Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding submodules to LMeX #41

Merged
merged 1 commit into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "Submodules/amrex"]
path = Submodules/amrex
url = https://github.com/AMReX-Codes/amrex.git
[submodule "Submodules/AMReX-Hydro"]
path = Submodules/AMReX-Hydro
url = https://github.com/AMReX-Codes/AMReX-Hydro.git
[submodule "Submodules/PelePhysics"]
path = Submodules/PelePhysics
url = https://github.com/AMReX-Combustion/PelePhysics.git
2 changes: 1 addition & 1 deletion Exec/Cases/CounterFlow/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ USE_EFIELD = FALSE
# PelePhysics
Chemistry_Model = drm19
Eos_Model = Fuego
Transport_Model = Simple
Transport_Model = Constant

include $(PELELMEX_HOME)/Utils/Make.PeleLMeX
39 changes: 21 additions & 18 deletions Exec/Cases/CounterFlow/input.2d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -33,44 +33,47 @@ prob.inert_radius = 0.0075
prob.inert_velocity = 0.2
prob.pertmag = 0.000
prob.pmf_datafile = "drm_CH4Air_stoich.dat"
prob.do_ignition = 1
prob.ignition_SphT = 2200.0
prob.do_ignition = 0
prob.ignition_SphT = 1000.0

#-------------------------PeleLM CONTROL----------------------------
peleLM.v = 1
peleLM.v = 4
peleLM.incompressible = 0
peleLM.rho = 1.17
peleLM.mu = 0.0
peleLM.use_wbar = 1
peleLM.sdc_iterMax = 2
peleLM.floor_species = 1
peleLM.use_wbar = 0
peleLM.sdc_iterMax = 1
peleLM.floor_species = 0
peleLM.deltaT_verbose = 0

#amr.restart = chk01500
#amr.restart = chk00100
#amr.regrid_on_restart = 1
amr.check_int = 100
amr.plot_int = 20
amr.max_step = 100
amr.dt_shrink = 0.01
amr.max_step = 120
amr.dt_shrink = 0.001
amr.stop_time = 1.1
#amr.stop_time = 1.00
amr.cfl = 0.25
amr.cfl = 0.4
amr.derive_plot_vars = avg_pressure mag_vort mass_fractions

peleLM.chem_integrator = "ReactorCvode"
peleLM.chem_integrator = "ReactorNull"
peleLM.use_typ_vals_chem = 1 # Use species/temp typical values in CVODE
ode.rtol = 1.0e-6 # Relative tolerance of the chemical solve
ode.atol = 1.0e-5 # Absolute tolerance factor applied on typical values
cvode.solve_type = denseAJ_direct # CVODE Linear solve type (for Newton direction)
cvode.max_order = 4 # CVODE max BDF order.
cvode.max_order = 2 # CVODE max BDF order.

godunov.use_ppm = 1
godunov.use_forceInTrans = 0

nodal_proj.verbose = 0
mac_proj.verbose = 0
#diffusion.verbose = 2

peleLM.do_temporals = 1
peleLM.temporal_int = 2
peleLM.mass_balance = 1
#peleLM.do_temporals = 1
#peleLM.temporal_int = 2
#peleLM.mass_balance = 1

#--------------------REFINEMENT CONTROL------------------------
amr.refinement_indicators = temp
Expand All @@ -96,6 +99,6 @@ amr.temp.field_name = temp
#amr.CH2O.value_greater = 1.00e-3
#amr.CH2O.field_name = Y(CH2O)

#amrex.fpe_trap_invalid = 1
#amrex.fpe_trap_zero = 1
#amrex.fpe_trap_overflow = 1
amrex.fpe_trap_invalid = 1
amrex.fpe_trap_zero = 1
amrex.fpe_trap_overflow = 1
10 changes: 7 additions & 3 deletions Exec/Cases/PremBunsen2D/input.2d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ prob.pertmag = 0.000
prob.Vin = 2.0
prob.Vcoflow = 0.4
prob.slot_width = 0.003
prob.pmf_datafile = "drm_CH4Air_stoich.dat"
pmf.datafile = "drm_CH4Air_stoich.dat"

#-------------------------PeleLM CONTROL----------------------------
peleLM.v = 2
Expand All @@ -53,8 +53,12 @@ amr.stop_time = 1.1
amr.cfl = 0.3
amr.derive_plot_vars = avg_pressure mag_vort mass_fractions

