https://mooseframework.inl.gov
VolumeJunction1Phase.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 "FlowJunction1Phase.h"
13 
18 {
19 public:
20  VolumeJunction1Phase(const InputParameters & params);
21 
22  virtual void addVariables() override;
23  virtual void addMooseObjects() override;
24 
27  {
33  };
35  static const unsigned int N_EQ;
36 
37 protected:
38  virtual void setupMesh() override;
39  virtual void check() const override;
40 
44  virtual void buildVolumeJunctionUserObject();
45 
51  std::string junctionVariableName(const std::string & var_base) const;
52 
60  void addJunctionVariable(bool is_nonlinear, const VariableName & var, Real scaling_factor = 1.0);
61 
68  void addJunctionIC(const VariableName & var, Real value);
69 
76  void addVolumeJunctionIC(const VariableName & var, const std::string & quantity);
77 
79  const Real _volume;
80 
82  const Point & _position;
83 
94 
96  const VariableName _rhoV_var_name;
98  const VariableName _rhouV_var_name;
100  const VariableName _rhovV_var_name;
102  const VariableName _rhowV_var_name;
104  const VariableName _rhoEV_var_name;
106  const VariableName _pressure_var_name;
108  const VariableName _temperature_var_name;
110  const VariableName _velocity_var_name;
111 
113  const Real & _K;
115  const Real & _A_ref;
116 
117 public:
118  static InputParameters validParams();
119 };
virtual void addVariables() override
const VariableName _rhoV_var_name
rho*V variable name for junction
static InputParameters validParams()
const VariableName _rhovV_var_name
rho*v*V variable name for junction
const VariableName _temperature_var_name
temperature variable name for junction
const VariableName _rhowV_var_name
rho*w*V variable name for junction
virtual void buildVolumeJunctionUserObject()
Builds user object for computing and storing the fluxes.
const Real & _scaling_factor_rhovV
Scaling factor for rho*v*V.
static const unsigned int N_EQ
Number of equations for the junction.
std::string junctionVariableName(const std::string &var_base) const
Returns the name of junction variable, depending on whether scalar.
void addJunctionIC(const VariableName &var, Real value)
Adds a junction IC to the problem, as a scalar or field variable.
const Real & _scaling_factor_rhoV
Scaling factor for rho*V.
const Real & _scaling_factor_rhouV
Scaling factor for rho*u*V.
const VariableName _velocity_var_name
velocity variable name for junction
VolumeJunction1PhaseIndices
Enumeration for junction variable/equation indices.
virtual void check() const override
Check the component integrity.
virtual void addMooseObjects() override
const Real & _scaling_factor_rhowV
Scaling factor for rho*w*V.
const VariableName _pressure_var_name
pressure variable name for junction
const Real _volume
Volume of the junction.
void addJunctionVariable(bool is_nonlinear, const VariableName &var, Real scaling_factor=1.0)
Adds a junction variable to the problem, as a scalar or field variable.
Junction between 1-phase flow channels that has a non-zero volume.
const Real & _A_ref
Reference area.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for 1-phase flow junctions.
void addVolumeJunctionIC(const VariableName &var, const std::string &quantity)
Adds a VolumeJunctionIC to the problem.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
const Real & _K
Form loss coefficient.
const VariableName _rhouV_var_name
rho*u*V variable name for junction
const Point & _position
Spatial position of center of the junction.
VolumeJunction1Phase(const InputParameters &params)
const VariableName _rhoEV_var_name
rho*E*V variable name for junction
const Real & _scaling_factor_rhoEV
Scaling factor for rho*E*V.