Added Uabs as permanent field for post-processing

This commit is contained in:
Hrvoje Jasak 2010-12-16 22:25:06 +00:00
parent 0778c0393f
commit 5c8f6b89fd
2 changed files with 19 additions and 17 deletions

View file

@ -56,3 +56,19 @@
(
SRF::SRFModel::New(Urel)
);
// Create Uabs as a permanent field to make it available for on-the-fly
// post-processing operations
volVectorField Uabs
(
IOobject
(
"Uabs",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Urel + SRF->U()
);

View file

@ -112,24 +112,10 @@ int main(int argc, char *argv[])
turbulence->correct();
// Recalculate Uabs
Uabs = Urel + SRF->U();
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"