diff --git a/Docs/sphinx/manual/LMeXControls.rst b/Docs/sphinx/manual/LMeXControls.rst index a51d0dbc..5f224a04 100644 --- a/Docs/sphinx/manual/LMeXControls.rst +++ b/Docs/sphinx/manual/LMeXControls.rst @@ -121,9 +121,11 @@ IO parameters amr.restart = chk00100 # [OPT, DEF=""] Checkpoint from which to restart the simulation amr.initDataPlt = plt01000 # [OPT, DEF=""] Provide a plotfile from which to extract initial data + peleLM.initDataPlt_reset_time = 1 # [OPT, DEF=1] Resets time and nsteps to 0 after restarting from a plot file. (Warning: plot file will be rewritten if not renamed and argument value = 0) + peleLM.initDataPlt_patch_flow_variables = false # [OPT, DEF=false] Enable user-defined flow variable patching after reading a plot solution file amr.regrid_on_restart = 1 # [OPT, DEF="0"] Trigger a regrid after the data from checkpoint are loaded amr.n_files = 64 # [OPT, DEF="min(256,NProcs)"] Number of files to write per level - + Refinement controls ------------------- @@ -255,7 +257,6 @@ PeleLMeX algorithm peleLM.deltaT_iterMax = 5 # [OPT, DEF=10] Maximum number of deltaT iterations peleLM.deltaT_tol = 1e-10 # [OPT, DEF=1.e-10] Tolerance of the deltaT solve peleLM.evaluate_vars =... # [OPT, DEF=""] In evaluate mode, list unitTest: diffTerm, divU, instRR, transportCC - peleLM.do_patch_flow_variables = false # [OPT, DEF=false] Enable user-defined flow variable patching after reading a plot solution file Transport coefficients and LES ------------------------------ @@ -453,41 +454,41 @@ to activate `temporal` diagnostics performing these reductions at given interval peleLM.do_species_balance = 1 # [OPT, DEF=0] Compute species mass balance, if temporals activated peleLM.do_patch_mfr=1 # [OPT, DEF=0] Activate patch based species flux diagbostics peleLM.bpatch.patchnames= # List of patchnames - - bpatch.patch_name1.patchtype=full-boundary # patchtype one of "full-boundary", "circle, "rectangle", "circle-annular" or "rectangle-annular" - bpatch.patch_name1.boundary_direction=2 # patch normal direction - bpatch.patch_name1.boundary_lo_or_hi=0 # patch in low or high side of boundary + + bpatch.patch_name1.patchtype=full-boundary # patchtype one of "full-boundary", "circle, "rectangle", "circle-annular" or "rectangle-annular" + bpatch.patch_name1.boundary_direction=2 # patch normal direction + bpatch.patch_name1.boundary_lo_or_hi=0 # patch in low or high side of boundary bpatch.patch_name1.species= O2 N2 # list of species names - - bpatch.patch_name2.patchtype=circle # patchtype one of "full-boundary", "circle, "rectangle", "circle-annular" or "rectangle-annular" - bpatch.patch_name2.boundary_direction=2 # patch normal direction - bpatch.patch_name2.boundary_lo_or_hi=0 # patch in low or high side of boundary + + bpatch.patch_name2.patchtype=circle # patchtype one of "full-boundary", "circle, "rectangle", "circle-annular" or "rectangle-annular" + bpatch.patch_name2.boundary_direction=2 # patch normal direction + bpatch.patch_name2.boundary_lo_or_hi=0 # patch in low or high side of boundary bpatch.patch_name2.patch_circle_radius=0.1 # radius of the patch - bpatch.patch_name2.patch_circle_center=0.0 0.0 0.0 # coordinates of patch center + bpatch.patch_name2.patch_circle_center=0.0 0.0 0.0 # coordinates of patch center bpatch.patch_name2.species= O2 N2 # list of species names - - bpatch.patch_name3.patchtype=rectangle - bpatch.patch_name3.boundary_direction=2 # patch normal direction - bpatch.patch_name3.boundary_lo_or_hi=0 # patch in low or high side of boundary + + bpatch.patch_name3.patchtype=rectangle + bpatch.patch_name3.boundary_direction=2 # patch normal direction + bpatch.patch_name3.boundary_lo_or_hi=0 # patch in low or high side of boundary bpatch.patch_name3.patch_rectangle_lo=0.0 0.0 0.0 # coordinates of low corner of rectangle bpatch.patch_name3.patch_rectangle_hi=1.0 1.0 1.0 # coordinates of high corner of rectangle bpatch.patch_name3.species= O2 N2 # list of species names - - bpatch.patch_name4.patchtype=circle-annular - bpatch.patch_name4.boundary_direction=2 # patch normal direction - bpatch.patch_name4.boundary_lo_or_hi=0 # patch in low or high side of boundary + + bpatch.patch_name4.patchtype=circle-annular + bpatch.patch_name4.boundary_direction=2 # patch normal direction + bpatch.patch_name4.boundary_lo_or_hi=0 # patch in low or high side of boundary bpatch.patch_name4.patch_circ_ann_center= 0.0 0.0 0.0 # center of annular circle bpatch.patch_name4.patch_circ_ann_inner_radius=0.1 # coordinates of patch center - bpatch.patch_name4.patch_circ_ann_outer_radius=0.2 # coordinates of patch center + bpatch.patch_name4.patch_circ_ann_outer_radius=0.2 # coordinates of patch center bpatch.patch_name4.species= O2 N2 # list of species names - - bpatch.patch_name5.patchtype=rectangle-annular - bpatch.patch_name5.boundary_direction=2 # patch normal direction - bpatch.patch_name5.boundary_lo_or_hi=0 # patch in low or high side of boundary - bpatch.patch_name5.patch_rect_ann_outer_lo = -1.0 -1.0 -1.0 # coordinates of low corner of outer rectangle - bpatch.patch_name5.patch_rect_ann_outer_hi = 1.0 1.0 1.0 # coordinates of high corner of outer rectangle - bpatch.patch_name5.patch_rect_ann_inner_lo = -0.5 -0.5 -0.5 # coordinates of low corner of inner rectangle - bpatch.patch_name5.patch_rect_ann_inner_hi = 0.5 0.5 0.5 # coordinates of high corner of inner rectangle + + bpatch.patch_name5.patchtype=rectangle-annular + bpatch.patch_name5.boundary_direction=2 # patch normal direction + bpatch.patch_name5.boundary_lo_or_hi=0 # patch in low or high side of boundary + bpatch.patch_name5.patch_rect_ann_outer_lo = -1.0 -1.0 -1.0 # coordinates of low corner of outer rectangle + bpatch.patch_name5.patch_rect_ann_outer_hi = 1.0 1.0 1.0 # coordinates of high corner of outer rectangle + bpatch.patch_name5.patch_rect_ann_inner_lo = -0.5 -0.5 -0.5 # coordinates of low corner of inner rectangle + bpatch.patch_name5.patch_rect_ann_inner_hi = 0.5 0.5 0.5 # coordinates of high corner of inner rectangle bpatch.patch_name5.species= O2 N2 # list of species names The `do_temporal` flag will trigger the creation of a `temporals` folder in your run directory and the following entries @@ -499,8 +500,8 @@ the balance (dMdt - sum of fluxes), and species balance (stored in `temporals/te advective \& diffusive fluxes across the domain boundaries, consumption rate integral and the error (dMdt - sum of fluxes - reaction). Users can also monitor species advective fluxes through specific regions of the domain boundaries (called as boundary patches). Patches can be defined on the low or high sides of non-embedded boundaries through the use of pre-defined shapes such as `circle`, -`rectangle`,`circle-annular`, `rectangle-annular` and `full-boundary`. The zero AMR level, advective fluxes of each of the user-specified species will be -reported in the ASCII `temppatchmfr` file in the temporals folder. +`rectangle`,`circle-annular`, `rectangle-annular` and `full-boundary`. The zero AMR level, advective fluxes of each of the user-specified species will be +reported in the ASCII `temppatchmfr` file in the temporals folder. 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 diff --git a/Docs/sphinx/manual/Tutorials_BFSFlame.rst b/Docs/sphinx/manual/Tutorials_BFSFlame.rst index 0eb154c1..cfd24d38 100644 --- a/Docs/sphinx/manual/Tutorials_BFSFlame.rst +++ b/Docs/sphinx/manual/Tutorials_BFSFlame.rst @@ -151,7 +151,7 @@ The initial solution consists of a premixed methane/air mixture in the upper par and pure hot air in the wake of the step. The default parameters provided above are overwritten using AMReX ParmParse in ``pelelmex_prob.cpp`` and the initial/boundary conditions implemented in ``pelelmex_prob.H``. Alternatively, the user can write a custom function to enforce an ignition kernel through the ``patchFlowVariables`` function in the problem-specific ``PeleLMeX_PatchFlowVariables.cpp`` file. -It should be kept in mind that the ``patchFlowVariables`` function can be used if the user wants to patch certain flow variables after reading an existing solution from a plot file ( ``peleLM.do_patch_flow_variables`` should be set to true). +It should be kept in mind that the ``patchFlowVariables`` function can be used if the user wants to patch certain flow variables after reading an existing solution from a plot file ( ``peleLM.initDataPlt_patch_flow_variables`` should be set to true). In addition to these three C++ files, an extra header is needed in the present case compared to :doc:`Tutorials_FlameSheet` : ``EBUserDefined.H``. This file is necessary to specify more complex EB diff --git a/Exec/RegTests/EB_BackwardStepFlame/input.2d b/Exec/RegTests/EB_BackwardStepFlame/input.2d index 9fc043c0..d9dc7cbe 100644 --- a/Exec/RegTests/EB_BackwardStepFlame/input.2d +++ b/Exec/RegTests/EB_BackwardStepFlame/input.2d @@ -35,7 +35,7 @@ peleLM.use_wbar = 1 # Include Wbar term in species diffu peleLM.sdc_iterMax = 2 # Number of SDC iterations peleLM.num_init_iter = 3 # Number of initial iterations peleLM.floor_species = 0 # Enforce species positivity (non-conservative !) -peleLM.do_patch_flow_variables = false # Enable flow variable patching after reading a plot solution file +peleLM.initDataPlt_patch_flow_variables = false # Enable flow variable patching after reading a plot solution file #---------------------- Temporal CONTROL ------------------------- peleLM.do_temporals = 1 # Turn temporals ON/OFF peleLM.temporal_int = 10 # Frequency of temporals diff --git a/Source/PeleLMeX.H b/Source/PeleLMeX.H index a235837a..5308f04c 100644 --- a/Source/PeleLMeX.H +++ b/Source/PeleLMeX.H @@ -1812,6 +1812,7 @@ public: int m_regrid_int = -1; int m_regrid_on_restart = 0; + int m_do_reset_time = 1; // Switch Evolve/Evaluate std::string m_run_mode = "normal"; diff --git a/Source/PeleLMeX_Init.cpp b/Source/PeleLMeX_Init.cpp index 239b6c30..454e0437 100644 --- a/Source/PeleLMeX_Init.cpp +++ b/Source/PeleLMeX_Init.cpp @@ -234,7 +234,9 @@ PeleLM::initData() // Do initial pressure iterations initialIterations(); - m_nstep = 0; + if (m_do_reset_time != 0) { + m_nstep = 0; + } if (m_do_temporals != 0) { writeTemporals(); diff --git a/Source/PeleLMeX_Plot.cpp b/Source/PeleLMeX_Plot.cpp index 30db02b6..25ffc76e 100644 --- a/Source/PeleLMeX_Plot.cpp +++ b/Source/PeleLMeX_Plot.cpp @@ -802,6 +802,10 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) // Use PelePhysics PltFileManager pele::physics::pltfilemanager::PltFileManager pltData(a_dataPltFile); Vector plt_vars = pltData.getVariableList(); + if (m_do_reset_time == 0) { + m_cur_time = pltData.getTime(); + m_nstep = pltData.getNsteps(); + } // Find required data in pltfile Vector spec_names; diff --git a/Source/PeleLMeX_Setup.cpp b/Source/PeleLMeX_Setup.cpp index 9a795774..0d5109f7 100644 --- a/Source/PeleLMeX_Setup.cpp +++ b/Source/PeleLMeX_Setup.cpp @@ -418,7 +418,8 @@ PeleLM::readParameters() pp.query("num_divu_iter", m_numDivuIter); pp.query("do_init_proj", m_do_init_proj); pp.query("num_init_iter", m_init_iter); - pp.query("do_patch_flow_variables", m_do_patch_flow_variables); + pp.query("initDataPlt_patch_flow_variables", m_do_patch_flow_variables); + pp.query("initDataPlt_reset_time", m_do_reset_time); // ----------------------------------------- // advance diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 82dbfcb2..48fac139 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 82dbfcb2ce0f80416b5b74dcba4267de426e097b +Subproject commit 48fac13972356ffb42c865b49cead2ce6b7fa3bb