This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement TurbInflow based on the latest PelePhysics version (#221)
* TurbInflow in GNUMake * TurbParn is now an PeleLM static object: initialize and handle check accordingly. * Update the TurbInflow folder, setting up a test of the TurbInflow capability. * Update submodules. * Add TurbInflow to CMaket
- Loading branch information
Showing
16 changed files
with
461 additions
and
484 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 |
---|---|---|
@@ -1,53 +1,29 @@ | ||
PELELM_HOME = ../../.. | ||
SUBMODS = ${PELELM_HOME}/Submodules | ||
AMREX_HOME ?= ${SUBMODS}/amrex | ||
IAMR_HOME ?= ${SUBMODS}/IAMR | ||
PELE_PHYSICS_HOME ?= ${SUBMODS}/PelePhysics | ||
AMREX_HYDRO_HOME ?= ${SUBMODS}/AMReX-Hydro | ||
|
||
DEBUG = FALSE | ||
#DEBUG = TRUE | ||
DIM = 3 | ||
COMP = gcc | ||
PRECISION = DOUBLE | ||
USE_MPI = TRUE | ||
USE_OMP = FALSE | ||
|
||
EBASE = main | ||
#EBASE = turbToFab | ||
|
||
#NEEDS_FORT = FALSE | ||
NEEDS_FORT = TRUE | ||
|
||
include $(AMREX_HOME)/Tools/GNUMake/Make.defs | ||
|
||
CEXE_sources += $(EBASE).cpp | ||
ifeq ($(NEEDS_FORT), TRUE) | ||
F90EXE_sources += $(EBASE)_nd.F90 | ||
endif | ||
|
||
INCLUDE_LOCATIONS += $(AMREX_HOME)/Src/Base | ||
include $(AMREX_HOME)/Src/Base/Make.package | ||
vpathdir += $(AMREX_HOME)/Src/Base | ||
|
||
INCLUDE_LOCATIONS += $(AMREX_HOME)/Src/Extern/amrdata | ||
include $(AMREX_HOME)/Src/Extern/amrdata/Make.package | ||
vpathdir += $(AMREX_HOME)/Src/Extern/amrdata | ||
|
||
INCLUDE_LOCATIONS += $(AMREX_HOME)/Tools/C_util | ||
include $(AMREX_HOME)/Tools/C_util/Make.package | ||
vpathdir += $(AMREX_HOME)/Tools/C_util | ||
|
||
INCLUDE_LOCATIONS += $(IAMR_HOME)/Source/TurbInflow | ||
include $(IAMR_HOME)/Source/TurbInflow/Make.package | ||
vpathdir += $(IAMR_HOME)/Source/TurbInflow | ||
|
||
vpath %.c : . $(vpathdir) | ||
vpath %.h : . $(vpathdir) | ||
vpath %.cpp : . $(vpathdir) | ||
vpath %.H : . $(vpathdir) | ||
vpath %.F : . $(vpathdir) | ||
vpath %.f : . $(vpathdir) | ||
vpath %.f90 : . $(vpathdir) | ||
|
||
include $(AMREX_HOME)/Tools/GNUMake/Make.rules | ||
TOP = ../../../.. | ||
AMREX_HOME ?= ${TOP}/amrex | ||
PELELM_HOME ?= ${TOP}/PeleLM | ||
PELE_PHYSICS_HOME ?= ${TOP}/PelePhysics | ||
AMREX_HYDRO_HOME ?= ${TOP}/AMReX-Hydro | ||
|
||
|
||
# AMReX | ||
DIM = 3 | ||
DEBUG = TRUE | ||
PRECISION = DOUBLE | ||
VERBOSE = FALSE | ||
TINY_PROFILE = FALSE | ||
|
||
# Compilation | ||
COMP = gnu | ||
USE_MPI = TRUE | ||
USE_OMP = FALSE | ||
USE_CUDA = FALSE | ||
USE_HIP = FALSE | ||
|
||
# PeleLM | ||
|
||
# PelePhysics | ||
Chemistry_Model = air | ||
Eos_Model = Fuego | ||
Transport_Model = Simple | ||
|
||
include $(PELELM_HOME)/Tools/Make/Make.PeleLM |
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,134 @@ | ||
#----------------------DOMAIN DEFINITION------------------------ | ||
geometry.is_periodic = 1 1 0 # For each dir, 0: non-perio, 1: periodic | ||
geometry.coord_sys = 0 # 0 => cart, 1 => RZ | ||
geometry.prob_lo = 0.0 0.0 0.0 # x_lo y_lo (z_lo) | ||
geometry.prob_hi = 0.01 0.01 0.01 # x_hi y_hi (z_hi) | ||
|
||
# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<< | ||
# Interior, Inflow, Outflow, Symmetry, | ||
# SlipWallAdiab, NoSlipWallAdiab, SlipWallIsotherm, NoSlipWallIsotherm | ||
peleLM.lo_bc = Interior Interior Inflow | ||
peleLM.hi_bc = Interior Interior Outflow | ||
|
||
|
||
#-------------------------AMR CONTROL---------------------------- | ||
amr.n_cell = 64 64 64 # Level 0 number of cells in each direction | ||
amr.v = 1 # AMR verbose | ||
amr.max_level = 1 # maximum level number allowed | ||
amr.ref_ratio = 2 2 2 2 # refinement ratio | ||
amr.regrid_int = 2 # how often to regrid | ||
amr.n_error_buf = 1 1 2 2 # number of buffer cells in error est | ||
amr.grid_eff = 0.7 # what constitutes an efficient grid | ||
amr.blocking_factor = 16 # block factor in grid generation (min box size) | ||
amr.max_grid_size = 64 # max box size | ||
|
||
|
||
#--------------------------- Problem ------------------------------- | ||
prob.T_mean = 298.0 | ||
prob.P_mean = 101325.0 | ||
prob.flowDir = 2 | ||
prob.flowMag = 5 | ||
|
||
#turbinflow.turb_file = TurbFileHIT/TurbTEST | ||
#turbinflow.turb_scale_loc = 633.151 | ||
turbinflow.turb_scale_loc = 638.151 | ||
turbinflow.turb_scale_vel = 0.5 | ||
turbinflow.turb_center = 0.005 0.005 | ||
turbinflow.turb_conv_vel = 5. | ||
turbinflow.turb_nplane = 32 | ||
|
||
#----------------------TIME STEPING CONTROL---------------------- | ||
max_step = 20 # maximum number of time steps | ||
stop_time = 0.04 # final physical time | ||
ns.cfl = 0.7 # cfl number for hyperbolic system | ||
ns.init_shrink = 0.0001 # scale back initial timestep | ||
ns.change_max = 1.1 # max timestep size increase | ||
ns.dt_cutoff = 5.e-10 # level 0 timestep below which we halt | ||
|
||
#-------------------------IO CONTROL---------------------------- | ||
amr.checkpoint_files_output = 0 | ||
amr.check_file = chk # root name of checkpoint file | ||
amr.check_int = 5 # number of timesteps between checkpoints | ||
amr.plot_file = plt_ # root name of plot file | ||
amr.plot_int = 20000 # number of timesteps between plot files | ||
amr.derive_plot_vars = rhoRT mag_vort avg_pressure gradpx gradpy diveru cc_transport_coeffs | ||
amr.grid_log = grdlog # name of grid logging file | ||
|
||
#---------------------PHYSICS CONTROL------------------------ | ||
ns.fuelName = N2 # Fuel species name | ||
ns.unity_Le = 0 # Use unity Le number transport ? | ||
ns.hack_nochem = 0 # Bypass chemistry ? 0: no, 1: yes | ||
ns.gravity = 0 # body force (gravity in MKS units) | ||
|
||
#--------------------NUMERICS CONTROL------------------------ | ||
ns.init_iter = 0 # Number of initial iterations to def pressure | ||
ns.num_divu_iters = 0 # Number of DivU iteration at initialization | ||
ns.sdc_iterMAX = 2 # Number of SDC iterations | ||
ns.num_mac_sync_iter = 2 # Number of mac_sync iterations | ||
peleLM.chem_integrator = "ReactorNull" | ||
|
||
#------------ INPUTS TO CONSTANT TRANSPORT ----------------- | ||
transport.const_viscosity = 0.0001 | ||
transport.const_bulk_viscosity = 0.0 | ||
transport.const_conductivity = 0.0 | ||
transport.const_diffusivity = 0.0001 | ||
|
||
|
||
#--------------------REFINEMENT CONTROL------------------------ | ||
amr.refinement_indicators = O2 | ||
amr.O2.max_level = 1 | ||
amr.O2.value_greater = 0.4 | ||
amr.O2.field_name = Y(O2) | ||
|
||
|
||
# --------------------------------------------------------------- | ||
# ------------------ ADVANCED USER INPUTS ---------------------- | ||
# --------------------------------------------------------------- | ||
|
||
#---------------- ADV ALGORITHM CONTROL ------------------- | ||
ns.sum_interval = 5 # timesteps between computing mass | ||
ns.do_reflux = 1 # 1 => do refluxing | ||
ns.do_mac_proj = 1 # 1 => do MAC projection | ||
ns.do_sync_proj = 1 # 1 => do Sync Project | ||
ns.be_cn_theta = 0.5 | ||
ns.do_temp = 1 | ||
ns.do_diffuse_sync = 1 | ||
ns.do_reflux_visc = 1 | ||
ns.zeroBndryVisc = 1 | ||
ns.v = 1 | ||
|
||
# | ||
ns.divu_ceiling = 1 | ||
ns.divu_dt_factor = .4 | ||
ns.min_rho_divu_ceiling = .01 | ||
|
||
# ------------------ INPUTS TO DIFFUSION CLASS -------------------- | ||
ns.visc_tol = 1.0e-12 # tolerence for viscous solves | ||
ns.visc_abs_tol = 1.0e-12 # tolerence for viscous solves | ||
diffuse.max_order = 4 | ||
diffuse.tensor_max_order = 4 | ||
diffuse.v = 0 | ||
|
||
# ------------------ INPUTS TO PROJECTION CLASS ------------------- | ||
nodal_proj.proj_tol = 1.0e-12 # tolerence for projections | ||
nodal_proj.proj_abs_tol = 1.0e-12 | ||
nodal_proj.sync_tol = 1.0e-12 # tolerence for projections | ||
nodal_proj.rho_wgt_vel_proj = 0 # 0 => const den proj, 1 => rho weighted | ||
nodal_proj.do_outflow_bcs = 0 | ||
nodal_proj.verbose = 0 | ||
|
||
# ------------------ INPUTS TO MACPROJ CLASS ------------------- | ||
mac_proj.mac_tol = 1.0e-12 # tolerence for mac projections | ||
mac_proj.mac_sync_tol = 1.0e-12 # tolerence for mac SYNC projection | ||
mac_proj.mac_abs_tol = 1.0e-12 | ||
mac_proj.do_outflow_bcs = 0 | ||
mac_proj.verbose = 0 | ||
|
||
#--------------------------OMP TILE INPUTS----------------------------- | ||
fabarray.mfiter_tile_size = 1024 1024 1024 | ||
|
||
#--------------------------DEBUG/REGTESTS INPUTS----------------------------- | ||
amrex.regtest_reduction=1 | ||
amrex.fpe_trap_invalid = 1 | ||
amrex.fpe_trap_zero = 1 | ||
amrex.fpe_trap_overflow = 1 |
Oops, something went wrong.