Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Nov 18, 2011 3:11 am 
Offline

Joined: Thu May 05, 2011 11:47 am
Posts: 61
Hi all,
I am currently trying to implement this paper titled Corotated SPH for deformable solids. Currently I am having problem understanding section 5.1. The authors extract the rotation matrix from the point neighborhood. Now in this calculation first the polar decomposition is discussed to extract R matrix similar to how meshless shapematching does. This requires calculating the COM(center of mass) of initial and deformed config. Pseudocode follows,

p_i = x_i - x_com
q_i =x0_i - x0_com
A = sum_i(m_i p_i q_i^T) sum_i(m_i q_i q_i^T) = A_(pq) A_(qq)

Since A_(qq) is symmetric it is ignored and A_(pq) is polar decomposed to get the symmetric part S=sqrt(A_(pq)^T A_(pq)) and rotational part R = A_(pq)S^(-1). All of this makes sense infact this is plane old meshless shape matching. This translates to this if i understood correctly,
Code:
//Calculate center of mass (COM)
glm::vec3 Xcom, X0com;   
for(int i=0;i<total_points;i++) {
   X0com += Xi[i];
   Xcom  += X[i];
}
Xcom = Xcom/float(total_points);
X0com = X0com/float(total_points);

A = glm::mat3(0);
for(int i=0;i<total_points;i++) {
   glm::vec3 pi = X[i]-Xcom;
   glm::vec3 qi = Xi[i]-X0com;
   A += M[i]* glm::outerProduct(pi, qi);
}
Apq[i] =A;


Now the interesting bit comes in the second paragraph section 5.1 where they compute individual orientation Ri for each particle using the SPH formulation as follows,
A_(pq)_i = sum_j {m_j W(x0_(ij),h) ((x_j-x_i)(x0_j-x0_i)^T)}
This translates to the following code
Code:
glm::mat3 A = glm::mat3(0);          
vector<neighbor>& pNeighbor = neighbors[index];
for(size_t i=0;i<pNeighbor.size();i++)
{                              
   A += M[i]*pNeighbor[i].w * glm::outerProduct(pNeighbor[i].rdist, pNeighbor[i].rdist);
}
Apq[index] = A;   

Now the values of Apq are completely different by both methods. Would they be so?
Anyone who has any idea what may be the reason for this. Perhaps I am doing something wrong.
I am free for a discussion on this. Any ideas?

Regards,
Mobeen


Top
 Profile  
 
PostPosted: Fri Nov 18, 2011 7:07 am 
Offline

Joined: Thu May 05, 2011 11:47 am
Posts: 61
OK another thing I like to discuss. In the paper it seems that the authors exmphasize the requirement of calc. inverse in moving least square's formulation as problematic ( while this is generally true; inverses are always bad) but their formulation also requires two inverses one for the symmetric matrix S in Eq. 13 and one for the deformation calc. u_ji in Eq. 15 which clearly contradicts to what they are emphasizing in the paper?


Top
 Profile  
 
PostPosted: Sat Nov 19, 2011 10:01 am 
Offline

Joined: Thu May 05, 2011 11:47 am
Posts: 61
OK guys,
I think I have some progress. I have managed to get it working for a basic SPH using their formulation. The problem was the kernel function which the authors have not given in the paper. I think they are borrowing from the paper SSP07 (A Unified Particle Model for Fluid-Solid Interactions by B. Solenthaler, J. Schläfli and R. Pajarola) which defines the kernel function as,
Image
Changing the default kernel to the above kernel stabilizes the soft body deformation and now I can see the bar deforming nicely. See the snapshot.
Image
Now i need to sort out the corotation stuff and it should be easy.

OK I have done it.


Top
 Profile  
 
PostPosted: Mon Mar 18, 2013 12:39 pm 
Offline

Joined: Mon Mar 18, 2013 12:23 pm
Posts: 1
Hey, mobeen

I'm also implementing this paper but i'm having some problems. My simulation scenario is a falling cuboid, but every time when the cuboid contacts with ground, it gradually explodes.I checked up my program detailedly and found no errors with it. Did you experience the same situation when you were implementing this paper? p.s. I'm using the kernel function from the paper SSP07.

Cheers


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group