1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::tractionDisplacementFvPatchVectorField
28 Fixed traction boundary condition for the standard linear elastic, fixed
29 coefficient displacement equation.
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 // ************************************************************************* //