https://mooseframework.inl.gov
GeochemistryTimeDerivative.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
16 {
18  params.addCoupledVar("porosity", 1.0, "Porosity");
19  params.addClassDescription(
20  "Kernel describing porosity * d(concentration)/dt, where porosity is an AuxVariable (or just "
21  "a real number) and concentration is the 'variable' for this Kernel. This Kernel should not "
22  "be used if porosity is time-dependent. Mass lumping is employed for numerical stability");
23  return params;
24 }
25 
27  : TimeKernel(parameters),
28  _nodal_u_dot(_var.dofValuesDot()),
29  _nodal_du_dot_du(_var.dofValuesDuDotDu()),
30  _porosity(coupledValue("porosity"))
31 {
32 }
33 
34 Real
36 {
37  return _test[_i][_qp] * _porosity[_qp] * _nodal_u_dot[_i];
38 }
39 
40 Real
42 {
43  if (_i == _j)
44  return _test[_i][_qp] * _porosity[_qp] * _nodal_du_dot_du[_j];
45  else
46  return 0.0;
47 }
GeochemistryTimeDerivative(const InputParameters &parameters)
const VariableValue & _nodal_du_dot_du
virtual Real computeQpJacobian() override
const VariableTestValue & _test
registerMooseObject("GeochemistryApp", GeochemistryTimeDerivative)
Kernel describing porosity * d(concentration)/dt, where porosity is an AuxVariable.
unsigned int _i
void addCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual Real computeQpResidual() override
static InputParameters validParams()
static InputParameters validParams()
unsigned int _qp