https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PINSFEFluidPressureTimeDerivative.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
14 PMFluidPressureTimeDerivative,
15 "02/01/2024 00:00",
17
20{
23 "Adds the transient term of the porous-media mass conservation equation");
24 params.addRequiredCoupledVar("temperature", "coupled temperature");
25 params.addRequiredCoupledVar("porosity", "porosity");
26 params.addRequiredParam<UserObjectName>("eos", "The name of equation of state object to use.");
27
28 return params;
29}
30
32 const InputParameters & parameters)
33 : TimeKernel(parameters),
34 _temperature(coupledValue("temperature")),
35 _temperature_dot(coupledDot("temperature")),
36 _d_temperaturedot_du(coupledDotDu("temperature")),
37 _temperature_var_number(coupled("temperature")),
38 _porosity(coupledValue("porosity")),
39 _eos(getUserObject<SinglePhaseFluidProperties>("eos"))
40{
41}
42
43Real
45{
46 Real rho, drho_dp, drho_dT;
47 _eos.rho_from_p_T(_u[_qp], _temperature[_qp], rho, drho_dp, drho_dT);
48 return _porosity[_qp] * (drho_dT * _temperature_dot[_qp] + drho_dp * _u_dot[_qp]) *
49 _test[_i][_qp];
50}
51
52Real
54{
55 Real rho, drho_dp, drho_dT;
56 _eos.rho_from_p_T(_u[_qp], _temperature[_qp], rho, drho_dp, drho_dT);
57 return _porosity[_qp] * drho_dp * _du_dot_du[_qp] * _phi[_j][_qp] * _test[_i][_qp];
58}
59
60Real
62{
63 if (jvar == _temperature_var_number)
64 {
65 Real rho, drho_dp, drho_dT;
66 _eos.rho_from_p_T(_u[_qp], _temperature[_qp], rho, drho_dp, drho_dT);
67 return _porosity[_qp] * drho_dT * _d_temperaturedot_du[_qp] * _phi[_j][_qp] * _test[_i][_qp];
68 }
69 else
70 return 0;
71}
const double rho
registerMooseObjectRenamed("NavierStokesApp", PMFluidPressureTimeDerivative, "02/01/2024 00:00", PINSFEFluidPressureTimeDerivative)
registerMooseObject("NavierStokesApp", PINSFEFluidPressureTimeDerivative)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _j
unsigned int _i
const VariablePhiValue & _phi
const VariableTestValue & _test
const VariableValue & _u
The transient term of the porous-media mass conservation equation.
PINSFEFluidPressureTimeDerivative(const InputParameters &parameters)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
Common class for single phase fluid properties.
const VariableValue & _u_dot
const VariableValue & _du_dot_du
static InputParameters validParams()