Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://www.sphinxsys.org/
Apache License 2.0
259 stars 199 forks source link

Using the function "getRotationFromPseudoNormalForFiniteDeformation" to deal with the large deformation problem #394

Closed rukawaaaaaaa closed 8 months ago

rukawaaaaaaa commented 9 months ago

Describe the bug When I use the function "getRotationFromPseudoNormalForSmallDeformation", the large deformation can not be simulate, e.g the results of the case 3d_arch will be like

image

I have a solution for the "getRotationFromPseudoNormalForSmallDeformation".

After we get the dpseudo_nd2t , transfer it to local current,

Matd current_transformation_matrix = getTransformationMatrix(pseudon[index_i]); Vecd local_dpseudo_n_d2t = current_transformation_matrix * dpseudo_nd2t[index_i];

and then use the function "getRotationFromPseudoNormalForSmallDeformation". We will get the dangular_veldt[index_i] in the local current configuration. The angularvel[indexi] and rotation[index_i] are in the local initial configuration. So when we update the angularvel[index_i], we need Matd current_transformation_matrix = getTransformationMatrix(pseudon[index_i]); angularvel[index_i] += ( transformationmatrix[index_i] (current_transformation_matrix.transpose() dangular_veldt[index_i])) * dt;

after that the old “getVectorChangeRateAfterThinStructureRotation" is not correct anymore, make the corresponding change.

In this way, the "getRotationFromPseudoNormalForSmallDeformation" can be used for the large deformation case. The results is shown here,

image. I put the results of "getRotationFromPseudoNormalForSmallDeformation" of this improved version and "getRotationFromPseudoNormalForFiniteDeformation" together here. image

There is no visible difference between two rotation function.

DongWuTUM commented 9 months ago

Thank you very much! This is important for us. Could you show details about how you modify the function “getVectorChangeRateAfterThinStructureRotation"?

Xiangyu-Hu commented 9 months ago

@rukawaaaaaaa could you also initialize a pull request for this new updating?

rukawaaaaaaa commented 9 months ago

Thank you very much! This is important for us. Could you show details about how you modify the function “getVectorChangeRateAfterThinStructureRotation"?

The “getVectorChangeRateAfterThinStructureRotation" now is only used for the rotation around two axis in the initial configuration. I modify the funciton the same as in the slender_structure_math.cpp.

rukawaaaaaaa commented 9 months ago

@rukawaaaaaaa could you also initialize a pull request for this new updating?

I'd love to do that.

DongWuTUM commented 9 months ago

Thank you very much! This is important for us. Could you show details about how you modify the function “getVectorChangeRateAfterThinStructureRotation"?

The “getVectorChangeRateAfterThinStructureRotation" now is only used for the rotation around two axis in the initial configuration. I modify the funciton the same as in the slender_structure_math.cpp.

Thank you! I will take time to think this through.

Xiangyu-Hu commented 9 months ago

@rukawaaaaaaa For the pull request, we expected that CI should be passed.

Xiangyu-Hu commented 8 months ago

close due to pull request #413.