taichi-dev / taichi_elements

High-performance multi-material continuum physics engine in Taichi
MIT License
483 stars 69 forks source link

Scale of E (Young modulus), units of rho, size #61

Open r03ert0 opened 4 years ago

r03ert0 commented 4 years ago

Hello,

The mpm_solver.py code has independent parameters for scaling dt and E. Shouldn't there be only a scaling for dt, and the scaling of E be computed just from the change in units? Units of E are kg/(m*s^2), so if time units are t=s*scale, then Et = kg/(m*t^2) = (1/scale^2)*E, and E_scale = (1/scale^2). In the demo_3d_letters2.py, for example, dt_scale=0.5, but E_scale=8 instead of E_scale=(1/0.5^2)=4.

By the way, units are supposed to be MKS everywhere, yes? So density rho is 1000 kg/m^3, like water, and g=9.8 m/s^2 (which should be scaled if dt_scale!=1?). And the default size=1 means the simulation box has dimension 1m?

Thank you!