Commit 7810d432 authored by Henry Weller's avatar Henry Weller
Browse files

SRFSimpleFoam, SRFPimpleFoam: Use absolute U for the production term in turbulence models

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1788
parent 5f865a44
......@@ -45,13 +45,6 @@ scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(Urel, phi);
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(Urel, phi, laminarTransport)
);
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF
(
......@@ -71,3 +64,10 @@ volVectorField U
),
Urel + SRF->U()
);
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
......@@ -65,26 +65,12 @@ int main(int argc, char *argv[])
#include "pEqn.H"
}
U = Urel + SRF->U();
laminarTransport.correct();
turbulence->correct();
if (runTime.outputTime())
{
volVectorField Uabs
(
IOobject
(
"Uabs",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Urel + SRF->U()
);
runTime.write();
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
......
......@@ -45,12 +45,26 @@ scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(Urel, phi);
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF(SRF::SRFModel::New(Urel));
autoPtr<incompressible::RASModel> turbulence
// Construct the absolute velocity
volVectorField U
(
incompressible::RASModel::New(Urel, phi, laminarTransport)
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Urel + SRF->U()
);
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF(SRF::SRFModel::New(Urel));
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
);
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