cvode.solve_type = dense # CVODE Linear solve type (for Newton direction)
ode.analytical_jacobian = 0 # Provide analytical jacobian (from Fuego)
peleLM.chem_integrator = "ReactorCvode"
peleLM.use_typ_vals_chem = 1 # Use species/temp typical values in CVODE
ode.rtol = 1.0e-6 # Relative tolerance of the chemical solve
ode.atol = 1.0e-5 # Absolute tolerance factor applied on typical values
cvode.solve_type = dense_direct # CVODE Linear solve type (for Newton direction)
cvode.max_order = 4 # CVODE max BDF order.

#--------------------REFINEMENT CONTROL------------------------
#amr.refinement_indicators = temp
Expand Down
12 changes: 5 additions & 7 deletions Exec/Cases/PremBunsen3D/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TOP = ../../../..
AMREX_HOME ?= ${TOP}/amrex
PELELMEX_HOME ?= ${TOP}/PeleLMeX
PELE_PHYSICS_HOME ?= ${TOP}/PelePhysics
AMREX_HYDRO_HOME ?= ${TOP}/AMReX-Hydro


# AMReX
Expand All @@ -19,14 +20,11 @@ USE_CUDA = FALSE
USE_HIP = FALSE

# PeleLMeX
USE_EFIELD = FALSE
USE_EFIELD = FALSE

# PelePhysics
Chemistry_Model = drm19
Reactions_Model = Fuego
Eos_Model = Fuego
Transport_Model = Simple

USE_SUNDIALS_PP = TRUE
Chemistry_Model = CH4Ion_GRI
Eos_Model = Fuego
Transport_Model = Simple

include $(PELELMEX_HOME)/Utils/Make.PeleLMeX
11 changes: 6 additions & 5 deletions Exec/Cases/PremBunsen3D/input.3d
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ peleLM.hi_bc = Outflow Outflow Outflow
#-------------------------AMR CONTROL----------------------------
amr.n_cell = 96 96 96 # Level 0 number of cells in each direction
amr.v = 1 # AMR verbose
amr.max_level = 2 # maximum level number allowed
amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 5 # how often to regrid
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est
Expand All @@ -32,7 +32,7 @@ prob.slot_width = 0.003
pmf.datafile = "drm_CH4Air_stoich.dat"

#-------------------------PeleLM CONTROL----------------------------
peleLM.v = 2
peleLM.v = 4
peleLM.incompressible = 0
peleLM.rho = 1.17
peleLM.mu = 0.0
Expand All @@ -41,12 +41,13 @@ peleLM.sdc_iterMax = 1
peleLM.floor_species = 0
peleLM.deltaT_verbose = 0

#amr.restart = chk00000
amr.restart = chk00010
#amr.initDataPlt = DRMplt14800
#amr.regrid_on_restart = 1
amr.check_int = 100
amr.plot_int = 10
amr.max_step = 100
amr.dt_shrink = 0.001
amr.max_step = 10
amr.dt_shrink = 0.0001
amr.stop_time = 1.1
#amr.stop_time = 1.00
amr.cfl = 0.3
Expand Down
2 changes: 1 addition & 1 deletion Exec/Cases/PremBunsen3D/pelelm_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ bcnormal(
if ( zone == 3 ) {
s_ext[VELZ] = prob_parm.Vin * ( 1.0 - (rad_xy/prob_parm.slot_width) * (rad_xy/prob_parm.slot_width) );
} else if ( zone == 1 ) {
s_ext[VELZ] = prob_parm.Vcoflow * ( 1.0 + (rad_xy)/0.025);
s_ext[VELZ] = prob_parm.Vcoflow * ( 1.0 + 1.5*(rad_xy)/0.025);
if ( rad_xy <= prob_parm.slot_width*1.4 ) s_ext[VELZ] = 0.0;
}

Expand Down
2 changes: 1 addition & 1 deletion Exec/Efield/FlameSheetIons/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ USE_HIP = FALSE
USE_EFIELD = TRUE

# PelePhysics
Chemistry_Model = CH4Ion_LuSk
Chemistry_Model = CH4Ion_GRI
Eos_Model = Fuego
Transport_Model = Simple

Expand Down
16 changes: 9 additions & 7 deletions Exec/Efield/FlameSheetIons/input.2d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ amr.max_grid_size = 128 # max box size
prob.P_mean = 101325.0
prob.standoff = -.01
prob.pertmag = 0.0000
prob.pmf_datafile = "pmf_CH4Air_1p0.dat"
pmf.datafile = "pmf_CH4Air_1p0.dat"
prob.PhiV_y_hi = 1000.0

#-------------------------PeleLM CONTROL----------------------------
Expand All @@ -36,14 +36,14 @@ peleLM.incompressible = 0
peleLM.rho = 1.17
peleLM.mu = 0.0
peleLM.use_wbar = 1
peleLM.sdc_iterMax = 1
peleLM.floor_species = 1
peleLM.sdc_iterMax = 2
peleLM.floor_species = 0
peleLM.num_init_iter = 2

#amr.restart = chk00005
#amr.check_int = 2000
amr.plot_int = 10
amr.max_step = 50
amr.max_step = 100
amr.dt_shrink = 0.01
amr.stop_time = 0.001
#amr.stop_time = 1.00
Expand All @@ -52,12 +52,14 @@ amr.cfl = 0.5
amr.derive_plot_vars = avg_pressure mag_vort mass_fractions chargedistrib efieldy

peleLM.chem_integrator = "ReactorCvode"
#peleLM.use_typ_vals_chem = 1 # Use species/temp typical values in CVODE
#ode.rtol = 1.0e-6 # Relative tolerance of the chemical solve
#ode.atol = 1.0e-5 # Absolute tolerance factor applied on typical values
peleLM.use_typ_vals_chem = 1 # Use species/temp typical values in CVODE
ode.rtol = 1.0e-6 # Relative tolerance of the chemical solve
ode.atol = 1.0e-5 # Absolute tolerance factor applied on typical values
cvode.solve_type = denseAJ_direct # CVODE Linear solve type (for Newton direction)
cvode.max_order = 4 # CVODE max BDF order.

godunov.use_ppm = 0

#--------------------REFINEMENT CONTROL------------------------
ef.phiV_lo_bc = Interior Dirichlet
ef.phiV_hi_bc = Interior Dirichlet
Expand Down
8 changes: 4 additions & 4 deletions Exec/RegTests/EB_ChallengeProblem/input.3d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ peleLM.temporal_int = 2
peleLM.mass_balance = 1

#amr.restart = chk00005
amr.check_int = 5
amr.check_int = 20
amr.plot_int = 10
amr.max_step = 5
amr.max_step = 200
amr.dt_shrink = 0.1
amr.stop_time = 1.0
#amr.stop_time = 1.00
amr.cfl = 0.15
amr.cfl = 0.3
amr.derive_plot_vars = avg_pressure mag_vort mass_fractions

# --------------- INPUTS TO CHEMISTRY REACTOR ---------------
Expand Down Expand Up @@ -86,7 +86,7 @@ nodal_proj.verbose = 2
nodal_proj.mg_max_coarsening_level = 2
nodal_proj.bottom_solver = "smoother"

fabarray.mfiter_tile_size = 1024 1024 1024
#fabarray.mfiter_tile_size = 1024 1024 1024

amrex.fpe_trap_invalid = 1
amrex.fpe_trap_zero = 1
Expand Down
4 changes: 3 additions & 1 deletion Exec/RegTests/EB_ChallengeProblem/input.3d-regt_Hypre
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ peleLM.hi_bc = NoSlipWallAdiab NoSlipWallAdiab NoSlipWallAdiab

#-------------------------AMR CONTROL----------------------------
amr.n_cell = 64 64 32 # Level 0 number of cells in each direction
amr.n_cell = 256 256 128 # Level 0 number of cells in each direction
amr.n_cell = 128 128 64 # Level 0 number of cells in each direction
amr.v = 1 # AMR verbose
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 2 # refinement ratio
Expand Down Expand Up @@ -62,7 +64,7 @@ cvode.max_order = 4 # CVODE max BDF order.

#------------------------- EB SETUP -----------------------------
eb2.geom_type = UserDefined
eb2.small_volfrac = 1.e-2
eb2.small_volfrac = 1.e-3

#------------ INPUTS TO CONSTANT TRANSPORT -----------------
transport.const_viscosity = 0.0002
Expand Down
4 changes: 2 additions & 2 deletions Exec/RegTests/EB_EnclosedFlame/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AMREX_HYDRO_HOME ?= ${TOP}/AMReX-Hydro


# AMReX
DIM = 2
DIM = 3
DEBUG = FALSE
PRECISION = DOUBLE
VERBOSE = FALSE
Expand All @@ -24,7 +24,7 @@ USE_HIP = FALSE
# PeleLMeX

# PelePhysics
Chemistry_Model = drm19
Chemistry_Model = dodecane_lu
Eos_Model = Fuego
Transport_Model = Simple

Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB_EnclosedFlame/input.3d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ peleLM.use_wbar = 1
peleLM.sdc_iterMax = 2
peleLM.floor_species = 0
peleLM.num_divu_iter = 1
peleLM.num_init_iter = 0
peleLM.num_init_iter = 1

peleLM.do_temporals = 1
peleLM.temporal_int = 2
Expand Down
31 changes: 14 additions & 17 deletions Exec/RegTests/EB_EnclosedFlame/pelelm_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ void pelelm_initdata(int i, int j, int k,
amrex::Real massfrac[NUM_SPECIES] = {0.0};
amrex::Real pert = 0.0;

amrex::Real radius = std::sqrt(AMREX_D_TERM( (x-xc)*(x-xc),
+ (y-yc)*(y-yc),
+ (z-zc)*(z-zc)));
amrex::Real radius = std::sqrt( (x-xc)*(x-xc)
+ (y-yc)*(y-yc));

if (prob_parm.pertmag > 0.0)
{
Expand All @@ -60,8 +59,6 @@ void pelelm_initdata(int i, int j, int k,
amrex::Real angle = std::atan2((y-yc),(x-xc));
pert = prob_parm.pertmag *
(0.7 * std::sin(2*angle) +
//1.023 * std::sin(2 * (angle - 0.004598) / radius2) +
//0.945 * std::sin(3 * (angle - 0.00712435) / radius2) +
0.9 * std::sin(8 * angle ) +
1.4 * std::sin(4 * angle ));
}
Expand All @@ -70,16 +67,16 @@ void pelelm_initdata(int i, int j, int k,
amrex::Real y2 = 3.6 - (radius - prob_parm.standoff + 1.42*dx[1] + pert)*100;

#elif ( AMREX_SPACEDIM == 3 )

amrex::Real pertLz = (prob_parm.pertLz > 0.0) ? prob_parm.pertLz
: Lz;
amrex::Real angle = std::atan2((y-yc),(x-xc));
amrex::Real angle2 = std::atan2((z-zc),(y-yc));
pert = prob_parm.pertmag *
(0.7 * std::sin(2*angle) +
0.9 * std::sin(8 * angle ) +
1.4 * std::sin(4 * angle )) *
(1.2 * std::sin(2*angle2) +
0.5 * std::sin(8 * angle2 ) +
0.9 * std::sin(16 * angle2 ));
(0.974 * std::sin(3 * angle ) *
0.995 * std::sin(2 * Pi * (z - 0.00712435) / pertLz) +
0.983 * std::sin(11 * (angle-0.63578) ) *
0.982 /* std::sin(2 * Pi * 3 * (z - 0.0014234) / pertLz)*/ +
1.022 * std::sin(7 * angle ) *
0.945 * std::sin(2 * Pi * 2 * (z - 0.0039765) / pertLz));
}

amrex::Real y1 = 3.6 - (radius - prob_parm.standoff - 1.42*dx[1] + pert)*100;
Expand All @@ -96,12 +93,12 @@ void pelelm_initdata(int i, int j, int k,
}
eos.X2Y(molefrac, massfrac);

vel(i,j,k,0) = 0.0;
vel(i,j,k,0) = 0.1;
#if ( AMREX_SPACEDIM == 2 )
vel(i,j,k,1) = pmf_vals[1]*1e-2;
vel(i,j,k,1) = 0.1;
#elif ( AMREX_SPACEDIM == 3 )
vel(i,j,k,1) = 0.0;
vel(i,j,k,2) = pmf_vals[1]*1e-2;
vel(i,j,k,1) = 0.1;
vel(i,j,k,2) = 0.0;
#endif

amrex::Real P_cgs = prob_parm.P_mean * 10.0;
Expand Down
11 changes: 3 additions & 8 deletions Exec/RegTests/EB_EnclosedFlame/pelelm_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ void PeleLM::readProbParm()
pp.query("P_mean", PeleLM::prob_parm->P_mean);
pp.query("standoff", PeleLM::prob_parm->standoff);
pp.query("pertmag", PeleLM::prob_parm->pertmag);
#if (AMREX_SPACEDIM == 3)
pp.query("pertLz", PeleLM::prob_parm->pertLz);
#endif

PeleLM::pmf_data.initialize();

auto& trans_parm = PeleLM::trans_parms.host_trans_parm();
amrex::ParmParse pptr("transport");
pp.query("const_viscosity", trans_parm.const_viscosity);
pp.query("const_bulk_viscosity", trans_parm.const_bulk_viscosity);
pp.query("const_conductivity", trans_parm.const_conductivity);
pp.query("const_diffusivity", trans_parm.const_diffusivity);
PeleLM::trans_parms.sync_to_device();
}
Loading