https://mooseframework.inl.gov
Loading...
Searching...
No Matches
OutOfPlanePressure.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
10#include "OutOfPlanePressure.h"
11#include "Function.h"
12
14
17{
19
20 params.addClassDescription("Apply pressure in the out-of-plane direction in 2D plane stress or "
21 "generalized plane strain models ");
22 params.addParam<FunctionName>("function", "1.0", "Function used to prescribe pressure");
23 params.addParam<PostprocessorName>("postprocessor", "Postprocessor used to prescribe pressure");
24 params.addParam<Real>("factor", 1.0, "Scale factor applied to prescribed pressure");
25
26 params.set<bool>("use_displaced_mesh") = true;
27
28 return params;
29}
30
32 : Kernel(parameters),
33 _postprocessor(
34 parameters.isParamValid("postprocessor") ? &getPostprocessorValue("postprocessor") : NULL),
35 _function(getFunction("function")),
36 _factor(getParam<Real>("factor"))
37{
38}
39
40Real
42{
43 Real val = _factor;
44
45 val *= _function.value(_t, _q_point[_qp]);
46
48 val *= *_postprocessor;
49
50 return val * _test[_i][_qp];
51}
registerMooseObject("SolidMechanicsApp", OutOfPlanePressure)
virtual Real value(Real t, const Point &p) const
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)
T & set(const std::string &name, bool quiet_mode=false)
unsigned int _qp
const MooseArray< Point > & _q_point
unsigned int _i
const VariableTestValue & _test
static InputParameters validParams()
OutOfPlanePressure is a kernel used to apply pressure in the out-of-plane direction in 2D plane stres...
OutOfPlanePressure(const InputParameters &parameters)
const PostprocessorValue *const _postprocessor
const Function & _function
static InputParameters validParams()
virtual Real computeQpResidual()
Real & _t