https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
FVReconstructedPressureGradient Class Reference

Gradient method that reconstructs and relaxes the pressure gradient used for Rhie-Chow momentum-pressure coupling on the linear finite-volume segregated solver. More...

#include <FVReconstructedPressureGradient.h>

Inheritance diagram for FVReconstructedPressureGradient:
[legend]

Public Types

using GradientContainer = FVGradientMethod::GradientContainer
 
using GradientView = LinearFVGradientReader::GradientContainer
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 FVReconstructedPressureGradient (const InputParameters &params)
 
void linkFlowSystem (RhieChowMassFlux &rc, const LinearFVGradientReader &pressure_gradient)
 Link this stateful method to one Rhie-Chow flow-system configuration.
 
void validateSetup (const RhieChowMassFlux &rc) const
 Validate the one-time Rhie-Chow linkage and field layouts required by reconstruction.
 
const GradientMethodName & baseGradientMethodName () const
 Name of the gradient method used before the reconstructed coupling pressure gradient exists.
 
void resetForTimeStep (const RhieChowMassFlux &rc)
 Prepare solver-iteration state for a new time-step attempt.
 
void saveLaggedVelocityGradient (RhieChowMassFlux &rc)
 Save the lagged cell velocity gradient used by the reconstruction.
 
void computeCandidateFromCorrectedFlux (const RhieChowMassFlux &rc)
 Reconstruct the conservative pressure-gradient candidate from the corrected face flux.
 
const GradientContainer & reconstructedCandidate (const RhieChowMassFlux &rc) const
 Get the conservative candidate produced by the current pressure corrector.
 
void finalizeCouplingPressureGradient (const RhieChowMassFlux &rc, const GradientView &base_gradient)
 Relax and publish the current candidate as the coupling pressure gradient.
 
virtual void meshChanged () override
 
