Skip to content

Commit

Permalink
BCType::foextrap as default for (scalar/tracer, BC::slip_wall) combin…
Browse files Browse the repository at this point in the history
…ation when advection_type == BDS
  • Loading branch information
siddanib committed Aug 1, 2024
1 parent f255842 commit ab8aab2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/boundary_conditions/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 20 additions & 2 deletions src/boundary_conditions/boundary_conditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ab8aab2

Please sign in to comment.