tractionDisplacementFvPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6  This file is modified from OpenFOAM's source code
7  applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/
8  tractionDisplacementFvPatchVectorField.H
9 
10  OpenFOAM: The Open Source CFD Toolbox
11 
12  Copyright (C): 2011-2016 OpenFOAM Foundation
13 
14  OpenFOAM License:
15 
16  OpenFOAM is free software: you can redistribute it and/or modify it
17  under the terms of the GNU General Public License as published by
18  the Free Software Foundation, either version 3 of the License, or
19  (at your option) any later version.
20 
21  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
22  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  for more details.
25 
26  You should have received a copy of the GNU General Public License
27  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 
29  Description:
30  Fixed traction boundary condition for the standard linear elastic,
31  fixed coefficient displacement equation.
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef tractionDisplacementFvPatchVectorField_H
36 #define tractionDisplacementFvPatchVectorField_H
37 
38 #include "fvPatchFields.H"
39 #include "fixedGradientFvPatchFields.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class tractionDisplacementFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
49 
51  : public fixedGradientFvPatchVectorField
52 {
53 
54  // Private Data
55 
56  vectorField traction_;
57  scalarField pressure_;
58 
59 public:
60  //- Runtime type information
61  TypeName("tractionDisplacement");
62 
63  // Constructors
64 
65  //- Construct from patch and internal field
67  const fvPatch&,
68  const DimensionedField<vector, volMesh>&);
69 
70  //- Construct from patch, internal field and dictionary
72  const fvPatch&,
73  const DimensionedField<vector, volMesh>&,
74  const dictionary&);
75 
76  //- Construct by mapping given
77  // tractionDisplacementFvPatchVectorField onto a new patch
80  const fvPatch&,
81  const DimensionedField<vector, volMesh>&,
82  const fvPatchFieldMapper&);
83 
84  //- Construct as copy
87 
88  //- Construct as copy setting internal field reference
91  const DimensionedField<vector, volMesh>&);
92 
93  // Member functions
94 
95  // Access
96  /*
97  virtual const vectorField& traction() const
98  {
99  return traction_;
100  }
101 
102  virtual vectorField& traction()
103  {
104  return traction_;
105  }
106 
107  virtual const scalarField& pressure() const
108  {
109  return pressure_;
110  }
111 
112  virtual scalarField& pressure()
113  {
114  return pressure_;
115  }
116 */
117  //- Update the coefficients associated with the patch field
118  virtual void updateCoeffs();
119 
120  //- Write
121  virtual void write(Ostream&) const;
122 };
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
Foam::tractionDisplacementFvPatchVectorField::tractionDisplacementFvPatchVectorField
tractionDisplacementFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Definition: tractionDisplacementFvPatchVectorField.C:43
Foam::tractionDisplacementFvPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Definition: tractionDisplacementFvPatchVectorField.C:89
Foam
Definition: checkGeometry.C:32
Foam::tractionDisplacementFvPatchVectorField
Definition: tractionDisplacementFvPatchVectorField.H:50
Foam::tractionDisplacementFvPatchVectorField::write
virtual void write(Ostream &) const
Definition: tractionDisplacementFvPatchVectorField.C:119
Foam::tractionDisplacementFvPatchVectorField::TypeName
TypeName("tractionDisplacement")