Skip to content

Commit

Permalink
Merge pull request seahorce-scidac#133 from hklion/check_bc_type
Browse files Browse the repository at this point in the history
Check BC type is outflow when init from netcdf
  • Loading branch information
hklion authored Jan 12, 2024
2 parents 8c3c54b + 8682c20 commit 2b9c2e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Exec/OCCAMS/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ geometry.prob_hi = 320000. 320000. 0.

amr.n_cell = 563 751 40

geometry.is_periodic = 1 1 0
geometry.is_periodic = 0 0 0
zlo.type = "SlipWall"
zhi.type = "SlipWall"

xlo.type = "outflow"
xhi.type = "outflow"
ylo.type = "outflow"
yhi.type = "outflow"

# TIME STEP CONTROL
remora.fixed_dt = 60.0 # Timestep size (seconds)
remora.fixed_ndtfast_ratio = 20 # Baratropic timestep size (seconds)
Expand Down
8 changes: 8 additions & 0 deletions Source/Initialization/REMORA_init_bcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ void REMORA::init_bcs ()
amrex::Print() << "BC Type specified for face " << bcid << " is " << bc_type_in << std::endl;
amrex::Abort("This BC type is unknown");
}

if ((bcid == "xlo" || bcid == "xhi" ||
bcid == "ylo" || bcid == "yhi") &&
solverChoice.ic_bc_type == IC_BC_Type::Real &&
phys_bc_type[ori] != REMORA_BC::outflow)
{
amrex::Abort("BC type must be outflow in x and y when reading BCs from file");
}
};

f("xlo", Orientation(Direction::x,Orientation::low));
Expand Down

0 comments on commit 2b9c2e9

Please sign in to comment.