www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KineticDisPreRateAux Class Reference

Calculate the kinetic mineral species kinetic rate according to transient state theory rate law. More...

#include <KineticDisPreRateAux.h>

Inheritance diagram for KineticDisPreRateAux:
[legend]

Public Member Functions

 KineticDisPreRateAux (const InputParameters &parameters)
 
virtual ~KineticDisPreRateAux ()
 

Protected Member Functions

virtual Real computeValue () override
 

Protected Attributes

const VariableValue & _log_k
 Equilibrium constant at reference temperature. More...
 
const Real _r_area
 Specific reactive surface area, m^2/L solution. More...
 
const Real _ref_kconst
 Reference kinetic rate constant. More...
 
const Real _e_act
 Activation energy. More...
 
const Real _gas_const
 Gas constant, 8.314 J/mol/K. More...
 
const Real _ref_temp
 Reference temperature. More...
 
const VariableValue & _sys_temp
 Actual system temperature. More...
 
const std::vector< Real > _sto_v
 Stoichiometric coefficients for involved primary species. More...
 
std::vector< const VariableValue * > _vals
 Coupled primary species concentrations. More...
 

Detailed Description

Calculate the kinetic mineral species kinetic rate according to transient state theory rate law.

Definition at line 24 of file KineticDisPreRateAux.h.

Constructor & Destructor Documentation

◆ KineticDisPreRateAux()

KineticDisPreRateAux::KineticDisPreRateAux ( const InputParameters &  parameters)

Definition at line 33 of file KineticDisPreRateAux.C.

34  : AuxKernel(parameters),
35  _log_k(coupledValue("log_k")),
36  _r_area(getParam<Real>("r_area")),
37  _ref_kconst(getParam<Real>("ref_kconst")),
38  _e_act(getParam<Real>("e_act")),
39  _gas_const(getParam<Real>("gas_const")),
40  _ref_temp(getParam<Real>("ref_temp")),
41  _sys_temp(coupledValue("sys_temp")),
42  _sto_v(getParam<std::vector<Real>>("sto_v"))
43 {
44  const unsigned int n = coupledComponents("v");
45 
46  // Check that the number of stoichiometric coefficients is equal to the number
47  // of reactant species
48  if (_sto_v.size() != n)
49  mooseError(
50  "The number of stoichiometric coefficients in sto_v is not equal to the number of reactant "
51  "species in ",
52  _name);
53 
54  _vals.resize(n);
55  for (unsigned int i = 0; i < n; ++i)
56  _vals[i] = &coupledValue("v", i);
57 }
const VariableValue & _log_k
Equilibrium constant at reference temperature.
const Real _ref_temp
Reference temperature.
const Real _ref_kconst
Reference kinetic rate constant.
const std::vector< Real > _sto_v
Stoichiometric coefficients for involved primary species.
const VariableValue & _sys_temp
Actual system temperature.
const Real _r_area
Specific reactive surface area, m^2/L solution.
const Real _gas_const
Gas constant, 8.314 J/mol/K.
std::vector< const VariableValue * > _vals
Coupled primary species concentrations.
const Real _e_act
Activation energy.

◆ ~KineticDisPreRateAux()

virtual KineticDisPreRateAux::~KineticDisPreRateAux ( )
inlinevirtual

Definition at line 29 of file KineticDisPreRateAux.h.

29 {}

Member Function Documentation

◆ computeValue()

Real KineticDisPreRateAux::computeValue ( )
overrideprotectedvirtual

Reimplemented in KineticDisPreConcAux.

Definition at line 60 of file KineticDisPreRateAux.C.

Referenced by KineticDisPreConcAux::computeValue().

61 {
62  const Real kconst =
63  _ref_kconst * std::exp(_e_act * (1.0 / _ref_temp - 1.0 / _sys_temp[_qp]) / _gas_const);
64  Real omega = 1.0;
65 
66  if (_vals.size() > 0)
67  {
68  for (unsigned int i = 0; i < _vals.size(); ++i)
69  {
70  if ((*_vals[i])[_qp] < 0.0)
71  omega *= 0.0;
72  else
73  omega *= std::pow((*_vals[i])[_qp], _sto_v[i]);
74  }
75  }
76 
77  const Real saturation_SI = omega / std::pow(10.0, _log_k[_qp]);
78  Real kinetic_rate = _r_area * kconst * (1.0 - saturation_SI);
79 
80  if (std::abs(kinetic_rate) <= 1.0e-12)
81  kinetic_rate = 0.0;
82 
83  return -kinetic_rate;
84 }
const VariableValue & _log_k
Equilibrium constant at reference temperature.
const Real _ref_temp
Reference temperature.
const Real _ref_kconst
Reference kinetic rate constant.
const std::vector< Real > _sto_v
Stoichiometric coefficients for involved primary species.
const VariableValue & _sys_temp
Actual system temperature.
const Real _r_area
Specific reactive surface area, m^2/L solution.
const Real _gas_const
Gas constant, 8.314 J/mol/K.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
std::vector< const VariableValue * > _vals
Coupled primary species concentrations.
const Real _e_act
Activation energy.

Member Data Documentation

◆ _e_act

const Real KineticDisPreRateAux::_e_act
protected

Activation energy.

Definition at line 41 of file KineticDisPreRateAux.h.

Referenced by computeValue().

◆ _gas_const

const Real KineticDisPreRateAux::_gas_const
protected

Gas constant, 8.314 J/mol/K.

Definition at line 43 of file KineticDisPreRateAux.h.

Referenced by computeValue().

◆ _log_k

const VariableValue& KineticDisPreRateAux::_log_k
protected

Equilibrium constant at reference temperature.

Definition at line 35 of file KineticDisPreRateAux.h.

Referenced by computeValue().

◆ _r_area

const Real KineticDisPreRateAux::_r_area
protected

Specific reactive surface area, m^2/L solution.

Definition at line 37 of file KineticDisPreRateAux.h.

Referenced by computeValue().

◆ _ref_kconst

const Real KineticDisPreRateAux::_ref_kconst
protected

Reference kinetic rate constant.

Definition at line 39 of file KineticDisPreRateAux.h.

Referenced by computeValue().

◆ _ref_temp

const Real KineticDisPreRateAux::_ref_temp
protected

Reference temperature.

Definition at line 45 of file KineticDisPreRateAux.h.

Referenced by computeValue().

◆ _sto_v

const std::vector<Real> KineticDisPreRateAux::_sto_v
protected

Stoichiometric coefficients for involved primary species.

Definition at line 49 of file KineticDisPreRateAux.h.

Referenced by computeValue(), and KineticDisPreRateAux().

◆ _sys_temp

const VariableValue& KineticDisPreRateAux::_sys_temp
protected

Actual system temperature.

Definition at line 47 of file KineticDisPreRateAux.h.

Referenced by computeValue().

◆ _vals

std::vector<const VariableValue *> KineticDisPreRateAux::_vals
protected

Coupled primary species concentrations.

Definition at line 51 of file KineticDisPreRateAux.h.

Referenced by computeValue(), and KineticDisPreRateAux().


The documentation for this class was generated from the following files: