Commit 25632992 authored by Steve Plimpton's avatar Steve Plimpton
Browse files

updates to USER-SPH example scripts

parent 9e776506
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
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
+7 −7
Original line number Diff line number Diff line
# 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
+7 −7
Original line number Diff line number Diff line
# 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
+11 −11
Original line number Diff line number Diff line
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
+11 −11
Original line number Diff line number Diff line
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
Loading