void computeGradient (SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const
 
Moose::FV::GradientLimiterType limiterType () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObject > getSharedPtr ()
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Member Functions

void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 

Protected Attributes

const bool & _enabled
 
MooseApp & _app
 
Factory & _factory
 
ActionFactory & _action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters & _pars
 
const Parallel::Communicator & _communicator
 
FEProblemBase & _mci_feproblem
 

Private Types

enum class  PressureGradientReconstructionState { NeedLaggedVelocityGradient , NeedCandidate , CandidateReady }
 Current stage of the pressure-gradient reconstruction cycle. More...
 
enum class  PressureGradientReconstructionEvent { Reset , SaveLaggedVelocityGradient , ReconstructCandidate , PublishCandidate }
 Operations that advance or reset the pressure-gradient reconstruction cycle. More...
 

Private Member Functions

void computeGradientWithoutLimiter (SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const override
 
void resolveGradientMethodDependencies (FEProblemBase &fe_problem) override
 
void checkFlowSystem (const RhieChowMassFlux &rc) const
 Check that a stateful operation is requested by the bound Rhie-Chow object.
 
void copyGradient (const GradientView &source, GradientContainer &destination)
 Copy gradient values while reusing compatible destination storage.
 
void transition (PressureGradientReconstructionEvent event)
 Apply and validate one reconstruction-cycle transition.
 
void updateCouplingPressureGradient (const RhieChowMassFlux &rc, const GradientView &base_gradient, const GradientContainer &reconstructed_candidate)
 Blend a reconstructed candidate into the persistent coupling pressure gradient.
 
RealVectorValue reconstructionVelocityGradient (const RhieChowMassFlux &rc, const RealVectorValue &elem_gradient, const FaceInfo &fi, bool elem_has_info, unsigned int velocity_component) const
 Interpolate a lagged velocity-component gradient to a face.
 
void assembleFaceProjection (const RhieChowMassFlux &rc, const ElemInfo &elem_info, const std::vector< RealVectorValue > &elem_velocity_gradients, const FaceInfo *fi, const Point &surface_vector, bool elem_has_info, DenseMatrix< Real > &matrix, DenseVector< Real > &projection_rhs) const
 Add one face's contribution to the area-weighted least-squares system that reconstructs the cell velocity of elem_info from corrected face fluxes.
 
DenseVector< Real > solveFaceProjection (const DenseMatrix< Real > &matrix, const DenseVector< Real > &projection_rhs) const
 Solve a cell's velocity-projection system.
 
Real reconstructPressureGradient (const RhieChowMassFlux &rc, const ElemInfo &elem_info, unsigned int component, Real reconstructed_velocity) const
 Invert one diagonal momentum equation to recover a pressure-gradient component.
 
bool suppressInfo () const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

const GradientMethodName _base_gradient_method_name
 Gradient method used before the reconstructed coupling pressure gradient exists.
 
const FVGradientMethod * _base_gradient_method = nullptr
 Resolved method used before the reconstructed coupling pressure gradient exists.
 
const Real _gradient_relaxation
 Relaxation factor applied to reconstructed pressure gradients.
 
const RhieChowMassFlux * _rhie_chow = nullptr
 Rhie-Chow object that owns this stateful reconstruction method.
 
const PorousRhieChowMassFlux * _porous_rhie_chow = nullptr
 Porous Rhie-Chow object used to identify pressure-baffle faces.
 
const SystemBase * _pressure_system = nullptr
 Pressure system that owns the reconstructed pressure variable.
 
unsigned int _pressure_variable_number = libMesh::invalid_uint
 Pressure variable reconstructed by this method.
 
std::vector< const SystemBase * > _momentum_systems
 Momentum systems coupled through the owning Rhie-Chow object.
 
std::vector< const LinearFVGradientReader * > _velocity_gradient_fields
 Ordinary gradient fields for the velocity components.
 
std::vector< std::vector< std::unique_ptr< NumericVector< Number > > > > _lagged_reconstruction_velocity_gradient
 Lagged velocity gradients indexed by velocity component and spatial direction.
 
PressureGradientReconstructionState _reconstruction_state
 Current position in the pressure-gradient reconstruction cycle.
 
dof_id_type _last_reconstructed_face_flux_iteration = 0
 Corrected face-flux iteration used by the previous reconstruction.
 
GradientContainer _reconstructed_pressure_gradient
 Reconstructed pressure-gradient candidate.
 
GradientContainer _coupling_pressure_gradient
 Persistent coupling pressure gradient.
 
const Moose::FV::GradientLimiterType _limiter_type
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 
const FEProblemBase * _si_problem
 

Detailed Description

Gradient method that reconstructs and relaxes the pressure gradient used for Rhie-Chow momentum-pressure coupling on the linear finite-volume segregated solver.

Responsibilities:

Definition at line 44 of file FVReconstructedPressureGradient.h.

Member Typedef Documentation

◆ GradientContainer

Definition at line 47 of file FVReconstructedPressureGradient.h.

◆ GradientView

Definition at line 48 of file FVReconstructedPressureGradient.h.

Member Enumeration Documentation

◆ PressureGradientReconstructionEvent

Operations that advance or reset the pressure-gradient reconstruction cycle.

Enumerator
Reset 

Reset the cycle to require a new lagged velocity-gradient snapshot.

SaveLaggedVelocityGradient 

Record that the lagged velocity-gradient snapshot has been saved.

ReconstructCandidate 

Record that a pressure-gradient candidate has been reconstructed.

PublishCandidate 

Record that the reconstructed candidate has been published.

Definition at line 100 of file FVReconstructedPressureGradient.h.

101 {
103 Reset,
110 };
@ Reset
Reset the cycle to require a new lagged velocity-gradient snapshot.
@ ReconstructCandidate
Record that a pressure-gradient candidate has been reconstructed.
@ PublishCandidate
Record that the reconstructed candidate has been published.
@ SaveLaggedVelocityGradient
Record that the lagged velocity-gradient snapshot has been saved.

◆ PressureGradientReconstructionState

Current stage of the pressure-gradient reconstruction cycle.

Enumerator
NeedLaggedVelocityGradient 

The next reconstruction cycle requires a lagged velocity-gradient snapshot.

NeedCandidate 

The lagged velocity gradient is available and a reconstructed candidate is required.

CandidateReady 

The reconstructed candidate is available and ready to be published.

Definition at line 89 of file FVReconstructedPressureGradient.h.

90 {
97 };
@ CandidateReady
The reconstructed candidate is available and ready to be published.
@ NeedLaggedVelocityGradient
The next reconstruction cycle requires a lagged velocity-gradient snapshot.
@ NeedCandidate
The lagged velocity gradient is available and a reconstructed candidate is required.

Constructor & Destructor Documentation

◆ FVReconstructedPressureGradient()

FVReconstructedPressureGradient::FVReconstructedPressureGradient ( const InputParameters &  params)

Definition at line 53 of file FVReconstructedPressureGradient.C.

54 : FVGradientMethod(params),
56 _base_gradient_method_name(getParam<GradientMethodName>("base_gradient_method")),
57 _gradient_relaxation(getParam<Real>("gradient_relaxation"))
58{
59}
const GradientMethodName _base_gradient_method_name
Gradient method used before the reconstructed coupling pressure gradient exists.
const Real _gradient_relaxation
Relaxation factor applied to reconstructed pressure gradients.

Member Function Documentation

◆ assembleFaceProjection()

void FVReconstructedPressureGradient::assembleFaceProjection ( const RhieChowMassFlux &  rc,
const ElemInfo &  elem_info,
const std::vector< RealVectorValue > &  elem_velocity_gradients,
const FaceInfo *  fi,
const Point &  surface_vector,
bool  elem_has_info,
DenseMatrix< Real > &  matrix,
DenseVector< Real > &  projection_rhs 
) const
private

Add one face's contribution to the area-weighted least-squares system that reconstructs the cell velocity of elem_info from corrected face fluxes.

The pressure-corrected face-normal volumetric flux at fi, with the lagged velocity-gradient Taylor correction from the cell center to the face removed, gives one linear equation for the unknown cell velocity, u_P . n_f ~= qhat_f. This face equation contributes |S_f| n_f n_f^T to matrix and |S_f| qhat_f n_f to projection_rhs; once every face of elem_info has been added, solving that system gives the cell velocity that is later substituted into the discrete momentum balance to recover the pressure-gradient component consistent with these corrected fluxes.

Parameters
rcThe bound Rhie-Chow flow-system configuration supplying the corrected face flux and lagged velocity gradients
elem_infoThe cell whose velocity-projection system is being assembled
elem_velocity_gradientsLagged velocity gradients at the center of elem_info
fiThe face being added to the projection
surface_vectorThe coordinate-system-aware area vector of this face, outward from elem_info
elem_has_infoWhether elem_info is the "elem" side of fi, as opposed to its "neighbor" side
matrixArea-weighted normal-equation matrix accumulated over the cell's faces, updated in place with this face's contribution
projection_rhsArea-weighted right-hand side accumulated over the cell's faces, updated in place with this face's contribution

Definition at line 405 of file FVReconstructedPressureGradient.C.

414{
415 mooseAssert(fi, "FaceInfo must be available while reconstructing a cell.");
416
417 const Real surface_area = surface_vector.norm();
418 // An axisymmetric face on the symmetry axis has zero physical area and adds no projection
419 // equation.
420 if (surface_area == 0.0)
421 return;
422
423 const auto pressure_face_type =
425 // On one-sided pressure faces, RhieChow stores the flux outward from the pressure cell. On
426 // two-sided faces, it stores the flux relative to FaceInfo::normal(), so only the neighbor
427 // cell needs the opposite orientation. Boundary conditions are already reflected in this
428 // corrected flux, including zero normal flux on impermeable boundaries.
429 const Real normal_alignment =
430 pressure_face_type == FaceInfo::VarFaceNeighbors::BOTH && !elem_has_info ? -1.0 : 1.0;
431 // Density varies continuously, so the face density also gives the normal velocity on both sides
432 // of a pressure baffle.
433 const Real face_flux = rc.getVolumetricFaceFlux(*fi);
434 mooseAssert(std::isfinite(face_flux), "Corrected face flux must be finite.");
435 Real face_normal_reconstructed_quantity = face_flux * normal_alignment;
436
437 // First-order expansion at the face gives
438 // u_f.n_f = u_P.n_f + ((grad u)_f d_Pf).n_f.
439 // Subtract the lagged Taylor term to obtain one face equation for the unknown cell velocity:
440 // u_P.n_f ~= u_f.n_f - ((grad u)_f d_Pf).n_f.
441 const Point d_pf = fi->faceCentroid() - elem_info.centroid();
442 Real gradient_flux_correction = 0.0;
443 for (const auto component : make_range(rc.dimension()))
444 {
445 const auto velocity_gradient = reconstructionVelocityGradient(
446 rc, elem_velocity_gradients[component], *fi, elem_has_info, component);
447 for ([[maybe_unused]] const auto direction : make_range(rc.dimension()))
448 mooseAssert(std::isfinite(velocity_gradient(direction)),
449 "Lagged velocity gradient must be finite.");
450
451 gradient_flux_correction += (velocity_gradient * d_pf) * surface_vector(component);
452 }
453
454 face_normal_reconstructed_quantity -= gradient_flux_correction / surface_area;
455
456 // Assemble the area-weighted least-squares projection of the corrected face equations:
457 // [sum_f |S_f| n_f n_f^T] u_P = sum_f |S_f| qhat_f n_f,
458 // where qhat_f is face_normal_reconstructed_quantity and S_f = |S_f| n_f.
459 for (const auto i : make_range(rc.dimension()))
460 {
461 projection_rhs(i) += face_normal_reconstructed_quantity * surface_vector(i);
462 for (const auto j : make_range(rc.dimension()))
463 matrix(i, j) += surface_vector(i) * surface_vector(j) / surface_area;
464 }
465}
const Point & centroid() const
RealVectorValue reconstructionVelocityGradient(const RhieChowMassFlux &rc, const RealVectorValue &elem_gradient, const FaceInfo &fi, bool elem_has_info, unsigned int velocity_component) const
Interpolate a lagged velocity-component gradient to a face.
const SystemBase * _pressure_system
Pressure system that owns the reconstructed pressure variable.
unsigned int _pressure_variable_number
Pressure variable reconstructed by this method.
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const
const Point & faceCentroid() const
Real getVolumetricFaceFlux(const FaceInfo &fi) const
Get the volumetric face flux (used in advection terms)
unsigned int number() const
auto norm() const
bool isfinite(std::complex< T > a)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)

Referenced by computeCandidateFromCorrectedFlux().

◆ baseGradientMethodName()

const GradientMethodName & FVReconstructedPressureGradient::baseGradientMethodName ( ) const
inline

Name of the gradient method used before the reconstructed coupling pressure gradient exists.

Definition at line 61 of file FVReconstructedPressureGradient.h.

◆ checkFlowSystem()

void FVReconstructedPressureGradient::checkFlowSystem ( const RhieChowMassFlux &  rc) const
private

Check that a stateful operation is requested by the bound Rhie-Chow object.

Definition at line 127 of file FVReconstructedPressureGradient.C.

128{
129 mooseAssert(_rhie_chow,
130 "FVReconstructedPressureGradient must be bound to one RhieChowMassFlux before it "
131 "is used.");
132
133 mooseAssert(_rhie_chow == &rc,
134 "FVReconstructedPressureGradient is bound to a single RhieChowMassFlux and cannot "
135 "be used by another.");
136}
const RhieChowMassFlux * _rhie_chow
Rhie-Chow object that owns this stateful reconstruction method.

Referenced by computeCandidateFromCorrectedFlux(), finalizeCouplingPressureGradient(), reconstructedCandidate(), resetForTimeStep(), saveLaggedVelocityGradient(), and validateSetup().

◆ computeCandidateFromCorrectedFlux()

void FVReconstructedPressureGradient::computeCandidateFromCorrectedFlux ( const RhieChowMassFlux &  rc)

Reconstruct the conservative pressure-gradient candidate from the corrected face flux.

Definition at line 523 of file FVReconstructedPressureGradient.C.

524{
525 checkFlowSystem(rc);
527
528 const auto dimension = rc.dimension();
529 const auto & base_pressure_gradient = rc.basePressureGradientComponents();
530 const auto face_flux_iteration = rc.faceMassFluxGeneration();
531
532 mooseAssert(base_pressure_gradient.size() == dimension,
533 "A base pressure-gradient component must exist for every spatial dimension.");
534
535 mooseAssert(face_flux_iteration != _last_reconstructed_face_flux_iteration,
536 "The current pressure corrector must produce a new face flux before "
537 "reconstruction.");
538
540 for (const auto component : make_range(dimension))
541 _reconstructed_pressure_gradient.push_back(base_pressure_gradient[component]->zero_clone());
542
543 // Zero the candidate so pressure DOFs not visited during this corrector cannot retain stale
544 // reconstructed values from an earlier cycle.
545 for (auto & pressure_gradient : _reconstructed_pressure_gradient)
546 pressure_gradient->zero();
547
548 const auto & mesh = rc.pressureSystem().feProblem().mesh();
549 const auto rz_radial_coord = mesh.getAxisymmetricRadialCoord();
550 std::vector<RealVectorValue> elem_velocity_gradients(dimension);
551
552 for (const auto & elem_info : mesh.elemInfoVector())
553 {
554 if (!rc.hasBlocks(elem_info->subdomain_id()))
555 continue;
556
557 const Elem & elem = *elem_info->elem();
558 DenseMatrix<Real> matrix(dimension, dimension);
559 DenseVector<Real> projection_rhs(dimension);
560 matrix.zero();
561 projection_rhs.zero();
562
563 for (const auto component : make_range(dimension))
564 {
565 const auto & velocity = rc.velocityVariable(component);
566 const auto system_number = rc.momentumSystem(component).number();
567 const auto velocity_dof = elem_info->dofIndices()[system_number][velocity.number()];
568 for (const auto direction : make_range(dimension))
569 {
570 const auto gradient =
571 (*_lagged_reconstruction_velocity_gradient[component][direction])(velocity_dof);
572 mooseAssert(std::isfinite(gradient), "Lagged velocity gradient must be finite.");
573 elem_velocity_gradients[component](direction) = gradient;
574 }
575 }
576
577 // The coordinate-system-aware surface vector S_f supplied by loopOverElemFaceInfo is outward
578 // from this cell, including the appropriate Cartesian or axisymmetric geometric weighting.
579 auto act = [&](const Elem &,
580 const Elem * const,
581 const FaceInfo * const fi,
582 const Point & surface_vector,
583 const Real,
584 const bool elem_has_info)
585 {
587 *elem_info,
588 elem_velocity_gradients,
589 fi,
590 surface_vector,
591 elem_has_info,
592 matrix,
593 projection_rhs);
594 };
595
597 elem, mesh, act, mesh.getCoordSystem(elem.subdomain_id()), rz_radial_coord);
598
599 const auto reconstructed_quantity = solveFaceProjection(matrix, projection_rhs);
600
601 const auto pressure_dof =
602 elem_info->dofIndices()[rc.pressureSystem().number()][_pressure_variable_number];
603 for (const auto component : make_range(dimension))
604 {
605 const auto reconstructed_gradient =
606 reconstructPressureGradient(rc, *elem_info, component, reconstructed_quantity(component));
607 _reconstructed_pressure_gradient[component]->set(pressure_dof, reconstructed_gradient);
608 }
609 }
610
611 for (auto & pressure_gradient : _reconstructed_pressure_gradient)
612 pressure_gradient->close();
613
614 _last_reconstructed_face_flux_iteration = face_flux_iteration;
615}
bool hasBlocks(const SubdomainName &name) const
virtual MooseMesh & mesh() override
std::vector< std::vector< std::unique_ptr< NumericVector< Number > > > > _lagged_reconstruction_velocity_gradient
Lagged velocity gradients indexed by velocity component and spatial direction.
DenseVector< Real > solveFaceProjection(const DenseMatrix< Real > &matrix, const DenseVector< Real > &projection_rhs) const
Solve a cell's velocity-projection system.
Real reconstructPressureGradient(const RhieChowMassFlux &rc, const ElemInfo &elem_info, unsigned int component, Real reconstructed_velocity) const
Invert one diagonal momentum equation to recover a pressure-gradient component.
void transition(PressureGradientReconstructionEvent event)
Apply and validate one reconstruction-cycle transition.
void assembleFaceProjection(const RhieChowMassFlux &rc, const ElemInfo &elem_info, const std::vector< RealVectorValue > &elem_velocity_gradients, const FaceInfo *fi, const Point &surface_vector, bool elem_has_info, DenseMatrix< Real > &matrix, DenseVector< Real > &projection_rhs) const
Add one face's contribution to the area-weighted least-squares system that reconstructs the cell velo...
GradientContainer _reconstructed_pressure_gradient
Reconstructed pressure-gradient candidate.
dof_id_type _last_reconstructed_face_flux_iteration
Corrected face-flux iteration used by the previous reconstruction.
void checkFlowSystem(const RhieChowMassFlux &rc) const
Check that a stateful operation is requested by the bound Rhie-Chow object.
MooseLinearVariableFVReal & velocityVariable(unsigned int component)
Velocity variable for one spatial component.
const LinearSystem & pressureSystem() const
Pressure linear system.
dof_id_type faceMassFluxGeneration() const
Producer counter for the conservative face mass flux: incremented every time computeFaceMassFlux() ru...
LinearSystem & momentumSystem(unsigned int component)
Momentum linear system for one spatial component.
const std::vector< NumericVector< Number > * > & basePressureGradientComponents() const
Get the base-pressure gradient component vectors used to seed reconstructed updates.
unsigned int dimension() const
Number of spatial dimensions of the coupled momentum/pressure systems.
FEProblemBase & feProblem()
subdomain_id_type subdomain_id() const
MeshBase & mesh
void loopOverElemFaceInfo(const Elem &elem, const MooseMesh &mesh, ActionFunctor &act, const Moose::CoordinateSystemType coord_type, const unsigned int rz_radial_coord=libMesh::invalid_uint)
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)
const Number zero

