www.mooseframework.org
PorousFlowSink.h
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 
8 #ifndef POROUSFLOWSINK_H
9 #define POROUSFLOWSINK_H
10 
11 #include "IntegratedBC.h"
12 #include "Function.h"
13 #include "PorousFlowDictator.h"
14 
15 // Forward Declarations
16 class PorousFlowSink;
17 
18 template <>
19 InputParameters validParams<PorousFlowSink>();
20 
34 class PorousFlowSink : public IntegratedBC
35 {
36 public:
37  PorousFlowSink(const InputParameters & parameters);
38 
39 protected:
40  virtual Real computeQpResidual() override;
41  virtual Real computeQpJacobian() override;
42  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
43 
46 
48  const bool _involves_fluid;
49 
51  const unsigned int _ph;
52 
54  const bool _use_mass_fraction;
55 
57  const bool _has_mass_fraction;
58 
60  const unsigned int _sp;
61 
63  const bool _use_mobility;
64 
66  const bool _has_mobility;
67 
69  const bool _use_relperm;
70 
72  const bool _has_relperm;
73 
75  const bool _use_enthalpy;
76 
78  const bool _has_enthalpy;
79 
82 
85 
88 
91 
93  Function & _m_func;
94 
96  const MaterialProperty<RealTensorValue> * const _permeability;
97 
99  const MaterialProperty<std::vector<RealTensorValue>> * const _dpermeability_dvar;
100 
102  const MaterialProperty<std::vector<std::vector<RealTensorValue>>> * const _dpermeability_dgradvar;
103 
105  const MaterialProperty<std::vector<Real>> * const _fluid_density_node;
106 
108  const MaterialProperty<std::vector<std::vector<Real>>> * const _dfluid_density_node_dvar;
109 
111  const MaterialProperty<std::vector<Real>> * const _fluid_viscosity;
112 
114  const MaterialProperty<std::vector<std::vector<Real>>> * const _dfluid_viscosity_dvar;
115 
117  const MaterialProperty<std::vector<Real>> * const _relative_permeability;
118 
120  const MaterialProperty<std::vector<std::vector<Real>>> * const _drelative_permeability_dvar;
121 
123  const MaterialProperty<std::vector<std::vector<Real>>> * const _mass_fractions;
124 
126  const MaterialProperty<std::vector<std::vector<std::vector<Real>>>> * const _dmass_fractions_dvar;
127 
129  const MaterialProperty<std::vector<Real>> * const _enthalpy;
130 
132  const MaterialProperty<std::vector<std::vector<Real>>> * const _denthalpy_dvar;
133 
135  const MaterialProperty<std::vector<Real>> * const _internal_energy;
136 
138  const MaterialProperty<std::vector<std::vector<Real>>> * const _dinternal_energy_dvar;
139 
141  const MaterialProperty<RealTensorValue> * const _thermal_conductivity;
142 
144  const MaterialProperty<std::vector<RealTensorValue>> * const _dthermal_conductivity_dvar;
145 
147  Real jac(unsigned int jvar) const;
148 
150  virtual Real multiplier() const;
151 
153  virtual Real dmultiplier_dvar(unsigned int pvar) const;
154 };
155 
156 #endif // POROUSFLOWSINK_H
const bool _has_enthalpy
whether there is an "enthalpy" Material. This is just for error checking
const bool _involves_fluid
Whether this BC involves fluid (whether the user has supplied a fluid phase number) ...
const MaterialProperty< std::vector< Real > > *const _relative_permeability
Relative permeability of each phase.
const unsigned int _sp
The component number (only used if _use_mass_fraction==true)
const unsigned int _ph
The phase number.
const MaterialProperty< std::vector< std::vector< Real > > > *const _denthalpy_dvar
d(enthalpy of each phase)/d(PorousFlow variable)
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > *const _dpermeability_dgradvar
d(Permeability)/d(grad(PorousFlow variable))
const PorousFlowDictator & _dictator
PorousFlow UserObject.
const bool _has_internal_energy
whether there is an "internal_energy" Material. This is just for error checking
const MaterialProperty< std::vector< Real > > *const _fluid_viscosity
Viscosity of each component in each phase.
const bool _has_thermal_conductivity
whether there is an "thermal_conductivity" Material. This is just for error checking ...
const bool _has_mobility
Whether there are Materials that can form "mobility". This is just for error checking.
const bool _use_mass_fraction
Whether the flux will be multiplied by the mass fraction.
const bool _has_relperm
Whether there is a "relperm" Material. This is just for error checking.
const MaterialProperty< std::vector< std::vector< Real > > > *const _mass_fractions
Mass fraction of each component in each phase.
const MaterialProperty< RealTensorValue > *const _thermal_conductivity
Thermal_Conductivity of porous material.
const bool _use_relperm
whether to multiply the sink flux by relative permeability
Applies a flux sink to a boundary.
const bool _use_mobility
whether to multiply the sink flux by permeability*density/viscosity
const MaterialProperty< std::vector< Real > > *const _internal_energy
Internal_Energy of each phase.
const MaterialProperty< std::vector< RealTensorValue > > *const _dthermal_conductivity_dvar
d(Thermal_Conductivity)/d(PorousFlow variable)
virtual Real computeQpJacobian() override
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_density_node_dvar
d(Fluid density for each phase (at the node))/d(PorousFlow variable)
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const _dmass_fractions_dvar
d(Mass fraction of each component in each phase)/d(PorousFlow variable)
Real jac(unsigned int jvar) const
derivative of residual with respect to the jvar variable
const bool _use_enthalpy
whether to multiply the sink flux by enthalpy
Function & _m_func
The flux.
const MaterialProperty< std::vector< Real > > *const _enthalpy
Enthalpy of each phase.
virtual Real dmultiplier_dvar(unsigned int pvar) const
d(multiplier)/d(Porous flow variable pvar)
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const bool _has_mass_fraction
Whether there is a "mass_fraction" Material. This is just for error checking.
const bool _use_internal_energy
whether to multiply the sink flux by internal_energy
virtual Real computeQpResidual() override
const bool _use_thermal_conductivity
whether to multiply the sink flux by thermal_conductivity
const MaterialProperty< std::vector< Real > > *const _fluid_density_node
Fluid density for each phase (at the node)
const MaterialProperty< std::vector< std::vector< Real > > > *const _drelative_permeability_dvar
d(Relative permeability of each phase)/d(PorousFlow variable)
const MaterialProperty< std::vector< std::vector< Real > > > *const _dinternal_energy_dvar
d(internal_energy of each phase)/d(PorousFlow variable)
const MaterialProperty< RealTensorValue > *const _permeability
Permeability of porous material.
PorousFlowSink(const InputParameters &parameters)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
virtual Real multiplier() const
The flux gets multiplied by this quantity.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_viscosity_dvar
d(Viscosity of each component in each phase)/d(PorousFlow variable)
InputParameters validParams< PorousFlowSink >()
const MaterialProperty< std::vector< RealTensorValue > > *const _dpermeability_dvar
d(Permeability)/d(PorousFlow variable)