mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
SRFSimpleFoam, SRFPimpleFoam: Use absolute U for the production term in turbulence models
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1788
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
// Construct the absolute velocity
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
Urel + SRF->U()
|
||||
);
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> turbulence
|
||||
(
|
||||
incompressible::RASModel::New(Urel, phi, laminarTransport)
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
Info<< "Creating SRF model\n" << endl;
|
||||
autoPtr<SRF::SRFModel> SRF(SRF::SRFModel::New(Urel));
|
||||
|
||||
Reference in New Issue
Block a user