forked from CFDEMproject/LIGGGHTS-PUBLIC
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added restart functionality for bonds
Testfile: examples/bondspackage/beam/read_restart.bonds
- Loading branch information
Christian Richter
committed
Jan 26, 2015
1 parent
d5c0c42
commit e2270cd
Showing
6 changed files
with
172 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
#bond | ||
|
||
######## simulation setup ######### | ||
variable dt equal 0.00001 | ||
variable runstep equal 10/${dt} | ||
variable filestep equal 0.01/${dt} | ||
################################## | ||
|
||
variable rp equal 10*0.0254 #particle radius | ||
variable d equal 2*${rp} | ||
variable sc equal $d-0.000000001 | ||
variable c equal ${d}+0.1 | ||
variable rb equal 0.8*${rp} | ||
variable L equal 200*0.0254+${rp} #INCH ! | ||
|
||
atom_style hybrid granular bond/gran n_bondtypes 1 bonds_per_atom 6 | ||
#atom_style granular | ||
atom_modify map array | ||
boundary f f f | ||
newton off | ||
|
||
#processors 2 1 1 | ||
|
||
communicate single vel yes | ||
|
||
units si | ||
|
||
region reg block -$L $L -1 1 -$L 1 units box | ||
#create_box 2 reg #bonds 1 6 # {num_atom_types} {region} bonds moved into atom_style for LIGGGHTS>=3.X.X | ||
|
||
#bond | ||
bond_style gran | ||
|
||
#read_restart can only work correctly AFTER bond_style is set | ||
read_restart beam.restart | ||
|
||
neighbor 1 bin | ||
neigh_modify delay 0 | ||
|
||
#New pair style | ||
pair_style gran model hertz tangential history | ||
pair_coeff * * | ||
|
||
#for stressbreak | ||
variable Y equal 6894.75729*1000*1e4 | ||
|
||
variable p equal 0.3 | ||
variable G equal 3759.4*6894.75729*1000 #$Y/(2*(1+$p)) | ||
print $Y | ||
print $G | ||
|
||
#double kn = E/lenght; //ZUG - Druck | ||
#double ks = 12*I*E/(A*lenght*lenght*lenght); //A*G/lenght; //Schub | ||
|
||
variable I equal 0.25*PI*${rb}*${rb}*${rb}*${rb} | ||
variable A equal PI*${rb}*${rb} | ||
|
||
variable kn equal 2*$Y/$d #grain behaivior ? | ||
variable ks equal 12*$I*$Y/($A*$d*$d*$d) #${kn}/2.5 | ||
|
||
print $I | ||
print $A | ||
print ${kn} | ||
print ${ks} | ||
bond_coeff 1 ${rb} ${kn} ${ks} 1 1e10 1e10 | ||
#bond_coeff 1 ${rb} $Y $G 1 1e10 1e10 #N rb Sn_bond St_bond TYPE_OF_BOND r_break|sigma_break tau_break (temp) | ||
|
||
|
||
#Material properties required for new pair styles | ||
|
||
fix m1 all property/global youngsModulus peratomtype $Y $Y | ||
fix m2 all property/global poissonsRatio peratomtype $p $p | ||
fix m3 all property/global coefficientRestitution peratomtypepair 2 0.2 0.2 0.2 0.2 | ||
fix m4 all property/global coefficientFriction peratomtypepair 2 0.3 0.3 0.3 0.3 | ||
|
||
mass 1 1.0 #dummy | ||
mass 2 1.0 #dummy | ||
|
||
variable lastone equal atoms | ||
|
||
group freezed id == 1 | ||
group tipball id == ${lastone} | ||
|
||
run 1 | ||
fix f1 freezed freeze #festlager | ||
|
||
fix bondcr all bond/create/gran 1 1 1 0.51 1 6 #every itype jtype cutoff btype newperts | ||
|
||
timestep ${dt} | ||
|
||
#fix gravi all gravity 9.81 vector 0.0 0.0 -1.0 | ||
|
||
#fix zwalls all wall/gran/hertz/history primitive type 1 zplane 0.0 | ||
|
||
#region and insertion | ||
|
||
group nve_group region reg | ||
|
||
#apply nve integration to all particles that are inserted as single particles | ||
fix integr nve_group nve/sphere | ||
|
||
#output settings, include total thermal energyg | ||
thermo_style custom step atoms #numbond | ||
thermo 100 | ||
thermo_modify lost ignore norm no | ||
compute_modify thermo_temp dynamic yes | ||
|
||
#insert the first particles so that dump is not empty | ||
shell rm -rf post | ||
shell mkdir post | ||
dump dmp all custom ${filestep} post/dump*.liggghts id type x y z vx vy vz fx fy fz omegax omegay omegaz radius | ||
|
||
compute b1 all property/local batom1x batom1y batom1z batom2x batom2y batom2z batom1 batom2 btype | ||
dump bnd all local ${filestep} post/bonds*.bond c_b1[1] c_b1[2] c_b1[3] c_b1[4] c_b1[5] c_b1[6] c_b1[7] c_b1[8] c_b1[9] #x1 y1 z1 x2 y2 z2 id1 id2 typeofbond BSD | ||
|
||
#hole koordinaten von letztem partikel | ||
variable time equal step*dt | ||
variable px equal x[${lastone}] | ||
variable py equal y[${lastone}] | ||
variable pz equal z[${lastone}] | ||
|
||
fix outfile all print ${filestep} "${time};${px};${py};${pz}" file beam.csv screen no title "t;x;y;z" | ||
|
||
#insert particles | ||
run 1 #run one step | ||
fix_modify bondcr every 0 #do not create new bonds after this line | ||
variable KIP equal 4448.2216 #N | ||
variable inch equal 0.0254 #mm | ||
|
||
variable M equal 100*${KIP}/${inch} | ||
variable F equal 1*${KIP} #N | ||
fix tipF tipball addforce 0 0 +$F #1kip=4.4482216kN | ||
#fix tipM tipball addtorque 0 $M 0 #nicht moeglich | ||
|
||
#quit | ||
variable t equal 1/dt #run 1second | ||
run $t | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters