# Physics Simulation Forum

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Corotated SPH for deformable solidsPosted: Fri Nov 18, 2011 3:11 am

Joined: Thu May 05, 2011 11:47 am
Posts: 62
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

 Post subject: Re: Corotated SPH for deformable solidsPosted: Fri Nov 18, 2011 7:07 am

Joined: Thu May 05, 2011 11:47 am
Posts: 62
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

 Post subject: Re: Corotated SPH for deformable solidsPosted: Sat Nov 19, 2011 10:01 am

Joined: Thu May 05, 2011 11:47 am
Posts: 62
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,

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.

Now i need to sort out the corotation stuff and it should be easy.

OK I have done it.

Top

 Post subject: Re: Corotated SPH for deformable solidsPosted: Mon Mar 18, 2013 12:39 pm

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

#### Who is online

Users browsing this forum: No registered users and 3 guests

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities