gradAlpha.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2019-2020 DLR
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::reconstruction::gradAlpha
28 
29 Description
30  Reconstructs an interface (centre and normal vector) consisting of planes
31  to match the internal fluid distribution in cells. The interface normals
32  are estimated by least square gradient scheme on the VoF Field (alpha).
33  Also known as Young method
34 
35  Original code supplied by Henning Scheufler, DLR (2019)
36 
37 SourceFiles
38  gradAlpha.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef gradAlpha_H
43 #define gradAlpha_H
44 
45 #include "typeInfo.H"
46 #include "reconstructionSchemes.H"
47 #include "volFields.H"
48 #include "DynamicField.H"
49 #include "dimensionedScalar.H"
50 #include "surfaceIteratorPLIC.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace reconstruction
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class gradAlpha Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class gradAlpha
64 :
66 {
67  // Private Data
68 
69  //- Reference to mesh
70  const fvMesh& mesh_;
71 
72  //- Interpolation object from cell centres to points
73  DynamicField<vector> interfaceNormal_;
74 
75 
76  // Switches and tolerances. Tolerances need to go into toleranceSwitches
77 
78  //- Tolerance for search of isoFace giving specified VOF value
79  scalar isoFaceTol_;
80 
81  //- Tolerance for marking of surface cells:
82  // Those with surfCellTol_ < alpha1 < 1 - surfCellTol_
83  scalar surfCellTol_;
84 
85  //- SurfaceIterator finds the plane centre for specified VOF value
86  surfaceIteratorPLIC sIterPLIC_;
87 
88 
89  // Private Member Functions
90 
91  //- Compute gradient at the surfaces
92  void gradSurf(const volScalarField& phi);
93 
94  //- No copy construct
95  gradAlpha(const gradAlpha&) = delete;
96 
97  //- No copy assignment
98  void operator=(const gradAlpha&) = delete;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("gradAlpha");
105 
106  //- Construct from components
107  gradAlpha
108  (
110  const surfaceScalarField& phi,
111  const volVectorField& U,
112  const dictionary& dict
113  );
114 
115  //- Destructor
116  virtual ~gradAlpha() = default;
117 
118 
119  // Member Functions
120 
121  //- Reconstruct interface
122  virtual void reconstruct(bool forceUpdate = true);
123 
124  //- map VoF Field in case of refinement
125  virtual void mapAlphaField() const;
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace reconstruction
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Original code supplied by Henning Scheufler, DLR (2019)
Reconstructs an interface (centre and normal vector) consisting of planes to match the internal fluid...
Definition: gradAlpha.H:58
dictionary dict
Finds the cutValue that matches the volume fraction.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual void reconstruct(bool forceUpdate=true)
Reconstruct interface.
Definition: gradAlpha.C:119
virtual void mapAlphaField() const
map VoF Field in case of refinement
Definition: gradAlpha.C:188
virtual ~gradAlpha()=default
Destructor.
TypeName("gradAlpha")
Runtime type information.
Dynamically sized Field.
Definition: DynamicField.H:45
Basic run-time type information using word as the type&#39;s name. Used to enhance the standard RTTI to c...
U
Definition: pEqn.H:72
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Namespace for OpenFOAM.
const volScalarField & alpha1