-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sreehari Perumanath
committed
Mar 13, 2024
1 parent
e4217e0
commit cb206a0
Showing
28 changed files
with
575 additions
and
3,207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This directory contains the inputs files which can be used to study propagation of ice front in a supercooled liquid. | ||
|
||
General instructions: | ||
1. Remember to change the values of thermophysical properties according to the table given within. | ||
2. You can turn stochasticity on/off by setting variance_coef_* to 1/0. | ||
|
||
In ./ | ||
inputs_slab_3d: inputs to measure the propagation speed of ice/water interface at various temperatures. | ||
inputs_nucleus_3d: inputs for simulationg growth of an ice nucleus at various temperatures. | ||
|
||
In ./_Examples/ | ||
inputs_laplace: to measure laplace pressure inside an ice nucleus in a deterministic setting. | ||
inputs_spectrum: to measure the spectral energy in a long slab and compare with theory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
#---------------------- | ||
# Problem specification | ||
#---------------------- | ||
prob_lo = 0. 0. # physical lo coordinate | ||
prob_hi = 48e-7 48e-7 # physical hi coordinate | ||
|
||
cell_depth = 1.0e-7 | ||
|
||
# refer to Init.cpp | ||
prob_type = 8 | ||
chk_base_name = chk | ||
plot_base_name = plt | ||
|
||
# number of cells in domain. IMP: 0.5 nm or less for deterministic simulations | ||
n_cells = 192 192 | ||
# max number of cells in a box | ||
max_grid_size = 96 96 | ||
|
||
# Time-step control | ||
fixed_dt = 1.e-13 | ||
|
||
# Controls for number of steps between actions | ||
max_step = 1000000 | ||
plot_int = 10000 | ||
chk_int = 100000 | ||
restart = -1 | ||
|
||
use_ice_nucleation = 1 | ||
|
||
#---------------------- | ||
# Thermodynamic and transport properties: | ||
#------------------------------------------------------------------------------------------------------------------------------------ | ||
# Temperature (K) | 230 235 240 245 250 255 260 265 270 | ||
#------------------------------------------------------------------------------------------------------------------------------------ | ||
# c0_water | 0.1099 0.0957 0.082 0.0687 0.0558 0.0431 0.0308 0.0186 0.0066 | ||
# c0_ice | 1.0637 1.0591 1.0539 1.048 1.0415 1.0341 1.0259 1.0167 1.0064 | ||
# mu_water (Poise) | 0.9124 0.2588 0.1279 0.0782 0.0536 0.0394 0.0304 0.0243 0.0200 | ||
# fh_chi | 2.6194 2.5637 2.5103 2.4591 2.4099 2.3626 2.3172 2.2735 2.2314 | ||
# fh_kappa | 2.563e-15 2.508e-15 2.456e-15 2.406e-15 2.358e-15 2.311e-15 2.267e-15 2.224e-15 2.183e-15 | ||
# rho (g/cm^3) | 0.9453 0.9676 0.9789 0.9862 0.9912 0.9946 0.997 0.9986 0.9995 | ||
#------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
k_B = 1.3806488e-16 # Boltzmann's constant [units: cm2*g*s-2*K-1] | ||
T_init = 255.0 # [units: K] IMP: Change visc_coef, rho, fh_chi, fh_kappa, c_init_1, c_init_2 accordingly. | ||
|
||
# Viscous friction L phi operator | ||
# if abs(visc_type) = 1, L = div beta grad | ||
# if abs(visc_type) = 2, L = div [ beta (grad + grad^T) ] | ||
# if abs(visc_type) = 3, L = div [ beta (grad + grad^T) + I (gamma - (2/3)*beta) div ] | ||
# positive = assume constant coefficients | ||
# negative = assume spatially-varying coefficients | ||
visc_coef = 0.0394 # [units: g*cm-1*s-1] dynamic (shear) viscosity of water at T_init | ||
visc_type = 1 | ||
|
||
nspecies = 2 | ||
#molmass = 2.98e-23 2.98e-23 # molecular masses for nspecies (mass per molecule, *not* molar mass) | ||
use_flory_huggins = 1 | ||
|
||
fh_monomers = 1. 1. | ||
monomer_mass = 2.98e-23 | ||
rho0 = 0.9946 | ||
rhobar = 0.9946 0.9946 # pure component densities for all species. Same for ice and water for now. | ||
fh_chi = 0. 2.3626 2.3626 0. # = 2.79e09/(rhobar*k_B*T_init/monomer_mass) ~ 602.478/T_init. Off-diagonal terms should be identical. | ||
fh_kappa = 0. 2.311e-15 2.311e-15 0. # = 2.73e-6/(rhobar*k_B*T_init/monomer_mass) ~ 5.895e-13/T_init. Off-diagonal terms should be identical. | ||
|
||
is_ideal_mixture = 0 | ||
|
||
# initial values for c | ||
c_init_1 = 1.0341 0.0431 # ice ~ -1.605e-05*T_init^2+0.006603*T_init+0.3938 | ||
c_init_2 = 0.0431 1.0341 # water ~ -0.002575*T_init+0.7005 | ||
smoothing_width = 0.0 | ||
radius_cyl = 6.e-7 | ||
|
||
# These are lower-triangules of symmetric matrices represented as vectors | ||
# Number of elements is (nspecies*(nspecies-1)/2) | ||
# The values are red row by row starting from top going down | ||
# (this allows easy addition/deletion of new species/rows) | ||
# So D_12; D_13, D_23; D_14, D_24, D_34; ... | ||
Dbar = 5.e-5 # Maxwell-Stefan diffusion constant | ||
|
||
use_charged_fluid = 0 | ||
dielectric_const = 9.2e-20 | ||
charge_per_mass = 0. 0. | ||
|
||
mg_verbose = 0 # multigrid verbosity | ||
algorithm_type = 6 | ||
|
||
#---------------------- | ||
# Stochastic parameters | ||
#---------------------- | ||
seed = 1 | ||
variance_coef_mom = 0. | ||
variance_coef_mass = 0. | ||
initial_variance_mom = 0. | ||
|
||
struct_fact_int = -1 | ||
n_steps_skip = 0 | ||
|
||
#---------------------- | ||
# Boundary conditions | ||
# ---------------------- | ||
# BC specifications: | ||
# -1 = periodic | ||
# 1 = slip | ||
# 2 = no-slip | ||
bc_vel_lo = -1 -1 -1 | ||
bc_vel_hi = -1 -1 -1 | ||
|
||
# -1 = periodic | ||
# 1 = wall | ||
# 2 = reservoir (Dirichlet values must be suppled by other means) | ||
bc_mass_lo = -1 -1 -1 | ||
bc_mass_hi = -1 -1 -1 | ||
|
||
# -1 = periodic | ||
# 1 = Dirichlet | ||
# 2 = Neumann | ||
bc_es_lo = -1 -1 -1 | ||
bc_es_hi = -1 -1 -1 | ||
|
||
potential_lo = 0. 0. 0. | ||
potential_hi = 0. 0. 0. | ||
|
||
#---------------------- | ||
# Staggered multigrid solver parameters | ||
#---------------------- | ||
stag_mg_verbosity = 0 # verbosity | ||
stag_mg_max_vcycles = 1 # max number of v-cycles | ||
stag_mg_minwidth = 2 # length of box at coarsest multigrid level | ||
stag_mg_bottom_solver = 0 # bottom solver type | ||
# 0 = smooths only, controlled by mg_nsmooths_bottom | ||
# 4 = Fancy bottom solve that coarsens additionally | ||
# and then applies stag_mg_nsmooths_bottom smooths | ||
stag_mg_nsmooths_down = 2 # number of smooths at each level on the way down | ||
stag_mg_nsmooths_up = 2 # number of smooths at each level on the way up | ||
stag_mg_nsmooths_bottom = 8 # number of smooths at the bottom | ||
stag_mg_max_bottom_nlevels = 10 # for stag_mg_bottom_solver 4, number of additional levels of multigrid | ||
stag_mg_omega = 1.e0 # weighted-jacobi omega coefficient | ||
stag_mg_smoother = 1 # 0 = jacobi; 1 = 2*dm-color Gauss-Seidel | ||
stag_mg_rel_tol = 1.e-9 # relative tolerance stopping criteria | ||
|
||
|
||
#---------------------- | ||
# GMRES solver parameters | ||
#---------------------- | ||
gmres_rel_tol = 1.e-12 # relative tolerance stopping criteria | ||
gmres_abs_tol = 0 # absolute tolerance stopping criteria | ||
gmres_verbose = 1 # gmres verbosity; if greater than 1, more residuals will be printed out | ||
gmres_max_outer = 20 # max number of outer iterations | ||
gmres_max_inner = 5 # max number of inner iterations, or restart number | ||
gmres_max_iter = 100 # max number of gmres iterations | ||
gmres_min_iter = 1 # min number of gmres iterations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
#---------------------- | ||
# Problem specification | ||
#---------------------- | ||
prob_lo = 0. 0. # physical lo coordinate | ||
prob_hi = 256e-7 64e-7 # physical hi coordinate | ||
|
||
cell_depth = 1.0e-7 | ||
|
||
# refer to Init.cpp | ||
prob_type = 16 | ||
chk_base_name = chk | ||
plot_base_name = plt | ||
|
||
# number of cells in domain. IMP: 0.5 nm for deterministic simulations | ||
n_cells = 256 64 | ||
# max number of cells in a box | ||
max_grid_size = 32 64 | ||
|
||
# Time-step control | ||
fixed_dt = 1.e-13 | ||
|
||
# Controls for number of steps between actions | ||
max_step = 1000000 | ||
plot_int = 1000 | ||
chk_int = 100000 | ||
restart = -1 | ||
|
||
use_ice_nucleation = 1 | ||
|
||
#---------------------- | ||
# Thermodynamic and transport properties: | ||
#------------------------------------------------------------------------------------------------------------------------------------ | ||
# Temperature (K) | 230 235 240 245 250 255 260 265 270 | ||
#------------------------------------------------------------------------------------------------------------------------------------ | ||
# c0_water | 0.1099 0.0957 0.082 0.0687 0.0558 0.0431 0.0308 0.0186 0.0066 | ||
# c0_ice | 1.0637 1.0591 1.0539 1.048 1.0415 1.0341 1.0259 1.0167 1.0064 | ||
# mu_water (Poise) | 0.9124 0.2588 0.1279 0.0782 0.0536 0.0394 0.0304 0.0243 0.0200 | ||
# fh_chi | 2.6194 2.5637 2.5103 2.4591 2.4099 2.3626 2.3172 2.2735 2.2314 | ||
# fh_kappa | 2.563e-15 2.508e-15 2.456e-15 2.406e-15 2.358e-15 2.311e-15 2.267e-15 2.224e-15 2.183e-15 | ||
# rho (g/cm^3) | 0.9453 0.9676 0.9789 0.9862 0.9912 0.9946 0.997 0.9986 0.9995 | ||
#------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
k_B = 1.3806488e-16 # Boltzmann's constant [units: cm2*g*s-2*K-1] | ||
T_init = 255.0 # [units: K] IMP: Change visc_coef, rho, fh_chi, fh_kappa, c_init_1, c_init_2 accordingly. | ||
|
||
# Viscous friction L phi operator | ||
# if abs(visc_type) = 1, L = div beta grad | ||
# if abs(visc_type) = 2, L = div [ beta (grad + grad^T) ] | ||
# if abs(visc_type) = 3, L = div [ beta (grad + grad^T) + I (gamma - (2/3)*beta) div ] | ||
# positive = assume constant coefficients | ||
# negative = assume spatially-varying coefficients | ||
visc_coef = 0.0394 # [units: g*cm-1*s-1] dynamic (shear) viscosity of water at T_init | ||
visc_type = 1 | ||
|
||
nspecies = 2 | ||
#molmass = 2.98e-23 2.98e-23 # molecular masses for nspecies (mass per molecule, *not* molar mass) | ||
use_flory_huggins = 1 | ||
|
||
fh_monomers = 1. 1. | ||
monomer_mass = 2.98e-23 | ||
rho0 = 0.9946 | ||
rhobar = 0.9946 0.9946 # pure component densities for all species. Same for ice and water for now. | ||
fh_chi = 0. 2.3626 2.3626 0. # = 2.79e09/(rhobar*k_B*T_init/monomer_mass) ~ 602.478/T_init. Off-diagonal terms should be identical. | ||
fh_kappa = 0. 2.311e-15 2.311e-15 0. # = 2.73e-6/(rhobar*k_B*T_init/monomer_mass) ~ 5.895e-13/T_init. Off-diagonal terms should be identical. | ||
|
||
is_ideal_mixture = 0 | ||
|
||
# initial values for c | ||
c_init_1 = 1.0341 0.0431 # ice ~ -1.605e-05*T_init^2+0.006603*T_init+0.3938 | ||
c_init_2 = 0.0431 1.0341 # water ~ -0.002575*T_init+0.7005 | ||
smoothing_width = 0.75 | ||
film_thickness = 32.e-7 | ||
|
||
# These are lower-triangules of symmetric matrices represented as vectors | ||
# Number of elements is (nspecies*(nspecies-1)/2) | ||
# The values are red row by row starting from top going down | ||
# (this allows easy addition/deletion of new species/rows) | ||
# So D_12; D_13, D_23; D_14, D_24, D_34; ... | ||
Dbar = 5.e-5 # Maxwell-Stefan diffusion constant | ||
|
||
use_charged_fluid = 0 | ||
dielectric_const = 9.2e-20 | ||
charge_per_mass = 0. 0. | ||
|
||
mg_verbose = 0 # multigrid verbosity | ||
algorithm_type = 6 | ||
|
||
#---------------------- | ||
# Stochastic parameters | ||
#---------------------- | ||
seed = 1 | ||
variance_coef_mom = 1. | ||
variance_coef_mass = 1. | ||
initial_variance_mom = 0. | ||
|
||
struct_fact_int = -1 | ||
n_steps_skip = 0 | ||
|
||
#---------------------- | ||
# Boundary conditions | ||
# ---------------------- | ||
# BC specifications: | ||
# -1 = periodic | ||
# 1 = slip | ||
# 2 = no-slip | ||
bc_vel_lo = -1 -1 -1 | ||
bc_vel_hi = -1 -1 -1 | ||
|
||
# -1 = periodic | ||
# 1 = wall | ||
# 2 = reservoir (Dirichlet values must be suppled by other means) | ||
bc_mass_lo = -1 -1 -1 | ||
bc_mass_hi = -1 -1 -1 | ||
|
||
# -1 = periodic | ||
# 1 = Dirichlet | ||
# 2 = Neumann | ||
bc_es_lo = -1 -1 -1 | ||
bc_es_hi = -1 -1 -1 | ||
|
||
potential_lo = 0. 0. 0. | ||
potential_hi = 0. 0. 0. | ||
|
||
#---------------------- | ||
# Staggered multigrid solver parameters | ||
#---------------------- | ||
stag_mg_verbosity = 0 # verbosity | ||
stag_mg_max_vcycles = 1 # max number of v-cycles | ||
stag_mg_minwidth = 2 # length of box at coarsest multigrid level | ||
stag_mg_bottom_solver = 0 # bottom solver type | ||
# 0 = smooths only, controlled by mg_nsmooths_bottom | ||
# 4 = Fancy bottom solve that coarsens additionally | ||
# and then applies stag_mg_nsmooths_bottom smooths | ||
stag_mg_nsmooths_down = 2 # number of smooths at each level on the way down | ||
stag_mg_nsmooths_up = 2 # number of smooths at each level on the way up | ||
stag_mg_nsmooths_bottom = 8 # number of smooths at the bottom | ||
stag_mg_max_bottom_nlevels = 10 # for stag_mg_bottom_solver 4, number of additional levels of multigrid | ||
stag_mg_omega = 1.e0 # weighted-jacobi omega coefficient | ||
stag_mg_smoother = 1 # 0 = jacobi; 1 = 2*dm-color Gauss-Seidel | ||
stag_mg_rel_tol = 1.e-9 # relative tolerance stopping criteria | ||
|
||
|
||
#---------------------- | ||
# GMRES solver parameters | ||
#---------------------- | ||
gmres_rel_tol = 1.e-12 # relative tolerance stopping criteria | ||
gmres_abs_tol = 0 # absolute tolerance stopping criteria | ||
gmres_verbose = 1 # gmres verbosity; if greater than 1, more residuals will be printed out | ||
gmres_max_outer = 20 # max number of outer iterations | ||
gmres_max_inner = 5 # max number of inner iterations, or restart number | ||
gmres_max_iter = 100 # max number of gmres iterations | ||
gmres_min_iter = 1 # min number of gmres iterations |
Oops, something went wrong.