https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeExtraStressVDWGas.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{
19 "Computes a hydrostatic stress corresponding to the pressure of a van der Waals gas that is "
20 "added as an extra_stress to the stress computed by the constitutive model");
21 params.addRequiredParam<MaterialPropertyName>(
22 "b", "Hard-sphere exclusion volume of van der Waals gas atoms in nm^3");
23 params.addRequiredParam<MaterialPropertyName>("Va", "Atomic volume of lattice atoms in nm^3");
24 params.addRequiredParam<MaterialPropertyName>("T", "Temperature in K");
25 params.addRequiredCoupledVar("cg", "Gas concentration (relative to lattice atoms)");
26 params.addParam<Real>("nondim_factor",
27 1.0,
28 "Optional factor to non-dimensionalize pressure (pressure is calculated in "
29 "Pa, set this factor to characteristic energy density used for "
30 "non-dimensionalization if desired)");
31 return params;
32}
33
35 : ComputeExtraStressBase(parameters),
36 _b(getMaterialProperty<Real>("b")),
37 _Va(getMaterialProperty<Real>("Va")),
38 _T(getMaterialProperty<Real>("T")),
39 _cg(coupledValue("cg")),
40 _nondim_factor(getParam<Real>("nondim_factor")),
41 _kB(1.38064852e-23) // Boltzmann constant in J/K
42{
43}
44
45void
registerMooseObject("SolidMechanicsApp", ComputeExtraStressVDWGas)
ComputeExtraStressBase is the base class for extra_stress, which is added to stress calculated by the...
static InputParameters validParams()
MaterialProperty< RankTwoTensor > & _extra_stress
Computes a concentration-dependent ExtraStress bases on the van der Waals equation of state that is a...
static InputParameters validParams()
const MaterialProperty< Real > & _b
const MaterialProperty< Real > & _T
ComputeExtraStressVDWGas(const InputParameters &parameters)
const MaterialProperty< Real > & _Va
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp