Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
- name: Run
working-directory: ./Exec/RegTests/EB_BackwardStepFlame/
run: |
mpirun -n 2 ./PeleLMeX2d.gnu.MPI.ex eb_bfs.inp amr.max_step=2 amr.plot_int=-1 amr.check_int=-1 amrex.abort_on_unused_inputs=1
mpirun -n 2 ./PeleLMeX2d.gnu.MPI.ex eb_bfs.inp amr.max_step=2 amr.plot_int=-1 amr.check_int=-1 amrex.abort_on_unused_inputs=1 mac_proj.verbose=2 mac_proj.atol=5e-11 mac_proj.rtol=5e-11

# Build and Run the Plasma flamesheet with GNU9.3 and MPI support
PLASMA:
Expand Down
1 change: 1 addition & 0 deletions Docs/sphinx/manual/LMeXControls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ 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_specname_map = spec1 spec2 # [OPT, DEF=""] If specified, lookup these entries instead of species names when populating species from the init plot file (length must match NUM_SPECIES)
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
Expand Down
4 changes: 2 additions & 2 deletions Exec/Plasma/FlameSheetIons/pelelmex_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct MyProblemSpecificFunctions : public DefaultProblemSpecificFunctions
massfrac[E_ID] = 0.0;
amrex::Real sum = 0.0;
for (int n = 0; n < NUM_SPECIES; n++) {
massfrac[n] = std::max(0.0, massfrac[n]);
massfrac[n] = amrex::max(0.0, massfrac[n]);
if (n != N2_ID)
sum += massfrac[n];
}
Expand Down Expand Up @@ -126,7 +126,7 @@ struct MyProblemSpecificFunctions : public DefaultProblemSpecificFunctions
for (int n = 0; n < NUM_SPECIES; n++) {
chargeDist += massfrac[n] * zk[n];
}
state(i, j, k, NE) = std::max(1.0e-24, chargeDist / elemCharge);
state(i, j, k, NE) = amrex::max(1.0e-24, chargeDist / elemCharge);

AMREX_D_TERM(state(i, j, k, VELX) = 0.0;
, state(i, j, k, VELY) = pmf_vals[1] * 0.01;
Expand Down
45 changes: 21 additions & 24 deletions Exec/Production/CounterFlowSpray/SprayParticlesInitInsert.cpp
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@

#include "SprayParticles.H"
#include "SprayInjection.H"
#include "pelelmex_prob.H"

using namespace amrex;

class CounterFlowJet : public SprayJet
{
public:
// Use default constructor
CounterFlowJet(const std::string jet_name, const Geometry& geom)
CounterFlowJet(const std::string jet_name, const amrex::Geometry& geom)
: SprayJet(jet_name, geom)
{
}

bool get_new_particle(
const Real time,
const Real& phi_radial,
const Real& cur_radius,
Real& umag,
Real& theta_spread,
Real& phi_swirl,
Real& dia_part,
Real& T_part,
Real* Y_part) override;
const amrex::Real time,
const amrex::Real& phi_radial,
const amrex::Real& cur_radius,
amrex::Real& umag,
amrex::Real& theta_spread,
amrex::Real& phi_swirl,
amrex::Real& dia_part,
amrex::Real& T_part,
amrex::Real* Y_part) override;
};

bool
CounterFlowJet::get_new_particle(
const Real time,
const Real& phi_radial,
const Real& cur_radius,
Real& umag,
Real& theta_spread,
Real& phi_swirl,
Real& dia_part,
Real& T_part,
Real* Y_part)
const amrex::Real time,
const amrex::Real& phi_radial,
const amrex::Real& cur_radius,
amrex::Real& umag,
amrex::Real& theta_spread,
amrex::Real& phi_swirl,
amrex::Real& dia_part,
amrex::Real& T_part,
amrex::Real* Y_part)
{
umag = m_jetVel;
T_part = m_jetT;
dia_part = m_dropDist->get_dia();
phi_swirl = 0.;
// Random spread angle
Real tan_vel_comp = (2. * amrex::Random() - 1.) * 0.05;
amrex::Real tan_vel_comp = (2. * amrex::Random() - 1.) * 0.05;
theta_spread = std::asin(tan_vel_comp);
for (int sp = 0; sp < SPRAY_FUEL_NUM; ++sp) {
Y_part[sp] = 0.;
Expand All @@ -54,7 +51,7 @@ CounterFlowJet::get_new_particle(

bool
SprayParticleContainer::injectParticles(
Real time, Real dt, int nstep, int lev, int finest_level)
amrex::Real time, amrex::Real dt, int nstep, int lev, int finest_level)
{
if (lev != 0) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/SprayTest/compareOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def pproc(args):
cer = float(line.split()[2])
if (cer > max_error):
errfail += 1
perr = "Error in {} on level {}: {} > {}".format(var,curlev,cer,maxerror)
perr = "Error in {} on level {}: {} > {}".format(var,curlev,cer,max_error)
print(perr)
if (varcount != len(vars)):
error = "Not all variables were found in plot file"
Expand Down
6 changes: 2 additions & 4 deletions Exec/RegTests/Unit/pelelmex_prob_parm.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@

#include <AMReX_REAL.H>

using namespace amrex::literals;

struct ProbParm
{
// Shared params
int probType = 0;
amrex::Real T_mean = 298.0_rt;
amrex::Real P_mean = 101325.0_rt;
amrex::Real T_mean = 298.0;
amrex::Real P_mean = 101325.0;
amrex::Real meanFlowMag = 0.0;
int meanFlowDir = 1;

Expand Down
2 changes: 2 additions & 0 deletions Source/PeleLMeX.H
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,7 @@ public:
std::unique_ptr<AdvanceAdvData>& advData,
std::unique_ptr<AdvanceDiffData>& diffData);

bool checkForNaNs();
void copyTransportOldToNew();
void copyStateNewToOld(int nGhost = 0);
void copyPressNewToOld();
Expand Down Expand Up @@ -1900,6 +1901,7 @@ public:
amrex::Vector<std::string> m_evaluatePlotVars;
bool m_write_hdf5_pltfile = false;
bool m_do_patch_flow_variables = false;
amrex::Vector<std::string> m_initDataPlt_specname_map = {};

//-----------------------------------------------------------------------------
// ALGORITHM
Expand Down
Loading
Loading