https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowPorosityConst.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
15template <bool is_ad>
18{
21 "porosity",
22 "The porosity (assumed indepenent of porepressure, temperature, "
23 "strain, etc, for this material). This should be a real number, or "
24 "a constant monomial variable (not a linear lagrange or other kind of variable). If it is "
25 "less than porosity_min, porosity is set to porosity_min instead.");
26 // The porosity derivatives are always zero in this Material, so zero_modifier has no effect
27 params.suppressParameter<Real>("zero_modifier");
28 params.addClassDescription("This Material calculates the porosity assuming it is constant");
29 return params;
30}
31
32template <bool is_ad>
34 const InputParameters & parameters)
35 : PorousFlowPorosityBaseTempl<is_ad>(parameters), _input_porosity(coupledValue("porosity"))
36{
37}
38
39template <bool is_ad>
40void
42{
43 // note the [0] below: _phi0 is a constant monomial and we use [0] regardless of _nodal_material
44 _porosity[_qp] = _input_porosity[0];
45
46 if (!is_ad)
47 {
48 // The derivatives are zero for all time
49 (*_dporosity_dvar)[_qp].assign(_num_var, 0.0);
50 (*_dporosity_dgradvar)[_qp].assign(_num_var, RealGradient());
51 }
52
53 this->applyPorosityMin();
54}
55
56template <bool is_ad>
57void
59{
60 initQpStatefulProperties();
61}
62
registerMooseObject("PorousFlowApp", PorousFlowPorosityConst)
void suppressParameter(const std::string &name)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Base class Material designed to provide the porosity.
static InputParameters validParams()
Material to provide a constant value of porosity.
PorousFlowPorosityConstTempl(const InputParameters &parameters)
static InputParameters validParams()
virtual void computeQpProperties() override
virtual void initQpStatefulProperties() override