Referenced by RhieChowMassFlux::preparePressureRelaxation().

◆ computeGradientWithoutLimiter()

void FVReconstructedPressureGradient::computeGradientWithoutLimiter ( SystemBase &  system,
GradientContainer &  gradient,
const std::unordered_set< unsigned int > &  variable_numbers 
) const
overrideprivatevirtual

Implements FVGradientMethod.

Definition at line 219 of file FVReconstructedPressureGradient.C.

223{
224 // On a fresh run, FEProblemBase::initialSetup() calls copySolutionsBackwards() to initialize
225 // gradient time-state storage before SIMPLE or PIMPLE calls linkRhieChowUserObject(). That state
226 // initialization reaches this method with no linked Rhie-Chow pressure system, so seed the
227 // gradient history with the ordinary gradient until the executioner completes the linkage.
228 if (!_pressure_system)
229 {
230 mooseAssert(_base_gradient_method,
231 "resolveGradientMethodDependencies() must run before gradients are computed.");
232 _base_gradient_method->computeGradient(system, gradient, variable_numbers);
233 return;
234 }
235
236 mooseAssert(_pressure_system == &system,
237 "FVReconstructedPressureGradient can only compute gradients for the pressure "
238 "system it is bound to.");
239
240 mooseAssert(variable_numbers.size() == 1 && variable_numbers.count(_pressure_variable_number),
241 "FVReconstructedPressureGradient can only compute the pressure variable to which "
242 "it is bound.");
243
244 if (_coupling_pressure_gradient.empty())
245 {
246 // No flux-consistent pressure gradient exists before the first pressure corrector. Use the
247 // ordinary gradient for the initial momentum predictor instead of inventing coupling data.
248 mooseAssert(_base_gradient_method,
249 "resolveGradientMethodDependencies() must run before gradients are computed.");
250 _base_gradient_method->computeGradient(system, gradient, variable_numbers);
251 return;
252 }
253
254 mooseAssert(_coupling_pressure_gradient.size() == gradient.size(),
255 "Coupling and destination gradients must have equal component counts.");
256 for (const auto component : index_range(gradient))
257 {
258 mooseAssert(gradient[component]->type() == GHOSTED,
259 "Linear FV gradient storage must be ghosted.");
260 // Only the owned range needs to be copied here; the caller,
261 // FVGradientMethod::computeGradient(), unconditionally closes every component of gradient right
262 // after this call returns, which refreshes the ghosts needed by face interpolation from the
263 // now-matching owned entries.
265 }
266}
void computeGradient(SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const
const FVGradientMethod * _base_gradient_method
Resolved method used before the reconstructed coupling pressure gradient exists.
GradientContainer _coupling_pressure_gradient
Persistent coupling pressure gradient.
const std::string & type() const
auto index_range(const T &sizable)

◆ copyGradient()

void FVReconstructedPressureGradient::copyGradient ( const GradientView &  source,
GradientContainer &  destination 
)
private

Copy gradient values while reusing compatible destination storage.

Definition at line 269 of file FVReconstructedPressureGradient.C.

271{
272 if (destination.empty())
273 {
274 destination.reserve(source.size());
275 for (const auto component : index_range(source))
276 destination.push_back(source[component]->clone());
277 return;
278 }
279
280 mooseAssert(source.size() == destination.size(),
281 "Source and destination gradients must have equal component counts.");
282 for (const auto component : index_range(source))
283 {
284 mooseAssert(
285 source[component]->size() == destination[component]->size() &&
286 source[component]->local_size() == destination[component]->local_size() &&
287 source[component]->first_local_index() == destination[component]->first_local_index() &&
288 source[component]->last_local_index() == destination[component]->last_local_index(),
289 "Source and destination gradient component vectors must have matching parallel "
290 "layouts.");
291 *destination[component] = *source[component];
292 }
293}

Referenced by resetForTimeStep(), saveLaggedVelocityGradient(), and updateCouplingPressureGradient().

◆ finalizeCouplingPressureGradient()

void FVReconstructedPressureGradient::finalizeCouplingPressureGradient ( const RhieChowMassFlux &  rc,
const GradientView &  base_gradient 
)

Relax and publish the current candidate as the coupling pressure gradient.

Parameters
rcThe bound Rhie-Chow flow-system configuration whose pressure gradient is being finalized
base_gradientThe ordinary (unreconstructed) pressure gradient used to initialize the coupling gradient the first time it is published

Definition at line 662 of file FVReconstructedPressureGradient.C.

664{
665 checkFlowSystem(rc);
668}
void updateCouplingPressureGradient(const RhieChowMassFlux &rc, const GradientView &base_gradient, const GradientContainer &reconstructed_candidate)
Blend a reconstructed candidate into the persistent coupling pressure gradient.

Referenced by RhieChowMassFlux::finalizePressureCorrector().

◆ linkFlowSystem()

void FVReconstructedPressureGradient::linkFlowSystem ( RhieChowMassFlux &  rc,
const LinearFVGradientReader &  pressure_gradient 
)

Link this stateful method to one Rhie-Chow flow-system configuration.

Definition at line 62 of file FVReconstructedPressureGradient.C.

64{
65 mooseAssert(pressure_gradient.system().number() == rc.pressureSystem().number(),
66 "First binding must use the pressure system owned by the RhieChowMassFlux.");
67
68 mooseAssert(pressure_gradient.variableNumber() == rc.pressureVariableNumber(),
69 "First binding must use the pressure variable registered on the RhieChowMassFlux.");
70
71 if (!_rhie_chow)
72 {
73 _rhie_chow = &rc;
74 _porous_rhie_chow = dynamic_cast<const PorousRhieChowMassFlux *>(&rc);
75 _pressure_system = &pressure_gradient.system();
76 _pressure_variable_number = pressure_gradient.variableNumber();
77 _momentum_systems.reserve(rc.dimension());
79 for (const auto component : make_range(rc.dimension()))
80 {
81 _momentum_systems.push_back(&rc.momentumSystem(component));
83 }
84 return;
85 }
86
87 if (_rhie_chow != &rc)
88 mooseError("FVReconstructedPressureGradient '",
89 name(),
90 "' is already bound to RhieChowMassFlux '",
92 "' and cannot also be used by RhieChowMassFlux '",
93 rc.name(),
94 "'.");
95
96 if (_pressure_system != &pressure_gradient.system())
97 mooseError("FVReconstructedPressureGradient '",
98 name(),
99 "' is already bound to pressure system '",
101 "' and cannot also be used by pressure system '",
102 pressure_gradient.system().name(),
103 "'.");
104
105 if (_pressure_variable_number != pressure_gradient.variableNumber())
106 mooseError("FVReconstructedPressureGradient '",
107 name(),
108 "' is already bound to pressure variable number ",
110 " and cannot also be used by pressure variable number ",
111 pressure_gradient.variableNumber(),
112 ".");
113
114 if (_momentum_systems.size() != rc.dimension())
115 mooseError("FVReconstructedPressureGradient '",
116 name(),
117 "' cannot be reused with a different set of momentum systems.");
118
119 for (const auto component : make_range(rc.dimension()))
120 if (_momentum_systems[component] != &rc.momentumSystem(component))
121 mooseError("FVReconstructedPressureGradient '",
122 name(),
123 "' cannot be reused with a different set of momentum systems.");
124}
std::vector< const SystemBase * > _momentum_systems
Momentum systems coupled through the owning Rhie-Chow object.
std::vector< const LinearFVGradientReader * > _velocity_gradient_fields
Ordinary gradient fields for the velocity components.
const PorousRhieChowMassFlux * _porous_rhie_chow
Porous Rhie-Chow object used to identify pressure-baffle faces.
const SystemBase & system() const
unsigned int variableNumber() const
const std::string & name() const
void mooseError(Args &&... args) const
const LinearFVGradientReader & requestCellGradients(unsigned int oldest_state=0)
Computes Rhie-Chow face mass fluxes for porous flow with optional internal pressure jumps.
unsigned int pressureVariableNumber() const
Variable number of the pressure variable reconstructed by this object.
virtual const std::string & name() const
if(subdm)

Referenced by RhieChowMassFlux::linkMomentumPressureSystems().

◆ meshChanged()

void FVReconstructedPressureGradient::meshChanged ( )
overridevirtual

◆ reconstructedCandidate()

const FVReconstructedPressureGradient::GradientContainer & FVReconstructedPressureGradient::reconstructedCandidate ( const RhieChowMassFlux &  rc) const

Get the conservative candidate produced by the current pressure corrector.

Definition at line 618 of file FVReconstructedPressureGradient.C.

619{
620 checkFlowSystem(rc);
622 "No reconstructed pressure-gradient candidate is ready for the conservative "
623 "cell-velocity correction.");
625}
PressureGradientReconstructionState _reconstruction_state
Current position in the pressure-gradient reconstruction cycle.

◆ reconstructionVelocityGradient()

RealVectorValue FVReconstructedPressureGradient::reconstructionVelocityGradient ( const RhieChowMassFlux &  rc,
const RealVectorValue &  elem_gradient,
const FaceInfo &  fi,
bool  elem_has_info,
unsigned int  velocity_component 
) const
private

Interpolate a lagged velocity-component gradient to a face.

Definition at line 368 of file FVReconstructedPressureGradient.C.

374{
375 const auto dimension = rc.dimension();
376 const ElemInfo * const neighbor_info = elem_has_info ? fi.neighborInfo() : fi.elemInfo();
377 // At a domain boundary, the edge of the Rhie-Chow block restriction, or a pressure baffle, use
378 // the owned cell's gradient (zero Hessian approximation). The velocity jumps across a baffle,
379 // so the neighbor gradient describes a different field. Otherwise interpolate the two lagged
380 // cell gradients to the face.
381 if (!neighbor_info || !rc.hasBlocks(neighbor_info->subdomain_id()) ||
383 return elem_gradient;
384
385 const auto & velocity = rc.velocityVariable(velocity_component);
386 const auto system_number = rc.momentumSystem(velocity_component).number();
387 RealVectorValue neighbor_gradient;
388 for (const auto direction : make_range(dimension))
389 neighbor_gradient(direction) =
390 (*_lagged_reconstruction_velocity_gradient[velocity_component][direction])(
391 neighbor_info->dofIndices()[system_number][velocity.number()]);
392
393 RealVectorValue face_gradient;
394 Moose::FV::interpolate(Moose::FV::InterpMethod::Average,
395 face_gradient,
396 elem_gradient,
397 neighbor_gradient,
398 fi,
399 elem_has_info);
400
401 return face_gradient;
402}
SubdomainID subdomain_id() const
const ElemInfo * elemInfo() const
const ElemInfo * neighborInfo() const
bool faceIsBaffle(const FaceInfo &fi) const
Whether a face is governed by a pressure-jump model.
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)

