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

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Interesting project: DesignSPHysics fluid simulator

Post by bernd »

wow ... would it be possible to extract the stress on the sourroundings with all this wave simulations? This is what would be interesting for an structural enginneer.

Ahh, are there people doing avalange models with this solver too? Would be even more interesting for me, because in Switzerland we only have ozean waves if Germany is flooded (land unter). I don't belive this will happen ... But we do have averlanges quit a lot after heavy snow falls.

bernd
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Post by thschrader »

@Bernd:
The dualsphpysics-solver does not compute stresses like FEM.
The Isosurface-tool is for better visualisation only.
You can simulate avalanches with SPH-Method (lets try it).
https://www.youtube.com/watch?v=13Osz4vWeQ4
particleVTK.JPG
particleVTK.JPG (19.82 KiB) Viewed 4919 times
Isosurface.JPG
Isosurface.JPG (32.04 KiB) Viewed 4919 times
hooge_island_stormflood.JPG
hooge_island_stormflood.JPG (20.46 KiB) Viewed 4919 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Interesting project: DesignSPHysics fluid simulator

Post by bernd »

cool, btw the guy from the avalange video works in zürich too, like me. But he is on ETH.
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: Interesting project: DesignSPHysics fluid simulator

Post by fosselius »

Sorry for hijacking the thread but I felt I had to share this:
phpBB [video]
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Post by thschrader »

@fosselius: thanks for the video, cool stuff! (I will try to simulate how to put ketchup on a hot-dog...)
Played with the dualsphysics-wb, 10 cm icecube falling into water
(I used a low number of points, that is the reason why it seems that the cube "hovers" above the fluid)
There are several (minor) bugs in the dualsphysics-gui. However, it works.
There is an addon for Blender to import the generated vtk-files.
http://visual.sphysics.org/
http://visual.sphysics.org/wiki/doku.php
So: in general, it should be possible (extreme fine point cloud, enough computing power)
to generate cool visualizations like this:
https://www.youtube.com/watch?v=pnLTWUk6wPc
BTW: what you see in YT-example is a modified testcase from the dualsphysics example files....
blender.gif
blender.gif (730.95 KiB) Viewed 4763 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Post by thschrader »

I try to run a very simple simulation (falling water cube) to play with the
viscosity parameter. But i cant get it running. The simulation always breaks with
"particle outside domain" error (the computation domain is the red frame, the box is closed!)
ZIP contains Freecad-input dualsphysics macro files, run.bat, case.xml
Help welcome, Thomas
cannonball.zip
(15.24 KiB) Downloaded 131 times
I am am running on
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13042 (Git)
Build type: Release
Branch: master
Hash: 9a215440b8a0140dbc2e8778e66cf63feeac7114
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
falling_water_cube.JPG
falling_water_cube.JPG (157.67 KiB) Viewed 4734 times
boundary_error.JPG
boundary_error.JPG (78.89 KiB) Viewed 4734 times
boundary_error2.JPG
boundary_error2.JPG (43.34 KiB) Viewed 4734 times
User avatar
ndrs
Posts: 6
Joined: Thu Jan 18, 2018 11:14 am
Contact:

Re: Interesting project: DesignSPHysics fluid simulator

Post by ndrs »

Hi there! This is my first post in this thread. The user luzpaz notified me in an issue, I didn't even know this was here! :)

So I'm seeing you are testing a lot of interesting things, I hope to solve your doubts and I'll check and write regularly over here.
thschrader wrote: Sun Jan 28, 2018 4:44 pm I try to run a very simple simulation (falling water cube) to play with ...
So starting over here: I've checked your simulation and the problem is that you have set the walls as floating boundaries. Floating boundaries move in the simulation, obeying gravity and floating calculations. The problem is caused because the boundary just falls down into the void, crossing the Case Limits. That's why the error says Some floating particle was found outside the domain.

If you really want the box to move and float, just put it inside another box or something like that... haha. There is probably a better solution but I'm not really a dualsphysics user (in fact I don't know anything about the code and physics involved). I'll try to resolve doubts and take suggestions on the GUI matter.
DesignSPHysics developer and DualSPHysics mantainer.

DesignSPHysics Repo
DualSPHysics Repo
DualSPHysics Reference
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Post by thschrader »

