77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
# ------ 2D dam break ------ #
|
|
|
|
dimension 2
|
|
units lj
|
|
atom_style rheo
|
|
boundary f s p
|
|
comm_modify vel yes
|
|
newton off
|
|
|
|
# ------ Create simulation box ------ #
|
|
|
|
variable n equal 1.0
|
|
variable cut equal 2.2
|
|
variable dx equal 3.0
|
|
|
|
region box block -1 150 -1 80 -0.1 0.1 units box
|
|
create_box 2 box
|
|
lattice hex ${n}
|
|
|
|
region fluid block $(xlo+v_dx+1.0) $(xlo+40.0) $(ylo+v_dx+1.0) $(yhi-20.0) EDGE EDGE units box
|
|
region walls1 block $(xlo+v_dx) $(xhi-v_dx) $(ylo+v_dx) $(yhi-v_dx) EDGE EDGE side out units box
|
|
region walls2 block EDGE EDGE EDGE $(yhi-v_dx) EDGE EDGE side in units box
|
|
region walls intersect 2 walls1 walls2
|
|
|
|
create_atoms 1 region fluid
|
|
create_atoms 2 region walls
|
|
|
|
group fluid type 1
|
|
group rig type 2
|
|
|
|
# ------ Model parameters ------ #
|
|
|
|
variable rho0 equal 1.0
|
|
variable mp equal ${rho0}/${n}
|
|
variable cs equal 1.0
|
|
variable zeta equal 0.1
|
|
variable dt_max equal 0.1*${cut}/${cs}/3
|
|
variable eta equal 0.1
|
|
variable Dr equal 0.1
|
|
|
|
mass 1 ${mp}
|
|
mass 2 $(2*v_mp)
|
|
set group all rheo/rho ${rho0}
|
|
|
|
set group all rheo/status 0
|
|
set group rig rheo/status 1
|
|
|
|
timestep ${dt_max}
|
|
|
|
pair_style rheo ${cut} artificial/visc ${zeta} #rho/damp ${Dr}
|
|
pair_coeff * *
|
|
|
|
# ------ Fixes & computes ------ #
|
|
|
|
fix 1 all rheo ${cut} quintic 10 &
|
|
surface/detection coordination 22 8 &
|
|
rho/sum
|
|
fix 2 all rheo/viscosity * constant ${eta}
|
|
fix 3 all rheo/pressure * linear
|
|
fix 4 all gravity 1e-3 vector 0 -1 0
|
|
fix 5 rig setforce 0.0 0.0 0.0
|
|
fix 6 all enforce2d
|
|
|
|
compute rho all rheo/property/atom rho
|
|
compute p all rheo/property/atom pressure
|
|
compute surf all rheo/property/atom surface
|
|
compute sn all rheo/property/atom surface/n/x surface/n/y
|
|
|
|
# ------ Output & Run ------ #
|
|
|
|
thermo 20
|
|
thermo_style custom step time ke press
|
|
|
|
#dump 1 all custom 200 atomDump id type x y vx vy fx fy c_rho c_surf c_p c_sn[*]
|
|
|
|
run 30000
|