Skip to content

Commit

Permalink
removing calculation of boundary velocity from gradphi calc (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn authored Sep 6, 2023
1 parent 6831033 commit 814a0aa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions amr-wind/projection/incflo_apply_nodal_projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ void incflo::UpdateGradP(
{
BL_PROFILE("amr-wind::incflo::UpdateGradP");

// Pressure and sigma are necessary to calculate the pressure gradient

bool variable_density =
(!m_sim.pde_manager().constant_density() ||
m_sim.physics_manager().contains("MultiPhase"));
Expand Down Expand Up @@ -495,17 +497,17 @@ void incflo::UpdateGradP(
}
}

// Perform projection
// Set up projection object
std::unique_ptr<Hydro::NodalProjector> nodal_projector;

auto bclo = get_projection_bc(Orientation::low);
auto bchi = get_projection_bc(Orientation::high);

// Velocity multifab is needed for proper initialization, but only the size
// matters for the purpose of calculating gradp, the values do not matter
Vector<MultiFab*> vel;
for (int lev = 0; lev <= finest_level; ++lev) {
vel.push_back(&(velocity(lev)));
vel[lev]->setBndry(0.0);
set_inflow_velocity(lev, time, *vel[lev], 1);
}

amr_wind::MLMGOptions options("nodal_proj");
Expand Down Expand Up @@ -549,5 +551,5 @@ void incflo::UpdateGradP(
}
}

// Average down is unnecessary because it is build into calcGradPhi
// Average down is unnecessary because it is built into calcGradPhi
}

0 comments on commit 814a0aa

Please sign in to comment.