-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time step is too strict in mpm88.py #8345
Comments
Was able to reproduce locally with taichi-nightly. Seems that whenever Let me investigate that further. |
@jim19930609 Discovering a new problem in mpm88, probably I should open a new issue, but I will post it here though. According to slides of GAMES201 Lec08, constitutive model of water in mpm88 is defined as (page 17) The internal force on the node is given by (page 11) The cauchy stress So the force can be written as In mpm88, the force momentum is given in the following code stress = -dt * 4 * E * p_vol * (J[p] - 1) / dx**2
affine = ti.Matrix([[stress, 0], [0, stress]]) + p_mass * C[p] The proper form should consist of a extra J term due to conversion from P to sigma stress = -dt * 4 * E * J[p] * p_vol * (J[p] - 1) / dx**2
affine = ti.Matrix([[stress, 0], [0, stress]]) + p_mass * C[p] |
Hello, I am trying to do a simulation (SPH), but when I use a dt varibele (courant condition) I get that there is an error when accessing the memory, it only happens when I put the dt variable, thare is a bug with taichi ? |
Describe the bug
Fine tuning the time step can cause program errors in mpm88.py
To Reproduce
Change code in mpm88.py:L9 from
dt = 2e-4
todt = 2.8e-4
will raise memory access errors.Log/Screenshots
Additional comments
Perhaps the error is raised by illegal array indexing in both G2P and P2G part, since none boundary constraints is applied on particles and grids. To be specific:
will throw out error when indexing
base + offset
is out of range. This is caused by particles that have wrongly moved inside the boundary predefined in L15bound=3
. Simply clamping particle position can get rid of illegal memory access, but still result in exploded simulation results due to negative J[p].The text was updated successfully, but these errors were encountered: