https://mooseframework.inl.gov
INSFVVariable.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "MooseVariableFV.h"
13 
14 class InputParameters;
16 
18 {
19 public:
20  INSFVVariable(const InputParameters & params);
21 
23 
24  // The INSFV system relies on on-the-fly functor evaluation and does not need any pre-init'd data
25  void computeFaceValues(const FaceInfo &) override;
26  void computeElemValues() override;
27  void computeElemValuesFace() override;
28  void computeNeighborValuesFace() override;
29  void computeNeighborValues() override;
30  void requireQpComputations() const override { _qp_calculations = true; }
31  virtual void initialSetup() override;
32  virtual void timestepSetup() override;
33  virtual void meshChanged() override;
34 
35  // If the given boundary is a hydraulic separator bouundary for this variable
36  bool isSeparatorBoundary(const FaceInfo & fi) const;
37 
38  bool isExtrapolatedBoundaryFace(const FaceInfo & fi,
39  const Elem * elem,
40  const Moose::StateArg & time) const override;
41 
42 protected:
46  bool isFullyDevelopedFlowFace(const FaceInfo & fi) const;
47 
52 
55  std::unordered_map<BoundaryID, const INSFVHydraulicSeparatorInterface *>
57 
58 private:
62  mutable bool _qp_calculations;
63 };
64 
65 inline void
67 {
68  if (_qp_calculations)
70 }
71 
72 inline void
74 {
75  if (_qp_calculations)
77  else
78  _element_data->setGeometry(Moose::Volume);
79 }
80 
81 inline void
83 {
84  if (_qp_calculations)
86 }
87 
88 inline void
90 {
91  if (_qp_calculations)
93 }
94 
95 inline void
97 {
98  if (_qp_calculations)
100 }
void computeElemValues() override
Definition: INSFVVariable.h:73
virtual void computeNeighborValues() override
void computeNeighborValuesFace() override
Definition: INSFVVariable.h:89
bool _qp_calculations
Whether to pre-initialize variable data for use in traditional MOOSE quadrature point based objects...
Definition: INSFVVariable.h:62
bool isExtrapolatedBoundaryFace(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &time) const override
Definition: INSFVVariable.C:92
bool isSeparatorBoundary(const FaceInfo &fi) const
Definition: INSFVVariable.C:82
virtual void initialSetup() override
Definition: INSFVVariable.C:75
std::unordered_map< BoundaryID, const INSFVHydraulicSeparatorInterface * > _boundary_id_to_separator
A container for quick access of hydraulic separator BCs associated with this variable.
Definition: INSFVVariable.h:56
std::unique_ptr< MooseVariableDataFV< Real > > _element_data
INSFVVariable(const InputParameters &params)
Definition: INSFVVariable.C:29
void requireQpComputations() const override
Definition: INSFVVariable.h:30
virtual void computeFaceValues(const FaceInfo &fi) override
virtual void meshChanged() override
Definition: INSFVVariable.C:68
void computeElemValuesFace() override
Definition: INSFVVariable.h:82
static InputParameters validParams()
Definition: INSFVVariable.C:24
void cacheSeparatorBoundaries()
Caches the separator boundaries.
Definition: INSFVVariable.C:35
A base class which serves as a tag for hydraulic separators.
virtual void timestepSetup() override
Definition: INSFVVariable.C:61
virtual void computeElemValues() override
void computeNeighborValues() override
Definition: INSFVVariable.h:96
virtual void computeElemValuesFace() override
void computeFaceValues(const FaceInfo &) override
Definition: INSFVVariable.h:66
virtual void computeNeighborValuesFace() override
bool isFullyDevelopedFlowFace(const FaceInfo &fi) const
Returns whether the passed-in FaceInfo corresponds to a fully-developed flow face.