Commit 8ffb3662 authored by Andrew Heather's avatar Andrew Heather
Browse files

merge with master + fix conflicts

parents 6f28a119 70f453b4
......@@ -180,7 +180,7 @@
- =mut=: =muWallFunction=
- =epsilon=: =epsilonWallFunction=
- =omega=: =omegaWallFunction=
- =k=, =Q=, =R=: =kQRWallFunction=
- =k=, =q=, =R=: =kqRWallFunction=
- for temperature:
- =alphat=: =alphatWallFunction=
- New =alphaSgsJayatillekeWallFunction= thermal wall function for
......
......@@ -16,52 +16,93 @@
RASProperties.lookup("turbulence")
);
dictionary kEpsilonCoeffs
dictionary kEpsilonDict
(
RASProperties.subDict("kEpsilonCoeffs")
RASProperties.subDictPtr("kEpsilonCoeffs")
);
scalar Cmu
dimensionedScalar Cmu
(
readScalar(kEpsilonCoeffs.lookup("Cmu"))
dimensionedScalar::lookupOrAddToDict
(
"Cmu",
kEpsilonDict,
0.09
)
);
scalar C1
dimensionedScalar C1
(
readScalar(kEpsilonCoeffs.lookup("C1"))
dimensionedScalar::lookupOrAddToDict
(
"C1",
kEpsilonDict,
1.44
)
);
scalar C2
dimensionedScalar C2
(
readScalar(kEpsilonCoeffs.lookup("C2"))
dimensionedScalar::lookupOrAddToDict
(
"C2",
kEpsilonDict,
1.92
)
);
scalar alphak
dimensionedScalar alphak
(
readScalar(kEpsilonCoeffs.lookup("alphak"))
dimensionedScalar::lookupOrAddToDict
(
"alphaEps",
kEpsilonDict,
1.0
)
);
scalar alphaEps
dimensionedScalar alphaEps
(
readScalar(kEpsilonCoeffs.lookup("alphaEps"))
dimensionedScalar::lookupOrAddToDict
(
"alphaEps",
kEpsilonDict,
0.76923
)
);
dictionary wallFunctionCoeffs
dictionary wallFunctionDict
(
RASProperties.subDict("wallFunctionCoeffs")
RASProperties.subDictPtr("wallFunctionCoeffs")
);
scalar kappa
dimensionedScalar kappa
(
readScalar(wallFunctionCoeffs.lookup("kappa"))
dimensionedScalar::lookupOrAddToDict
(
"kappa",
wallFunctionDict,
0.4187
)
);
scalar E
dimensionedScalar E
(
readScalar(wallFunctionCoeffs.lookup("E"))
dimensionedScalar::lookupOrAddToDict
(
"E",
wallFunctionDict,
9.0
)
);
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
{
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
}
nearWallDist y(mesh);
......
......@@ -16,7 +16,11 @@ if(turbulence)
(
fvm::ddt(beta, epsilon)
+ fvm::div(phib, epsilon)
- fvm::laplacian(alphaEps*nuEffb, epsilon)
- fvm::laplacian
(
alphaEps*nuEffb, epsilon,
"laplacian(DepsilonEff,epsilon)"
)
==
C1*beta*G*epsilon/k
- fvm::Sp(C2*beta*epsilon/k, epsilon)
......@@ -35,7 +39,11 @@ if(turbulence)
(
fvm::ddt(beta, k)
+ fvm::div(phib, k)
- fvm::laplacian(alphak*nuEffb, k)
- fvm::laplacian
(
alphak*nuEffb, k,
"laplacian(DkEff,k)"
)
==
beta*G
- fvm::Sp(beta*epsilon/k, k)
......
{
labelList cellBoundaryFaceCount(epsilon.size(), 0);
scalar Cmu25 = ::pow(Cmu, 0.25);
scalar Cmu75 = ::pow(Cmu, 0.75);
scalar Cmu25 = ::pow(Cmu.value(), 0.25);
scalar Cmu75 = ::pow(Cmu.value(), 0.75);
scalar kappa_ = kappa.value();
const fvPatchList& patches = mesh.boundary();
......@@ -53,14 +54,14 @@
epsilon[faceCelli] +=
Cmu75*::pow(k[faceCelli], 1.5)
/(kappa*y[patchi][facei]);
/(kappa_*y[patchi][facei]);
if (yPlus > 11.6)
{
G[faceCelli] +=
nuw[facei]*magFaceGradU[facei]
*Cmu25*::sqrt(k[faceCelli])
/(kappa*y[patchi][facei]);
/(kappa_*y[patchi][facei]);
}
}
}
......
{
scalar Cmu25 = ::pow(Cmu, 0.25);
scalar Cmu25 = ::pow(Cmu.value(), 0.25);
scalar kappa_ = kappa.value();
scalar E_ = E.value();
scalar nub_ = nub.value();
const fvPatchList& patches = mesh.boundary();
......@@ -19,14 +22,14 @@
scalar yPlus =
Cmu25*y[patchi][facei]
*::sqrt(k[faceCelli])
/nub.value();
/nub_;
if (yPlus > 11.6)
{
nutw[facei] =
yPlus*nub.value()*kappa
/::log(E*yPlus)
- nub.value();
yPlus*nub_*kappa_
/::log(E_*yPlus)
- nub_;
}
else
{
......
......@@ -228,57 +228,103 @@
RASProperties.lookup("turbulence")
);
const dictionary& kEpsilonCoeffs
dictionary kEpsilonDict
(
RASProperties.subDict("kEpsilonCoeffs")
RASProperties.subDictPtr("kEpsilonCoeffs")
);
scalar Cmu
dimensionedScalar Cmu
(
readScalar(kEpsilonCoeffs.lookup("Cmu"))
dimensionedScalar::lookupOrAddToDict
(
"Cmu",
kEpsilonDict,
0.09
)
);
scalar C1
dimensionedScalar C1
(
readScalar(kEpsilonCoeffs.lookup("C1"))
dimensionedScalar::lookupOrAddToDict
(
"C1",
kEpsilonDict,
1.44
)
);
scalar C2
dimensionedScalar C2
(
readScalar(kEpsilonCoeffs.lookup("C2"))
dimensionedScalar::lookupOrAddToDict
(
"C2",
kEpsilonDict,
1.92
)
);
scalar C3
dimensionedScalar C3
(
readScalar(kEpsilonCoeffs.lookup("C3"))
dimensionedScalar::lookupOrAddToDict
(
"C3",
kEpsilonDict,
0.85
)
);
scalar alphak
dimensionedScalar alphak
(
readScalar(kEpsilonCoeffs.lookup("alphak"))
dimensionedScalar::lookupOrAddToDict
(
"alphaEps",
kEpsilonDict,
1.0
)
);
scalar alphaEps
dimensionedScalar alphaEps
(
readScalar(kEpsilonCoeffs.lookup("alphaEps"))
dimensionedScalar::lookupOrAddToDict
(
"alphaEps",
kEpsilonDict,
0.76923
)
);
const dictionary& wallFunctionCoeffs
dictionary wallFunctionDict
(
RASProperties.subDict("wallFunctionCoeffs")
RASProperties.subDictPtr("wallFunctionCoeffs")
);
scalar kappa
dimensionedScalar kappa
(
readScalar(wallFunctionCoeffs.lookup("kappa"))
dimensionedScalar::lookupOrAddToDict
(
"kappa",
wallFunctionDict,
0.4187
)
);
scalar E
dimensionedScalar E
(
readScalar(wallFunctionCoeffs.lookup("E"))
dimensionedScalar::lookupOrAddToDict
(
"E",
wallFunctionDict,
9.0
)
);
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
{
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
}
nearWallDist y(mesh);
Info<< "Reading field k\n" << endl;
......
......@@ -26,7 +26,7 @@ if(turbulence)
+ fvm::div(phi, epsilon)
- fvm::laplacian
(
alphaEps*mut + mul, epsilon,
alphaEps*mut + mul, epsilon,
"laplacian(DepsilonEff,epsilon)"
)
==
......@@ -49,7 +49,11 @@ if(turbulence)
(
fvm::ddt(rho, k)
+ fvm::div(phi, k)
- fvm::laplacian(alphak*mut + mul, k, "laplacian(DkEff,k)")
- fvm::laplacian
(
alphak*mut + mul, k,
"laplacian(DkEff,k)"
)
==
G
- fvm::SuSp(Gcoef + 2.0/3.0*rho*divU, k)
......
{
labelList cellBoundaryFaceCount(epsilon.size(), 0);
scalar Cmu25 = ::pow(Cmu, 0.25);
scalar Cmu75 = ::pow(Cmu, 0.75);
scalar Cmu25 = ::pow(Cmu.value(), 0.25);
scalar Cmu75 = ::pow(Cmu.value(), 0.75);
scalar kappa_ = kappa.value();
const fvPatchList& patches = mesh.boundary();
......@@ -55,14 +56,14 @@
epsilon[faceCelli] +=
Cmu75*rho[faceCelli]*::pow(k[faceCelli], 1.5)
/(kappa*y[patchi][facei]);
/(kappa_*y[patchi][facei]);
if (yPlus > 11.6)
{
G[faceCelli] +=
mutw[facei]*magFaceGradU[facei]
*Cmu25*::sqrt(k[faceCelli])
/(kappa*y[patchi][facei]);
/(kappa_*y[patchi][facei]);
}
}
}
......
{
scalar Cmu25 = ::pow(Cmu, 0.25);
scalar Cmu25 = ::pow(Cmu.value(), 0.25);
scalar kappa_ = kappa.value();
scalar E_ = E.value();
const fvPatchList& patches = mesh.boundary();
......@@ -26,7 +28,7 @@
{
mutw[facei] =
muw[facei]
*(yPlus*kappa/::log(E*yPlus) - 1);
*(yPlus*kappa_/::log(E_*yPlus) - 1);
}
else
{
......
EXE_INC = \
-I../bubbleFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-IturbulenceModel \
......@@ -6,7 +7,7 @@ EXE_INC = \
-IinterfacialModels/lnInclude \
-IphaseModel/lnInclude \
-Iaveraging
EXE_LIBS = \
-lEulerianInterfacialModels \
-lfiniteVolume \
......
......@@ -91,34 +91,6 @@
alpha*Ua + beta*Ub
);
Info<< "Reading field k\n" << endl;
volScalarField k
(
IOobject
(
"k",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field epsilon\n" << endl;
volScalarField epsilon
(
IOobject
(
"epsilon",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
dimensionedScalar Cvm
(
transportProperties.lookup("Cvm")
......@@ -156,114 +128,7 @@
alpha*rhoa + beta*rhob
);
IOdictionary RASProperties
(
IOobject
(
"RASProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
Switch turbulence
(
RASProperties.lookup("turbulence")
);
dictionary kEpsilonCoeffs
(
RASProperties.subDict("kEpsilonCoeffs")
);
scalar Cmu
(
readScalar(kEpsilonCoeffs.lookup("Cmu"))
);
scalar C1
(
readScalar(kEpsilonCoeffs.lookup("C1"))
);
scalar C2
(
readScalar(kEpsilonCoeffs.lookup("C2"))
);
scalar alphak
(
readScalar(kEpsilonCoeffs.lookup("alphak"))
);
scalar alphaEps
(
readScalar(kEpsilonCoeffs.lookup("alphaEps"))
);
dictionary wallFunctionCoeffs
(
RASProperties.subDict("wallFunctionCoeffs")
);
scalar kappa
(
readScalar(wallFunctionCoeffs.lookup("kappa"))
);
scalar E
(
readScalar(wallFunctionCoeffs.lookup("E"))
);
nearWallDist y(mesh);
Info<< "Calculating field nutb\n" << endl;
volScalarField nutb
(
IOobject
(
"nutb",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Cmu*sqr(k)/epsilon
);
Info<< "Calculating field nuEffa\n" << endl;
volScalarField nuEffa
(
IOobject
(
"nuEffa",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
sqr(Ct)*nutb + nua
);
Info<< "Calculating field nuEffb\n" << endl;
volScalarField nuEffb
(
IOobject
(
"nuEffb",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
nutb + nub
);
#include "createRASTurbulence.H"
Info<< "Calculating field DDtUa and DDtUb\n" << endl;
......
if(turbulence)
{
if (mesh.changing())
{
y.correct();
}
tmp<volTensorField> tgradUb = fvc::grad(Ub);
volScalarField G = 2*nutb*(tgradUb() && dev(symm(tgradUb())));
tgradUb.clear();
# include "wallFunctions.H"
// Dissipation equation
fvScalarMatrix epsEqn
(
fvm::ddt(beta, epsilon)
+ fvm::div(phib, epsilon)
- fvm::laplacian
(
alphaEps*nuEffb,
epsilon,
"laplacian((alphaEps*nuEffb),epsilon)"
)
==
C1*beta*G*epsilon/k
- fvm::Sp(C2*beta*epsilon/k, epsilon)
);
# include "wallDissipation.H"