Skip to content

Commit

Permalink
Used blocks dimension instead of global dimension in NSFVAction
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahansel committed Apr 4, 2023
1 parent 7f06340 commit 0c45937
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion modules/navier_stokes/src/actions/NSFVAction.C
Expand Up @@ -2308,12 +2308,16 @@ NSFVAction::addRelationshipManagers(Moose::RelationshipManagerType input_rm_type
void
NSFVAction::processMesh()
{
_dim = _mesh->dimension();
_problem->needFV();

// If the user doesn't define a block name we go with the default
if (!_blocks.size())
{
_blocks.push_back("ANY_BLOCK_ID");
_dim = _mesh->dimension();
}
else
_dim = _mesh->getBlocksDimension(_blocks);
}

void
Expand Down
Expand Up @@ -44,11 +44,11 @@ PINSFVSpeedFunctorMaterial::PINSFVSpeedFunctorMaterial(const InputParameters & p
parameters.isParamSetByUser(NS::superficial_velocity_x) +
parameters.isParamSetByUser(NS::superficial_velocity_y) +
parameters.isParamSetByUser(NS::superficial_velocity_z);
if (num_components_specified != _mesh.dimension())
if (num_components_specified != blocksDimension())
mooseError("Only ",
num_components_specified,
" superficial velocity components were provided for a mesh of dimension ",
_mesh.dimension());
blocksDimension());

// Interstitial velocity is needed by certain correlations
addFunctorProperty<ADRealVectorValue>(NS::velocity,
Expand Down
Expand Up @@ -93,7 +93,7 @@ INSFVRhieChowInterpolator::INSFVRhieChowInterpolator(const InputParameters & par
ADFunctorInterface(this),
_moose_mesh(UserObject::_subproblem.mesh()),
_mesh(_moose_mesh.getMesh()),
_dim(_moose_mesh.dimension()),
_dim(blocksDimension()),
_vel(libMesh::n_threads()),
_p(dynamic_cast<INSFVPressureVariable *>(
&UserObject::_subproblem.getVariable(0, getParam<VariableName>(NS::pressure)))),
Expand Down

0 comments on commit 0c45937

Please sign in to comment.