isoAlpha.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::isoAlpha
28 
29 Description
30  Reconstructs an interface (centre and normal vectors) consisting of isosurfaces
31  to match the internal fluid distribution in cells. The point values (ap_)
32  are estimated by inverse distance interpolation of the VoF (alpha) field.
33 
34  Reference:
35  \verbatim
36  Roenby, J., Bredmose, H. and Jasak, H. (2016).
37  A computational method for sharp interface advection
38  Royal Society Open Science, 3
39  doi 10.1098/rsos.160405
40  \endverbatim
41 
42  Original code supplied by Johan Roenby, DHI (2016)
43 
44 Author
45  Johan Roenby, DHI, all rights reserved.
46  Modified Henning Scheufler, DLR
47 
48 SourceFiles
49  isoAlpha.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef isoAlpha_H
54 #define isoAlpha_H
55 
56 #include "autoPtr.H"
57 #include "dimensionedScalar.H"
58 #include "reconstructionSchemes.H"
59 #include "typeInfo.H"
60 #include "volFields.H"
61 
62 #include "surfaceIteratorIso.H"
63 #include "volPointInterpolation.H"
64 
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 
67 namespace Foam
68 {
69 namespace reconstruction
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class isoAlpha Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class isoAlpha
77 :
79 {
80  // Private Data
81 
82  //- Reference to mesh
83  const fvMesh& mesh_;
84 
85  //- VOF field interpolated to mesh points
86  scalarField ap_;
87 
88  // Switches and tolerances. Tolerances need to go into toleranceSwitches
89 
90  //- Tolerance for search of isoFace giving specified VOF value
91  scalar isoFaceTol_;
92 
93  //- Tolerance for marking of surface cells:
94  // Those with surfCellTol_ < alpha1 < 1 - surfCellTol_
95  scalar surfCellTol_;
96 
97  //- surfaceIterator finds the isovalue for specified VOF value
98  surfaceIteratorIso sIterIso_;
99 
100 
101  // Private Member Functions
102 
103  //- No copy construct
104  isoAlpha(const isoAlpha&) = delete;
105 
106  //- No copy assignment
107  void operator=(const isoAlpha&) = delete;
108 
109 
110 public:
111 
112  //- Runtime type information
113  TypeName("isoAlpha");
114 
115  //- Construct from components
116  isoAlpha
117  (
119  const surfaceScalarField& phi,
120  const volVectorField& U,
121  const dictionary& dict
122  );
123 
124 
125  //- Destructor
126  virtual ~isoAlpha() = default;
127 
128 
129  // Member Functions
130 
131  //- Reconstructs the interface
132  virtual void reconstruct(bool forceUpdate = true);
133 
134  //- map VoF Field in case of refinement
135  virtual void mapAlphaField() const
136  {
137  // do nothing;
138  }
139 };
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace reconstruction
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
volFields.H
Foam::reconstruction::isoAlpha::TypeName
TypeName("isoAlpha")
Runtime type information.
typeInfo.H
reconstructionSchemes.H
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::Field< scalar >
Foam::reconstruction::isoAlpha
Reconstructs an interface (centre and normal vectors) consisting of isosurfaces to match the internal...
Definition: isoAlpha.H:75
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::reconstruction::isoAlpha::~isoAlpha
virtual ~isoAlpha()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::surfaceIteratorIso
Finds the isovalue that matches the volume fraction.
Definition: surfaceIteratorIso.H:64
volPointInterpolation.H
dimensionedScalar.H
U
U
Definition: pEqn.H:72
Foam::reconstruction::isoAlpha::mapAlphaField
virtual void mapAlphaField() const
map VoF Field in case of refinement
Definition: isoAlpha.H:134
Foam::reconstructionSchemes
Original code supplied by Henning Scheufler, DLR (2019)
Definition: reconstructionSchemes.H:58
Foam::reconstruction::isoAlpha::reconstruct
virtual void reconstruct(bool forceUpdate=true)
Reconstructs the interface.
Definition: isoAlpha.C:78
Foam::GeometricField< scalar, fvPatchField, volMesh >
surfaceIteratorIso.H
autoPtr.H