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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::reconstruction::isoAlpha
28
29Description
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
44Author
45 Johan Roenby, DHI, all rights reserved.
46 Modified Henning Scheufler, DLR
47
48SourceFiles
49 isoAlpha.C
50
51\*---------------------------------------------------------------------------*/
52
53#ifndef isoAlpha_H
54#define isoAlpha_H
55
56#include "autoPtr.H"
57#include "dimensionedScalar.H"
59#include "typeInfo.H"
60#include "volFields.H"
61
62#include "surfaceIteratorIso.H"
64
65// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66
67namespace Foam
68{
69namespace reconstruction
70{
71
72/*---------------------------------------------------------------------------*\
73 Class isoAlpha Declaration
74\*---------------------------------------------------------------------------*/
76class 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
110public:
111
112 //- Runtime type information
113 TypeName("isoAlpha");
114
115 //- Construct from components
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// ************************************************************************* //
surfaceScalarField & phi
const volScalarField & alpha1
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Original code supplied by Henning Scheufler, DLR (2019)
Reconstructs an interface (centre and normal vectors) consisting of isosurfaces to match the internal...
Definition: isoAlpha.H:78
virtual void mapAlphaField() const
map VoF Field in case of refinement
Definition: isoAlpha.H:134
virtual void reconstruct(bool forceUpdate=true)
Reconstructs the interface.
Definition: isoAlpha.C:78
virtual ~isoAlpha()=default
Destructor.
TypeName("isoAlpha")
Runtime type information.
Finds the isovalue that matches the volume fraction.
U
Definition: pEqn.H:72
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73