www.mooseframework.org
PorousFlowPorosityConst.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<PorousFlowPorosityBase>();
15  params.addRequiredCoupledVar("porosity", "The porosity (assumed constant for this material)");
16  params.addClassDescription("This Material calculates the porosity assuming it is constant");
17  return params;
18 }
19 
20 PorousFlowPorosityConst::PorousFlowPorosityConst(const InputParameters & parameters)
21  : PorousFlowPorosityBase(parameters), _input_porosity(coupledValue("porosity"))
22 {
23 }
24 
25 void
27 {
28  _porosity[_qp] = _input_porosity[_qp];
29 }
30 
31 void
33 {
35 
36  // The derivatives are zero for all time
37  _dporosity_dvar[_qp].assign(_num_var, 0.0);
38  _dporosity_dgradvar[_qp].assign(_num_var, RealGradient());
39 }
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)
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.
virtual void initQpStatefulProperties() override
PorousFlowPorosityConst(const InputParameters &parameters)
InputParameters validParams< PorousFlowPorosityConst >()
const VariableValue & _input_porosity
Constant porosity.
InputParameters validParams< PorousFlowPorosityBase >()