forked from lijiext/lammps
updates to USER-SPH example scripts
This commit is contained in:
parent
9e7765064c
commit
25632992f4
|
@ -1,6 +1,6 @@
|
|||
dimension 2
|
||||
units si
|
||||
atom_style meso
|
||||
atom_style sph
|
||||
|
||||
# create simulation box
|
||||
region box block -0.050e-3 1.044e-3 -0.05e-3 1.044e-3 -1.0e-6 1.0e-6 units box
|
||||
|
@ -28,7 +28,7 @@ group integrate_full union fluid driver
|
|||
mass 3 2.0e-7
|
||||
mass 2 2.0e-7
|
||||
mass 1 4.0e-7
|
||||
set group all meso/rho 1000.0
|
||||
set group all sph/rho 1000.0
|
||||
|
||||
# use Tait's EOS in combination with Morris' laminar viscosity.
|
||||
# We set rho_0 = 1000 kg/m^3, c = 0.1 m/s, h = 6.5e-5 m.
|
||||
|
@ -37,8 +37,8 @@ pair_style hybrid sph/taitwater/morris
|
|||
pair_coeff * * sph/taitwater/morris 1000 0.1 1.0e-3 6.5e-5
|
||||
pair_coeff 2 3 none # exclude interaction between walls and shear driver
|
||||
|
||||
compute rho_peratom all meso/rho/atom
|
||||
compute e_peratom all meso/e/atom
|
||||
compute rho_peratom all sph/rho/atom
|
||||
compute e_peratom all sph/e/atom
|
||||
compute ke_peratom all ke/atom
|
||||
compute esph all reduce sum c_e_peratom
|
||||
compute ke all ke
|
||||
|
@ -49,8 +49,8 @@ velocity driver set 0.001 0.0 0.0 units box
|
|||
fix freeze_fix driver setforce 0.0 0.0 0.0
|
||||
|
||||
# do full time integration for shear driver and fluid, but keep walls stationary
|
||||
fix integrate_fix_full integrate_full meso
|
||||
fix integrate_fix_stationary walls meso/stationary
|
||||
fix integrate_fix_full integrate_full sph
|
||||
fix integrate_fix_stationary walls sph/stationary
|
||||
|
||||
dump dump_id all custom 100 dump.lammpstrj id type xs ys zs vx vy c_rho_peratom c_e_peratom
|
||||
dump_modify dump_id first yes
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# mesoscopic heat conduction
|
||||
# SPH heat conduction
|
||||
# heat flow from hot right region to cold left region
|
||||
# compare the temperature profile at the end opf the simulation,
|
||||
# contained in file dump.last, to analytic solution.
|
||||
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
dimension 2
|
||||
units si
|
||||
atom_style meso
|
||||
atom_style sph
|
||||
boundary f p p
|
||||
|
||||
lattice sq 0.01
|
||||
|
@ -17,23 +17,23 @@ mass 1 1.0e-5
|
|||
|
||||
region left block EDGE 49.9 EDGE EDGE EDGE EDGE
|
||||
region right block 50 EDGE EDGE EDGE EDGE EDGE
|
||||
set region left meso/e 1.0 # internal energies
|
||||
set region right meso/e 2.0
|
||||
set group all meso/rho 0.1 # mesoscopic density is also needed for this pair style
|
||||
set region left sph/e 1.0 # internal energies
|
||||
set region right sph/e 2.0
|
||||
set group all sph/rho 0.1 # SPH density is also needed for this pair style
|
||||
# For correct temperature profiles, mescoscopic density and mass * number density must coincide!
|
||||
|
||||
pair_style sph/heatconduction
|
||||
# i j diffusion coeff. cutoff
|
||||
pair_coeff 1 1 1.0e-4 2.0e-2
|
||||
|
||||
compute ie_atom all meso/e/atom
|
||||
compute ie_atom all sph/e/atom
|
||||
compute ie all reduce sum c_ie_atom
|
||||
|
||||
thermo 10
|
||||
thermo_style custom step temp c_ie
|
||||
timestep 0.25e-1
|
||||
neighbor 0.2e-2 bin
|
||||
fix integrate_fix all meso/stationary
|
||||
fix integrate_fix all sph/stationary
|
||||
|
||||
dump dump_fix all custom 10 dump.heat id type x y z c_ie_atom
|
||||
dump_modify dump_fix first yes
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# mesoscopic heat conduction
|
||||
# SPH heat conduction
|
||||
# heat flow from hot right region to cold left region
|
||||
# compare the temperature profile at the end opf the simulation,
|
||||
# contained in file dump.last, to analytic solution.
|
||||
#
|
||||
#
|
||||
units si
|
||||
atom_style meso
|
||||
atom_style sph
|
||||
newton on
|
||||
boundary f p p
|
||||
|
||||
|
@ -17,9 +17,9 @@ mass 1 1.0e-5
|
|||
|
||||
region left block EDGE 49.9 EDGE EDGE EDGE EDGE
|
||||
region right block 50 EDGE EDGE EDGE EDGE EDGE
|
||||
set region left meso/e 1.0 # internal energies
|
||||
set region right meso/e 2.0
|
||||
set group all meso/rho 10.0 # mesoscopic density is also needed for this pair style
|
||||
set region left sph/e 1.0 # internal energies
|
||||
set region right sph/e 2.0
|
||||
set group all sph/rho 10.0 # SPH density is also needed for this pair style
|
||||
# For correct temperature profiles, mescoscopic density and mass * number density must coincide!
|
||||
|
||||
pair_style sph/heatconduction
|
||||
|
@ -28,13 +28,13 @@ pair_coeff 1 1 1.0e-4 2.0e-2
|
|||
neighbor 0.2e-2 bin
|
||||
neigh_modify every 20 delay 0 check no
|
||||
|
||||
compute ie_atom all meso/e/atom
|
||||
compute ie_atom all sph/e/atom
|
||||
compute ie all reduce sum c_ie_atom
|
||||
|
||||
thermo_style custom step temp c_ie
|
||||
thermo_modify norm no
|
||||
|
||||
fix integrate_fix all meso/stationary
|
||||
fix integrate_fix all sph/stationary
|
||||
|
||||
thermo 10
|
||||
timestep 0.25e-1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
atom_style meso
|
||||
atom_style sph
|
||||
dimension 2
|
||||
boundary s p p
|
||||
|
||||
|
@ -13,20 +13,20 @@ set region right type 2
|
|||
|
||||
mass 1 1
|
||||
mass 2 0.25
|
||||
set type 1 meso/e 2.5 # internal energy corresponding to p=1, rho=1
|
||||
set type 2 meso/e 0.625 # internal energy corresponding to p=0.25, rho=0.25
|
||||
set type 1 meso/rho 1.0
|
||||
set type 2 meso/rho 0.25
|
||||
set type 1 sph/e 2.5 # internal energy corresponding to p=1, rho=1
|
||||
set type 2 sph/e 0.625 # internal energy corresponding to p=0.25, rho=0.25
|
||||
set type 1 sph/rho 1.0
|
||||
set type 2 sph/rho 0.25
|
||||
|
||||
pair_style hybrid/overlay sph/rhosum 1 sph/idealgas
|
||||
pair_coeff * * sph/rhosum 4.0
|
||||
pair_coeff * * sph/idealgas 0.75 4.0
|
||||
|
||||
compute rhoatom all meso/rho/atom
|
||||
compute ieatom all meso/e/atom
|
||||
compute emeso all reduce sum c_ieatom # total internal energy
|
||||
compute rhoatom all shp/rho/atom
|
||||
compute ieatom all sph/e/atom
|
||||
compute esph all reduce sum c_ieatom # total internal energy
|
||||
compute ke all ke
|
||||
variable etot equal c_ke+c_emeso # total energy
|
||||
variable etot equal c_ke+c_esph # total energy
|
||||
|
||||
# dump positions and local density
|
||||
dump dump_id all custom 100 dump.2d id type x z y c_rhoatom
|
||||
|
@ -35,10 +35,10 @@ dump_modify dump_id first yes
|
|||
neighbor 0.5 bin
|
||||
neigh_modify every 5 delay 0 check yes
|
||||
thermo 10
|
||||
thermo_style custom step c_ke c_emeso v_etot
|
||||
thermo_style custom step c_ke c_esph v_etot
|
||||
thermo_modify norm no
|
||||
|
||||
fix integration_fix all meso
|
||||
fix integration_fix all sph
|
||||
fix 1 all setforce NULL 0.0 0.0 # treat as a quasi 1d problem
|
||||
timestep 0.05
|
||||
log log.2d
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
atom_style meso
|
||||
atom_style sph
|
||||
boundary s p p
|
||||
|
||||
region box block -100 150 -4 4 -4 4 units box
|
||||
|
@ -12,20 +12,20 @@ set region right type 2
|
|||
|
||||
mass 1 1
|
||||
mass 2 0.25
|
||||
set type 1 meso/e 2.5 # internal energy corresponding to p=1, rho=1
|
||||
set type 2 meso/e 0.625 # internal energy corresponding to p=0.25, rho=0.25
|
||||
set type 1 meso/rho 1.0
|
||||
set type 2 meso/rho 0.25
|
||||
set type 1 sph/e 2.5 # internal energy corresponding to p=1, rho=1
|
||||
set type 2 sph/e 0.625 # internal energy corresponding to p=0.25, rho=0.25
|
||||
set type 1 sph/rho 1.0
|
||||
set type 2 sph/rho 0.25
|
||||
|
||||
pair_style hybrid/overlay sph/rhosum 1 sph/idealgas
|
||||
pair_coeff * * sph/rhosum 4.0
|
||||
pair_coeff * * sph/idealgas 0.75 4.0
|
||||
|
||||
compute rhoatom all meso/rho/atom
|
||||
compute ieatom all meso/e/atom
|
||||
compute emeso all reduce sum c_ieatom # total internal energy
|
||||
compute rhoatom all sph/rho/atom
|
||||
compute ieatom all sph/e/atom
|
||||
compute esph all reduce sum c_ieatom # total internal energy
|
||||
compute ke all ke
|
||||
variable etot equal c_ke+c_emeso # total energy
|
||||
variable etot equal c_ke+c_esph # total energy
|
||||
|
||||
# dump positions and local density
|
||||
dump dump_id all custom 100 dump.3d id type x z y c_rhoatom
|
||||
|
@ -34,10 +34,10 @@ dump_modify dump_id first yes
|
|||
neighbor 0.5 bin
|
||||
neigh_modify every 5 delay 0 check yes
|
||||
thermo 10
|
||||
thermo_style custom step c_ke c_emeso v_etot
|
||||
thermo_style custom step c_ke c_esph v_etot
|
||||
thermo_modify norm no
|
||||
|
||||
fix integration_fix all meso
|
||||
fix integration_fix all sph
|
||||
fix 1 all setforce NULL 0.0 0.0 # treat as a quasi 1d problem
|
||||
timestep 0.05
|
||||
log log.3d
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
processors * 1 1 # manually assign processors to spatial regions
|
||||
atom_style meso
|
||||
atom_style sph
|
||||
dimension 2
|
||||
newton on
|
||||
boundary f f p
|
||||
|
@ -22,8 +22,8 @@ pair_coeff 1 1 sph/rhosum ${h}
|
|||
fix gfix water gravity -9.81 vector 0 1 0 # add gravity. This fix also computes potential energy of mass in gravity field.
|
||||
fix 2d_fix all enforce2d
|
||||
|
||||
compute rho_peratom all meso/rho/atom
|
||||
compute e_peratom all meso/e/atom
|
||||
compute rho_peratom all sph/rho/atom
|
||||
compute e_peratom all sph/e/atom
|
||||
compute esph all reduce sum c_e_peratom
|
||||
compute ke all ke
|
||||
variable etot equal c_esph+c_ke+f_gfix
|
||||
|
@ -32,10 +32,10 @@ variable etot equal c_esph+c_ke+f_gfix
|
|||
fix dtfix all dt/reset 1 NULL ${dt} 0.0005 units box # use a variable timestep
|
||||
|
||||
# time-integrate position, velocities, internal energy and density of water particles
|
||||
fix integrate_water_fix water meso
|
||||
fix integrate_water_fix water sph
|
||||
|
||||
# time-integrate only internal energy and density of boundary particles
|
||||
fix integrate_bc_fix bc meso/stationary
|
||||
fix integrate_bc_fix bc sph/stationary
|
||||
dump dump_id all custom 100 dump.lammpstrj id type xs ys zs c_rho_peratom c_e_peratom fx fy
|
||||
dump_modify dump_id first yes
|
||||
thermo 10
|
||||
|
|
Loading…
Reference in New Issue