Line data Source code
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 : #include "RhoVaporMixtureFromPressureTemperatureIC.h" 11 : 12 : registerMooseObject("FluidPropertiesApp", RhoVaporMixtureFromPressureTemperatureIC); 13 : 14 : InputParameters 15 41 : RhoVaporMixtureFromPressureTemperatureIC::validParams() 16 : { 17 41 : InputParameters params = InitialCondition::validParams(); 18 41 : params += VaporMixtureInterface<>::validParams(); 19 : 20 41 : params.addClassDescription( 21 : "Computes the density of a vapor mixture from pressure and temperature."); 22 : 23 82 : params.addRequiredCoupledVar("p", "Pressure of the mixture [Pa]"); 24 82 : params.addRequiredCoupledVar("T", "Temperature of the mixture [K]"); 25 : 26 41 : return params; 27 0 : } 28 : 29 22 : RhoVaporMixtureFromPressureTemperatureIC::RhoVaporMixtureFromPressureTemperatureIC( 30 22 : const InputParameters & parameters) 31 : : VaporMixtureInterface<InitialCondition>(parameters), 32 22 : _p(coupledValue("p")), 33 44 : _T(coupledValue("T")) 34 : { 35 22 : } 36 : 37 : Real 38 18 : RhoVaporMixtureFromPressureTemperatureIC::value(const Point & /*p*/) 39 : { 40 18 : const auto x = getMassFractionVector(); 41 36 : return _fp_vapor_mixture.rho_from_p_T(_p[_qp], _T[_qp], x); 42 18 : }