Files
CFDEMcoupling-PFM/tutorials/cfdemSolverIBContinuousForcing/redBloodCellShearFlow/DEM/in.liggghts_run
danielque 1f5c8f6492 add a tutorial for cfdemSolverIBContinuousForcing
simulating the deformation of a red blood cell (bonded particles) in
shear flow
2022-03-24 15:39:10 +01:00

131 lines
4.3 KiB
Plaintext

# RBC in a box sheared by fluid
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
# bond parameter setup
variable rp equal 1.955 # sphere radius
variable ro equal 1 # bond outer radius multiplier
variable ri equal 0 # bond inner radius multiplier
variable rb equal 2*${ro}*${rp} # bond radius
variable lb equal 0.3090 # bond length multiplier
variable damp equal 25 # damping coefficient
# material properties
variable G equal 0.005333 # in-plane shear modulus of the membrane
variable Y equal 0.020426 # in-plane Young's modulus of the membrane
variable Sn equal $Y/3.91 # analogous Youngs modulus of the parallel bond
variable St equal $G/3.91 # analogous shear modulus of the parallel bond
variable Ab equal (22/7)*${rb}${rb} # bond area
variable Sben equal ${Sn}/${Ab} # analogous bending modulus of the parallel bond
variable Stor equal ${St}/${Ab} # analogous torsional modulus of the parallel bond
# atom type and style
atom_style hybrid granular bond/gran n_bondtypes 1 bonds_per_atom 6
atom_modify map array
# boundary
boundary p f p
# communication
newton off
communicate single vel yes
# units and processors
units micro
processors 1 1 2
# read the restart file
read_restart ../DEM/post/restart/liggghts.restart
# neighbors
neighbor 1.0 bin
neigh_modify exclude molecule all
neigh_modify delay 0
# material properties
fix m1 all property/global youngsModulus peratomtype 7.5e02 7.5e04
fix m2 all property/global poissonsRatio peratomtype 0.5 0.18
fix m3 all property/global coefficientRestitution peratomtypepair 2 0.9 0.1 0.1 0.9
fix m4 all property/global coefficientFriction peratomtypepair 2 0.3 0.3 0.3 0.3
# pair style
pair_style gran model hertz tangential history
pair_coeff * *
# bond parameters
bond_style gran
# N ro ri lb Sn_bond St_bond s_bend s_tor damp bn bt TYPE_OF_BOND sigma_break tau_break
bond_coeff 1 ${ro} ${ri} ${lb} ${Sn} ${St} ${Sben} ${Stor} ${damp} 3.0 1.0 1.0 1e50 1e50
# reset timestep after reading the restart file
reset_timestep 0
timestep 0.1
# cfd coupling
fix cfd all couple/cfd couple_every 10 mpi
fix cfd2 all couple/cfd/force
# apply nve integration to all constituent spheres - single sphere treatment
fix integr all nve
compute unwra all property/atom xu yu zu
# variables for data processing
variable x1 equal c_unwra[1][1]
variable y1 equal c_unwra[1][2]
variable z1 equal c_unwra[1][3]
variable x2 equal c_unwra[2][1]
variable y2 equal c_unwra[2][2]
variable z2 equal c_unwra[2][3]
variable x3 equal c_unwra[3][1]
variable y3 equal c_unwra[3][2]
variable z3 equal c_unwra[3][3]
variable x4 equal c_unwra[4][1]
variable y4 equal c_unwra[4][2]
variable z4 equal c_unwra[4][3]
variable x5 equal c_unwra[5][1]
variable y5 equal c_unwra[5][2]
variable z5 equal c_unwra[5][3]
variable x6 equal c_unwra[6][1]
variable y6 equal c_unwra[6][2]
variable z6 equal c_unwra[6][3]
variable x7 equal c_unwra[7][1]
variable y7 equal c_unwra[7][2]
variable z7 equal c_unwra[7][3]
variable x8 equal c_unwra[8][1]
variable y8 equal c_unwra[8][2]
variable z8 equal c_unwra[8][3]
variable x9 equal c_unwra[9][1]
variable y9 equal c_unwra[9][2]
variable z9 equal c_unwra[9][3]
variable x10 equal c_unwra[10][1]
variable y10 equal c_unwra[10][2]
variable z10 equal c_unwra[10][3]
variable time equal step*dt
fix extra1 all print 10 "${time} ${x1} ${y1} ${z1} ${x2} ${y2} ${z2} ${x3} ${y3} ${z3} ${x4} ${y4} ${z4} ${x5} ${y5} ${z5} ${x6} ${y6} ${z6} ${x7} ${y7} ${z7} ${x8} ${y8} ${z8} ${x9} ${y9} ${z9} ${x10} ${y10} ${z10}" &
file ../DEM/post/particle_position.txt screen no
# check timestep
fix ts_check all check/timestep/gran 1 0.1 0.1
# screen output
thermo_style custom step atoms numbond
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 1000 ../DEM/post/dump.liggghts &
id mol 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 bforceX bforceY bforceZ
# x1 y1 z1 x2 y2 z2 id1 id2 bondtype f_bond[1] f_bond[2] f_bond[3]
dump bnd all local 1000 ../DEM/post/bonds.bond1 &
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] c_b1[10] c_b1[11] c_b1[12]
run 1