Skip to content
Snippets Groups Projects
Commit 162b6979 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 5e51d937
Branches
Tags
No related merge requests found
...@@ -45,13 +45,6 @@ scalar pRefValue = 0.0; ...@@ -45,13 +45,6 @@ scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue); setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name()); mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(Urel, phi);
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(Urel, phi, laminarTransport)
);
Info<< "Creating SRF model\n" << endl; Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF autoPtr<SRF::SRFModel> SRF
( (
...@@ -71,3 +64,10 @@ volVectorField U ...@@ -71,3 +64,10 @@ volVectorField U
), ),
Urel + SRF->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[]) ...@@ -65,26 +65,12 @@ int main(int argc, char *argv[])
#include "pEqn.H" #include "pEqn.H"
} }
U = Urel + SRF->U();
laminarTransport.correct(); laminarTransport.correct();
turbulence->correct(); turbulence->correct();
if (runTime.outputTime()) runTime.write();
{
volVectorField Uabs
(
IOobject
(
"Uabs",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Urel + SRF->U()
);
runTime.write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s"
......
...@@ -45,12 +45,26 @@ scalar pRefValue = 0.0; ...@@ -45,12 +45,26 @@ scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue); setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name()); 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; singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<SRF::SRFModel> SRF(SRF::SRFModel::New(Urel));
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
);
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