www.mooseframework.org
DesorptionToPorespace.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
10 #include "DesorptionToPorespace.h"
11 
12 #include <iostream>
13 
14 registerMooseObject("ChemicalReactionsApp", DesorptionToPorespace);
15 
18 {
20  params.addRequiredCoupledVar("conc_var",
21  "Variable representing the concentration (kg/m^3) of "
22  "fluid in the matrix that will be desorped to "
23  "porespace");
24  params.addClassDescription("Mass flow rate to the porespace from the matrix. Add this to the "
25  "other kernels for the porepressure variable to form the complete DE");
26  return params;
27 }
28 
30  : Kernel(parameters),
31  _conc_var(coupled("conc_var")),
32  _mass_rate_from_matrix(getMaterialProperty<Real>("mass_rate_from_matrix")),
33  _dmass_rate_from_matrix_dC(getMaterialProperty<Real>("dmass_rate_from_matrix_dC")),
34  _dmass_rate_from_matrix_dp(getMaterialProperty<Real>("dmass_rate_from_matrix_dp"))
35 {
36 }
37 
38 Real
40 {
41  return -_test[_i][_qp] * _mass_rate_from_matrix[_qp];
42 }
43 
44 Real
46 {
48 }
49 
50 Real
52 {
53  if (jvar != _conc_var)
54  return 0.0;
56 }
const unsigned int _conc_var
MOOSE internal variable number corresponding to the concentration in the matrix (needed for OffDiagJa...
registerMooseObject("ChemicalReactionsApp", DesorptionToPorespace)
static InputParameters validParams()
const MaterialProperty< Real > & _mass_rate_from_matrix
mass flow rate from matrix = mass flow rate to porespace
static InputParameters validParams()
Mass flow rate of fluid to the porespace from the matrix Add this to the DE for the porepressure vari...
const VariableTestValue & _test
virtual Real computeQpJacobian() override
unsigned int _i
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
DesorptionToPorespace(const InputParameters &parameters)
virtual Real computeQpResidual() override
const MaterialProperty< Real > & _dmass_rate_from_matrix_dC
derivative of mass flow rate from matrix wrt concentration
void addClassDescription(const std::string &doc_string)
const VariablePhiValue & _phi
const MaterialProperty< Real > & _dmass_rate_from_matrix_dp
derivative of mass flow rate from matrix wrt pressure
unsigned int _qp