ndrs wrote: Mon Jan 29, 2018 9:39 am So starting over here: I've checked your simulation and the problem is that you have set the walls as floating boundaries.
Aaaah...I havent checked that... :oops: :oops: :oops:
ndrs,
welcome to the Freecad-Forum :)
I_fuxxxd_up.JPG
I_fuxxxd_up.JPG (62.3 KiB) Viewed 4686 times
Steban
Posts: 12
Joined: Sat Sep 01, 2018 4:13 am

Re: Interesting project: DesignSPHysics fluid simulator

Post by Steban »

HII! i´m new here, please i need help...
Basically i dont can run my simulation... when i click on Run (CPU option) Error window say


====
LoadDsphConfig> .../dualsphysics/bin/DsphConfig.xml
Threads by host for parallel execution: 8

[Initialising JSphCpuSingle 08-09-2018 10:06:17]
ProgramFile=".../dualsphysics/bin/DualSPHysics4.2_win64.exe"
ExecutionDir=".../FreeCAD/Mod/DesignSPHysics"
XmlFile=".../Ejercicio 3 Flujo dinamico-prueba1/Ejercicio 3 Flujo dinamico-prueba1_out/Ejercicio 3 Flujo dinamico-prueba1.xml"
OutputDir=".../Ejercicio 3 Flujo dinamico-prueba1/Ejercicio 3 Flujo dinamico-prueba1/Ejercicio 3 Flujo dinamico-prueba1_out"
OutputDataDir=".../Ejercicio 3 Flujo dinamico-prueba1/Ejercicio 3 Flujo dinamico-prueba1/Ejercicio 3 Flujo dinamico-prueba1_out"
**Basic case configuration is loaded
**Special case configuration is loaded
Loading initial state of particles...
Loaded particles: 1980
MapRealPos(border)=(-0.00216506,-0.00216506,-0.00216506)-(0.977165,0.477165,0.502165)
MapRealPos(final)=(-0.00216506,-0.00216506,-0.00216506)-(0.977165,0.477165,1.0065)
**Initial state of particles is loaded
**3D-Simulation parameters:
CaseName="Ejercicio 3 Flujo dinamico-prueba1"
RunName="Ejercicio 3 Flujo dinamico-prueba1"
PosDouble="0: Uses and stores in single precision"
SvTimers=True
StepAlgorithm="Verlet"
VerletSteps=40
Kernel="Wendland"
Viscosity="Artificial"
Visco=0.010000
ViscoBoundFactor=1.000000
DeltaSph="None"
Shifting="None"
RigidAlgorithm="None"
FloatingCount=0
CaseNp=1980
CaseNbound=1980
CaseNfixed=1980
CaseNmoving=0
CaseNfloat=0
CaseNfluid=0
PeriodicActive="None"
Dx=0.025
H=0.043301
CoefficientH=1
CteB=0.000000
Gamma=7.000000
RhopZero=1000.000000
Cs0=0
CFLnumber=0.200000
DtIni=inf
DtMin=inf
DtAllParticles=False
MassFluid=0.015625
MassBound=0.015625
Awen (Wendland)=5145.715332
Bwen (Wendland)=-594178.875000
TimeMax=2
TimePart=0.01
Gravity=(0.000000,0.000000,-9.810000)
NpMinimum=1980
RhopOut=True
RhopOutMin=700.000000
RhopOutMax=1300.000000

*** Exception (JSphCpuSingle::VisuConfig)
Text: Constant 'b' cannot be zero.
'b' is zero when fluid height is zero (or fluid particles were not created)
____________________________________________________________________________
when i click on Run (GPU option) Error window say


====
LoadDsphConfig> .../dualsphysics/bin/DsphConfig.xml
[Select CUDA Device]

*** Exception: Failed getting devices info. (CUDA error at ..\source\FunctionsCuda.cpp:132 code=35(CUDA driver version is insufficient for CUDA runtime version)).

____________________________________________________________________________
thanks for your time and help.
____________________________________________________________________________

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13528 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Attachments
Error window
Error window
error por B constant.jpg (347.48 KiB) Viewed 4291 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Interesting project: DesignSPHysics fluid simulator

Post by thschrader »

Hi Steban,
I used dualsphysics only a few times and just for fun (month ago)
https://forum.freecadweb.org/viewtopic.php?t=26675
For me, openfoam is the better way. You should post a help request in the
dualsphysics forum with a link to this thread.
http://dual.sphysics.org/vanilla/
Another problem is: for running a cool simulation like this
https://www.youtube.com/watch?v=pnLTWUk6wPc
you need a very fast machine with gpu computing. Which i dont have.
And you must know how to use blender for rendering.
regards Thomas
Post Reply