relocation of turbulence models and renaming namespaces

This commit is contained in:
andy
2008-06-17 10:48:04 +01:00
parent 2251d431fb
commit 24c4b1b745
250 changed files with 1444 additions and 403 deletions

View File

@ -9,7 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \

View File

@ -35,7 +35,7 @@ namespace Foam
{ {
namespace compressible namespace compressible
{ {
namespace turbulenceModels namespace RAS
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -55,12 +55,15 @@ PDRkEpsilon::PDRkEpsilon
: :
turbulenceModel(typeName, rho, U, phi, thermophysicalModel), turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
Cmu(turbulenceModelCoeffs_.lookup("Cmu")), Cmu(turbulenceModelCoeffs_.lookupOrAddDefault<scalar>("Cmu", 0.09)),
C1(turbulenceModelCoeffs_.lookup("C1")), C1(turbulenceModelCoeffs_.lookupOrAddDefault<scalar>("C1", 1.44)),
C2(turbulenceModelCoeffs_.lookup("C2")), C2(turbulenceModelCoeffs_.lookupOrAddDefault<scalar>("C2", 1.92)),
alphak(turbulenceModelCoeffs_.lookup("alphak")), alphak(turbulenceModelCoeffs_.lookupOrAddDefault<scalar>("alphak", 1.0)),
alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")), alphaEps
alphah(turbulenceModelCoeffs_.lookup("alphah")), (
turbulenceModelCoeffs_.lookupOrAddDefault<scalar>("alphaEps", 0.76923)
),
alphah(turbulenceModelCoeffs_.lookupOrAddDefault<scalar>("alphah", 1.0)),
k_ k_
( (
@ -102,6 +105,8 @@ PDRkEpsilon::PDRkEpsilon
) )
{ {
# include "wallViscosityI.H" # include "wallViscosityI.H"
printCoeffs();
} }
@ -161,12 +166,12 @@ bool PDRkEpsilon::read()
{ {
if (turbulenceModel::read()) if (turbulenceModel::read())
{ {
turbulenceModelCoeffs_.lookup("Cmu") >> Cmu; turbulenceModelCoeffs_.readIfPresent<scalar>("Cmu", Cmu);
turbulenceModelCoeffs_.lookup("C1") >> C1; turbulenceModelCoeffs_.readIfPresent<scalar>("C1", C1);
turbulenceModelCoeffs_.lookup("C2") >> C2; turbulenceModelCoeffs_.readIfPresent<scalar>("C2", C2);
turbulenceModelCoeffs_.lookup("alphak") >> alphak; turbulenceModelCoeffs_.readIfPresent<scalar>("alphak", alphak);
turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps; turbulenceModelCoeffs_.readIfPresent<scalar>("alphaEps", alphaEps);
turbulenceModelCoeffs_.lookup("alphah") >> alphah; turbulenceModelCoeffs_.readIfPresent<scalar>("alphah", alphah);
return true; return true;
} }
@ -204,7 +209,7 @@ void PDRkEpsilon::correct()
// in both the k and epsilon equations // in both the k and epsilon equations
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav"); const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
const PDRDragModel& drag = const PDRDragModel& drag =
U_.db().lookupObject<PDRDragModel>("PDRDragModel"); U_.db().lookupObject<PDRDragModel>("PDRDragModel");
volScalarField GR = drag.Gk(); volScalarField GR = drag.Gk();
@ -259,7 +264,7 @@ void PDRkEpsilon::correct()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace turbulenceModels } // End namespace RAS
} // End namespace compressible } // End namespace compressible
} // End namespace Foam } // End namespace Foam

View File

@ -45,7 +45,7 @@ namespace Foam
{ {
namespace compressible namespace compressible
{ {
namespace turbulenceModels namespace RAS
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -58,12 +58,12 @@ class PDRkEpsilon
{ {
// Private data // Private data
dimensionedScalar Cmu; scalar Cmu;
dimensionedScalar C1; scalar C1;
dimensionedScalar C2; scalar C2;
dimensionedScalar alphak; scalar alphak;
dimensionedScalar alphaEps; scalar alphaEps;
dimensionedScalar alphah; scalar alphah;
volScalarField k_; volScalarField k_;
volScalarField epsilon_; volScalarField epsilon_;
@ -103,7 +103,7 @@ public:
//- Return the effective diffusivity for k //- Return the effective diffusivity for k
tmp<volScalarField> DkEff() const tmp<volScalarField> DkEff() const
{ {
return tmp<volScalarField> return tmp<volScalarField>
( (
new volScalarField("DkEff", alphak*mut_ + mu()) new volScalarField("DkEff", alphak*mut_ + mu())
); );
@ -112,7 +112,7 @@ public:
//- Return the effective diffusivity for epsilon //- Return the effective diffusivity for epsilon
tmp<volScalarField> DepsilonEff() const tmp<volScalarField> DepsilonEff() const
{ {
return tmp<volScalarField> return tmp<volScalarField>
( (
new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) new volScalarField("DepsilonEff", alphaEps*mut_ + mu())
); );
@ -121,7 +121,7 @@ public:
//- Return the effective turbulent thermal diffusivity //- Return the effective turbulent thermal diffusivity
tmp<volScalarField> alphaEff() const tmp<volScalarField> alphaEff() const
{ {
return tmp<volScalarField> return tmp<volScalarField>
( (
new volScalarField("alphaEff", alphah*mut_ + alpha()) new volScalarField("alphaEff", alphah*mut_ + alpha())
); );
@ -158,7 +158,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace turbulenceModels } // End namespace RAS
} // End namespace compressible } // End namespace compressible
} // End namespace Foam } // End namespace Foam

View File

@ -5,7 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -3,8 +3,8 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \

View File

@ -6,7 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/lnInclude -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lengine \ -lengine \

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I../engineFoam \ -I../engineFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I../dieselEngineFoam \ -I../dieselEngineFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \

View File

@ -4,7 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I../XiFoam -I../XiFoam

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I../XiFoam \ -I../XiFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \

View File

@ -2,8 +2,8 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I../sonicFoam \ -I../sonicFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -0,0 +1,14 @@
nAveragingSteps++;
scalar nm1Coeff = scalar(nAveragingSteps - 1)/nAveragingSteps;
scalar nCoeff = 1.0/nAveragingSteps;
R += sqr(Umean);
Umean = nm1Coeff*Umean + nCoeff*U;
R = nm1Coeff*R + nCoeff*sqr(U) - sqr(Umean);
Bmean = nm1Coeff*Bmean + nCoeff*sgsModel->B();
epsilonMean = nm1Coeff*epsilonMean + nCoeff*sgsModel->epsilon();
pPrime2Mean += sqr(pMean);
pMean = nm1Coeff*pMean + nCoeff*p;
pPrime2Mean = nm1Coeff*pPrime2Mean + nCoeff*sqr(p) - sqr(pMean);

View File

@ -0,0 +1,14 @@
nAveragingSteps++;
scalar nm1Coeff = scalar(nAveragingSteps - 1)/nAveragingSteps;
scalar nCoeff = 1.0/nAveragingSteps;
R += sqr(Umean);
Umean = nm1Coeff*Umean + nCoeff*U;
R = nm1Coeff*R + nCoeff*sqr(U) - sqr(Umean);
Bmean = nm1Coeff*Bmean + nCoeff*sgsModel->B();
epsilonMean = nm1Coeff*epsilonMean + nCoeff*sgsModel->epsilon();
pPrime2Mean += sqr(pMean);
pMean = nm1Coeff*pMean + nCoeff*p;
pPrime2Mean = nm1Coeff*pPrime2Mean + nCoeff*sqr(p) - sqr(pMean);

View File

@ -0,0 +1,14 @@
nAveragingSteps++;
scalar nm1Coeff = scalar(nAveragingSteps - 1)/nAveragingSteps;
scalar nCoeff = 1.0/nAveragingSteps;
R += sqr(Umean);
Umean = nm1Coeff*Umean + nCoeff*U;
R = nm1Coeff*R + nCoeff*sqr(U) - sqr(Umean);
Bmean = nm1Coeff*Bmean + nCoeff*sgsModel->B();
epsilonMean = nm1Coeff*epsilonMean + nCoeff*sgsModel->epsilon();
pPrime2Mean += sqr(pMean);
pMean = nm1Coeff*pMean + nCoeff*p;
pPrime2Mean = nm1Coeff*pPrime2Mean + nCoeff*sqr(p) - sqr(pMean);

View File

@ -0,0 +1,234 @@
label nAveragingSteps = 1;
IFstream nAveragingStepsFile
(
runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw"
);
autoPtr<volVectorField> UmeanPtr;
autoPtr<volSymmTensorField> RPtr;
autoPtr<volSymmTensorField> BmeanPtr;
autoPtr<volScalarField> epsilonMeanPtr;
autoPtr<volScalarField> pMeanPtr;
autoPtr<volScalarField> pPrime2MeanPtr;
if (nAveragingStepsFile.good())
{
nAveragingStepsFile >> nAveragingSteps;
Info<< "Reading field Umean\n" << endl;
UmeanPtr.reset
(
new volVectorField
(
IOobject
(
"Umean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field R\n" << endl;
RPtr.reset
(
new volSymmTensorField
(
IOobject
(
"R",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field Bmean\n" << endl;
BmeanPtr.reset
(
new volSymmTensorField
(
IOobject
(
"Bmean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field epsilonMean\n" << endl;
epsilonMeanPtr.reset
(
new volScalarField
(
IOobject
(
"epsilonMean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "Reading field pMean\n" << endl;
pMeanPtr.reset
(
new volScalarField
(
IOobject
(
"pMean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "Reading field pPrime2Mean\n" << endl;
pPrime2MeanPtr.reset
(
new volScalarField
(
IOobject
(
"pPrime2Mean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
else
{
Info<< "Creating field Umean\n" << endl;
UmeanPtr.reset
(
new volVectorField
(
IOobject
(
"Umean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U
)
);
Info<< "Creating field R\n" << endl;
RPtr.reset
(
new volSymmTensorField
(
IOobject
(
"R",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sqr(U) - sqr(UmeanPtr())
)
);
Info<< "Creating field Bmean\n" << endl;
BmeanPtr.reset
(
new volSymmTensorField
(
IOobject
(
"Bmean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sgsModel->B()
)
);
Info<< "Creating field epsilonMean\n" << endl;
epsilonMeanPtr.reset
(
new volScalarField
(
IOobject
(
"epsilonMean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sgsModel->epsilon()
)
);
Info<< "Creating field pMean\n" << endl;
pMeanPtr.reset
(
new volScalarField
(
IOobject
(
"pMean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p
)
);
Info<< "Creating field pPrime2Mean\n" << endl;
pPrime2MeanPtr.reset
(
new volScalarField
(
IOobject
(
"pPrime2Mean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sqr(p) - sqr(pMeanPtr())
)
);
}
volVectorField& Umean = UmeanPtr();
volSymmTensorField& R = RPtr();
volSymmTensorField& Bmean = BmeanPtr();
volScalarField& epsilonMean = epsilonMeanPtr();
volScalarField& pMean = pMeanPtr();
volScalarField& pPrime2Mean = pPrime2MeanPtr();

View File

@ -0,0 +1,234 @@
label nAveragingSteps = 1;
IFstream nAveragingStepsFile
(
runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw"
);
autoPtr<volVectorField> UmeanPtr;
autoPtr<volSymmTensorField> RPtr;
autoPtr<volSymmTensorField> BmeanPtr;
autoPtr<volScalarField> epsilonMeanPtr;
autoPtr<volScalarField> pMeanPtr;
autoPtr<volScalarField> pPrime2MeanPtr;
if (nAveragingStepsFile.good())
{
nAveragingStepsFile >> nAveragingSteps;
Info<< "Reading field Umean\n" << endl;
UmeanPtr.reset
(
new volVectorField
(
IOobject
(
"Umean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field R\n" << endl;
RPtr.reset
(
new volSymmTensorField
(
IOobject
(
"R",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field Bmean\n" << endl;
BmeanPtr.reset
(
new volSymmTensorField
(
IOobject
(
"Bmean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field epsilonMean\n" << endl;
epsilonMeanPtr.reset
(
new volScalarField
(
IOobject
(
"epsilonMean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "Reading field pMean\n" << endl;
pMeanPtr.reset
(
new volScalarField
(
IOobject
(
"pMean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "Reading field pPrime2Mean\n" << endl;
pPrime2MeanPtr.reset
(
new volScalarField
(
IOobject
(
"pPrime2Mean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
else
{
Info<< "Creating field Umean\n" << endl;
UmeanPtr.reset
(
new volVectorField
(
IOobject
(
"Umean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U
)
);
Info<< "Creating field R\n" << endl;
RPtr.reset
(
new volSymmTensorField
(
IOobject
(
"R",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sqr(U) - sqr(UmeanPtr())
)
);
Info<< "Creating field Bmean\n" << endl;
BmeanPtr.reset
(
new volSymmTensorField
(
IOobject
(
"Bmean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sgsModel->B()
)
);
Info<< "Creating field epsilonMean\n" << endl;
epsilonMeanPtr.reset
(
new volScalarField
(
IOobject
(
"epsilonMean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sgsModel->epsilon()
)
);
Info<< "Creating field pMean\n" << endl;
pMeanPtr.reset
(
new volScalarField
(
IOobject
(
"pMean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p
)
);
Info<< "Creating field pPrime2Mean\n" << endl;
pPrime2MeanPtr.reset
(
new volScalarField
(
IOobject
(
"pPrime2Mean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sqr(p) - sqr(pMeanPtr())
)
);
}
volVectorField& Umean = UmeanPtr();
volSymmTensorField& R = RPtr();
volSymmTensorField& Bmean = BmeanPtr();
volScalarField& epsilonMean = epsilonMeanPtr();
volScalarField& pMean = pMeanPtr();
volScalarField& pPrime2Mean = pPrime2MeanPtr();

View File

@ -0,0 +1,234 @@
label nAveragingSteps = 1;
IFstream nAveragingStepsFile
(
runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw"
);
autoPtr<volVectorField> UmeanPtr;
autoPtr<volSymmTensorField> RPtr;
autoPtr<volSymmTensorField> BmeanPtr;
autoPtr<volScalarField> epsilonMeanPtr;
autoPtr<volScalarField> pMeanPtr;
autoPtr<volScalarField> pPrime2MeanPtr;
if (nAveragingStepsFile.good())
{
nAveragingStepsFile >> nAveragingSteps;
Info<< "Reading field Umean\n" << endl;
UmeanPtr.reset
(
new volVectorField
(
IOobject
(
"Umean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field R\n" << endl;
RPtr.reset
(
new volSymmTensorField
(
IOobject
(
"R",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field Bmean\n" << endl;
BmeanPtr.reset
(
new volSymmTensorField
(
IOobject
(
"Bmean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "\nReading field epsilonMean\n" << endl;
epsilonMeanPtr.reset
(
new volScalarField
(
IOobject
(
"epsilonMean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "Reading field pMean\n" << endl;
pMeanPtr.reset
(
new volScalarField
(
IOobject
(
"pMean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
Info<< "Reading field pPrime2Mean\n" << endl;
pPrime2MeanPtr.reset
(
new volScalarField
(
IOobject
(
"pPrime2Mean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
else
{
Info<< "Creating field Umean\n" << endl;
UmeanPtr.reset
(
new volVectorField
(
IOobject
(
"Umean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U
)
);
Info<< "Creating field R\n" << endl;
RPtr.reset
(
new volSymmTensorField
(
IOobject
(
"R",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sqr(U) - sqr(UmeanPtr())
)
);
Info<< "Creating field Bmean\n" << endl;
BmeanPtr.reset
(
new volSymmTensorField
(
IOobject
(
"Bmean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sgsModel->B()
)
);
Info<< "Creating field epsilonMean\n" << endl;
epsilonMeanPtr.reset
(
new volScalarField
(
IOobject
(
"epsilonMean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sgsModel->epsilon()
)
);
Info<< "Creating field pMean\n" << endl;
pMeanPtr.reset
(
new volScalarField
(
IOobject
(
"pMean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p
)
);
Info<< "Creating field pPrime2Mean\n" << endl;
pPrime2MeanPtr.reset
(
new volScalarField
(
IOobject
(
"pPrime2Mean",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
sqr(p) - sqr(pMeanPtr())
)
);
}
volVectorField& Umean = UmeanPtr();
volSymmTensorField& R = RPtr();
volSymmTensorField& Bmean = BmeanPtr();
volScalarField& epsilonMean = epsilonMeanPtr();
volScalarField& pMean = pMeanPtr();
volScalarField& pPrime2Mean = pPrime2MeanPtr();

View File

@ -0,0 +1,18 @@
if (runTime.outputTime())
{
OFstream nAveragingStepsFile
(
runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw"
);
if (nAveragingStepsFile.good())
{
nAveragingStepsFile << nAveragingSteps << endl;
}
else
{
FatalErrorIn(args.executable())
<< "Cannot open file " << nAveragingStepsFile.name()
<< abort(FatalError);
}
}

View File

@ -0,0 +1,18 @@
if (runTime.outputTime())
{
OFstream nAveragingStepsFile
(
runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw"
);
if (nAveragingStepsFile.good())
{
nAveragingStepsFile << nAveragingSteps << endl;
}
else
{
FatalErrorIn(args.executable())
<< "Cannot open file " << nAveragingStepsFile.name()
<< abort(FatalError);
}
}

View File

@ -0,0 +1,18 @@
if (runTime.outputTime())
{
OFstream nAveragingStepsFile
(
runTime.path()/runTime.timeName()/"uniform"/"nAveragingSteps.raw"
);
if (nAveragingStepsFile.good())
{
nAveragingStepsFile << nAveragingSteps << endl;
}
else
{
FatalErrorIn(args.executable())
<< "Cannot open file " << nAveragingStepsFile.name()
<< abort(FatalError);
}
}

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I../XiFoam -I../XiFoam
EXE_LIBS = \ EXE_LIBS = \

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -7,7 +7,7 @@ EXE_INC = \
-IderivedFvPatchFields/solidWallHeatFluxTemperatureCoupled \ -IderivedFvPatchFields/solidWallHeatFluxTemperatureCoupled \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels -I$(LIB_SRC)/turbulenceModels/RAS
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -120,7 +120,7 @@ public:
inline const fvMesh& neighbourRegion() const; inline const fvMesh& neighbourRegion() const;
//- Return the neighbour patch ID //- Return the neighbour patch ID
inline const label neighbourPatchID() const; inline label neighbourPatchID() const;
//- Return a reference to the neighbour patch //- Return a reference to the neighbour patch
inline const fvPatch& neighbourPatch() const; inline const fvPatch& neighbourPatch() const;

View File

@ -55,7 +55,7 @@ inline const Foam::fvMesh& Foam::coupleManager::neighbourRegion() const
} }
inline const Foam::label Foam::coupleManager::neighbourPatchID() const inline Foam::label Foam::coupleManager::neighbourPatchID() const
{ {
return neighbourRegion().boundaryMesh().findPatchID(neighbourPatchName_); return neighbourRegion().boundaryMesh().findPatchID(neighbourPatchName_);
} }

View File

@ -2,8 +2,8 @@ EXE_INC = \
-I../buoyantFoam \ -I../buoyantFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude

View File

@ -31,9 +31,9 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels
EXE_LIBS = \ EXE_LIBS = \

View File

@ -36,7 +36,7 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude

View File

@ -37,9 +37,9 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );
Info<< "Reading field rAU if present\n" << endl; Info<< "Reading field rAU if present\n" << endl;

View File

@ -1,5 +1,5 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude

View File

@ -36,7 +36,7 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );

View File

@ -4,8 +4,8 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -2,8 +2,8 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/turbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/turbulenceModels/RAS/incompressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -86,10 +86,10 @@
// Construct interface from gamma distribution // Construct interface from gamma distribution
interfaceProperties interface(gamma, U, twoPhaseProperties); interfaceProperties interface(gamma, U, twoPhaseProperties);
// Construct LES model // Construct incompressible RAS model
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, twoPhaseProperties) incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
); );
wordList pcorrTypes(pd.boundaryField().types()); wordList pcorrTypes(pd.boundaryField().types());

View File

@ -2,8 +2,8 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \ -IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude

View File

@ -3,9 +3,9 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/incompressible/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/incompressible/lnInclude \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -31,7 +31,7 @@ License
namespace Foam namespace Foam
{ {
namespace LESmodels namespace LES
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -64,8 +64,10 @@ devOneEqEddy::devOneEqEddy
mesh_ mesh_
), ),
ck_(LESmodelProperties().lookup("ck")) ck_(LESmodelProperties().lookupOrAddDefault("ck", 0.07))
{} {
printCoeffs();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -99,7 +101,7 @@ bool devOneEqEddy::read()
{ {
if (GenEddyVisc::read()) if (GenEddyVisc::read())
{ {
LESmodelProperties().lookup("ck") >> ck_; LESmodelProperties().readIfPresent<scalar>("ck", ck_);
return true; return true;
} }
@ -112,7 +114,7 @@ bool devOneEqEddy::read()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESmodels } // End namespace LES
} // End namespace Foam } // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -61,7 +61,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
namespace LESmodels namespace LES
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -76,7 +76,7 @@ class devOneEqEddy
volScalarField k_; volScalarField k_;
dimensionedScalar ck_; scalar ck_;
// Private Member Functions // Private Member Functions
@ -119,7 +119,7 @@ public:
//- Return the effective diffusivity for k //- Return the effective diffusivity for k
tmp<volScalarField> DkEff() const tmp<volScalarField> DkEff() const
{ {
return tmp<volScalarField> return tmp<volScalarField>
( (
new volScalarField("DkEff", nuSgs_ + nu()) new volScalarField("DkEff", nuSgs_ + nu())
); );

View File

@ -4,8 +4,8 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -79,7 +79,7 @@
twoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
// Create RAS turbulence model // Create RAS turbulence model
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phiv, twoPhaseProperties) incompressible::turbulenceModel::New(U, phiv, twoPhaseProperties)
); );

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -110,7 +110,7 @@
interfaceProperties interface(gamma, U, twoPhaseProperties); interfaceProperties interface(gamma, U, twoPhaseProperties);
// Construct LES model // Construct LES model
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, twoPhaseProperties) incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
); );

View File

@ -0,0 +1,53 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::hashSetUnionEqOp
Description
Union operation to combine hash sets
Usage: combineReduce(myWordHashSet, unionEqOp<word>());
\*---------------------------------------------------------------------------*/
namespace Foam
{
template<class Type>
class hashSetUnionEqOp
{
public:
void operator()(HashSet<Type>& x, const HashSet<Type>& y) const
{
forAllConstIter(typename HashSet<Type>, y, iter)
{
x.insert(iter.key());
}
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,53 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::hashTableUnionEqOp
Description
Union operation to combine hash sets
Usage: combineReduce(myWordHashSet, unionEqOp<word>());
\*---------------------------------------------------------------------------*/
namespace Foam
{
template<class Type>
class hashTableUnionEqOp
{
public:
void operator()(HashTable<Type>& x, const HashTable<Type>& y) const
{
forAllConstIter(typename HashTable<Type>, y, iter)
{
x.insert(iter.key(), iter());
}
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,9 +2,9 @@ EXE_INC = \
-I$(FOAM_SRC)/postProcessing/postCalc \ -I$(FOAM_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -148,9 +148,14 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
if (turbulenceProperties.found("turbulenceModel")) if (turbulenceProperties.found("turbulenceModel"))
{ {
autoPtr<turbulenceModel> turbulenceModel autoPtr<incompressible::turbulenceModel> turbulenceModel
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New
(
U,
phi,
laminarTransport
)
); );
execFlowFunctionObjects(args, runTime); execFlowFunctionObjects(args, runTime);

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels
EXE_LIBS = \ EXE_LIBS = \

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels
EXE_LIBS = \ EXE_LIBS = \

View File

@ -16,7 +16,7 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels
EXE_LIBS = \ EXE_LIBS = \

View File

@ -16,7 +16,7 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );

View File

@ -4,9 +4,9 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -100,9 +100,14 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
if (turbulenceProperties.found("turbulenceModel")) if (turbulenceProperties.found("turbulenceModel"))
{ {
autoPtr<turbulenceModel> turbulenceModel autoPtr<incompressible::turbulenceModel> turbulenceModel
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New
(
U,
phi,
laminarTransport
)
); );
PePtr.set PePtr.set

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels
EXE_LIBS = \ EXE_LIBS = \

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels
EXE_LIBS = \ EXE_LIBS = \

View File

@ -16,7 +16,7 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/LESmodels \ -I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels
EXE_LIBS = \ EXE_LIBS = \

View File

@ -83,9 +83,9 @@ int main(int argc, char *argv[])
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence
( (
turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );
const fvPatchList& patches = mesh.boundary(); const fvPatchList& patches = mesh.boundary();

View File

@ -29,7 +29,6 @@ wmake libso randomProcesses
( cd thermophysicalModels && ./Allwmake ) ( cd thermophysicalModels && ./Allwmake )
( cd transportModels && ./Allwmake ) ( cd transportModels && ./Allwmake )
( cd turbulenceModels && ./Allwmake ) ( cd turbulenceModels && ./Allwmake )
( cd LESmodels && ./Allwmake )
( cd lagrangian && ./Allwmake ) ( cd lagrangian && ./Allwmake )
( cd postProcessing && ./Allwmake ) ( cd postProcessing && ./Allwmake )

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
set -x set -x
wmake libso incompressible ( cd RAS && ./Allwmake )
wmake libso compressible ( cd LES && ./Allwmake )

View File

@ -33,7 +33,7 @@ namespace Foam
{ {
namespace compressible namespace compressible
{ {
namespace LESmodels namespace LES
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -127,7 +127,7 @@ bool DeardorffDiffStress::read()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESmodels } // End namespace LES
} // End namespace compressible } // End namespace compressible
} // End namespace Foam } // End namespace Foam

View File

@ -62,7 +62,7 @@ namespace Foam
{ {
namespace compressible namespace compressible
{ {
namespace LESmodels namespace LES
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -130,7 +130,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESmodels } // End namespace LES
} // End namespace compressible } // End namespace compressible
} // End namespace Foam } // End namespace Foam

Some files were not shown because too many files have changed in this diff Show More