1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 tractionDisplacementFvPatchVectorField
28 Fixed traction boundary condition for the standard linear elastic, fixed
29 coefficient displacement equation (stressedFoam).
32 tractionDisplacementFvPatchVectorField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef tractionDisplacementFvPatchVectorField_H
37 #define tractionDisplacementFvPatchVectorField_H
39 #include "fvPatchFields.H"
40 #include "fixedGradientFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class tractionDisplacementFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class tractionDisplacementFvPatchVectorField
53 public fixedGradientFvPatchVectorField
58 vectorField traction_;
59 scalarField pressure_;
64 //- Runtime type information
65 TypeName("tractionDisplacement");
70 //- Construct from patch and internal field
71 tractionDisplacementFvPatchVectorField
74 const DimensionedField<vector, volMesh>&
77 //- Construct from patch, internal field and dictionary
78 tractionDisplacementFvPatchVectorField
81 const DimensionedField<vector, volMesh>&,
85 //- Construct by mapping given
86 // tractionDisplacementFvPatchVectorField onto a new patch
87 tractionDisplacementFvPatchVectorField
89 const tractionDisplacementFvPatchVectorField&,
91 const DimensionedField<vector, volMesh>&,
92 const fvPatchFieldMapper&
96 tractionDisplacementFvPatchVectorField
98 const tractionDisplacementFvPatchVectorField&
101 //- Construct and return a clone
102 virtual tmp<fvPatchVectorField> clone() const
104 return tmp<fvPatchVectorField>
106 new tractionDisplacementFvPatchVectorField(*this)
110 //- Construct as copy setting internal field reference
111 tractionDisplacementFvPatchVectorField
113 const tractionDisplacementFvPatchVectorField&,
114 const DimensionedField<vector, volMesh>&
117 //- Construct and return a clone setting internal field reference
118 virtual tmp<fvPatchVectorField> clone
120 const DimensionedField<vector, volMesh>& iF
123 return tmp<fvPatchVectorField>
125 new tractionDisplacementFvPatchVectorField(*this, iF)
134 virtual const vectorField& traction() const
139 virtual vectorField& traction()
144 virtual const scalarField& pressure() const
149 virtual scalarField& pressure()
157 //- Map (and resize as needed) from self given a mapping object
160 const fvPatchFieldMapper&
163 //- Reverse map the given fvPatchField onto this fvPatchField
166 const fvPatchVectorField&,
171 //- Update the coefficients associated with the patch field
172 virtual void updateCoeffs();
175 virtual void write(Ostream&) const;
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace Foam
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************************************************************* //