Added Urel for post-processing and function objects

This commit is contained in:
Hrvoje Jasak 2016-09-07 13:49:21 +01:00
parent 17129062cd
commit aa518c6931
2 changed files with 20 additions and 0 deletions

View file

@ -65,6 +65,10 @@ int main(int argc, char *argv[])
# include "pEqn.H" # include "pEqn.H"
} }
// Calculate relative velocity
Urel == U;
mrfZones.relativeVelocity(Urel);
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View file

@ -44,3 +44,19 @@
MRFZones mrfZones(mesh); MRFZones mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U); mrfZones.correctBoundaryVelocity(U);
// Create Urel as a permanent field to make it available for on-the-fly
// post-processing operations
volVectorField Urel
(
IOobject
(
"Urel",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U
);
mrfZones.relativeVelocity(Urel);