https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
37Real
39{
40 const auto x = getMassFractionVector();
41 return _fp_vapor_mixture.rho_from_p_T(_p[_qp], _T[_qp], x);
42}
const std::vector< double > x
registerMooseObject("FluidPropertiesApp", RhoVaporMixtureFromPressureTemperatureIC)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Computes the density of a vapor mixture from pressure and temperature variables.
RhoVaporMixtureFromPressureTemperatureIC(const InputParameters &parameters)
Interface for calculations involving vapor mixtures.
std::vector< Real > getMassFractionVector() const
Gets the vector of mass fractions of each secondary vapor, at a quadrature point.
static InputParameters validParams()
const VaporMixtureFluidProperties & _fp_vapor_mixture
Vapor mixture fluid properties.