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

Derivative of mineral species concentration wrt time. More...

#include <CoupledBEKinetic.h>

Inheritance diagram for CoupledBEKinetic:
[legend]

Public Member Functions

 CoupledBEKinetic (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual () override
 

Private Attributes

const MaterialProperty< Real > & _porosity
 Porosity. More...
 
const std::vector< Real > _weight
 Weight of the kinetic mineral concentration in the total primary species concentration. More...
 
std::vector< const VariableValue * > _vals
 Coupled kinetic mineral concentrations. More...
 
std::vector< const VariableValue * > _vals_old
 Coupled old values of kinetic mineral concentrations. More...
 

Detailed Description

Derivative of mineral species concentration wrt time.

Definition at line 22 of file CoupledBEKinetic.h.

Constructor & Destructor Documentation

◆ CoupledBEKinetic()

CoupledBEKinetic::CoupledBEKinetic ( const InputParameters &  parameters)

Definition at line 26 of file CoupledBEKinetic.C.

27  : TimeDerivative(parameters),
28  _porosity(getMaterialProperty<Real>("porosity")),
29  _weight(getParam<std::vector<Real>>("weight"))
30 {
31  const unsigned int n = coupledComponents("v");
32  _vals.resize(n);
33  _vals_old.resize(n);
34 
35  for (unsigned int i = 0; i < n; ++i)
36  {
37  _vals[i] = &coupledValue("v", i);
38  _vals_old[i] = &coupledValueOld("v", i);
39  }
40 }

Member Function Documentation

◆ computeQpResidual()

Real CoupledBEKinetic::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 43 of file CoupledBEKinetic.C.

44 {
45  Real assemble_conc = 0.0;
46 
47  for (MooseIndex(_vals) i = 0; i < _vals.size(); ++i)
48  assemble_conc += _weight[i] * ((*_vals[i])[_qp] - (*_vals_old[i])[_qp]) / _dt;
49 
50  return _porosity[_qp] * _test[_i][_qp] * assemble_conc;
51 }

Member Data Documentation

◆ _porosity

const MaterialProperty<Real>& CoupledBEKinetic::_porosity
private

Porosity.

Definition at line 32 of file CoupledBEKinetic.h.

Referenced by computeQpResidual().

◆ _vals

std::vector<const VariableValue *> CoupledBEKinetic::_vals
private

Coupled kinetic mineral concentrations.

Definition at line 36 of file CoupledBEKinetic.h.

Referenced by computeQpResidual(), and CoupledBEKinetic().

◆ _vals_old

std::vector<const VariableValue *> CoupledBEKinetic::_vals_old
private

Coupled old values of kinetic mineral concentrations.

Definition at line 38 of file CoupledBEKinetic.h.

Referenced by computeQpResidual(), and CoupledBEKinetic().

◆ _weight

const std::vector<Real> CoupledBEKinetic::_weight
private

Weight of the kinetic mineral concentration in the total primary species concentration.

Definition at line 34 of file CoupledBEKinetic.h.

Referenced by computeQpResidual().


The documentation for this class was generated from the following files:
CoupledBEKinetic::_weight
const std::vector< Real > _weight
Weight of the kinetic mineral concentration in the total primary species concentration.
Definition: CoupledBEKinetic.h:34
CoupledBEKinetic::_vals
std::vector< const VariableValue * > _vals
Coupled kinetic mineral concentrations.
Definition: CoupledBEKinetic.h:36
CoupledBEKinetic::_porosity
const MaterialProperty< Real > & _porosity
Porosity.
Definition: CoupledBEKinetic.h:32
CoupledBEKinetic::_vals_old
std::vector< const VariableValue * > _vals_old
Coupled old values of kinetic mineral concentrations.
Definition: CoupledBEKinetic.h:38