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 23 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 }
std::vector< const VariableValue * > _vals
Coupled kinetic mineral concentrations.
const std::vector< Real > _weight
Weight of the kinetic mineral concentration in the total primary species concentration.
const MaterialProperty< Real > & _porosity
Porosity.
std::vector< const VariableValue * > _vals_old
Coupled old values of kinetic mineral concentrations.

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 (auto i = beginIndex(_vals); 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 }
std::vector< const VariableValue * > _vals
Coupled kinetic mineral concentrations.
const std::vector< Real > _weight
Weight of the kinetic mineral concentration in the total primary species concentration.
const MaterialProperty< Real > & _porosity
Porosity.
std::vector< const VariableValue * > _vals_old
Coupled old values of kinetic mineral concentrations.

Member Data Documentation

◆ _porosity

const MaterialProperty<Real>& CoupledBEKinetic::_porosity
private

Porosity.

Definition at line 33 of file CoupledBEKinetic.h.

Referenced by computeQpResidual().

◆ _vals

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

Coupled kinetic mineral concentrations.

Definition at line 37 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 39 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 35 of file CoupledBEKinetic.h.

Referenced by computeQpResidual().


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