multiphaseMixture.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef multiphaseMixture_H
00044 #define multiphaseMixture_H
00045
00046 #include "incompressible/transportModel/transportModel.H"
00047 #include "phase.H"
00048 #include "PtrDictionary.H"
00049 #include "volFields.H"
00050 #include "surfaceFields.H"
00051 #include "multivariateSurfaceInterpolationScheme.H"
00052
00053
00054
00055
00056 namespace Foam
00057 {
00058
00059
00060
00061
00062
00063 class multiphaseMixture
00064 :
00065 public transportModel
00066 {
00067 public:
00068
00069 class interfacePair
00070 :
00071 public Pair<word>
00072 {
00073 public:
00074
00075 class hash
00076 :
00077 public Hash<interfacePair>
00078 {
00079 public:
00080
00081 hash()
00082 {}
00083
00084 label operator()(const interfacePair& key) const
00085 {
00086 return word::hash()(key.first()) + word::hash()(key.second());
00087 }
00088 };
00089
00090
00091
00092
00093 interfacePair()
00094 {}
00095
00096 interfacePair(const word& alpha1Name, const word& alpha2Name)
00097 :
00098 Pair<word>(alpha1Name, alpha2Name)
00099 {}
00100
00101 interfacePair(const phase& alpha1, const phase& alpha2)
00102 :
00103 Pair<word>(alpha1.name(), alpha2.name())
00104 {}
00105
00106
00107
00108
00109 friend bool operator==
00110 (
00111 const interfacePair& a,
00112 const interfacePair& b
00113 )
00114 {
00115 return
00116 (
00117 ((a.first() == b.first()) && (a.second() == b.second()))
00118 || ((a.first() == b.second()) && (a.second() == b.first()))
00119 );
00120 }
00121
00122 friend bool operator!=
00123 (
00124 const interfacePair& a,
00125 const interfacePair& b
00126 )
00127 {
00128 return (!(a == b));
00129 }
00130 };
00131
00132
00133 private:
00134
00135
00136
00137
00138 PtrDictionary<phase> phases_;
00139
00140
00141
00142 phase& refPhase_;
00143
00144 const fvMesh& mesh_;
00145 const volVectorField& U_;
00146 const surfaceScalarField& phi_;
00147
00148 surfaceScalarField rhoPhi_;
00149
00150 volScalarField alphas_;
00151
00152 typedef HashTable<scalar, interfacePair, interfacePair::hash>
00153 sigmaTable;
00154
00155 sigmaTable sigmas_;
00156 dimensionSet dimSigma_;
00157
00158
00159 const dimensionedScalar deltaN_;
00160
00161
00162 static const scalar convertToRad;
00163
00164
00165 multivariateSurfaceInterpolationScheme<scalar>::fieldTable alphaTable_;
00166
00167
00168
00169
00170 void calcAlphas();
00171
00172 void solveAlphas
00173 (
00174 const label nAlphaCorr,
00175 const bool cycleAlpha,
00176 const scalar cAlpha
00177 );
00178
00179 tmp<surfaceVectorField> nHatfv
00180 (
00181 const volScalarField& alpha1,
00182 const volScalarField& alpha2
00183 ) const;
00184
00185 tmp<surfaceScalarField> nHatf
00186 (
00187 const volScalarField& alpha1,
00188 const volScalarField& alpha2
00189 ) const;
00190
00191 void correctContactAngle
00192 (
00193 const phase& alpha1,
00194 const phase& alpha2,
00195 surfaceVectorField::GeometricBoundaryField& nHatb
00196 ) const;
00197
00198 tmp<volScalarField> K(const phase& alpha1, const phase& alpha2) const;
00199
00200
00201 public:
00202
00203
00204
00205
00206 multiphaseMixture
00207 (
00208 const volVectorField& U,
00209 const surfaceScalarField& phi
00210 );
00211
00212
00213
00214
00215 ~multiphaseMixture()
00216 {}
00217
00218
00219
00220
00221
00222 const PtrDictionary<phase>& phases() const
00223 {
00224 return phases_;
00225 }
00226
00227
00228 const volVectorField& U() const
00229 {
00230 return U_;
00231 }
00232
00233
00234 const surfaceScalarField& phi() const
00235 {
00236 return phi_;
00237 }
00238
00239 const surfaceScalarField& rhoPhi() const
00240 {
00241 return rhoPhi_;
00242 }
00243
00244
00245 tmp<volScalarField> rho() const;
00246
00247
00248 tmp<volScalarField> mu() const;
00249
00250
00251 tmp<surfaceScalarField> muf() const;
00252
00253
00254 tmp<volScalarField> nu() const;
00255
00256
00257 tmp<surfaceScalarField> nuf() const;
00258
00259 tmp<surfaceScalarField> surfaceTensionForce() const;
00260
00261
00262 void correct();
00263
00264
00265 bool read();
00266 };
00267
00268
00269
00270
00271 }
00272
00273
00274
00275 #endif
00276
00277
Copyright © 2000-2009 OpenCFD Ltd