19 "weight", 1.0,
"The weight of the equilibrium species in total concentration");
20 params.
addCoupledVar(
"log_k", 0.0,
"The equilibrium constant of this equilibrium species");
24 "The stoichiometric coefficient of the primary species this kernel operates on");
26 "gamma_u", 1.0,
"Activity coefficient of primary species that this kernel operates on");
28 "sto_v", {},
"The stoichiometric coefficients of coupled primary species");
29 params.
addCoupledVar(
"gamma_v", 1.0,
"Activity coefficients of coupled primary species");
30 params.
addCoupledVar(
"gamma_eq", 1.0,
"Activity coefficient of this equilibrium species");
31 params.
addCoupledVar(
"v",
"Coupled primary species constituting the equilibrium species");
38 _weight(getParam<
Real>(
"weight")),
39 _log_k(coupledValue(
"log_k")),
40 _sto_u(getParam<
Real>(
"sto_u")),
41 _sto_v(getParam<
std::vector<
Real>>(
"sto_v")),
42 _gamma_u(coupledValue(
"gamma_u")),
43 _gamma_u_old(coupledValueOld(
"gamma_u")),
44 _gamma_v(isCoupled(
"gamma_v")
45 ? coupledValues(
"gamma_v")
47 &coupledValue(
"gamma_v"))),
48 _gamma_v_old(isCoupled(
"gamma_v")
49 ? coupledValuesOld(
"gamma_v")
51 &coupledValue(
"gamma_v"))),
52 _gamma_eq(coupledValue(
"gamma_eq")),
53 _gamma_eq_old(coupledValueOld(
"gamma_eq")),
54 _porosity(getMaterialProperty<
Real>(
"porosity")),
55 _vars(coupledIndices(
"v")),
56 _v_vals(coupledValues(
"v")),
57 _v_vals_old(coupledValuesOld(
"v")),
64 mooseError(
"The number of stoichiometric coefficients in sto_v is not equal to the number of " 65 "coupled species in ",
70 mooseError(
"The number of activity coefficients in gamma_v is not equal to the number of " 71 "coupled species in ",
78 mooseAssert(
_gamma_eq[
_qp] > 0.0,
"Activity coefficient must be greater than zero");
87 for (
unsigned int i = 0; i <
_vars.size(); ++i)
102 for (
unsigned int i = 0; i <
_vars.size(); ++i)
122 for (
unsigned int i = 0; i <
_vars.size(); ++i)
124 if (jvar ==
_vars[i])
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
CoupledBEEquilibriumSub(const InputParameters ¶meters)
const std::vector< const VariableValue * > _v_vals_old
Old values of coupled primary species concentrations.
registerMooseObject("ChemicalReactionsApp", CoupledBEEquilibriumSub)
static InputParameters validParams()
const std::vector< const VariableValue * > _gamma_v
Activity coefficients of coupled primary species in the equilibrium species.
const VariableValue & _gamma_eq_old
Old activity coefficient of equilibrium species.
const VariableValue & _gamma_eq
Activity coefficient of equilibrium species.
static InputParameters validParams()
const VariableValue & _gamma_u
Activity coefficient of primary species in the equilibrium species.
virtual Real computeQpJacobian() override
const std::vector< unsigned int > _vars
Coupled primary species variable numbers.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const VariableTestValue & _test
const VariableValue & _gamma_u_old
Old activity coefficient of primary species in the equilibrium species.
const MaterialProperty< Real > & _porosity
Porosity.
const std::vector< const VariableValue * > _v_vals
Coupled primary species concentrations.
OutputTools< Real >::VariableValue VariableValue
unsigned int coupledComponents(const std::string &var_name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _sto_u
Stoichiometric coefficient of the primary species in the equilibrium species.
const std::vector< const VariableValue * > _gamma_v_old
Old activity coefficients of coupled primary species in the equilibrium species.
void mooseError(Args &&... args) const
virtual Real computeQpResidual() override
const std::vector< Real > _sto_v
Stoichiometric coefficients of the coupled primary species in the equilibrium species.
const VariableValue & _u_old
Old value of the primary species concentration.
const VariablePhiValue & _phi
MooseUnits pow(const MooseUnits &, int)
const Real _weight
Weight of the equilibrium species in the total primary species.
Time derivative of primary species in given equilibrium species.
const VariableValue & _log_k
Equilibrium constant for the equilibrium species.