www.mooseframework.org
PorousFlowPorosityConst.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<PorousFlowPorosityBase>();
19  params.addRequiredCoupledVar(
20  "porosity",
21  "The porosity (assumed indepenent of porepressure, temperature, "
22  "strain, etc, for this material). This should be a real number, or "
23  "a constant monomial variable (not a linear lagrange or other kind of variable).");
24  params.addClassDescription("This Material calculates the porosity assuming it is constant");
25  return params;
26 }
27 
28 PorousFlowPorosityConst::PorousFlowPorosityConst(const InputParameters & parameters)
29  : PorousFlowPorosityBase(parameters), _input_porosity(coupledValue("porosity"))
30 {
31 }
32 
33 void
35 {
36  // note the [0] below: _phi0 is a constant monomial and we use [0] regardless of _nodal_material
37  _porosity[_qp] = _input_porosity[0];
38 }
39 
40 void
42 {
44 
45  // The derivatives are zero for all time
46  _dporosity_dvar[_qp].assign(_num_var, 0.0);
48 }
VectorValue< Real > RealGradient
virtual void computeQpProperties() override
MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable)
MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable)
Material to provide a constant value of porosity.
Base class Material designed to provide the porosity.
MaterialProperty< Real > & _porosity
Computed porosity at the nodes or quadpoints.
const unsigned int _num_var
Number of PorousFlow variables.
registerMooseObject("PorousFlowApp", PorousFlowPorosityConst)
virtual void initQpStatefulProperties() override
PorousFlowPorosityConst(const InputParameters &parameters)
InputParameters validParams< PorousFlowPorosityConst >()
const VariableValue & _input_porosity
Constant porosity.
InputParameters validParams< PorousFlowPorosityBase >()