What is the value range for "n_damp"

30 views
Skip to first unread message

Ruibo Yi

unread,
Jun 29, 2022, 11:09:11 AM6/29/22
to pysph-users
I'm creating a coupled fluid-solid simulation. In my application, dt=1e-6s, tf=10s.
The initial condition is hydrostatic pressure field. However, due to the use of WCSPHScheme, the fluid pressure requires the fluid to produce a certain compression deformation to reach equilibrium, which will lead to solid particles moving with the fluid.
How can I avoid this problem?
There is a parameter  "n_damp",  In docs( n_damp (int) – Number of timesteps for which the initial damping is required. This is used to improve stability for problems with strong discontinuity in initial condition. Setting it to zero will disable damping of the timesteps. )
When I set n_damp=10000, I noticed that the timing had changed.
I don't quite understand whether this is related to my question. Could anyone explain it?
If I need to set n_damp, what value is it?

mutaa...@gmail.com

unread,
Jul 1, 2022, 2:45:58 AM7/1/22
to pysph-users
Hi,

The n_damp parameter is being used here: https://github.com/pypr/pysph/blob/master/pysph/solver/solver.py#L669. It changes the dt to dt * 0.5 * (sin(pi*(-0.5 + count/n_damp)) + 1), where count is the current iteration count, for n_damp steps as long as count is less than n_damp. This is why you saw the change in the timestep in the log file. I am not sure about the applicability.

Cheers,
Abhinav

Ruibo Yi

unread,
Jul 7, 2022, 10:50:42 AM7/7/22
to pysph-users

Thank you for your explanation.

I mentioned the other major problem above (how to solve the pressure oscillation)?

Is there a more convenient solution?

Reply all
Reply to author
Forward
0 new messages