threePhaseInterfaceProperties.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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::threePhaseInterfaceProperties
26 
27 Description
28  Properties to aid interFoam :
29  1. Correct the alpha boundary condition for dynamic contact angle.
30  2. Calculate interface curvature.
31 
32 SourceFiles
33  threePhaseInterfaceProperties.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef threePhaseInterfaceProperties_H
38 #define threePhaseInterfaceProperties_H
39 
41 #include "surfaceFields.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class threePhaseInterfaceProperties Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private data
55 
57 
58  //- Compression coefficient
59  scalar cAlpha_;
60 
61  //- Surface tension 1-2
63 
64  //- Surface tension 1-3
66 
67  //- Stabilisation for normalisation of the interface normal
69 
72 
73 
74  // Private Member Functions
75 
76  //- Disallow default bitwise copy construct and assignment
79 
80  //- Correction for the boundary condition on the unit normal nHat on
81  // walls to produce the correct contact dynamic angle.
82  // Calculated from the component of U parallel to the wall
84  (
86  ) const;
87 
88  //- Re-calculate the interface curvature
89  void calculateK();
90 
91 
92 public:
93 
94  //- Conversion factor for degrees into radians
95  static const scalar convertToRad;
96 
97 
98  // Constructors
99 
100  //- Construct from volume fraction field alpha and IOdictionary
102  (
104  );
105 
106 
107  // Member Functions
108 
109  scalar cAlpha() const
110  {
111  return cAlpha_;
112  }
113 
114  const dimensionedScalar& deltaN() const
115  {
116  return deltaN_;
117  }
118 
119  const surfaceScalarField& nHatf() const
120  {
121  return nHatf_;
122  }
123 
124  const volScalarField& K() const
125  {
126  return K_;
127  }
128 
129  tmp<volScalarField> sigma() const
130  {
131  volScalarField limitedAlpha2(max(mixture_.alpha2(), scalar(0)));
132  volScalarField limitedAlpha3(max(mixture_.alpha3(), scalar(0)));
133 
134  return
135  (limitedAlpha2*sigma12_ + limitedAlpha3*sigma13_)
136  /(limitedAlpha2 + limitedAlpha3 + SMALL);
137  }
138 
140  {
141  return sigma()*K_;
142  }
143 
145 
146  //- Indicator of the proximity of the interface
147  // Field values are 1 near and 0 away for the interface.
149 
150  void correct()
151  {
152  calculateK();
153  }
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
Foam::threePhaseInterfaceProperties::deltaN
const dimensionedScalar & deltaN() const
Definition: threePhaseInterfaceProperties.H:113
Foam::incompressibleThreePhaseMixture::alpha3
const volScalarField & alpha3() const
Definition: incompressibleThreePhaseMixture.H:140
Foam::threePhaseInterfaceProperties::operator=
void operator=(const threePhaseInterfaceProperties &)
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
threePhaseInterfaceProperties(const threePhaseInterfaceProperties &)
Disallow default bitwise copy construct and assignment.
surfaceFields.H
Foam::surfaceFields.
Foam::threePhaseInterfaceProperties::cAlpha_
scalar cAlpha_
Compression coefficient.
Definition: threePhaseInterfaceProperties.H:58
Foam::threePhaseInterfaceProperties::sigma12_
dimensionedScalar sigma12_
Surface tension 1-2.
Definition: threePhaseInterfaceProperties.H:61
Foam::threePhaseInterfaceProperties
Properties to aid interFoam : 1. Correct the alpha boundary condition for dynamic contact angle....
Definition: threePhaseInterfaceProperties.H:51
Foam::threePhaseInterfaceProperties::nHatf_
surfaceScalarField nHatf_
Definition: threePhaseInterfaceProperties.H:69
incompressibleThreePhaseMixture.H
Foam::threePhaseInterfaceProperties::sigma
tmp< volScalarField > sigma() const
Definition: threePhaseInterfaceProperties.H:128
Foam::threePhaseInterfaceProperties::correctContactAngle
void correctContactAngle(surfaceVectorField::GeometricBoundaryField &nHat) const
Correction for the boundary condition on the unit normal nHat on.
Foam::threePhaseInterfaceProperties::sigma13_
dimensionedScalar sigma13_
Surface tension 1-3.
Definition: threePhaseInterfaceProperties.H:64
Foam::threePhaseInterfaceProperties::nHatf
const surfaceScalarField & nHatf() const
Definition: threePhaseInterfaceProperties.H:118
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::threePhaseInterfaceProperties::correct
void correct()
Definition: threePhaseInterfaceProperties.H:149
Foam::threePhaseInterfaceProperties::mixture_
const incompressibleThreePhaseMixture & mixture_
Definition: threePhaseInterfaceProperties.H:55
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::threePhaseInterfaceProperties::K
const volScalarField & K() const
Definition: threePhaseInterfaceProperties.H:123
Foam::threePhaseInterfaceProperties::sigmaK
tmp< volScalarField > sigmaK() const
Definition: threePhaseInterfaceProperties.H:138
Foam::threePhaseInterfaceProperties::cAlpha
scalar cAlpha() const
Definition: threePhaseInterfaceProperties.H:108
Foam::threePhaseInterfaceProperties::nearInterface
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
Foam::threePhaseInterfaceProperties::surfaceTensionForce
tmp< surfaceScalarField > surfaceTensionForce() const
Foam::threePhaseInterfaceProperties::calculateK
void calculateK()
Re-calculate the interface curvature.
Foam::incompressibleThreePhaseMixture
Definition: incompressibleThreePhaseMixture.H:51
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::threePhaseInterfaceProperties::K_
volScalarField K_
Definition: threePhaseInterfaceProperties.H:70
Foam::threePhaseInterfaceProperties::convertToRad
static const scalar convertToRad
Conversion factor for degrees into radians.
Definition: threePhaseInterfaceProperties.H:94
Foam::GeometricField::GeometricBoundaryField
Definition: GeometricField.H:105
Foam::threePhaseInterfaceProperties::deltaN_
const dimensionedScalar deltaN_
Stabilisation for normalisation of the interface normal.
Definition: threePhaseInterfaceProperties.H:67
Foam::incompressibleThreePhaseMixture::alpha2
const volScalarField & alpha2() const
Definition: incompressibleThreePhaseMixture.H:130
Foam::mixture
Definition: mixture.H:52