Skip to content

Commit

Permalink
test_NO2_dimerization_neq: simple noneq simulation example directory …
Browse files Browse the repository at this point in the history
…updated
  • Loading branch information
ckim103 committed May 20, 2024
1 parent c781c93 commit f331272
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 70 deletions.
4 changes: 2 additions & 2 deletions exec/compressible_stag/test_NO2_dimerization_neq/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
job_script.sh (for Pinnacles:--partition test, pi.ckim103, or dept.appliedmath)
-> output slurm-*.out

* FHD inputs file inputs_NO2_dimerization_neq
* FHD inputs files inputs_NO2_dimerization_neq0 (equilibration)
inputs_NO2_dimerization_neq1 (actual noneq simulation)
-> output plt*
* parameter analysis params_NO2_dimerization_rate_const.py

* clean-up clean.sh
* comparison diff.sh
Expand Down
2 changes: 1 addition & 1 deletion exec/compressible_stag/test_NO2_dimerization_neq/diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DIR1=./
DIR2=../test_NO2_dimerization_neq
FILES="submit_job.sh job_script.sh inputs_NO2_dimerization_neq params_NO2_dimerization_rate_const.py avg.sh clean.sh diff.sh README"
FILES="submit_job.sh job_script.sh inputs_NO2_dimerization_neq0 inputs_NO2_dimerization_neq1 avg.sh clean.sh diff.sh README"

for file in $FILES
do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ fixed_dt = 1.e-12

# Controls for number of steps between actions
# First run (equilibration) set max_step = 10000, set nreaction = 0 (no reaction)
# Second run set max_step = 20000, set nreaction = 2 (see below)
# Second run set max_step = 60000, set nreaction = 2 (see below)
max_step = 10000 # Comment (uncomment) this if restart = 10000 (-1)
#max_step = 20000 # Comment (uncomment) this if restart = -1 (10000)
plot_int = 100
#max_step = 60000 # Comment (uncomment) this if restart = -1 (10000)
plot_int = 1000
chk_int = 10000
restart = -1 # Comment (uncomment) this if max_step = 20000 (10000)
#restart = 10000 # Comment (uncomment) this if max_step = 10000 (20000)
restart = -1 # Comment (uncomment) this if max_step = 60000 (10000)
#restart = 10000 # Comment (uncomment) this if max_step = 10000 (60000)

# Multispecies toggle
# if algorithm_type = 1, single component
Expand All @@ -56,8 +56,8 @@ prob_type = 1
# Initial parameters
k_B = 1.38064852e-16 # [units: cm2*g*s-2*K-1]
Runiv = 8.314462175e7
T_init = 380.153
rho0 = 1.855335e-03
T_init = 380
rho0 = 1.858339e-03

struct_fact_int = 0
n_steps_skip = 100000
Expand Down Expand Up @@ -91,13 +91,13 @@ nspecies = 2

molmass = 46.0055 92.0110
diameter = 3.765e-08 4.621e-08
rhobar = 0.690422 0.309578
rhobar = 0.687801 0.312199

# Enter negative dof to use hcv & hcp values
dof = 7.279582 18.049065
dof = 7.279586 18.049072
hcv = -1 -1
hcp = -1 -1
e0 = 4.684542e+09 -1.730892e+09
e0 = 4.685624e+09 -1.730782e+09

plot_means = 1
plot_vars = 1
Expand All @@ -108,12 +108,18 @@ plot_vars = 1
# spec1 = A
# spec2 = A_2

nreaction = 0 # Comment (uncomment) this if max_step = 20000 (10000)
#nreaction = 2 # Comment (uncomment) this if max_step = 10000 (20000)
nreaction = 0 # Comment (uncomment) this if max_step = 60000 (10000)
#nreaction = 2 # Comment (uncomment) this if max_step = 10000 (60000)

T0_chem = 350

rate_const = 5.194896e+26 2.326169e+27
rate_const = 4.065753e+11 6.236899e+07

# These are the kinetic parameters for the expression of the rate constants
alpha_param = -5.337990e+10 5.370000e+11
beta_param = 0.644950 -1.100000
#alpha_param = 0 0 # temperature-independent rate const
#beta_param = 0 0 # temperature-independent rate const

stoich_1R = 2 0
stoich_1P = 0 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# random number seed
# 0 = unpredictable seed based on clock
# positive = fixed seed
seed = 0

# Problem specification
prob_lo = 0.0 0.0 0.0 # physical lo coordinate
prob_hi = 1.28e-04 1.28e-04 1.28e-04 # physical hi coordinate

