Skip to content

Commit

Permalink
Minor updates (#105)
Browse files Browse the repository at this point in the history
* Add an enstrophy derived (not EB aware yet) and get enstrophy integral
in temporals.

* Pass reaction data to derived to accomodate more cases. Really need to update
the entire process.

* Update EB_Pipe to accomodate turbulence in between plates (SINTEF).

* Add channel flow input file.

* Add dt to temporal data, always useful ...

* Add new derived to doc.

* Add min/max of state components to the temporals.

* Add a description of the temporal diagnostics in the doc.

* Update key for mass_balance to make it consistent with others.

* Update all the input files to reflect changes in temporals.

* Minor summer cleaning of trailing whitespaces.
  • Loading branch information
esclapez committed Jul 1, 2022
1 parent b449359 commit cc8bfea
Show file tree
Hide file tree
Showing 59 changed files with 603 additions and 333 deletions.
29 changes: 28 additions & 1 deletion Docs/source/LMeXControls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ The following list of derived variables are available in PeleLMeX:
- Vorticity (2D) or vorticity magnitude (3D)
* - `kinetic_energy`
- 1
- Kinetic energy
- Kinetic energy: 0.5 * rho * (u^2+v^2+w^2)
* - `enstrophy`
- 1
- enstrophy: 0.5 * rho * (\omega_x^2+\omega_y^2+\omega_z^2)
* - `HeatRelease`
- 1
- Heat release rate from chem. reactions

Note that `mixture_fraction` and `progress_variable` requires additional inputs from the users as described below.

Expand Down Expand Up @@ -203,6 +209,27 @@ Linear solvers are a key component of PeleLMeX algorithm, separate controls are
Run-time diagnostics
--------------------

PeleLMeX provides a few diagnostics to check you simulations while it is running as well as adding basic analysis ingredients.

It is often usefull to have an estimate of integrated quantities (kinetic energy, heat release rate, ,..), state extremas
or other overall balance information to get a sense of the status and sanity of the simulation. To this end, it is possible
to activate `temporal` diagnostics performing these reductions at given intervals:

::

#-------------------------TEMPORALS---------------------------
peleLM.do_temporals = 1 # [OPT, DEF=0] Activate temporal diagnostics
peleLM.temporal_int = 10 # [OPT, DEF=5] Temporal freq.
peleLM.do_extremas = 1 # [OPT, DEF=0] Trigger extremas, if temporals activated
peleLM.do_mass_balance = 1 # [OPT, DEF=0] Compute mass balance, if temporals activated

The `do_temporal` flag will trigger the creation of a `temporals` folder in your run directory and the following entries
will be appended to an ASCII `temporals/tempState` file: step, time, dt, kin. energy integral, enstrophy integral, mean pressure
, fuel consumption rate integral, heat release rate integral. Additionnally, if the `do_temporal` flag is activated, one can
turn on state extremas (stored in `temporals/tempExtremas` as min/max for each state entry) and mass balance (stored in
`temporals/tempMass`) computing the total mass, dMdt and mass fluxes across the domain boundary as well as the error in
the balance (dMdt - sum of fluxes).

Combustion diagnostics often involve the use of a mixture fraction and/or a progress variable, both of which can be defined
at run time and added to the derived variables included in the plotfile. If `mixture_fraction` or `progress_variable` is
added to the `amr.derive_plot_vars` list, one need to provide input for defining those. The mixture fraction is based on
Expand Down
3 changes: 1 addition & 2 deletions Exec/Cases/ChallengeProblem/input.3d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 3

peleLM.do_temporals = 1
peleLM.temporal_int = 2
peleLM.mass_balance = 1
peleLM.do_mass_balance = 1
peleLM.num_init_iter = 1
peleLM.num_divu_iter = 1

Expand Down
3 changes: 1 addition & 2 deletions Exec/Cases/ChallengeProblem/input.3d-regt_AMR
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 3

peleLM.do_temporals = 1
peleLM.temporal_int = 2
peleLM.mass_balance = 1
peleLM.do_mass_balance = 1
peleLM.num_init_iter = 1
peleLM.num_divu_iter = 1

Expand Down
3 changes: 1 addition & 2 deletions Exec/Cases/ChallengeProblem/input.3d-regt_Quarter
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 3

peleLM.do_temporals = 1
peleLM.temporal_int = 2
peleLM.mass_balance = 1
peleLM.do_mass_balance = 1
peleLM.num_init_iter = 1
peleLM.num_divu_iter = 1

Expand Down
3 changes: 1 addition & 2 deletions Exec/Cases/CounterFlow/input.2d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ mac_proj.verbose = 0
#diffusion.verbose = 2

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

#--------------------REFINEMENT CONTROL------------------------
amr.refinement_indicators = temp
Expand Down
3 changes: 1 addition & 2 deletions Exec/Cases/CounterFlowSpray/input.2d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ nodal_proj.rtol = 1.0e-10
#diffusion.verbose = 2

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

#--------------------REFINEMENT CONTROL------------------------
amr.refinement_indicators = temp
Expand Down
3 changes: 1 addition & 2 deletions Exec/RegTests/EB_EnclosedFlame/input.2d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 0

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

#amr.restart = chk00700
amr.check_int = 20
Expand Down
3 changes: 1 addition & 2 deletions Exec/RegTests/EB_EnclosedFlame/input.2d-regt_Hypre
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 0

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

#amr.restart = chk00030
amr.check_int = 20
Expand Down
3 changes: 1 addition & 2 deletions Exec/RegTests/EB_EnclosedFlame/input.3d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 1

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

#amr.restart = chk00700
amr.check_int = 20
Expand Down
3 changes: 1 addition & 2 deletions Exec/RegTests/EB_EnclosedVortex/input.2d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 3

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

amr.check_int = 100
amr.plot_int = 50
Expand Down
3 changes: 1 addition & 2 deletions Exec/RegTests/EB_EnclosedVortex/input.2d-regt_Hypre
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ peleLM.num_divu_iter = 1
peleLM.num_init_iter = 3

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

#amr.restart = chk00005
amr.check_int = 5
Expand Down
3 changes: 1 addition & 2 deletions Exec/RegTests/EB_EnclosedVortex/input.3d-regt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ peleLM.num_divu_iter = 0
peleLM.num_init_iter = 1

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

#amr.restart = chk01000
amr.check_int = 100
Expand Down
68 changes: 68 additions & 0 deletions Exec/RegTests/EB_PipeFlow/input.3d-channel_noEB
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#----------------------DOMAIN DEFINITION------------------------
# https://amrex-combustion.github.io/PeleLMeX/LMeXControls.html
geometry.is_periodic = 1 0 1 # For each dir, 0: non-perio, 1: periodic
geometry.coord_sys = 0 # 0 => cart, 1 => RZ
geometry.prob_lo = 0.0 -0.005 -0.0075 # x_lo y_lo (z_lo)
geometry.prob_hi = 0.03 0.005 0.0075 # x_hi y_hi (z_hi)

# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
# Interior, Inflow, Outflow, Symmetry,
# SlipWallAdiab, NoSlipWallAdiab, SlipWallIsotherm, NoSlipWallIsotherm
# STM: NoSlipWallIsotherm crashes?
peleLM.lo_bc = Interior NoSlipWallAdiab Interior
peleLM.hi_bc = Interior NoSlipWallAdiab Interior


#-------------------------AMR CONTROL----------------------------
#amr.n_cell = 96 32 48 # Level 0 number of cells in each direction
#amr.n_cell = 1152 384 576 # Level 0 number of cells in each direction
amr.n_cell = 384 128 192
amr.n_cell = 576 192 256
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 = 1000 # how often to regrid
amr.n_error_buf = 2 2 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 = 128 # max box size

#--------------------------- Problem -------------------------------
prob.T_mean = 750.0
prob.P_mean = 101325.0
prob.problem_type = 2
prob.meanFlowMag = 5.0

#-------------------------PeleLM CONTROL----------------------------
peleLM.v = 1
peleLM.incompressible = 0
peleLM.gradP0 = -709.79 0.0 0.0

peleLM.do_temporals = 1
peleLM.temporal_int = 10

#amr.restart = chk30000
amr.max_step = 1000
amr.stop_time = 0.2
amr.plot_int = 100
amr.check_int = 100
amr.cfl = 0.5
amr.derive_plot_vars = avg_pressure mag_vort

peleLM.chem_integrator = "ReactorNull" # Chemistry integrator, from PelePhysics available list

#--------------------REFINEMENT CONTROL------------------------
#amr.refinement_indicators = temp
#amr.temp.max_level = 2
#amr.temp.value_greater = 305
#amr.temp.field_name = temp

amr.refinement_indicators = yLow yHigh
amr.yLow.in_box_lo = -0.001 -0.0052 -0.0085
amr.yLow.in_box_hi = 0.031 -0.0045 0.0085
amr.yHigh.in_box_lo = -0.001 0.0045 -0.0085
amr.yHigh.in_box_hi = 0.031 0.0052 0.0085

#amrex.fpe_trap_invalid = 1
#amrex.fpe_trap_zero = 1
#amrex.fpe_trap_overflow = 1
Loading

0 comments on commit cc8bfea

Please sign in to comment.