| Attachment | Size |
|---|---|
| displace_atom.png | 248.85 KB |
Forums
Hi all,
I'd like to view particles displacement.
I used compute displace/atom but I think it does not calculate what I want.
As you can see in attached picture I have the distance of particles from Origin.
When I run simulation and I move my particles, I obtain the same pictures!
I want to calculate the displacement of particles from their initial position, not from Origin.
I tried also fix store_coord command but without result (the vector in 0).
Any help?
Thanks in advance
Andrea
compute displace/atom should
compute displace/atom should do what you want... btw. there is no picture attached?
Christoph
In reply to by anonymous_stub (not verified)
I attached the picture. This
I attached the picture.
This is the starting configuration (my domain is 2 m in X direction). The particles are not moving so I'd like to see all the particles of blue color. But I see the distance of particles from Origin.
Maybe am I missing something in dump custom command? I use the c_compute-ID[N].
Thanks
Andrea
In reply to by anonymous_stub (not verified)
I tried a different
I tried a different thing:
compute 4 all com
fix 4_store_coord all store/coord
Then in Paraview I calculate:
customvec-coords
And I obtain what I want
Can I jump this passage in Paraview and do it directly in liggghts?
Thanks
Andrea
In reply to by anonymous_stub (not verified)
Another strange thing: the
Another strange thing:
the method I showed above seems to work only if you run the movement of particles (in my case introducing a cad) with restart command.
If you run directly insertion of particles and move cad the customvec will be null!
I did not understand it yet
Andrea
In reply to by anonymous_stub (not verified)
I solved it (almost
I solved it (almost partially),
if you put the command "compute 4 all com" just before you need (in my case before moving the cad) it works even directly
Andrea
In reply to by anonymous_stub (not verified)
hm, that's a bit strange...
hm, that's a bit strange... could you maybe post the script that did not work?
Cheers,
Christoph
In reply to by anonymous_stub (not verified)
Hi Christoph, here my
Hi Christoph,
here my script:
# *** LIGGGHTS 1.2.8 ***
# *** General ***
atom_style granular
boundary m m m
newton off
communicate single vel yes
units si
processors 2 1 1
# *** Restart - read ***
#read_restart OK_restart.75000 # if used "create_box" is to be commented
# *** Box ***
variable mX equal -0.05
variable pX equal 0.05
variable mY equal -0.05
variable pY equal 0.05
variable mZ equal -0.4000
variable pZ equal 2.00
variable cZ equal 0.00
variable bZ equal 0.40
variable aZ equal 0.80
variable velZ equal -10.0
variable radius1 equal 0.0050
variable radius2 equal 0.0045
variable radius3 equal 0.0040
variable skin equal 0.0100
variable densityC equal 1.70e+3
variable densityB equal 1.45e+3
variable densityA equal 1.20e+3
neighbor ${skin} bin
neigh_modify delay 0
region reg block ${mX} ${pX} ${mY} ${pY} ${mZ} ${pZ} units box
create_box 1 reg
# *** Pair style ***
variable fr_a equal 1 # fr: friction, co: cohesion
variable co_a equal 1 # a: atoms, w: walls, c: cad
variable fr_w equal 1 # friction, 0: off, 1: tg, 2: roll, 3: tg+roll
variable co_w equal 1 # cohesion, 0: off, 1: on
variable fr_c equal 1
variable co_c equal 1
pair_style gran/hertz/history ${fr_a} ${co_a}
pair_coeff * *
# *** Material properties ***
fix m1 all property/global youngsModulus peratomtype 10e+9
fix m2 all property/global poissonsRatio peratomtype 0.35
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.01
fix m4 all property/global coefficientFriction peratomtypepair 1 0.3
fix m5 all property/global coefficientRollingFriction peratomtypepair 1 0.3
fix m6 all property/global characteristicVelocity scalar 2.
fix m7 all property/global cohesionEnergyDensity peratomtypepair 1 1.9e+8
fix m8 all property/global k_finnie peratomtypepair 1 1.0
# *** Box walls ***
fix boxwalls_x all wall/gran/hertz/history ${fr_w} ${co_w} xplane ${mX} ${pX} 1
fix boxwalls_y all wall/gran/hertz/history ${fr_w} ${co_w} yplane ${mY} ${pY} 1
fix boxwalls_z all wall/gran/hertz/history ${fr_w} ${co_w} zplane ${mZ} ${pZ} 1
# *** Gravity ***
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
# *** Time ***
timestep 1e-6
#fix ts all check/timestep/gran 1 0.1 0.1
variable runtime equal 1e+6
variable restarttime equal 25000
variable settime equal 1e+5
variable thermotime equal 1000
variable movecadvel equal -2.0
variable movecadtime equal 0.19*${runtime}
variable dumptime equal 5000
variable Nevery equal 1
variable Nrepeat equal 5000
variable Nfreq equal 5000
# *** Distribution for insertion ***
variable alpha equal 0.20
variable Nattemps equal 1000
fix ptsC1 all particletemplate/sphere 1 atom_type 1 density constant ${densityC} radius constant ${radius1}
fix ptsC2 all particletemplate/sphere 1 atom_type 1 density constant ${densityC} radius constant ${radius2}
fix ptsC3 all particletemplate/sphere 1 atom_type 1 density constant ${densityC} radius constant ${radius3}
fix pddC all particledistribution/discrete 1. 3 ptsC1 0.57 ptsC2 0.26 ptsC3 0.17
fix ptsB1 all particletemplate/sphere 1 atom_type 1 density constant ${densityB} radius constant ${radius1}
fix ptsB2 all particletemplate/sphere 1 atom_type 1 density constant ${densityB} radius constant ${radius2}
fix ptsB3 all particletemplate/sphere 1 atom_type 1 density constant ${densityB} radius constant ${radius3}
fix pddB all particledistribution/discrete 1. 3 ptsB1 0.57 ptsB2 0.26 ptsB3 0.17
fix ptsA1 all particletemplate/sphere 1 atom_type 1 density constant ${densityA} radius constant ${radius1}
fix ptsA2 all particletemplate/sphere 1 atom_type 1 density constant ${densityA} radius constant ${radius2}
fix ptsA3 all particletemplate/sphere 1 atom_type 1 density constant ${densityA} radius constant ${radius3}
fix pddA all particledistribution/discrete 1. 3 ptsA1 0.57 ptsA2 0.26 ptsA3 0.17
region bcC block ${mX} ${pX} ${mY} ${pY} ${mZ} ${cZ} units box
region bcB block ${mX} ${pX} ${mY} ${pY} ${cZ} ${bZ} units box
region bcA block ${mX} ${pX} ${mY} ${pY} ${bZ} ${aZ} units box
group nve_group region reg
fix 1 all nve/sphere
# *** Output ***
compute 1 all erotate/sphere
compute 2 all com # if used here, the custumvec in ParaView will be NULL
fix 2_store_coord all store/coord
thermo_style custom step atoms ke c_1 vol
thermo ${thermotime}
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
# *** Restart - write ***
restart ${restarttime} restart
# *** Run - 01 - Insert particles ***
fix insC nve_group pour/dev/packing 1 distributiontemplate pddC vol ${alpha} ${Nattemps} vel uniform 0 0 0 0 ${velZ} region bcC
fix insB nve_group pour/dev/packing 1 distributiontemplate pddB vol ${alpha} ${Nattemps} vel uniform 0 0 0 0 ${velZ} region bcB
fix insA nve_group pour/dev/packing 1 distributiontemplate pddA vol ${alpha} ${Nattemps} vel uniform 0 0 0 0 ${velZ} region bcA
run 1
unfix insC
unfix insB
unfix insA
run 175000
# *** Run - 02 - Insert cad ***
fix cad1 all mesh/gran/stressanalysis penetrometro_z80.stl 1 0.001 0. 0. 0. 0. 0. 0.
fix granwalls all wall/gran/hertz/history ${fr_c} ${co_c} mesh/gran 1 cad1
run 25000
# *** Run - 03 - Move cad ***
#compute 2 all com # if used here, it will work
#fix 2_store_coord all store/coord
dump dmp all custom ${dumptime} post/dump.penetrometroModel_3_move id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_2_store_coord[1] f_2_store_coord[2] f_2_store_coord[3]
dump dumpPenetrografo all mesh/gran/VTK ${dumptime} post/penetrometro_3_move*.vtk stress cad1
fix forceOnMesh all ave/time ${Nevery} ${Nrepeat} ${Nfreq} f_cad1[1] f_cad1[2] f_cad1[3] file forces.dat
fix movecad1 all move/mesh/gran linear 0.0 0.0 ${movecadvel} cad1 1
run ${movecadtime}
unfix movecad1
# *** End of file ***
Andrea
In reply to by anonymous_stub (not verified)
I don't see a compute
I don't see a compute displace/atom here...?
Christoph
In reply to by anonymous_stub (not verified)
This is my last script where
This is my last script where I calculate com and then by ParaView the displacement (com - coods)
Before that I used "compute 2 all displace/atom" instead of "com".
But I did not try to put it just before movecad command.
I will try
Andrea
In reply to by anonymous_stub (not verified)
no problem, if you could make
no problem, if you could make it work finally it's fine :-)
In reply to by anonymous_stub (not verified)
Ok I tried "displace/atom"
Ok I tried "displace/atom" just before move cad and now it works well (dumping cumpute and not fix_store_coord).
But why if I put it in my *** Output *** field in my script it doesn't work?
Thanks
Andrea
In reply to by anonymous_stub (not verified)
Compute displace/atom issues
Compute displace/atom issues a fix store/coord that stores the coords at the time the fix is issued. As there are no particles inserted at that time, it does not work
Christoph
In reply to by anonymous_stub (not verified)
Ok I
Ok I understood,
Thanks
Andrea