# Number of ghost cells, conserved, and primitive variables
# ---------------------
ngc = 2 2 2
nvars = 7
nprimvars = 10

# number of cells in domain
n_cells = 16 16 16
# max number of cells in a box
max_grid_size = 4 4 8

# Time-step control
fixed_dt = 1.e-12

# Controls for number of steps between actions
# First run (equilibration) set max_step = 10000, set nreaction = 0 (no reaction)
# Second run set max_step = 60000, set nreaction = 2 (see below)
#max_step = 10000 # Comment (uncomment) this if restart = 10000 (-1)
max_step = 60000 # Comment (uncomment) this if restart = -1 (10000)
plot_int = 200
chk_int = 10000
#restart = -1 # Comment (uncomment) this if max_step = 60000 (10000)
restart = 10000 # Comment (uncomment) this if max_step = 10000 (60000)

# Multispecies toggle
# if algorithm_type = 1, single component
# if algorithm_type = 2, multispecies
algorithm_type = 2

# Viscous tensor form
# if visc_type = 1, L = not-symmetric (bulk viscosity = 0)
# if visc_type = 2, L = symmetric (bulk viscosity = 0)
# if visc_type = 3, L = symmetric + bulk viscosity
visc_type = 2

# Advection method
# if advection_type = 1, interpolate primitive quantities
# if advection_type = 2, interpolate conserved quantities
advection_type = 2

# Problem specification
# if prob_type = 1, constant species concentration
# if prob_type = 2, Rayleigh-Taylor instability
# if prob_type = 3, diffusion barrier
prob_type = 1

# Initial parameters
k_B = 1.38064852e-16 # [units: cm2*g*s-2*K-1]
Runiv = 8.314462175e7
T_init = 380
rho0 = 1.858339e-03

struct_fact_int = 0
n_steps_skip = 100000

# Boundary conditions:
# NOTE: setting bc_vel to periodic sets all the other bc's to periodic)
# bc_vel: -1 = periodic
# 1 = slip
# 2 = no-slip
# bc_mass: -1 = periodic
# 1 = wall
# 2 = concentration (set bc_Yk or bc_Xk in compressible namelist)
# 3 = reservoir (set bc_Yk or bc_Xk in compressible namelist)
# bc_therm: -1 = periodic
# 1 = adiabatic
# 2 = isothermal (set with t_lo/hi in common namelist)
bc_vel_lo = -1 -1 -1
bc_vel_hi = -1 -1 -1
bc_mass_lo = -1 -1 -1
bc_mass_hi = -1 -1 -1
bc_therm_lo = -1 -1 -1
bc_therm_hi = -1 -1 -1

# Temperature if thermal BC specified
t_hi = 350 350 350
t_lo = 350 350 350

#Kinetic species info
#--------------
nspecies = 2

molmass = 46.0055 92.0110
diameter = 3.765e-08 4.621e-08
rhobar = 0.687801 0.312199

# Enter negative dof to use hcv & hcp values
dof = 7.279586 18.049072
hcv = -1 -1
hcp = -1 -1
e0 = 4.685624e+09 -1.730782e+09

plot_means = 1
plot_vars = 1

# dimerization reaction
# react1 : 2A -> A_2
# react2 : A_2 -> 2A
# spec1 = A
# spec2 = A_2

#nreaction = 0 # Comment (uncomment) this if max_step = 60000 (10000)
nreaction = 2 # Comment (uncomment) this if max_step = 10000 (60000)

T0_chem = 350

rate_const = 4.065753e+11 6.236899e+07

# These are the kinetic parameters for the expression of the rate constants
alpha_param = -5.337990e+10 5.370000e+11
beta_param = 0.644950 -1.100000
#alpha_param = 0 0 # temperature-independent rate const
#beta_param = 0 0 # temperature-independent rate const

stoich_1R = 2 0
stoich_1P = 0 1
stoich_2R = 0 1
stoich_2P = 2 0

# 0 = Deterministic Chemistry
# 1 = CLE (Chemical Langevin Equation)
# 2 = SSA (Stochastic Simulation Algorithm)

reaction_type = 1
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@

# COMMANDS HERE

srun -n 32 ../main3d.gnu.MPI.ex inputs_NO2_dimerization_neq
srun -n 32 ../main3d.gnu.MPI.ex inputs_NO2_dimerization_neq0

srun echo "*** equilibration is done!"
srun echo "*** waiting 30 sec..."
srun sleep 30

srun -n 32 ../main3d.gnu.MPI.ex inputs_NO2_dimerization_neq1

This file was deleted.

0 comments on commit f331272

Please sign in to comment.