Cross section river profiles

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
thschrader
Posts: 1403
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Cross section river profiles

Postby thschrader » Mon Feb 12, 2018 5:41 am

kwahoo wrote:
Sun Feb 11, 2018 5:51 pm
Edit: changed gravity direction in case/constant/g and now results look correct.[/b]
Speaking about number of threads, I did simple benchmarks for the first second of simulation:
Files on SSD:
4 threads - 305 seconds
gravity:
sorry man, after writing the case in FC I have edit the g-dict to z-vector.... ;)
inlet-speed:
in my case a little bit to high, the water presses against the upper boundary.
305 sec:
pretty fast, I needed 4 hours on my high-end-laptop.
Can you run a dualsphysics case?
Download the program. Adjust the path to the exe-files in ...cpu.bat
The ..def.xml defines the calculation-parameters. dp is the "inter-particle-distance",
TimeMax/TimeOut is the calculation-time/timestep. After doing that, doubleclick on ...cpu.bat, job runs.
Dualsphysics generates vtk-files, which you can open in paraview. Rendering: there is an addon for blender (visualsphysics)
to import the vtk-files.
http://dual.sphysics.org/index.php/downloads/
http://visual.sphysics.org/
dualsphysics.JPG
dualsphysics.JPG (238.19 KiB) Viewed 551 times
inlet_speed.JPG
inlet_speed.JPG (15.09 KiB) Viewed 551 times
User avatar
kwahoo
Posts: 218
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Cross section river profiles

Postby kwahoo » Mon Feb 12, 2018 8:33 pm

The DualSPHysics example took 34 minutes using 16 threads (default settings, all threads load 90-95%).

phpBB [video]


Partial log:

Code: Select all

DualSPHysics4 v4.0.056 (18-05-2016)
====================================
Threads by host for parallel execution: 16

[Initialising JSphCpuSingle v0.70  12-02-2018 20:14:16]
**Basic case configuration is loaded
**Special case configuration is loaded
Loading initial state of particles...
Loaded particles: 171496
MapRealPos(border)=(0.000263878,0.000263878,0.000263878)-(1.59974,0.673236,0.452236)
MapRealPos(final)=(0.000263878,0.000263878,0.000263878)-(1.59974,0.673236,0.904208)
**Initial state of particles is loaded
**3D-Simulation parameters:
CaseName="CaseDambreak"
RunName="CaseDambreak"
PosDouble="1: Uses double and stores in single precision"
SvTimers=True
StepAlgorithm="Verlet"
VerletSteps=40
Kernel="Cubic"
Viscosity="Artificial"
Visco=0.100000
ViscoBoundFactor=1.000000
DeltaSph="None"
Shifting="None"
RigidAlgorithm="None"
FloatingCount=0
CaseNp=171496
CaseNbound=43186
CaseNfixed=43186
CaseNmoving=0
CaseNfloat=0
CaseNfluid=128310
PeriodicActive=0
Dx=0.0085
H=0.014722
CoefficientH=1
CteB=162005.140625
Gamma=7.000000
RhopZero=1000.000000
Cs0=33.6755
CFLnumber=0.200000
DtIni=0.000437186
DtMin=2.18593e-05
DtAllParticles=False
MassFluid=0.000614
MassBound=0.000614
CubicCte.a1=0.318310
CubicCte.aa=6775352.500000
CubicCte.a24=24937.416016
CubicCte.c1=-20326058.000000
CubicCte.c2=-5081514.500000
CubicCte.d1=15244543.000000
CubicCte.od_wdeltap=0.000018
TimeMax=1.5
TimePart=0.01
Gravity=(0.000000,0.000000,-9.810000)
NpMinimum=43186
RhopOut=True
RhopOutMin=700.000000
RhopOutMax=1300.000000
**Requested cpu memory for 171496 particles: 19.0 MB.
CellOrder="XYZ"
CellMode="2H"
Hdiv=1
MapCells=(55,23,31)
DomCells=(55,23,31)
DomCellCode="11_10_11"
**CellDiv: Requested cpu memory for 180070 particles: 5.5 MB.
**CellDiv: Requested cpu memory for 4992 cells (CellMode=2H): 0.1 MB.
RunMode="Pos-Double, HostName:adi-MS-7A34, OpenMP(Threads:16)"
Allocated memory in CPU: 25823692 (24.63 MB)
Part_0000        171496 particles successfully stored

