https://mooseframework.inl.gov
Loading...
Searching...
No Matches
THMSpecificVolumeAux.C
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
11
13
16{
18 params.addRequiredCoupledVar("rhoA",
19 "Density of the phase (conserved), \alpha \rho A for 2-phase model");
20 params.addRequiredCoupledVar("A", "Cross-sectional area");
21 params.addCoupledVar("alpha", 1., "Volume fraction");
22 params.addClassDescription("Computes the specific volume for the phase.");
23
24 return params;
25}
26
28 : AuxKernel(parameters),
29 _rhoA(coupledValue("rhoA")),
30 _area(coupledValue("A")),
31 _alpha(coupledValue("alpha"))
32{
33}
34
35Real
37{
38 mooseAssert(_rhoA[_qp] != 0, "Detected zero density.");
39 Real v = _alpha[_qp] * _area[_qp] / _rhoA[_qp];
40 mooseAssert(v >= 0., "specific volume is negative.");
41 return v;
42}
const double v
registerMooseObject("ThermalHydraulicsApp", THMSpecificVolumeAux)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
Computes specific volume.
THMSpecificVolumeAux(const InputParameters &parameters)
const VariableValue & _alpha
const VariableValue & _area
static InputParameters validParams()
const VariableValue & _rhoA