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-------------------------------------------------------------------------------
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::gradAlpha
28
29Description
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
37SourceFiles
38 gradAlpha.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef gradAlpha_H
43#define gradAlpha_H
44
45#include "typeInfo.H"
47#include "volFields.H"
48#include "DynamicField.H"
49#include "dimensionedScalar.H"
50#include "surfaceIteratorPLIC.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56namespace reconstruction
57{
58
59/*---------------------------------------------------------------------------*\
60 Class gradAlpha Declaration
61\*---------------------------------------------------------------------------*/
63class 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
101public:
102
103 //- Runtime type information
104 TypeName("gradAlpha");
105
106 //- Construct from components
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// ************************************************************************* //
surfaceScalarField & phi
const volScalarField & alpha1
Dynamically sized Field.
Definition: DynamicField.H:65
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 vector) consisting of planes to match the internal fluid...
Definition: gradAlpha.H:65
virtual void reconstruct(bool forceUpdate=true)
Reconstruct interface.
Definition: gradAlpha.C:126
TypeName("gradAlpha")
Runtime type information.
virtual ~gradAlpha()=default
Destructor.
virtual void mapAlphaField() const
map VoF Field in case of refinement
Definition: gradAlpha.C:195
Finds the cutValue 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