Missing wall boundary condition WCSPH/Scheme recommendation

93 views
Skip to first unread message

Robin Schmitt

unread,
Feb 15, 2022, 6:07:26 AM2/15/22
to pysph-users
Hello,
I am relatively new to the topic of SPH. 

My goal is to simulate a fluid flow containing Rigid Bodies flowing through a closed structure using an Inlet and Outlet.
Since all codes in the libary on the subject of rigid bodies  are using WCSPH, I have tried implementing using WCSPH, but failed because of missing boundary conditions.
Fluid particle kept sliding through the wall. (due to pressure?)
I have attached the code. Failed attempts to add missing wall boundary conditions are commented out.  

Does anyone know how to fix this problem or can recommend an other Scheme for my topic? (also tried SISPH, but haven´t yet got it running)

Every advice or idea would be highly appreciated.

Thanks in advance
Robin

multiple_rigid_bodies_WCSPH.py

A Dinesh

unread,
Feb 16, 2022, 10:28:43 AM2/16/22
to Robin Schmitt, pysph-users
Hi Robin,

I developed rigid fluid coupling in PySPH. I just tried to run the code (made some changes to make it run in python 3.6), one issue is, the timestep is 9*1e-8 and you are running it for 3 sec!!
Something looks wrong, can you answer this question, until I can get back to it?
Message has been deleted

Robin Schmitt

unread,
Feb 16, 2022, 12:30:10 PM2/16/22
to pysph-users
Hey Apedu,

thanks a lot for your reply. 

the small timestep arises from the viscous diffusion criteria, which I might calculated wrong when I compare the value to other examples.

This is the formula for the viscous diffusion criteria from the code:
dt_viscous = 0.125 * self.reference_smoothing_length**2 / self.kinematic_viscosities[max_viscous_fluid]

You can manually choose the timestep in line 545.
after choosing different timesteps(5*1e-5 and 4*1e-5) as examples, I had same problems with particles penetrating the wall.

Regards
Robin

A Dinesh

unread,
Feb 16, 2022, 12:57:28 PM2/16/22
to Robin Schmitt, pysph-users
Okay, great. I just reran it and I got segfault.

One way to debug this is, to remove the inlet and outlet, you can create a simple tank, and let your rigid body float/sink in the water.

https://github.com/pypr/pysph/blob/master/pysph/examples/rigid_body/sphere_in_vessel_akinci.py

You can replace the sphere with the body you are creating (create_particle_array). You can get back, after running this example.
Please remember to set the density of the sphere/rigid body to the correct value.

If this works then adding inlet outlet and other things should not affect the rigid fluid coupling part.

Also, I am working on a better version of RFC, which should be up within a couple of months.

--
You received this message because you are subscribed to the Google Groups "pysph-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pysph-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pysph-users/35097fbc-3784-4037-9ef1-5dbbfac663f9n%40googlegroups.com.
Message has been deleted

Robin Schmitt

unread,
Feb 16, 2022, 2:15:25 PM2/16/22
to pysph-users
Thanks again!

Sorry if I am missunderstanding, but I don`t know what Segfault means (new to programming :D)
Not sure if I made it clear but the rigid/fluid coupling works fine as far as I can see in the results.

I will attach a Screenshot.  The problem is the wall of the structure especially on the inlet side, where a lot of fluid particle cross


Robin Schmitt

unread,
Feb 17, 2022, 4:08:40 AM2/17/22
to pysph-users
fluid_particle_penetrating_wall.PNG

A Dinesh

unread,
Feb 17, 2022, 5:06:19 AM2/17/22
to Robin Schmitt, pysph-users
So this looks like a problem in your implementation if inlet and outlet. Were you able to implement inlet outlet with out the rigid bodies?

On 17-Feb-2022, at 2:38 PM, 'Robin Schmitt' via pysph-users <pysph...@googlegroups.com> wrote:


To view this discussion on the web visit https://groups.google.com/d/msgid/pysph-users/917eb895-286a-43f2-8818-a9411f1ff744n%40googlegroups.com.
<fluid_particle_penetrating_wall.PNG>

Robin Schmitt

unread,
Feb 17, 2022, 5:19:31 AM2/17/22
to pysph-users
yeah made a simulation with only fluid in tvf scheme and it worked fine. Therefor I thought I am missing a wall boundary equation at my WCSPH scheme (including rigid bodies).

A Dinesh

unread,
Feb 17, 2022, 8:02:38 AM2/17/22
to Robin Schmitt, pysph-users
I had a quick look at one of the schemes which has Inlet outlet, "EDACScheme", used by "flow over 2d cylinder". I will try to modify it and share it with you.With fewer modifications you can adapt it to other schemes.


Robin Schmitt

unread,
Feb 17, 2022, 8:15:31 AM2/17/22
to pysph-users
That would be awesome.
Thanks a lot!

Robin Schmitt

unread,
Feb 21, 2022, 6:02:05 AM2/21/22
to pysph-users
Hey Apedu,
I have also looked into the EDAC scheme used at "flow past 2d cylinder". How can I implement rigid-fluid coupling there? Can I use Akinci-rigid fluid coupling which I used at WCSPH scheme?

Thank you
Reply all
Reply to author
Forward
0 new messages