Skip to content

Commit

Permalink
Merge branch 'development' into LandSeaTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi authored Jun 24, 2024
2 parents 53f30ee + a0ea769 commit fa73cb6
Show file tree
Hide file tree
Showing 17 changed files with 547 additions and 9 deletions.
1 change: 1 addition & 0 deletions CMake/BuildERFExe.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/Initialization/ERF_init_from_metgrid.cpp
${SRC_DIR}/Initialization/ERF_init_uniform.cpp
${SRC_DIR}/Initialization/ERF_init1d.cpp
${SRC_DIR}/Initialization/ERF_init_TurbPert.cpp
${SRC_DIR}/Initialization/ERF_input_sponge.cpp
${SRC_DIR}/IO/Checkpoint.cpp
${SRC_DIR}/IO/ERF_ReadBndryPlanes.cpp
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USE_HIP = FALSE
USE_SYCL = FALSE

# Debugging
DEBUG = FALSE
DEBUG = TRUE

TEST = TRUE
USE_ASSERTION = TRUE
Expand Down
27 changes: 26 additions & 1 deletion Source/DataStructs/DataStruct.H
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <DiffStruct.H>
#include <SpongeStruct.H>
#include <TurbStruct.H>
#include <TurbPertStruct.H>

enum struct ABLDriverType {
None, PressureGradient, GeostrophicWind
Expand Down Expand Up @@ -60,6 +61,11 @@ enum Sponge {
ubar_sponge, vbar_sponge, nvars_sponge
};

enum struct PerturbationType {
BPM, CPM, None
// Box perturbation method, Cell perturbation method, None
};

/**
* Container holding many of the algorithmic options and parameters
*/
Expand Down Expand Up @@ -224,12 +230,28 @@ struct SolverChoice {
abl_driver_type = ABLDriverType::PressureGradient;
} else if (!abl_driver_type_string.compare("GeostrophicWind")) {
abl_driver_type = ABLDriverType::GeostrophicWind;
} else if (!abl_driver_type_string.compare("None")){
} else if (!abl_driver_type_string.compare("None")) {
abl_driver_type = ABLDriverType::None; // No ABL driver for simulating classical fluid dynamics problems
} else {
amrex::Error("Don't know this abl_driver_type");
}

// Which type of inflow turbulent generation
static std::string turb_pert_type_string = "None";
pp.query("inlet_perturbation_type",turb_pert_type_string);
if (!turb_pert_type_string.compare("BoxPerturbation")) {
pert_type = PerturbationType::BPM;
amrex::Print() << "Box perturbation method selected\n";
} else if (!turb_pert_type_string.compare("CellPerturbation")) {
pert_type = PerturbationType::CPM;
amrex::Print() << "Cell perturbation method selected\n";
} else if (!turb_pert_type_string.compare("None")) {
pert_type = PerturbationType::None;
amrex::Print() << "No perturbation method selected\n";
} else {
amrex::Abort("Dont know this inlet_perturbation_type");
}

amrex::Vector<amrex::Real> abl_pressure_grad_in = {0.0, 0.0, 0.0};
pp.queryarr("abl_pressure_grad",abl_pressure_grad_in);
for(int i = 0; i < AMREX_SPACEDIM; ++i) abl_pressure_grad[i] = abl_pressure_grad_in[i];
Expand Down Expand Up @@ -487,6 +509,9 @@ struct SolverChoice {
// User wishes to output time averaged velocity fields
bool time_avg_vel = false;

// Type of perturbation
PerturbationType pert_type;

// Numerical diffusion
bool use_NumDiff{false};
amrex::Real NumDiffCoeff{0.};
Expand Down
1 change: 1 addition & 0 deletions Source/DataStructs/Make.package
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ CEXE_headers += DiffStruct.H
CEXE_headers += AdvStruct.H
CEXE_headers += SpongeStruct.H
CEXE_headers += TurbStruct.H
CEXE_headers += TurbPertStruct.H
Loading

0 comments on commit fa73cb6

Please sign in to comment.