diff --git a/src/boundary_conditions/README.org b/src/boundary_conditions/README.org index e37527a5..0e569ed9 100644 --- a/src/boundary_conditions/README.org +++ b/src/boundary_conditions/README.org @@ -6,7 +6,8 @@ | v_t | foextrap | foextrap | ext_dir | ext_dir (0) | hoextrap | | rho | foextrap | foextrap | ext_dir | foextrap | if (advection_type == "BDS") foextrap | | | | | | | else hoextrap | -| scalar | foextrap | foextrap | ext_dir | foextrap | hoextrap | +| scalar | foextrap | foextrap | ext_dir | foextrap | if (advection_type == "BDS") foextrap | +| | | | | | else hoextrap | | force | foextrap | foextrap | foextrap | foextrap | foextrap | * projection diff --git a/src/boundary_conditions/boundary_conditions.cpp b/src/boundary_conditions/boundary_conditions.cpp index 9e1fed8a..07e7e6ac 100644 --- a/src/boundary_conditions/boundary_conditions.cpp +++ b/src/boundary_conditions/boundary_conditions.cpp @@ -267,12 +267,14 @@ void incflo::init_bcs () else if (bct == BC::slip_wall) { if (side == Orientation::low) { + // BDS requires foextrap to avoid introduction of local max/min if (m_advection_type == "BDS") { m_bcrec_density[0].setLo(dir, BCType::foextrap); } else{ m_bcrec_density[0].setLo(dir, BCType::hoextrap); } } else { + // BDS requires foextrap to avoid introduction of local max/min if (m_advection_type == "BDS") { m_bcrec_density[0].setHi(dir, BCType::foextrap); } else { @@ -335,9 +337,25 @@ void incflo::init_bcs () else if (bct == BC::slip_wall) { if (side == Orientation::low) { - for (auto& b : m_bcrec_tracer) b.setLo(dir, BCType::hoextrap); + for (auto& b : m_bcrec_tracer) { + // BDS requires foextrap to avoid introduction + // of local max/min + if (m_advection_type == "BDS") { + b.setLo(dir, BCType::foextrap); + } else { + b.setLo(dir, BCType::hoextrap); + } + } } else { - for (auto& b : m_bcrec_tracer) b.setHi(dir, BCType::hoextrap); + for (auto& b : m_bcrec_tracer) { + // BDS requires foextrap to avoid introduction + // of local max/min + if (m_advection_type == "BDS") { + b.setHi(dir, BCType::foextrap); + } else { + b.setHi(dir, BCType::hoextrap); + } + } } } else if (bct == BC::mass_inflow)