https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADGateValve1PhaseUserObject.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
13
15
20{
21public:
24 virtual void initialize() override;
25 virtual void execute() override;
26 virtual void threadJoin(const UserObject & uo) override;
27 virtual void finalize() override;
28
29 const std::vector<ADReal> & getFlux(const unsigned int & connection_index) const override;
30
31protected:
33 const Real & _f_open;
35 const Real & _f_open_min;
36
45
47 const unsigned int _rhoA_jvar;
49 const unsigned int _rhouA_jvar;
51 const unsigned int _rhoEA_jvar;
52
55
58
60 const std::string & _component_name;
61
64
66 std::vector<std::vector<ADReal>> _solutions;
68 std::vector<std::vector<ADReal>> _fluxes;
70 std::vector<std::vector<dof_id_type>> _dof_indices;
71
73 std::vector<ADReal> _stored_p;
74
76 std::vector<unsigned int> _elem_ids;
78 std::vector<unsigned int> _local_side_ids;
79
81 std::vector<ADReal> _areas;
83 std::vector<RealVectorValue> _directions;
84
86 std::vector<unsigned int> _connection_indices;
87
89 static const std::vector<std::pair<std::string, unsigned int>> _varname_eq_index_pairs;
90
91public:
93};
Provides common interfaces for flow junction user objects.
Gate valve user object for 1-phase flow.
std::vector< ADReal > _areas
Areas at each connection.
static const std::vector< std::pair< std::string, unsigned int > > _varname_eq_index_pairs
Pairs of variable names vs. their corresponding equation indices.
const ADMaterialProperty< Real > & _p
Pressure material property.
virtual void threadJoin(const UserObject &uo) override
const unsigned int _rhoEA_jvar
Flow channel rho*E*A coupled variable index.
std::vector< unsigned int > _connection_indices
Connection indices for this thread.
const ADVariableValue & _rhoA
rho*A of the connected flow channels
const std::string & _component_name
Name of the associated component.
std::vector< RealVectorValue > _directions
Directions at each connection.
const unsigned int _rhoA_jvar
Flow channel rho*A coupled variable index.
const MaterialProperty< RealVectorValue > & _dir
Direction material property.
std::vector< std::vector< ADReal > > _solutions
Solution vectors for each connection.
std::vector< std::vector< dof_id_type > > _dof_indices
Degree of freedom indices; first index is connection, second is equation.
const Real & _f_open_min
Minimum open area fraction.
std::vector< std::vector< ADReal > > _fluxes
Flux vector.
const std::vector< ADReal > & getFlux(const unsigned int &connection_index) const override
Gets the flux vector for a connection.
const ADVariableValue & _A
Cross-sectional area of connected flow channels.
const Real & _f_open
Fraction of possible flow area that is open.
std::vector< unsigned int > _elem_ids
Element IDs for each connection.
std::vector< unsigned int > _local_side_ids
Local side IDs for each connection.
const ADNumericalFlux3EqnBase & _numerical_flux
Numerical flux user object.
std::vector< ADReal > _stored_p
Stored pressure for each connection.
const ADVariableValue & _rhoEA
rho*E*A of the connected flow channels
const unsigned int _rhouA_jvar
Flow channel rho*u*A coupled variable index.
const ADVariableValue & _rhouA
rho*u*A of the connected flow channels
Base class for computing numerical fluxes for FlowModelSinglePhase.
VariableValueTempl< true > ADVariableValue