https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
19public:
21
22 virtual void addVariables() override;
23 virtual void addMooseObjects() override;
24
35 static const unsigned int N_EQ;
36
37 UserObjectName getVolumeJunctionUserObjectName() const { return _junction_uo_name; }
38 UserObjectName getNumericalFluxName(unsigned int i) const { return _numerical_flux_names[i]; }
39
40protected:
41 virtual void setupMesh() override;
42 virtual void check() const override;
43
47 virtual void buildVolumeJunctionUserObject();
48
54 std::string junctionVariableName(const std::string & var_base) const;
55
63 void addJunctionVariable(bool is_nonlinear, const VariableName & var, Real scaling_factor = 1.0);
64
71 void addJunctionIC(const VariableName & var, Real value);
72
79 void addVolumeJunctionIC(const VariableName & var, const std::string & quantity);
80
82 const Real _volume;
83
85 const Point & _position;
86
97
99 const VariableName _rhoV_var_name;
101 const VariableName _rhouV_var_name;
103 const VariableName _rhovV_var_name;
105 const VariableName _rhowV_var_name;
107 const VariableName _rhoEV_var_name;
109 const VariableName _pressure_var_name;
111 const VariableName _temperature_var_name;
113 const VariableName _velocity_var_name;
114
116 const Real & _K;
118 const Real & _A_ref;
119
120public:
122};
Base class for 1-phase flow junctions.
std::vector< UserObjectName > _numerical_flux_names
const std::string _junction_uo_name
Name of junction user object name, if any.
Junction between 1-phase flow channels that has a non-zero volume.
const VariableName _rhovV_var_name
rho*v*V variable name for junction
VolumeJunction1PhaseIndices
Enumeration for junction variable/equation indices.
const Real _volume
Volume of the junction.
const VariableName _temperature_var_name
temperature variable name for junction
const Real & _scaling_factor_rhoV
Scaling factor for rho*V.
const Real & _scaling_factor_rhovV
Scaling factor for rho*v*V.
UserObjectName getNumericalFluxName(unsigned int i) const
std::string junctionVariableName(const std::string &var_base) const
Returns the name of junction variable, depending on whether scalar.
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.
const Real & _scaling_factor_rhowV
Scaling factor for rho*w*V.
UserObjectName getVolumeJunctionUserObjectName() const
const VariableName _pressure_var_name
pressure variable name for junction
virtual void addVariables() override
const Real & _K
Form loss coefficient.
const VariableName _rhoEV_var_name
rho*E*V variable name for junction
static const unsigned int N_EQ
Number of equations for the junction.
const Real & _scaling_factor_rhouV
Scaling factor for rho*u*V.
const Real & _scaling_factor_rhoEV
Scaling factor for rho*E*V.
virtual void check() const override
Check the component integrity.
const VariableName _rhoV_var_name
rho*V variable name for junction
const Point & _position
Spatial position of center of the junction.
virtual void addMooseObjects() override
virtual void buildVolumeJunctionUserObject()
Builds user object for computing and storing the fluxes.
void addJunctionIC(const VariableName &var, Real value)
Adds a junction IC to the problem, as a scalar or field variable.
static InputParameters validParams()
const VariableName _rhowV_var_name
rho*w*V variable name for junction
void addVolumeJunctionIC(const VariableName &var, const std::string &quantity)
Adds a VolumeJunctionIC to the problem.
const VariableName _rhouV_var_name
rho*u*V variable name for junction
const VariableName _velocity_var_name
velocity variable name for junction
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
const Real & _A_ref
Reference area.