Referenced by assembleFaceProjection().

◆ reconstructPressureGradient()

Real FVReconstructedPressureGradient::reconstructPressureGradient ( const RhieChowMassFlux &  rc,
const ElemInfo &  elem_info,
unsigned int  component,
Real  reconstructed_velocity 
) const
private

Invert one diagonal momentum equation to recover a pressure-gradient component.

Definition at line 487 of file FVReconstructedPressureGradient.C.

492{
493 mooseAssert(std::isfinite(reconstructed_velocity),
494 "Reconstructed velocity component must be finite.");
495
496 const auto momentum_dof = elem_info.dofIndices()[rc.momentumSystem(component).number()][0];
497 const Real HbyA = (*rc.HbyAComponents()[component])(momentum_dof);
498 const Real Ainv = (*rc.AinvComponents()[component])(momentum_dof);
499 if (!std::isfinite(HbyA) || !std::isfinite(Ainv) || Ainv == 0.0)
500 mooseError("FVReconstructedPressureGradient '",
501 name(),
502 "' found invalid momentum-coupling data for component ",
503 component,
504 " of cell ID ",
505 elem_info.elem()->id(),
506 ": H/A = ",
507 HbyA,
508 " and 1/A = ",
509 Ainv,
510 ".");
511
512 // Invert the same diagonal momentum relation used by Rhie-Chow,
513 // u_P = -(H/A)_P - A_P^{-1} (grad p)_P,
514 // so the reconstructed pressure gradient produces the projected, flux-consistent u_P.
515 const Real reconstructed_gradient = (-reconstructed_velocity - HbyA) / Ainv;
516 mooseAssert(std::isfinite(reconstructed_gradient),
517 "Reconstructed pressure-gradient component must be finite.");
518
519 return reconstructed_gradient;
520}
const Elem * elem() const
const std::vector< std::vector< dof_id_type > > & dofIndices() const
const std::vector< std::unique_ptr< NumericVector< Number > > > & HbyAComponents() const
Get the momentum-layout H/A component vectors.
const std::vector< std::unique_ptr< NumericVector< Number > > > & AinvComponents() const
Get the momentum-layout 1/A component vectors.
dof_id_type id() const

