mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Uabs (for postprocessing) only constructed when needed.
This commit is contained in:
@ -26,22 +26,6 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
// Create absolute velocity field (post-processing only)
|
||||
// Will be updated before first use, so can be initialised by Urel
|
||||
Info<< "Creating field Uabs\n" << endl;
|
||||
volVectorField Uabs
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Uabs",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
Urel
|
||||
);
|
||||
|
||||
Info<< "Reading/calculating face flux field phi\n" << endl;
|
||||
surfaceScalarField phi
|
||||
(
|
||||
|
||||
@ -112,9 +112,24 @@ int main(int argc, char *argv[])
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
Reference in New Issue
Block a user