How to manage Stress/Force using Fix deform

furkhat's picture
Submitted by furkhat on Thu, 03/28/2019 - 13:21

Dear community!

I'm trying to conduct first part the Triaxial test -confining. So , For this I used Fix deform command to compress sample. I used Deform because walls should be periodic. And now I don't know how to manage compression to achieve constant Normal force or stress.

Does anybody know what kind command should I use ?

furkhat's picture

furkhat | Tue, 04/09/2019 - 11:59

Thanks a lot for good idea! During the Last week I tried to use:
deform fix comp all deform 1 z variable v_lengthTime v_rateTime remap x units box
but get ERROR:
Per-atom virial was not tallied on needed timestep
Could you help me to understand what is wrong with script?See code below...

#Contact model example

atom_style granular
atom_modify map array
boundary p p p
newton off

communicate single vel yes

variable PressureMax equal 300000
variable TimestepMax equal 2000000
variable LengthMax equal 0.005

units si
#processors 4 4 3
region reg block -0.005 0.005 -0.005 0.005 -0.007 0.007 units box
create_box 1 reg

neighbor 0.00071 bin
neigh_modify delay 0

#Material properties required for new pair styles

fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.8
fix m4 all property/global coefficientFriction peratomtypepair 1 0.05
fix m5 all property/global characteristicVelocity scalar 2.
fix m6 all property/global cohesionEnergy peratomtypepair 1 1e-12

#New pair style
pair_style gran model jkr tangential history #cement off
pair_coeff * *

timestep 0.0000001

#fix gravi all gravity 9.81 vector 0.0 0.0 -1.0

#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.15
#fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.05 0. 0.

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 0.005
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.005
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.007

#region for insertion
region bc block 0.0 0.005 0.0 0.005 0.0 0.007 units box
group nve_group region reg

#particle distributions

#particle distributions
fix pts1 all particletemplate/sphere 15485863 atom_type 1 density constant 2500 radius constant 0.00125
fix pdd1 all particledistribution/discrete 15485867 1 pts1 1.0

fix ins all insert/pack seed 32452843 distributiontemplate pdd1 vel constant 0. 0. 0. &
insert_every once overlapcheck yes all_in yes particles_in_region 4 region bc

#create_atoms 1 single 0.0025 0.0025 0.00125 units box
#create_atoms 1 single 0.0025 0.0025 0.00375 units box
#set group all diameter 0.0025 density 2500

#apply nve integration to all particles
fix integr all nve/sphere #nve -without rolling

#output settings, include total thermal energy
compute rke all erotate/sphere
compute str all stress/atom pair bond
compute myTemp all temp
compute pr all pressure myTemp
compute p all reduce sum c_str[1] c_str[2] c_str[3] c_str[4] c_str[5] c_str[6]

variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)

#fix comp all deform 1 z final 0.0 0.003 x final 0.0 0.003 y final 0.0 0.003 remap x units box

thermo_style custom step lx ly lz ke v_press vol #step lx ly lz atoms cpu ke v_press c_rke vol
thermo 10000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

variable name1 equal (${PressureMax}-v_press)/(${PressureMax})/(${TimestepMax})/2

variable lengthTime equal (1-v_name1*step)*(${LengthMax})
variable rateTime equal (v_name1)*(${LengthMax})

dump dmp all custom/vtk 10000 post/test/4_part_init_*.vtk id &
type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

fix comp all deform 1 z variable v_lengthTime v_rateTime remap x units box

fix data all print 10000 "$(step) $(c_p[1]) $(c_p[2]) $(c_p[3]) $(vol) $(v_press) $(v_name1) $(v_lengthTime) $(v_rateTime)" screen no file parameter.dat

#insert particles
restart 10000 post/restart/4_part.restart
run ${TimestepMax} upto

unfix ins