Referenced by computeCandidateFromCorrectedFlux().

◆ resetForTimeStep()

void FVReconstructedPressureGradient::resetForTimeStep ( const RhieChowMassFlux &  rc)

Prepare solver-iteration state for a new time-step attempt.

Definition at line 327 of file FVReconstructedPressureGradient.C.

328{
329 checkFlowSystem(rc);
330 // A new time-step attempt starts from the last accepted coupling field. This keeps a converged
331 // momentum balance unchanged across time-step acceptance, rejection, restart, and recovery.
335}
void copyGradient(const GradientView &source, GradientContainer &destination)
Copy gradient values while reusing compatible destination storage.
const GradientContainer & components() const
const LinearFVGradientReader & pressureGradientField() const
Get the registered pressure gradient field used by compatible momentum pressure kernels.
StateArg oldState()

Referenced by RhieChowMassFlux::timestepSetup().

◆ resolveGradientMethodDependencies()

void FVReconstructedPressureGradient::resolveGradientMethodDependencies ( FEProblemBase &  fe_problem)
overrideprivatevirtual

Reimplemented from FVGradientMethod.

Definition at line 197 of file FVReconstructedPressureGradient.C.

198{
200 mooseError("FVReconstructedPressureGradient '",
201 name(),
202 "' cannot use itself as its base_gradient_method.");
203
204 if (_base_gradient_method_name == "green-gauss" &&
206 {
207 auto params = fe_problem.getMooseApp().getFactory().getValidParams("FVGreenGaussGradient");
208 fe_problem.addFVGradientMethod("FVGreenGaussGradient", _base_gradient_method_name, params);
209 }
210
213 "Unable to find base FVGradientMethod with name '", _base_gradient_method_name, "'.");
214
216}
virtual void addFVGradientMethod(const std::string &method_type, const std::string &name, InputParameters &parameters)
FVGradientMethod & getFVGradientMethod(const GradientMethodName &name, const THREAD_ID tid=0)
bool hasFVGradientMethod(const GradientMethodName &name) const
Factory & getFactory()
MooseApp & getMooseApp() const

