www.mooseframework.org
PorousFlowFullySaturatedDarcyFlow.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<PorousFlowFullySaturatedDarcyBase>();
15  params.addParam<unsigned int>(
16  "fluid_component", 0, "The index corresponding to the fluid component for this kernel");
17  params.addClassDescription("Darcy flux suitable for models involving a fully-saturated single "
18  "phase, multi-component fluid. No upwinding is used");
19  return params;
20 }
21 
23  const InputParameters & parameters)
25  _mfrac(getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp")),
26  _dmfrac_dvar(getMaterialProperty<std::vector<std::vector<std::vector<Real>>>>(
27  "dPorousFlow_mass_frac_qp_dvar")),
28  _fluid_component(getParam<unsigned int>("fluid_component"))
29 {
31  mooseError("PorousFlowFullySaturatedDarcyFlow: The dictator proclaims the number of fluid "
32  "components is ",
34  " whereas you set the fluid_component = ",
36  ". Happyness equals perfection.");
37 }
38 
39 Real
41 {
42  const unsigned ph = 0;
44 }
45 
46 Real
48 {
49  const unsigned ph = 0;
50  const Real darcy_mob = PorousFlowFullySaturatedDarcyBase::mobility();
51  const Real ddarcy_mob = PorousFlowFullySaturatedDarcyBase::dmobility(pvar);
52  return _dmfrac_dvar[_qp][ph][_fluid_component][pvar] * darcy_mob +
53  _mfrac[_qp][ph][_fluid_component] * ddarcy_mob;
54 }
virtual Real mobility() const override
The mobility of the fluid = mass_fraction * density / viscosity.
InputParameters validParams< PorousFlowFullySaturatedDarcyBase >()
unsigned int numComponents() const
the number of fluid components
PorousFlowFullySaturatedDarcyFlow(const InputParameters &parameters)
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
InputParameters validParams< PorousFlowFullySaturatedDarcyFlow >()
virtual Real dmobility(unsigned pvar) const
The derivative of the mobility with respect to the porous-flow variable pvar.
const PorousFlowDictator & _porousflow_dictator
PorousFlow UserObject.
virtual Real dmobility(unsigned pvar) const override
The derivative of the mobility with respect to the porous-flow variable pvar.
Darcy advective flux for a fully-saturated, single phase, single component fluid. ...
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmfrac_dvar
Derivative of mass fraction wrt wrt PorousFlow variables.
const unsigned int _fluid_component
The fluid component for this Kernel.
const MaterialProperty< std::vector< std::vector< Real > > > & _mfrac
mass fraction of the components in the phase