Interesting project: DesignSPHysics fluid simulator

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

thschrader
Posts: 1393
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Postby thschrader » Fri Dec 29, 2017 1:50 pm

Did some playing with dualphysics:
The collapsing water-column is kicking the cube out of his place.
I can only see the moving cube in paraview when loading the point-cloud.
Dualphysics generates vtk-files, which can be loaded as a FEM-mesh in FC.
Is there a method/macro to automatically activate/deactivate the loaded vtks
step by step to see a nice fluid-animation like in paraview?
Runtime simulation 50 min with 81000 points, not bad.
paraview.JPG
paraview.JPG (73.64 KiB) Viewed 1328 times
freecad.JPG
freecad.JPG (89.26 KiB) Viewed 1328 times
thschrader
Posts: 1393
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Postby thschrader » Fri Dec 29, 2017 5:24 pm

Strange results with SPH-method:
The particles passing the stl-boundary and later hovering above the boundary.
Same does the Isosurface-Mesh in FC. Mmmh... :o
1 thousand questions...
strange001.JPG
strange001.JPG (111.46 KiB) Viewed 1307 times
strange002.JPG
strange002.JPG (45.46 KiB) Viewed 1307 times
thschrader
Posts: 1393
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Postby thschrader » Sun Dec 31, 2017 11:58 am

Hello Alex,
welcome to the Freecad forum. Thanks for the info,
I will have a look at the papers. Have a happy new year!
Cheers Thomas
cheers.JPG
cheers.JPG (37.42 KiB) Viewed 1260 times
User avatar
Kunda1
Posts: 4090
Joined: Thu Jan 05, 2017 9:03 pm

Re: Interesting project: DesignSPHysics fluid simulator

Postby Kunda1 » Sun Dec 31, 2017 1:57 pm

thschrader wrote:
Sun Dec 31, 2017 11:58 am
cheers.JPG
What would be more awesome than this post is actually seeing the movement of the wine in the glass! +1!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
thschrader
Posts: 1393
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Postby thschrader » Mon Jan 01, 2018 6:36 pm

The user "Gift" (this german word means "poison" :) ) has written
a makro to make the meshes moving. workflow:
1. Import the vtk-files with "FEM results"-filter
2. Hide all objects
3. Create group an put results in group
4. click on group in tree an run macro
Macro / complete simulation available here (download macro of Gifts second post,
simulation/FC-file on dropbox-links)
https://forum.freecadweb.org/viewtopic.php?f=13&t=26107
red_wine.gif
red_wine.gif (600.76 KiB) Viewed 1194 times
User avatar
bernd
Posts: 7535
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Interesting project: DesignSPHysics fluid simulator

Postby bernd » Mon Jan 01, 2018 8:16 pm

:shock: :shock: :shock: :D :D :D
User avatar
Kunda1
Posts: 4090
Joined: Thu Jan 05, 2017 9:03 pm

Re: Interesting project: DesignSPHysics fluid simulator

Postby Kunda1 » Mon Jan 01, 2018 10:39 pm

thschrader wrote:
Mon Jan 01, 2018 6:36 pm
red_wine.gif
This.Is.Awesome!
Happy New Year!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bernd
Posts: 7535
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Interesting project: DesignSPHysics fluid simulator

Postby bernd » Tue Jan 02, 2018 8:47 am

would it be different for white wine ? Has white wine different physical characteristics in this regard?
thschrader
Posts: 1393
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Postby thschrader » Tue Jan 02, 2018 10:20 am

bernd wrote:
Tue Jan 02, 2018 8:47 am
would it be different for white wine ? Has white wine different physical characteristics in this regard?
Hi Bernd,
the physical characteristics of wine (white/red) are the same like water, which I used
in the simulation. The current dualsphysics version supports only one-phase simulations.
That means the wine-drop is falling in vacuum and does not deform when accelerating.
The new version announced for january should support multiphase simulations (beer with foam!).
http://dual.sphysics.org/index.php/foru ... se-of-v4-2
Some hints about the simulation:
The red box is the simulation domain where the point-cloud is generated (pointmin/max in xml-input-deck).
You can adress the bodies with different options (fluid, boundary, moving, floating...).
When pressing the "save-case" button, the dualsphysics-macro generates the necessary files,
doubleclick on run.bat starts the simulation. It is the same process like using the cfd-wb with openfoam.
When finishing the calculation, the vtk-files with the point-information are writen. Pressing the Isosurface-button
generates the files which are loaded as FEM-mesh in FC.
There are tons of parameters you can play with. In this simulation I used 56000 particles (which is not much),
runtime 90 min for 2 sec. For a really high-fidelity approach you need millions of particles.
https://www.youtube.com/watch?v=rHq6rcdqHzM
case.JPG
case.JPG (231.25 KiB) Viewed 1074 times
caseInputDeckXML.JPG
caseInputDeckXML.JPG (286.45 KiB) Viewed 1074 times