◆ saveLaggedVelocityGradient()

void FVReconstructedPressureGradient::saveLaggedVelocityGradient ( RhieChowMassFlux &  rc)

Save the lagged cell velocity gradient used by the reconstruction.

Definition at line 347 of file FVReconstructedPressureGradient.C.

348{
349 checkFlowSystem(rc);
351 const auto dimension = rc.dimension();
352
353 mooseAssert(_velocity_gradient_fields.size() == dimension,
354 "A velocity gradient field must be registered for every momentum component.");
355
356 // Freeze grad(u) before the pressure corrector changes the flux. The lagged field linearizes the
357 // Taylor correction from each cell center P to its face f without coupling reconstruction back
358 // to the velocity that it is currently computing.
361
362 for (const auto component : make_range(dimension))
365}

Referenced by RhieChowMassFlux::finalizeMomentumPredictor(), and RhieChowMassFlux::preparePISOCorrector().

◆ solveFaceProjection()

DenseVector< Real > FVReconstructedPressureGradient::solveFaceProjection ( const DenseMatrix< Real > &  matrix,
const DenseVector< Real > &  projection_rhs 
) const
private

Solve a cell's velocity-projection system.

Definition at line 468 of file FVReconstructedPressureGradient.C.

470{
471 const auto dimension = projection_rhs.size();
472 DenseVector<Real> reconstructed_quantity(dimension);
473 if (dimension == 1)
474 reconstructed_quantity(0) = projection_rhs(0) / matrix(0, 0);
475 else
476 {
477 // A valid cell has face normals that span the spatial dimension, making this normal-equation
478 // matrix symmetric positive definite.
479 DenseMatrix<Real> solve_matrix(matrix);
480 solve_matrix.cholesky_solve(projection_rhs, reconstructed_quantity);
481 }
482
483 return reconstructed_quantity;
484}
virtual unsigned int size() const override final

Referenced by computeCandidateFromCorrectedFlux().

◆ transition()

void FVReconstructedPressureGradient::transition ( PressureGradientReconstructionEvent  event)
private

Apply and validate one reconstruction-cycle transition.

Definition at line 296 of file FVReconstructedPressureGradient.C.

Referenced by computeCandidateFromCorrectedFlux(), finalizeCouplingPressureGradient(), meshChanged(), resetForTimeStep(), and saveLaggedVelocityGradient().

◆ updateCouplingPressureGradient()

void FVReconstructedPressureGradient::updateCouplingPressureGradient ( const RhieChowMassFlux &  rc,
const GradientView &  base_gradient,
const GradientContainer &  reconstructed_candidate 
)
private

Blend a reconstructed candidate into the persistent coupling pressure gradient.

Definition at line 628 of file FVReconstructedPressureGradient.C.

632{
633 mooseAssert(!base_gradient.empty() && reconstructed_candidate.size() == base_gradient.size(),
634 "Base and reconstructed gradients must have equal nonzero component counts.");
635
636 if (_coupling_pressure_gradient.empty())
638
639 const auto & mesh = rc.pressureSystem().feProblem().mesh();
640 const auto pressure_system_number = rc.pressureSystem().number();
641 for (const auto component : index_range(_coupling_pressure_gradient))
642 {
643 for (const auto & elem_info : mesh.elemInfoVector())
644 {
645 if (!rc.hasBlocks(elem_info->subdomain_id()))
646 continue;
647
648 const auto pressure_dof =
649 elem_info->dofIndices()[pressure_system_number][_pressure_variable_number];
650 // Under-relax feedback to the next momentum predictor:
651 // g_coupling^{k+1} = (1-alpha) g_coupling^k + alpha g_reconstructed^k.
652 const auto updated_gradient =
653 (1.0 - _gradient_relaxation) * (*_coupling_pressure_gradient[component])(pressure_dof) +
654 _gradient_relaxation * (*reconstructed_candidate[component])(pressure_dof);
655 _coupling_pressure_gradient[component]->set(pressure_dof, updated_gradient);
656 }
658 }
659}

Referenced by finalizeCouplingPressureGradient().

◆ validateSetup()

void FVReconstructedPressureGradient::validateSetup ( const RhieChowMassFlux &  rc) const

Validate the one-time Rhie-Chow linkage and field layouts required by reconstruction.

Definition at line 139 of file FVReconstructedPressureGradient.C.

140{
141 checkFlowSystem(rc);
142
143 mooseAssert(_pressure_system && _pressure_system->number() == rc.pressureSystem().number() &&
145 "FVReconstructedPressureGradient must be linked to the pressure field owned by its "
146 "bound RhieChowMassFlux.");
147
148 const auto & pressure_variable = rc.pressureSystem().getVariable(0, _pressure_variable_number);
149 if (pressure_variable.blockIDs() != rc.blockIDs())
150 mooseError("FVReconstructedPressureGradient '",
151 name(),
152 "' requires pressure variable '",
153 pressure_variable.name(),
154 "' and RhieChowMassFlux '",
155 rc.name(),
156 "' to have identical block restrictions. Pressure blocks: ",
157 Moose::stringify(pressure_variable.blockIDs()),
158 "; Rhie-Chow blocks: ",
160 ".");
161
162 mooseAssert(_momentum_systems.size() == rc.dimension() &&
164 "One momentum system and velocity-gradient field must be registered per spatial "
165 "component.");
166
167 for (const auto component : make_range(rc.dimension()))
168 {
169 mooseAssert(_momentum_systems[component] == &rc.momentumSystem(component),
170 "Momentum system linkage must match the RhieChowMassFlux for every spatial "
171 "component.");
172
173 const auto & velocity_variable = rc.velocityVariable(component);
174 if (velocity_variable.blockIDs() != rc.blockIDs())
175 mooseError("FVReconstructedPressureGradient '",
176 name(),
177 "' requires velocity variable '",
178 velocity_variable.name(),
179 "' and RhieChowMassFlux '",
180 rc.name(),
181 "' to have identical block restrictions. Velocity blocks: ",
182 Moose::stringify(velocity_variable.blockIDs()),
183 "; Rhie-Chow blocks: ",
185 ".");
186
187 [[maybe_unused]] const auto * const velocity_gradient = _velocity_gradient_fields[component];
188 mooseAssert(velocity_gradient &&
189 &velocity_gradient->system() == &rc.momentumSystem(component) &&
190 velocity_gradient->variableNumber() == rc.velocityVariable(component).number(),
191 "Velocity-gradient field linkage must match the RhieChowMassFlux for every "
192 "momentum component.");
193 }
194}
virtual const std::set< SubdomainID > & blockIDs() const
unsigned int number() const
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
std::string stringify(const T &t)

