1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
5 \\ / A nd | 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 tractionDisplacementThermoFvPatchVectorField
28 Hrvoje Jasak, Wikki Ltd. All rights reserved
31 tractionDisplacementThermoFvPatchVectorField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef tractionDisplacementThermoFvPatchVectorField_H
36 #define tractionDisplacementThermoFvPatchVectorField_H
38 #include "fvPatchFields.H"
39 #include "fixedGradientFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class tractionDisplacementThermoFvPatchVectorField Declaration
48 \*---------------------------------------------------------------------------*/
50 class tractionDisplacementThermoFvPatchVectorField
52 public fixedGradientFvPatchVectorField
57 //- Name of the displacement field
60 //- Name of the temperature field
63 //- Name of rheology model
64 const word rheologyName_;
66 //- Name of thermal model
67 const word thermoName_;
70 vectorField traction_;
73 scalarField pressure_;
78 //- Runtime type information
79 TypeName("tractionDisplacementThermo");
84 //- Construct from patch and internal field
85 tractionDisplacementThermoFvPatchVectorField
88 const DimensionedField<vector, volMesh>&
91 //- Construct from patch, internal field and dictionary
92 tractionDisplacementThermoFvPatchVectorField
95 const DimensionedField<vector, volMesh>&,
99 //- Construct by mapping given
100 // tractionDisplacementThermoFvPatchVectorField onto a new patch
101 tractionDisplacementThermoFvPatchVectorField
103 const tractionDisplacementThermoFvPatchVectorField&,
105 const DimensionedField<vector, volMesh>&,
106 const fvPatchFieldMapper&
109 //- Construct as copy
110 tractionDisplacementThermoFvPatchVectorField
112 const tractionDisplacementThermoFvPatchVectorField&
115 //- Construct and return a clone
116 virtual tmp<fvPatchVectorField> clone() const
118 return tmp<fvPatchVectorField>
120 new tractionDisplacementThermoFvPatchVectorField(*this)
124 //- Construct as copy setting internal field reference
125 tractionDisplacementThermoFvPatchVectorField
127 const tractionDisplacementThermoFvPatchVectorField&,
128 const DimensionedField<vector, volMesh>&
131 //- Construct and return a clone setting internal field reference
132 virtual tmp<fvPatchVectorField> clone
134 const DimensionedField<vector, volMesh>& iF
137 return tmp<fvPatchVectorField>
139 new tractionDisplacementThermoFvPatchVectorField(*this, iF)
148 virtual const vectorField& traction() const
153 virtual vectorField& traction()
158 virtual const scalarField& pressure() const
163 virtual scalarField& pressure()
170 //- Map (and resize as needed) from self given a mapping object
173 const fvPatchFieldMapper&
176 //- Reverse map the given fvPatchField onto this fvPatchField
179 const fvPatchVectorField&,
184 //- Update the coefficients associated with the patch field
185 virtual void updateCoeffs();
188 virtual void write(Ostream&) const;
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 } // End namespace Foam
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 // ************************************************************************* //