www.mooseframework.org
PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent.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.addClassDescription(
19  "Computes the advective flux of fluid of given phase and fluid component. Explicitly, the "
20  "UserObject computes (mass_fraction * density / viscosity) * (- permeability * (grad(P) - "
21  "density * gravity)), using the Kuzmin-Turek FEM-TVD multidimensional stabilization scheme");
22  params.addParam<unsigned int>(
23  "fluid_component", 0, "The index corresponding to the fluid component for this UserObject");
24  return params;
25 }
26 
30  _fluid_component(getParam<unsigned int>("fluid_component")),
31  _mass_fractions(
32  getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_nodal")),
33  _dmass_fractions_dvar(getMaterialProperty<std::vector<std::vector<std::vector<Real>>>>(
34  "dPorousFlow_mass_frac_nodal_dvar"))
35 {
37  paramError("fluid_component",
38  "Fluid component number entered is greater than the number of fluid components "
39  "specified in the Dictator. Remember that indexing starts at 0");
40 }
41 
42 Real
44 {
47 }
48 
49 Real
51  unsigned pvar) const
52 {
57  return du;
58 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
unsigned int numComponents() const
The number of fluid components.
virtual Real computeU(unsigned i) const override
Computes the value of u at the local node id of the current element (_current_elem) ...
Computes the advective flux of fluid of given phase and fluid component.
void paramError(const std::string &param, Args... args) const
virtual Real computeU(unsigned i) const override
Computes the value of u at the local node id of the current element (_current_elem) ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computedU_dvar(unsigned i, unsigned pvar) const override
Compute d(u)/d(porous_flow_variable)
Computes the advective flux of fluid of given phase, assuming fully-saturated conditions.
const MaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions
Mass fraction of each component in each phase.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
void addClassDescription(const std::string &doc_string)
virtual Real computedU_dvar(unsigned i, unsigned pvar) const override
Compute d(u)/d(porous_flow_variable)
registerMooseObject("PorousFlowApp", PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent)
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmass_fractions_dvar
Derivative of the mass fraction of each component in each phase wrt PorousFlow variables.
void ErrorVector unsigned int