Referenced by RhieChowMassFlux::checkReconstructedPressureGradientCompatibility().

◆ validParams()

InputParameters FVReconstructedPressureGradient::validParams ( )
static

Definition at line 32 of file FVReconstructedPressureGradient.C.

33{
36 params.suppressParameter<MooseEnum>("limiter");
38 "Reconstructs and relaxes the pressure gradient used for Rhie-Chow momentum coupling.");
39 params.addParam<GradientMethodName>(
40 "base_gradient_method",
41 "green-gauss",
42 "Gradient method used before Rhie-Chow has computed reconstructed gradients.");
43 // A conservative 0.1 default damps pressure-velocity feedback with the standard SIMPLE
44 // relaxation settings; values near 1 can require retuning those settings to converge.
46 "gradient_relaxation",
47 0.1,
48 "0.0<gradient_relaxation<=1.0",
49 "Relaxation factor applied when updating the reconstructed pressure-coupling gradient.");
50 return params;
51}
static InputParameters validParams()
void suppressParameter(const std::string &name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _base_gradient_method

const FVGradientMethod* FVReconstructedPressureGradient::_base_gradient_method = nullptr
private

Resolved method used before the reconstructed coupling pressure gradient exists.

Definition at line 186 of file FVReconstructedPressureGradient.h.

Referenced by computeGradientWithoutLimiter(), and resolveGradientMethodDependencies().

◆ _base_gradient_method_name

const GradientMethodName FVReconstructedPressureGradient::_base_gradient_method_name
private

Gradient method used before the reconstructed coupling pressure gradient exists.

Definition at line 183 of file FVReconstructedPressureGradient.h.

Referenced by baseGradientMethodName(), and resolveGradientMethodDependencies().

◆ _coupling_pressure_gradient

GradientContainer FVReconstructedPressureGradient::_coupling_pressure_gradient
private

Persistent coupling pressure gradient.

Definition at line 224 of file FVReconstructedPressureGradient.h.

Referenced by computeGradientWithoutLimiter(), meshChanged(), resetForTimeStep(), and updateCouplingPressureGradient().

◆ _gradient_relaxation

const Real FVReconstructedPressureGradient::_gradient_relaxation
private

Relaxation factor applied to reconstructed pressure gradients.

Definition at line 189 of file FVReconstructedPressureGradient.h.

Referenced by updateCouplingPressureGradient().

◆ _lagged_reconstruction_velocity_gradient

std::vector<std::vector<std::unique_ptr<NumericVector<Number> > > > FVReconstructedPressureGradient::_lagged_reconstruction_velocity_gradient
private

Lagged velocity gradients indexed by velocity component and spatial direction.

Definition at line 211 of file FVReconstructedPressureGradient.h.

Referenced by computeCandidateFromCorrectedFlux(), meshChanged(), reconstructionVelocityGradient(), and saveLaggedVelocityGradient().

◆ _last_reconstructed_face_flux_iteration

dof_id_type FVReconstructedPressureGradient::_last_reconstructed_face_flux_iteration = 0
private

Corrected face-flux iteration used by the previous reconstruction.

Definition at line 218 of file FVReconstructedPressureGradient.h.

Referenced by computeCandidateFromCorrectedFlux().

◆ _momentum_systems

std::vector<const SystemBase *> FVReconstructedPressureGradient::_momentum_systems
private

Momentum systems coupled through the owning Rhie-Chow object.

Definition at line 204 of file FVReconstructedPressureGradient.h.

Referenced by linkFlowSystem(), and validateSetup().

◆ _porous_rhie_chow

const PorousRhieChowMassFlux* FVReconstructedPressureGradient::_porous_rhie_chow = nullptr
private

Porous Rhie-Chow object used to identify pressure-baffle faces.

Definition at line 195 of file FVReconstructedPressureGradient.h.

Referenced by linkFlowSystem(), and reconstructionVelocityGradient().

◆ _pressure_system

const SystemBase* FVReconstructedPressureGradient::_pressure_system = nullptr
private

Pressure system that owns the reconstructed pressure variable.

Definition at line 198 of file FVReconstructedPressureGradient.h.

Referenced by assembleFaceProjection(), computeGradientWithoutLimiter(), linkFlowSystem(), and validateSetup().

◆ _pressure_variable_number

unsigned int FVReconstructedPressureGradient::_pressure_variable_number = libMesh::invalid_uint
private

◆ _reconstructed_pressure_gradient

GradientContainer FVReconstructedPressureGradient::_reconstructed_pressure_gradient
private

Reconstructed pressure-gradient candidate.

Definition at line 221 of file FVReconstructedPressureGradient.h.

Referenced by computeCandidateFromCorrectedFlux(), finalizeCouplingPressureGradient(), meshChanged(), and reconstructedCandidate().

◆ _reconstruction_state

PressureGradientReconstructionState FVReconstructedPressureGradient::_reconstruction_state
private
Initial value:

Current position in the pressure-gradient reconstruction cycle.

Definition at line 214 of file FVReconstructedPressureGradient.h.

Referenced by reconstructedCandidate(), and transition().

◆ _rhie_chow

const RhieChowMassFlux* FVReconstructedPressureGradient::_rhie_chow = nullptr
private

Rhie-Chow object that owns this stateful reconstruction method.

Definition at line 192 of file FVReconstructedPressureGradient.h.

Referenced by checkFlowSystem(), and linkFlowSystem().

◆ _velocity_gradient_fields

std::vector<const LinearFVGradientReader *> FVReconstructedPressureGradient::_velocity_gradient_fields
private

Ordinary gradient fields for the velocity components.

Definition at line 207 of file FVReconstructedPressureGradient.h.

Referenced by linkFlowSystem(), saveLaggedVelocityGradient(), and validateSetup().


The documentation for this class was generated from the following files: