Skip to content

Commit

Permalink
corrected sign in bond_gran
Browse files Browse the repository at this point in the history
added beam_tension example
  • Loading branch information
richti83 committed Jan 5, 2015
1 parent 8263174 commit 7530ce8
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 2 deletions.
154 changes: 154 additions & 0 deletions examples/bondspackage/beam_tension.bonds
@@ -0,0 +1,154 @@
#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 !
variable 2L equal 2*$L

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 ${2L} -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

neighbor 1 bin
neigh_modify delay 0

#New pair style
pair_style gran model hertz tangential history
pair_coeff * *

#bond
bond_style gran

#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 1e4 1e4
#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

# ================================================
# create just 11 particles in a zylinder
# ================================================
region bc cylinder x 0.00 0.00 ${rp} 0.0 $L units box
lattice sc ${sc}
create_atoms 1 region bc
run 1

group bonded id >= 1
set group all density 2700 diameter $d
run 1

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

#atoms may not be lost, insert wall at box bounds
fix boxwalls_x1 all wall/gran model hertz tangential history primitive type 1 xplane -$L
fix boxwalls_x2 all wall/gran model hertz tangential history primitive type 1 xplane +${2L}
fix boxwalls_y1 all wall/gran model hertz tangential history primitive type 1 yplane -1
fix boxwalls_y2 all wall/gran model hertz tangential history primitive type 1 yplane +1
fix boxwalls_z1 all wall/gran model hertz tangential history primitive type 1 zplane -$L
fix boxwalls_z2 all wall/gran model hertz tangential history primitive type 1 zplane +1

#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

#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 10*${KIP} #N
#fix tipF tipball addforce 0 0 -$F #1kip=4.4482216kN
run 10000
fix tipF tipball addforce $F 0 0 #1kip=4.4482216kN
#fix tipM tipball addtorque 0 $M 0 #nicht moeglich

#quit
variable t equal 1/dt #run 1second
run $t



4 changes: 2 additions & 2 deletions src/bond_gran.cpp
Expand Up @@ -318,8 +318,8 @@ void BondGran::compute(int eflag, int vflag)
double ntorque_mag = vectorMag3D(&bondhistlist[n][6]);
double ttorque_mag = vectorMag3D(&bondhistlist[n][9]);

bool nstress = sigman_break[type] < (-nforce_mag/A + 2.*ttorque_mag/J*rb[type]);
bool tstress = tau_break[type] < (-tforce_mag/A + ntorque_mag/J*rb[type]);
bool nstress = sigman_break[type] < (nforce_mag/A + 2.*ttorque_mag/J*rb[type]);
bool tstress = tau_break[type] < (tforce_mag/A + ntorque_mag/J*rb[type]);
bool toohot = false;

if(breakmode == BREAKSTYLE_STRESS_TEMP)
Expand Down

0 comments on commit 7530ce8

Please sign in to comment.