www.mooseframework.org
MacroElastic.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 "MacroElastic.h"
11 
12 #include "SymmElasticityTensor.h"
13 
14 registerMooseObject("SolidMechanicsApp", MacroElastic);
15 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<Elastic>();
21  params.addRequiredParam<PostprocessorName>("C1111",
22  "The postprocessor associated with the C1111 value");
23  params.addRequiredParam<PostprocessorName>("C1122",
24  "The postprocessor associated with the C1122 value");
25  params.addRequiredParam<PostprocessorName>("C1133",
26  "The postprocessor associated with the C1133 value");
27  params.addRequiredParam<PostprocessorName>("C2222",
28  "The postprocessor associated with the C2222 value");
29  params.addRequiredParam<PostprocessorName>("C2233",
30  "The postprocessor associated with the C2233 value");
31  params.addRequiredParam<PostprocessorName>("C3333",
32  "The postprocessor associated with the C3333 value");
33  params.addRequiredParam<PostprocessorName>("C1212",
34  "The postprocessor associated with the C1212 value");
35  params.addRequiredParam<PostprocessorName>("C2323",
36  "The postprocessor associated with the C2323 value");
37  params.addRequiredParam<PostprocessorName>("C3131",
38  "The postprocessor associated with the C3131 value");
39  return params;
40 }
41 
42 MacroElastic::MacroElastic(const InputParameters & parameters)
43  : Elastic(parameters),
44  _C1111(getPostprocessorValue("C1111")),
45  _C1122(getPostprocessorValue("C1122")),
46  _C1133(getPostprocessorValue("C1133")),
47  _C2222(getPostprocessorValue("C2222")),
48  _C2233(getPostprocessorValue("C2233")),
49  _C3333(getPostprocessorValue("C3333")),
50  _C1212(getPostprocessorValue("C1212")),
51  _C2323(getPostprocessorValue("C2323")),
52  _C3131(getPostprocessorValue("C3131"))
53 {
54 }
55 
57 
59 
61 
62 bool
64 {
65  std::vector<Real> v(9);
66  v[0] = _C1111;
67  v[1] = _C1122;
68  v[2] = _C1133;
69  v[3] = _C2222;
70  v[4] = _C2233;
71  v[5] = _C3333;
72  v[6] = _C1212;
73  v[7] = _C2323;
74  v[8] = _C3131;
75 
76  tensor.fillFromInputVector(v, false);
77 
78  return true;
79 }
80 
81 void
83 {
85 }
SymmElasticityTensor.h
SolidModel::elasticityTensor
SymmElasticityTensor * elasticityTensor() const
Definition: SolidModel.h:224
MacroElastic::_C2222
const PostprocessorValue & _C2222
Definition: MacroElastic.h:36
MacroElastic::_C1133
const PostprocessorValue & _C1133
Definition: MacroElastic.h:35
MacroElastic.h
registerMooseObject
registerMooseObject("SolidMechanicsApp", MacroElastic)
MacroElastic::_C3131
const PostprocessorValue & _C3131
Definition: MacroElastic.h:41
MacroElastic::~MacroElastic
virtual ~MacroElastic()
Definition: MacroElastic.C:58
MacroElastic::createElasticityTensor
virtual void createElasticityTensor()
Definition: MacroElastic.C:82
SymmElasticityTensor
This class defines a basic set of capabilities any elasticity tensor should have.
Definition: SymmElasticityTensor.h:55
MacroElastic::_C3333
const PostprocessorValue & _C3333
Definition: MacroElastic.h:38
MacroElastic::_C1122
const PostprocessorValue & _C1122
Definition: MacroElastic.h:34
MacroElastic::_C2323
const PostprocessorValue & _C2323
Definition: MacroElastic.h:40
validParams< MacroElastic >
InputParameters validParams< MacroElastic >()
Definition: MacroElastic.C:18
MacroElastic::_C1212
const PostprocessorValue & _C1212
Definition: MacroElastic.h:39
MacroElastic::_C2233
const PostprocessorValue & _C2233
Definition: MacroElastic.h:37
MacroElastic
Definition: MacroElastic.h:19
MacroElastic::MacroElastic
MacroElastic(const InputParameters &parameters)
Definition: MacroElastic.C:42
Elastic
Definition: Elastic.h:19
SymmElasticityTensor::fillFromInputVector
void fillFromInputVector(std::vector< Real > input, bool all)
Definition: SymmElasticityTensor.C:384
validParams< Elastic >
InputParameters validParams< Elastic >()
Definition: Elastic.C:16
MacroElastic::updateElasticityTensor
virtual bool updateElasticityTensor(SymmElasticityTensor &tensor)
Return true if the elasticity tensor changed.
Definition: MacroElastic.C:63
MacroElastic::_C1111
const PostprocessorValue & _C1111
Definition: MacroElastic.h:33