Dam example, generalizing non-quintic kernels

This commit is contained in:
jtclemm
2024-06-03 15:04:24 -06:00
parent 8d25c510c1
commit fc0b155de9
12 changed files with 129 additions and 40 deletions

View File

@ -60,6 +60,7 @@ fix 1 all rheo ${cut} quintic 0 &
fix 2 all rheo/viscosity * constant ${eta}
fix 3 all rheo/pressure * linear
fix 4 all wall/harmonic ylo EDGE 2.0 1.0 1.0
fix 5 all enforce2d
compute rho all rheo/property/atom rho
compute phase all rheo/property/atom phase

View File

@ -3,24 +3,24 @@
dimension 2
units lj
atom_style rheo
boundary f f p
boundary f s p
comm_modify vel yes
newton off
# ------ Create simulation box ------ #
variable n equal 1.0
variable cut equal 3.0
variable dx equal 4.0
variable cut equal 2.2
variable dx equal 3.0
region box block -1 200 -1 80 -0.1 0.1 units box
#region box block -1 100 -1 40 -0.1 0.1 units box
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) $(xlo+44.0) $(ylo+v_dx) $(yhi-16.0) EDGE EDGE units box
#region fluid block $(xlo+v_dx) $(xlo+20.0) $(ylo+v_dx) $(yhi-10.0) EDGE EDGE units box
region walls block $(xlo+v_dx) $(xhi-v_dx) $(ylo+v_dx) $(yhi-v_dx) EDGE EDGE units box side out
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
@ -33,12 +33,13 @@ group rig type 2
variable rho0 equal 1.0
variable mp equal ${rho0}/${n}
variable cs equal 1.0
variable zeta equal 0.05
variable zeta equal 0.1
variable dt_max equal 0.1*${cut}/${cs}/3
variable eta equal 0.05
variable Dr equal 0.05
variable eta equal 0.1
variable Dr equal 0.1
mass * ${mp}
mass 1 ${mp}
mass 2 $(2*v_mp)
set group all rheo/rho ${rho0}
set group all rheo/status 0
@ -46,36 +47,30 @@ set group rig rheo/status 1
timestep ${dt_max}
pair_style rheo ${cut} artificial/visc ${zeta} rho/damp ${Dr}
pair_style rheo ${cut} artificial/visc ${zeta} #rho/damp ${Dr}
pair_coeff * *
# ------ Fixes & computes ------ #
fix 1 all rheo ${cut} quintic 10 &
shift &
surface/detection coordination 22 8 &
interface/reconstruct
#fix 1 all rheo ${cut} RK1 10 surface/detection coordination 36 10 interface/reconstruct shift
rho/sum
fix 2 all rheo/viscosity * constant ${eta}
fix 3 all rheo/pressure * linear
fix 4 all gravity 5e-4 vector 0 -1 0
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 phase all rheo/property/atom phase
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
compute vshift all rheo/property/atom shift/v/x shift/v/y
# ------ Output & Run ------ #
thermo 100
thermo 20
thermo_style custom step time ke press
dump 1 all custom 20 atomDump id type x y vx vy fx fy c_rho c_phase c_surf c_p c_vshift[*] c_sn[*]
#dump 1 all custom 200 atomDump id type x y vx vy fx fy c_rho c_surf c_p c_sn[*]
#thermo 1
run 300000 # 400000
run 30000

View File

@ -64,6 +64,7 @@ fix 4 all rheo/thermal conductivity * constant ${kappa} &
fix 5 all wall/region wall harmonic 1.0 1.0 1.0
fix 6 all gravity 5e-4 vector 0 -1 0
fix 7 all deposit 8 0 1000 37241459 mol my_mol region drop near 2.0 vy -0.02 -0.02
fix 8 all enforce2d
compute rho all rheo/property/atom rho
compute phase all rheo/property/atom phase

View File

@ -10,7 +10,6 @@ newton off
region box block -60 60 0 80 -0.01 0.01 units box
create_box 3 box bond/types 2 extra/bond/per/atom 20 extra/special/per/atom 50
region lbar block -15 0 3 80 EDGE EDGE units box
region rbar block 0 15 3 80 EDGE EDGE units box
region bar union 2 lbar rbar
@ -83,6 +82,7 @@ fix 7 all gravity 5e-5 vector 0 -1 0
fix 8 floor setforce 0.0 0.0 0.0
fix 9 surf add/heat linear 1.1 0.05
fix 10 floor add/heat constant 0 overwrite yes # fix the temperature of the floor
fix 11 all enforce2d
compute surf all rheo/property/atom surface
compute rho all rheo/property/atom rho

View File

@ -6,7 +6,6 @@ atom_style rheo
boundary p p p
comm_modify vel yes
# ------ Create simulation box ------ #
variable n equal 1.0
@ -53,7 +52,6 @@ timestep ${dt_max}
pair_style rheo ${cut} artificial/visc ${zeta} rho/damp ${Dr}
pair_coeff * *
# ------ Fixes & computes ------ #
fix 1 all rheo ${cut} quintic 0 shift
@ -62,10 +60,10 @@ fix 2 all rheo/viscosity * constant ${eta}
fix 3 all rheo/pressure * linear
fix 4 rig setforce 0.0 0.0 0.0
fix 5 fluid addforce ${fext} 0.0 0.0
fix 6 all enforce2d
compute rho all rheo/property/atom rho
# ------ Output & Run ------ #
thermo 200

View File

@ -7,7 +7,6 @@ boundary p p p
comm_modify vel yes
newton off
# ------ Create simulation box ------ #
variable n equal 1.0
@ -47,12 +46,12 @@ timestep ${dt_max}
pair_style rheo ${cut} artificial/visc ${zeta} rho/damp ${Dr}
pair_coeff * *
# ------ Fixes & computes ------ #
fix 1 all rheo ${cut} RK1 8 shift
fix 2 all rheo/viscosity * constant ${eta}
fix 3 all rheo/pressure * linear
fix 4 all enforce2d
compute rho all rheo/property/atom rho