yuanming-hu / taichi_mpm

High-performance moving least squares material point method (MLS-MPM) solver. (ACM Transactions on Graphics, SIGGRAPH 2018)
MIT License
2.33k stars 317 forks source link

Engineering-related usage of taichi_mpm #29

Open alda30 opened 4 years ago

alda30 commented 4 years ago

Hi, I am an engineering student and I would like to use Taichi_mpm for engineering simulations. I have 2 questions: 1- Is there any possibility to get the outputs in VTK format or CSV format? I would like to visualise the output in Paraview. Alternatively, I can do it in Houdini, but, what parameters can be visualized in Houdini? Can I get stresses or velocities of particles in Houdini? If yes, maybe it is easier to go for Houdini. What do you think?

2- Can you provide a brief explanation of what are the Linear, Sand, Elastic and Von-misses Particle Attributes? Here I would like to relate each parameter to the engineering definitions to allow a correct simulation.

Regards, Al

alda30 commented 4 years ago

I found the answer by reading the code and learning a bit of houdini

alda30 commented 4 years ago

The only thing that I have not yet found is how to export stress(es) and strains of the particles in Houdini.

Is there any hint?

haeriamin commented 4 years ago

Hi @alda30 ,

You can compute stress tensor and its invariants in the particles.cpp, for example, as follows:

Matrix cS = -this->vol (u center transpose(v)) transpose(dg); this->sm = (cS[1][1] + cS[2][2] + cS[3][3]) / 3.0f;

Then, you can export these variables to a text file (or whatever) in visualize.cpp, and use the data to visualize them in Matlab, Python, etc.

Note: You need to add some lines of code in the related header files, too.