https://mooseframework.inl.gov
RhoVaporMixtureFromPressureTemperatureIC.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 {
19 
20  params.addClassDescription(
21  "Computes the density of a vapor mixture from pressure and temperature.");
22 
23  params.addRequiredCoupledVar("p", "Pressure of the mixture [Pa]");
24  params.addRequiredCoupledVar("T", "Temperature of the mixture [K]");
25 
26  return params;
27 }
28 
30  const InputParameters & parameters)
32  _p(coupledValue("p")),
33  _T(coupledValue("T"))
34 {
35 }
36 
37 Real
39 {
40  const auto x = getMassFractionVector();
41  return _fp_vapor_mixture.rho_from_p_T(_p[_qp], _T[_qp], x);
42 }
RhoVaporMixtureFromPressureTemperatureIC(const InputParameters &parameters)
std::vector< Real > getMassFractionVector() const
Gets the vector of mass fractions of each secondary vapor, at a quadrature point. ...
static InputParameters validParams()
Interface for calculations involving vapor mixtures.
const VaporMixtureFluidProperties & _fp_vapor_mixture
Vapor mixture fluid properties.
const std::vector< double > x
registerMooseObject("FluidPropertiesApp", RhoVaporMixtureFromPressureTemperatureIC)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Computes the density of a vapor mixture from pressure and temperature variables.
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()