Hi all, I am having problems with ram usage.
I am running a simulation with particles of two sizes, 150000 particles of 1mm and 150000 particles of 1.8mm. The CFD mesh has arround 90.000 elements.
The problem is that the simulation uses a lot of memory, ~110GB when the total number of particles is inside the domain. I guess that I am having problems with my neighbor list.
First I set the skin to be equal to 1 particle (first the smallest and then the biggest) and the simulation started using swap (0ver 128 GB).
I checked on the tutorials if there is an apparent criteria to set the skin size when particles of two sizes are inserted and I saw that it is a fraction of the biggest particle diameter. So I reduced the skin size to 0.000042.
The neighbor list is built every timestep with no delay and I am using "map array" instead of "map hash" becasuse the simulation is rather small (300000 particles).
...
atom_modify map array sort 0 0
....
neighbor 0.00042 bin
neigh_modify delay 0
Below is the complete liggghts script.
Any suggestion? I've read the doc and I cannot see the problem. Thanks for your help!
Rregards,
Mauro
------------------------------------------------
echo both
log ../DEM/log.liggghts
#thermo_log ../DEM/post/thermo.txt
### Initialization
atom_style granular
#atom_modify map hash ## Scales with nAtoms/processor
atom_modify map array sort 0 0 ## Fastest but a processor can run out of memory in VERY large simulation
communicate single vel yes
boundary f f f
newton off
units si
variable stepSize equal 0.000005
variable np1 equal 150000 # Number of P1
variable p1t equal 4.5 # P1 time
variable np2 equal 150000 # Number of P2
variable p2t equal 4.5 # P2 time
variable vx0 equal 0.5 # initial velocity
variable np1pp equal 0.25*${np1}
variable np2pp equal 0.25*${np2}
variable p1rate equal ${np1pp}/${p1t}
variable p2rate equal ${np2pp}/${p2t}
variable stp1 equal ${p2t}/${stepSize}
#processors 4 3 1
region reg block 0.0 1.6 0 0.8 0.0 0.005 units box
create_box 2 reg
neighbor 0.00042 bin
neigh_modify delay 0
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 2 0.3 0.3 0.3 0.3 #Paramter's matrix
fix m4 all property/global coefficientFriction peratomtypepair 2 0.5 0.5 0.5 0.5
# Physics,pair style
pair_style gran model hertz tangential history # hertz without cohesion
pair_coeff * *
# timestep, gravity
timestep ${stepSize}
fix gravi all gravity 9.81 vector 0.0 -1.0 0.0
# Geometry, walls
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane 0.0
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 1.6
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.0
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.8
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.005
fix p1 all particletemplate/sphere 1 atom_type 1 density constant 2700 radius constant 0.0005
fix pd1 all particledistribution/discrete 34231 1 p1 1.0 #100% of P1#
fix p2 all particletemplate/sphere 2 atom_type 2 density constant 3260 radius constant 0.0009
fix pd2 all particledistribution/discrete 34233 1 p2 1.0 #100% of P2#
region middle_1 block 0.0 0.01 0.287 0.292 0.0 0.005 units box
region middle_2 block 0.0 0.01 0.36 0.365 0.0 0.005 units box
region middle_3 block 0.0 0.01 0.433 0.438 0.0 0.005 units box
region middle_4 block 0.0 0.01 0.506 0.511 0.0 0.005 units box
# p1 middle #
fix ins all insert/rate/region seed 54325 distributiontemplate pd1 nparticles ${np1pp} particlerate ${p1rate} start ${stp1} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_1 ntry_mc 10000
fix ins2 all insert/rate/region seed 54325 distributiontemplate pd1 nparticles ${np1pp} particlerate ${p1rate} start ${stp1} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_2 ntry_mc 10000
fix ins3 all insert/rate/region seed 54325 distributiontemplate pd1 nparticles ${np1pp} particlerate ${p1rate} start ${stp1} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_3 ntry_mc 10000
fix ins4 all insert/rate/region seed 54325 distributiontemplate pd1 nparticles ${np1pp} particlerate ${p1rate} start ${stp1} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_4 ntry_mc 10000
## p2 middle #
fix ins5 all insert/rate/region seed 54325 distributiontemplate pd2 nparticles ${np2pp} particlerate ${p2rate} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_1 ntry_mc 10000
fix ins6 all insert/rate/region seed 54325 distributiontemplate pd2 nparticles ${np2pp} particlerate ${p2rate} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_2 ntry_mc 10000
fix ins7 all insert/rate/region seed 54325 distributiontemplate pd2 nparticles ${np2pp} particlerate ${p2rate} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_3 ntry_mc 10000
fix ins8 all insert/rate/region seed 54325 distributiontemplate pd2 nparticles ${np2pp} particlerate ${p2rate} insert_every 10 overlapcheck yes vel constant ${vx0} 0.0 0.0 region middle_4 ntry_mc 10000
# cfd coupling
fix cfd all couple/cfd couple_every 50 mpi
fix cfd2 all couple/cfd/force
# apply nve integration to all particles that are inserted as single particles
#fix integr all nve/sphere
fix integrate all nve/sphere
#check timestep
fix ts_check all check/timestep/gran 1000 0.1 0.1
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 0
dump dmp all custom 2000 ../DEM/post/dump*.liggghts_run id type x y z ix iy iz vx vy vz radius
run 0 upto
Attachment | Size |
---|---|
![]() | 179.08 KB |
![]() | 218.65 KB |
mbaldini | Tue, 05/09/2017 - 14:16
Hi all, I tried with
Hi all, I tried with different values for the skin and the RAM requirement it's roughly the same. Does anybody has an idea of why my simulations demand that much memory? I don't think that is the case, but do I need to use "map hash" instead of "map array"? Thanks
Regards,
Mauro
mbaldini | Tue, 05/16/2017 - 00:18
Hi all, I am still struggling
Hi all, I am still struggling with this memory issue.
Apart from the skin size, particle number and mesh size what other parameter could affect memory consumption? As far as I am concerned those are the only ones, but maybe I am missing something. Thanks for your help!
Regards,
Mauro
j-kerbl | Tue, 05/16/2017 - 14:03
Hi Mauro,
Hi Mauro,
have you tried increasing the LIGGGHTS bin-size? This is typically the parameter to go with these kind of issues with large domains (1.6m)
e.g.
neigh_modify binsize 0.1
Please give it a try and tell me your experiences.
Cheers,
Josef
mbaldini | Thu, 06/01/2017 - 19:24
Hi Josef I followed your
Hi Josef I followed your suggestion and until now I have no problems (the simulation didn't finish yet). Thanks for your help!
Regards,
Mauro