Commit ff290931 authored by Henry's avatar Henry
Browse files

Incompressible turbulence models: Remove the correction of the laminar transport model

Explicitly correct laminar transport at the application level as is done in the multiphase solvers
parent 024f9c1e
......@@ -97,6 +97,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
......
......@@ -81,6 +81,7 @@ int main(int argc, char *argv[])
#include "pEqn.H"
}
laminarTransport.correct();
turbulence->correct();
runTime.write();
......
......@@ -216,6 +216,7 @@ int main(int argc, char *argv[])
Ua.correctBoundaryConditions();
}
laminarTransport.correct();
turbulence->correct();
runTime.write();
......
......@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
U += (Ubar - UbarStar);
gradP += (Ubar - UbarStar)/(1.0/UEqn.A())().weightedAverage(mesh.V());
laminarTransport.correct();
turbulence->correct();
Info<< "Uncorrected Ubar = " << (flowDirection & UbarStar.value())
......
......@@ -82,6 +82,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
......
......@@ -104,6 +104,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
......
......@@ -83,6 +83,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
......
......@@ -26,7 +26,7 @@
mesh
);
# include "createPhi.H"
#include "createPhi.H"
label pRefCell = 0;
......
......@@ -130,6 +130,7 @@ int main(int argc, char *argv[])
}
}
laminarTransport.correct();
turbulence->correct();
runTime.write();
......
......@@ -64,6 +64,7 @@ int main(int argc, char *argv[])
#include "pEqn.H"
}
laminarTransport.correct();
turbulence->correct();
if (runTime.outputTime())
......
......@@ -68,6 +68,7 @@ int main(int argc, char *argv[])
#include "pEqn.H"
}
laminarTransport.correct();
turbulence->correct();
runTime.write();
......
......@@ -62,6 +62,7 @@ int main(int argc, char *argv[])
#include "pEqn.H"
}
laminarTransport.correct();
turbulence->correct();
runTime.write();
......
......@@ -134,6 +134,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
......
......@@ -83,6 +83,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
......
EXE_INC = \
-I$(FOAM_SOLVERS)/incompressible/pisoFoam \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
......
......@@ -33,7 +33,7 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "IncompressibleTurbulenceModel.H"
#include "turbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "createPhi.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<IncompressibleTurbulenceModel<transportModel> >
turbulence
(
IncompressibleTurbulenceModel<transportModel>::New
(
U,
phi,
laminarTransport
)
);
#include "IncompressibleTurbulenceModel.H"
namespace Foam
{
namespace incompressible
{
typedef IncompressibleTurbulenceModel<transportModel> turbulenceModel;
}
}
EXE_INC = \
-I$(FOAM_SOLVERS)/compressible/rhoPimpleFoam \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
......
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
==
fvOptions(rho, U)
);
UEqn().relax();
fvOptions.constrain(UEqn());
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p));
fvOptions.correct(U);
K = 0.5*magSqr(U);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment