Initial commit of NavalHydro package from Wikki to the ShipHydroSIG
[ShipHydroSIG.git] / src / vofDynamicMesh / lnInclude / numericalBeachFvPatchField.H
blobf9ab8edf52bc4f5662c5ce8f7666e6d50da497bb
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::numericalBeachFvPatchField
28 Description
29     Foam::numericalBeachFvPatchField
31 Author
32     Henrik Rusche, Wikki GmbH.  All rights reserved.
34 SourceFiles
35     numericalBeachFvPatchField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef numericalBeachFvPatchField_H
40 #define numericalBeachFvPatchField_H
42 #include "fvPatchFields.H"
43 #include "inletOutletFvPatchFields.H"
44 #include "volFieldsFwd.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
51 /*---------------------------------------------------------------------------*\
52                 Class numericalBeachFvPatchField Declaration
53 \*---------------------------------------------------------------------------*/
55 class numericalBeachFvPatchField
57     public inletOutletFvPatchField<vector>
59     // Private data
61         //- Thickness measured from the patch
62         scalar thickness_;
64         //- Offset to allow some constant damping towards the walls
65         scalar offset_;
67         //- Damping factor
68         scalar nud_;
71 public:
73     //- Runtime type information
74     TypeName("numericalBeach");
77     // Constructors
79         //- Construct from patch and internal field
80         numericalBeachFvPatchField
81         (
82             const fvPatch&,
83             const DimensionedField<vector, volMesh>&
84         );
86         //- Construct from patch, internal field and dictionary
87         numericalBeachFvPatchField
88         (
89             const fvPatch&,
90             const DimensionedField<vector, volMesh>&,
91             const dictionary&
92         );
94         //- Construct by mapping given
95         //  numericalBeachFvPatchField
96         //  onto a new patch
97         numericalBeachFvPatchField
98         (
99             const numericalBeachFvPatchField&,
100             const fvPatch&,
101             const DimensionedField<vector, volMesh>&,
102             const fvPatchFieldMapper&
103         );
105         //- Construct as copy
106         numericalBeachFvPatchField
107         (
108             const numericalBeachFvPatchField&
109         );
111         //- Construct and return a clone
112         virtual tmp<fvPatchVectorField> clone() const
113         {
114             return tmp<fvPatchVectorField>
115             (
116                 new numericalBeachFvPatchField
117                 (
118                     *this
119                 )
120             );
121         }
123         //- Construct as copy setting internal field reference
124         numericalBeachFvPatchField
125         (
126             const numericalBeachFvPatchField&,
127             const DimensionedField<vector, volMesh>&
128         );
130         //- Construct and return a clone setting internal field reference
131         virtual tmp<fvPatchVectorField> clone
132         (
133             const DimensionedField<vector, volMesh>& iF
134         ) const
135         {
136             return tmp<fvPatchVectorField>
137             (
138                 new numericalBeachFvPatchField
139                 (
140                     *this,
141                     iF
142                 )
143             );
144         }
147     // Member functions
149         // Access
151         //- Return the damping in the internal field
152         tmp<volScalarField> internalDamping() const;
154         //- Update the coefficients associated with the patch field
155         virtual void updateCoeffs();
157         //- Write
158         virtual void write(Ostream&) const;
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace Foam
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 #endif
170 // ************************************************************************* //