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 Real _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 21 of file KineticDisPreRateAux.h.

Constructor & Destructor Documentation

KineticDisPreRateAux::KineticDisPreRateAux ( const InputParameters &  parameters)

Definition at line 28 of file KineticDisPreRateAux.C.

29  : AuxKernel(parameters),
30  _log_k(getParam<Real>("log_k")),
31  _r_area(getParam<Real>("r_area")),
32  _ref_kconst(getParam<Real>("ref_kconst")),
33  _e_act(getParam<Real>("e_act")),
34  _gas_const(getParam<Real>("gas_const")),
35  _ref_temp(getParam<Real>("ref_temp")),
36  _sys_temp(coupledValue("sys_temp")),
37  _sto_v(getParam<std::vector<Real>>("sto_v"))
38 {
39  const unsigned int n = coupledComponents("v");
40 
41  // Check that the number of stoichiometric coefficients is equal to the number
42  // of reactant species
43  if (_sto_v.size() != n)
44  mooseError("The number of stoichiometric coefficients is not equal to the number of reactant "
45  "species in ",
46  _name);
47 
48  _vals.resize(n);
49  for (unsigned int i = 0; i < n; ++i)
50  _vals[i] = &coupledValue("v", i);
51 }
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 _log_k
Equilibrium constant at reference 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.
virtual KineticDisPreRateAux::~KineticDisPreRateAux ( )
inlinevirtual

Definition at line 26 of file KineticDisPreRateAux.h.

26 {}

Member Function Documentation

Real KineticDisPreRateAux::computeValue ( )
overrideprotectedvirtual

Reimplemented in KineticDisPreConcAux.

Definition at line 54 of file KineticDisPreRateAux.C.

Referenced by KineticDisPreConcAux::computeValue(), and ~KineticDisPreRateAux().

55 {
56  const Real kconst =
57  _ref_kconst * std::exp(_e_act * (1.0 / _ref_temp - 1.0 / _sys_temp[_qp]) / _gas_const);
58  Real omega = 1.0;
59 
60  if (_vals.size() > 0)
61  {
62  for (unsigned int i = 0; i < _vals.size(); ++i)
63  {
64  if ((*_vals[i])[_qp] < 0.0)
65  omega *= std::pow(0.0, _sto_v[i]);
66  else
67  omega *= std::pow((*_vals[i])[_qp], _sto_v[i]);
68  }
69  }
70 
71  const Real saturation_SI = omega / std::pow(10.0, _log_k);
72  Real kinetic_rate = _r_area * kconst * (1.0 - saturation_SI);
73 
74  if (std::abs(kinetic_rate) <= 1.0e-12)
75  kinetic_rate = 0.0;
76 
77  return -kinetic_rate;
78 }
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 _log_k
Equilibrium constant at reference 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

const Real KineticDisPreRateAux::_e_act
protected

Activation energy.

Definition at line 41 of file KineticDisPreRateAux.h.

Referenced by computeValue().

const Real KineticDisPreRateAux::_gas_const
protected

Gas constant, 8.314 J/mol/K.

Definition at line 44 of file KineticDisPreRateAux.h.

Referenced by computeValue().

const Real KineticDisPreRateAux::_log_k
protected

Equilibrium constant at reference temperature.

Definition at line 32 of file KineticDisPreRateAux.h.

Referenced by computeValue().

const Real KineticDisPreRateAux::_r_area
protected

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

Definition at line 35 of file KineticDisPreRateAux.h.

Referenced by computeValue().

const Real KineticDisPreRateAux::_ref_kconst
protected

Reference kinetic rate constant.

Definition at line 38 of file KineticDisPreRateAux.h.

Referenced by computeValue().

const Real KineticDisPreRateAux::_ref_temp
protected

Reference temperature.

Definition at line 47 of file KineticDisPreRateAux.h.

Referenced by computeValue().

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

Stoichiometric coefficients for involved primary species.

Definition at line 53 of file KineticDisPreRateAux.h.

Referenced by computeValue(), and KineticDisPreRateAux().

const VariableValue& KineticDisPreRateAux::_sys_temp
protected

Actual system temperature.

Definition at line 50 of file KineticDisPreRateAux.h.

Referenced by computeValue().

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

Coupled primary species concentrations.

Definition at line 56 of file KineticDisPreRateAux.h.

Referenced by computeValue(), and KineticDisPreRateAux().


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