OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

tractionDisplacementFvPatchVectorField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::tractionDisplacementFvPatchVectorField
00027 
00028 Description
00029     Fixed traction boundary condition for the standard linear elastic, fixed
00030     coefficient displacement equation.
00031 
00032 SourceFiles
00033     tractionDisplacementFvPatchVectorField.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef tractionDisplacementFvPatchVectorField_H
00038 #define tractionDisplacementFvPatchVectorField_H
00039 
00040 #include "fvPatchFields.H"
00041 #include "fixedGradientFvPatchFields.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                    Class tractionDisplacementFvPatch Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class tractionDisplacementFvPatchVectorField
00053 :
00054     public fixedGradientFvPatchVectorField
00055 {
00056 
00057     // Private Data
00058 
00059         vectorField traction_;
00060         scalarField pressure_;
00061 
00062 
00063 public:
00064 
00065     //- Runtime type information
00066     TypeName("tractionDisplacement");
00067 
00068 
00069     // Constructors
00070 
00071         //- Construct from patch and internal field
00072         tractionDisplacementFvPatchVectorField
00073         (
00074             const fvPatch&,
00075             const DimensionedField<vector, volMesh>&
00076         );
00077 
00078         //- Construct from patch, internal field and dictionary
00079         tractionDisplacementFvPatchVectorField
00080         (
00081             const fvPatch&,
00082             const DimensionedField<vector, volMesh>&,
00083             const dictionary&
00084         );
00085 
00086         //- Construct by mapping given
00087         //  tractionDisplacementFvPatchVectorField onto a new patch
00088         tractionDisplacementFvPatchVectorField
00089         (
00090             const tractionDisplacementFvPatchVectorField&,
00091             const fvPatch&,
00092             const DimensionedField<vector, volMesh>&,
00093             const fvPatchFieldMapper&
00094         );
00095 
00096         //- Construct as copy
00097         tractionDisplacementFvPatchVectorField
00098         (
00099             const tractionDisplacementFvPatchVectorField&
00100         );
00101 
00102         //- Construct and return a clone
00103         virtual tmp<fvPatchVectorField> clone() const
00104         {
00105             return tmp<fvPatchVectorField>
00106             (
00107                 new tractionDisplacementFvPatchVectorField(*this)
00108             );
00109         }
00110 
00111         //- Construct as copy setting internal field reference
00112         tractionDisplacementFvPatchVectorField
00113         (
00114             const tractionDisplacementFvPatchVectorField&,
00115             const DimensionedField<vector, volMesh>&
00116         );
00117 
00118         //- Construct and return a clone setting internal field reference
00119         virtual tmp<fvPatchVectorField> clone
00120         (
00121             const DimensionedField<vector, volMesh>& iF
00122         ) const
00123         {
00124             return tmp<fvPatchVectorField>
00125             (
00126                 new tractionDisplacementFvPatchVectorField(*this, iF)
00127             );
00128         }
00129 
00130 
00131     // Member functions
00132 
00133         // Access
00134 
00135             virtual const vectorField& traction() const
00136             {
00137                 return traction_;
00138             }
00139 
00140             virtual vectorField& traction()
00141             {
00142                 return traction_;
00143             }
00144 
00145             virtual const scalarField& pressure() const
00146             {
00147                 return pressure_;
00148             }
00149 
00150             virtual  scalarField& pressure()
00151             {
00152                 return pressure_;
00153             }
00154 
00155 
00156         // Mapping functions
00157 
00158             //- Map (and resize as needed) from self given a mapping object
00159             virtual void autoMap
00160             (
00161                 const fvPatchFieldMapper&
00162             );
00163 
00164             //- Reverse map the given fvPatchField onto this fvPatchField
00165             virtual void rmap
00166             (
00167                 const fvPatchVectorField&,
00168                 const labelList&
00169             );
00170 
00171 
00172         //- Update the coefficients associated with the patch field
00173         virtual void updateCoeffs();
00174 
00175         //- Write
00176         virtual void write(Ostream&) const;
00177 };
00178 
00179 
00180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00181 
00182 } // End namespace Foam
00183 
00184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00185 
00186 #endif
00187 
00188 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd