https://mooseframework.inl.gov
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 {
21 public:
23 
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 
31 protected:
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 
91 public:
93 };
std::vector< RealVectorValue > _directions
Directions at each connection.
Gate valve user object for 1-phase flow.
static InputParameters validParams()
std::vector< unsigned int > _connection_indices
Connection indices for this thread.
const unsigned int _rhoA_jvar
Flow channel rho*A coupled variable index.
std::vector< unsigned int > _local_side_ids
Local side IDs for each connection.
const ADNumericalFlux3EqnBase & _numerical_flux
Numerical flux user object.
const ADMaterialProperty< Real > & _p
Pressure material property.
static const std::vector< std::pair< std::string, unsigned int > > _varname_eq_index_pairs
Pairs of variable names vs. their corresponding equation indices.
std::vector< ADReal > _areas
Areas at each connection.
const ADVariableValue & _rhouA
rho*u*A of the connected flow channels
Base class for computing numerical fluxes for FlowModelSinglePhase.
ADGateValve1PhaseUserObject(const InputParameters &params)
const MaterialProperty< RealVectorValue > & _dir
Direction material property.
const ADVariableValue & _rhoA
rho*A of the connected flow channels
std::vector< unsigned int > _elem_ids
Element IDs for each connection.
const std::vector< ADReal > & getFlux(const unsigned int &connection_index) const override
Gets the flux vector for a connection.
Provides common interfaces for flow junction user objects.
const ADVariableValue & _A
Cross-sectional area of connected flow channels.
std::vector< std::vector< ADReal > > _solutions
Solution vectors for each connection.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< ADReal > _stored_p
Stored pressure for each connection.
const unsigned int _rhoEA_jvar
Flow channel rho*E*A coupled variable index.
const unsigned int _rhouA_jvar
Flow channel rho*u*A coupled variable index.
const ADVariableValue & _rhoEA
rho*E*A of the connected flow channels
virtual void threadJoin(const UserObject &uo) override
const std::string & _component_name
Name of the associated component.
const Real & _f_open_min
Minimum open area fraction.
std::vector< std::vector< ADReal > > _fluxes
Flux vector.
std::vector< std::vector< dof_id_type > > _dof_indices
Degree of freedom indices; first index is connection, second is equation.
const Real & _f_open
Fraction of possible flow area that is open.