www.mooseframework.org
PorousFlowFullySaturatedDarcyFlow.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 
16 {
18  params.addParam<unsigned int>(
19  "fluid_component", 0, "The index corresponding to the fluid component for this kernel");
20  params.addClassDescription("Darcy flux suitable for models involving a fully-saturated single "
21  "phase, multi-component fluid. No upwinding is used");
22  return params;
23 }
24 
26  const InputParameters & parameters)
28  _mfrac(getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp")),
29  _dmfrac_dvar(getMaterialProperty<std::vector<std::vector<std::vector<Real>>>>(
30  "dPorousFlow_mass_frac_qp_dvar")),
31  _fluid_component(getParam<unsigned int>("fluid_component"))
32 {
34  paramError(
35  "fluid_component",
36  "The Dictator proclaims that the maximum fluid component index in this simulation is ",
38  " whereas you have used ",
40  ". Remember that indexing starts at 0. Happiness equals perfection.");
41 }
42 
43 Real
45 {
46  const unsigned ph = 0;
48 }
49 
50 Real
52 {
53  const unsigned ph = 0;
55  const Real ddarcy_mob = PorousFlowFullySaturatedDarcyBase::dmobility(pvar);
56  return _dmfrac_dvar[_qp][ph][_fluid_component][pvar] * darcy_mob +
57  _mfrac[_qp][ph][_fluid_component] * ddarcy_mob;
58 }
virtual Real dmobility(unsigned pvar) const
The derivative of the mobility with respect to the PorousFlow variable pvar.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Darcy advective flux for a fully-saturated, single-phase, multi-component fluid.
unsigned int numComponents() const
The number of fluid components.
virtual Real mobility() const override
The mobility of the fluid = mass_fraction * density / viscosity.
PorousFlowFullySaturatedDarcyFlow(const InputParameters &parameters)
void paramError(const std::string &param, Args... args) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Darcy advective flux for a fully-saturated, single phase, single component fluid. ...
registerMooseObject("PorousFlowApp", PorousFlowFullySaturatedDarcyFlow)
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmfrac_dvar
Derivative of mass fraction wrt wrt PorousFlow variables.
void addClassDescription(const std::string &doc_string)
const unsigned int _fluid_component
The fluid component for this Kernel.
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
const MaterialProperty< std::vector< std::vector< Real > > > & _mfrac
mass fraction of the components in the phase
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
virtual Real dmobility(unsigned pvar) const override
The derivative of the mobility with respect to the PorousFlow variable pvar.
void ErrorVector unsigned int
unsigned int _qp