[Initialising simulation (bfle646m)  12-02-2018 20:14:16]
PART       PartTime      TotalSteps    Steps    Time/Sec   Finish time        
=========  ============  ============  =======  =========  ===================
Part_0001      0.010000           115      115    1142.99  12-02-2018 20:42:50
thschrader
Posts: 1403
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Cross section river profiles

Postby thschrader » Mon Feb 12, 2018 8:57 pm

kwahoo wrote:
Mon Feb 12, 2018 8:33 pm
The DualSPHysics example took 34 minutes using 16 threads (default settings, all threads load 90-95%).
Hello kwahoo,
thanks for your work.
34 min with 170000 particles... not bad :)
I definitely need a faster machine. maybe next christmas?
User avatar
kwahoo
Posts: 218
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Cross section river profiles

Postby kwahoo » Mon Feb 12, 2018 10:38 pm

Additionally I ran the simulation on my notebook GPU (Geforce 645M, 545 GFLOPS SP). The simulation finished after 55 minutes, what makes GPU computing slightly less efficient (as mentioned before, my desktop CPU (about 400 GFLOPS SP) finished after 34 minutes.

Code: Select all

DualSPHysics4 v4.0.056 (18-05-2016)
====================================
[Select CUDA Device]
Device 0: "GeForce GT 645M"
  Compute capability:        3.0
  Multiprocessors:           2 (384 cores)
  Memory global:             1999 MB
  Clock rate:                0.78 GHz
  Run time limit on kernels: Yes
  ECC support enabled:       No

[GPU Hardware]
Device default: 0  "GeForce GT 645M"
Compute capability: 3.0
Memory global: 1999 MB
Memory shared: 49152 Bytes
As side note: running simulation on GPU makes a computer very "laggy", unusable for doing any other task the same time. When I use only CPU (all cores/threads) the computer still remain responsive.
thschrader
Posts: 1403
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Cross section river profiles

Postby thschrader » Mon Feb 12, 2018 10:49 pm

@kwahoo: what about 1 million particles ? 8-)
Should be the heaviest run ever performed in the forum.
vejmarie did a calculation with 6 M cells, but he crashed...
https://forum.freecadweb.org/viewtopic.php?t=15585
User avatar
kwahoo
Posts: 218
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Cross section river profiles

Postby kwahoo » Sun Feb 25, 2018 4:29 pm

thschrader wrote:
Mon Feb 12, 2018 10:49 pm
@kwahoo: what about 1 million particles ? 8-)
Estimated calculation time for 1 million particles is about 8 hours on mine cpu, but I lost interest of doing a test only on CPU. I have started pursuing GPU-support, but it seems I need some feedback from the developers to get code ported to ROCm/HIP.

IF I could get support for heterogeneous computing and unified memory, a simulation up to 20 millions particles would be possible, I think.
thschrader
Posts: 1403
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Cross section river profiles

Postby thschrader » Sun Feb 25, 2018 5:45 pm

kwahoo wrote:
Sun Feb 25, 2018 4:29 pm
IF I could get support for heterogeneous computing and unified memory, a simulation up to 20 millions particles would be possible, I think.
Wow, sounds promising! With 20 mio particles, we are near by university/industrial standard.
https://www.youtube.com/watch?v=GPZL84QrfBQ
I hope, the dualsphysics devs can solve your questions. It seems, they are very busy at the moment
to get the new release running...
Thanks for your effort in this topic.
regards Thomas