DAResidualSolidDisplacementFoam.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6  Description:
7  Child class for DASolidDisplacementFoam
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAResidualSolidDisplacementFoam_H
12 #define DAResidualSolidDisplacementFoam_H
13 
14 #include "DAResidual.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAResidualSolidDisplacementFoam Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAResidual
28 {
29 
30 protected:
32 
33  volVectorField& D_;
34  volVectorField DRes_;
36 
37  volTensorField& gradD_;
38  volSymmTensorField& sigmaD_;
39  volVectorField& divSigmaExp_;
40  volScalarField& lambda_;
41  volScalarField& mu_;
42 
44 
45  void updateDAndGradD();
46 
47 public:
48  TypeName("DASolidDisplacementFoam");
49  // Constructors
50 
51  //- Construct from components
53  const word modelType,
54  const fvMesh& mesh,
55  const DAOption& daOption,
56  const DAModel& daModel,
57  const DAIndex& daIndex);
58 
59  //- Destructor
61  {
62  }
63 
64  // Members
65 
67  virtual void clear();
68 
70  virtual void calcResiduals(const dictionary& options);
71 
73  virtual void updateIntermediateVariables();
74 
76  virtual void correctBoundaryConditions();
77 };
78 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80 
81 } // End namespace Foam
82 
83 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84 
85 #endif
86 
87 // ************************************************************************* //
Foam::DAResidualSolidDisplacementFoam::D_
volVectorField & D_
Definition: DAResidualSolidDisplacementFoam.H:33
Foam::DAResidualSolidDisplacementFoam::clear
virtual void clear()
clear the members
Definition: DAResidualSolidDisplacementFoam.C:75
Foam::DAOption
Definition: DAOption.H:29
Foam::DAResidualSolidDisplacementFoam::updateIntermediateVariables
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
Definition: DAResidualSolidDisplacementFoam.C:138
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAResidualSolidDisplacementFoam::calcResiduals
virtual void calcResiduals(const dictionary &options)
compute residual
Definition: DAResidualSolidDisplacementFoam.C:86
DAResidual.H
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAResidualSolidDisplacementFoam::TypeName
TypeName("DASolidDisplacementFoam")
Foam::DAResidualSolidDisplacementFoam::~DAResidualSolidDisplacementFoam
virtual ~DAResidualSolidDisplacementFoam()
Definition: DAResidualSolidDisplacementFoam.H:60
Foam::DAResidualSolidDisplacementFoam::updateDAndGradD
void updateDAndGradD()
Definition: DAResidualSolidDisplacementFoam.C:111
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAModel
Definition: DAModel.H:59
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAResidualSolidDisplacementFoam::DRes_
volVectorField DRes_
Definition: DAResidualSolidDisplacementFoam.H:34
Foam::DAResidualSolidDisplacementFoam::DAResidualSolidDisplacementFoam
DAResidualSolidDisplacementFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAResidualSolidDisplacementFoam.C:19
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DAResidualSolidDisplacementFoam::sigmaD_
volSymmTensorField & sigmaD_
Definition: DAResidualSolidDisplacementFoam.H:38
Foam::DAResidualSolidDisplacementFoam::isTractionDisplacementBC_
label isTractionDisplacementBC_
Definition: DAResidualSolidDisplacementFoam.H:43
Foam::DAResidualSolidDisplacementFoam::correctBoundaryConditions
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
Definition: DAResidualSolidDisplacementFoam.C:152
Foam::DAResidualSolidDisplacementFoam::divSigmaExp_
volVectorField & divSigmaExp_
Definition: DAResidualSolidDisplacementFoam.H:39
Foam::DAResidualSolidDisplacementFoam::lambda_
volScalarField & lambda_
Definition: DAResidualSolidDisplacementFoam.H:40
Foam::DAResidualSolidDisplacementFoam::gradD_
volTensorField & gradD_
Definition: DAResidualSolidDisplacementFoam.H:37
Foam::DAResidualSolidDisplacementFoam::mu_
volScalarField & mu_
Definition: DAResidualSolidDisplacementFoam.H:41
daModel
DAModel daModel(mesh, daOption)
Foam::DAResidualSolidDisplacementFoam
Definition: DAResidualSolidDisplacementFoam.H:26
daIndex
DAIndex daIndex(mesh, daOption, daModel)