egp@vt.edu
Eric Paterson is Professor and Department Head of Aerospace and Ocean Engineering. For Fall 2013, he is teaching AOE 5984, Intro to Parallel Computing Applications with faculty from Virginia Tech's Advanced Research Computing.
Post-processing velocity fields | |
Calculates and writes the Courant number obtained from field phi as avolScalarField. |
|
Calculates and writes the enstrophy of the velocity field U |
|
Calculates and writes the flowType of velocity field U |
|
Calculates and writes the second largest eigenvalue of the sum of the square of the symmetrical and anti-symmetrical parts of the velocity gradient tensor |
|
Calculates and optionally writes the local Mach number from the velocity field U at each time |
|
Calculates and writes the Pe number as a surfaceScalarField obtained from field phi |
|
Calculates and writes the second invariant of the velocity gradient tensor |
|
Calculates and writes the stream function of velocity field U at each time |
|
Calculates and writes the scalar field of uprime () |
|
Calculates and writes the vorticity of velocity field U |
postProcessing/velocityField/vorticity/vorticity.C
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
if (Uheader.headerOk())
{
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
Info<< " Calculating vorticity" << endl;
volVectorField vorticity
(
IOobject
(
"vorticity",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
fvc::curl(U)
);
volScalarField magVorticity
(
IOobject
(
"magVorticity",
runTime.timeName(),
mesh,
IOobject::NO_READ
),
mag(vorticity)
);
Info<< "vorticity max/min : "
<< max(magVorticity).value() << " "
<< min(magVorticity).value() << endl;
if (writeResults)
{
vorticity.write();
magVorticity.write();
}
}
else
{
Info<< " No U" << endl;
}
void calcIncompressible
(
const fvMesh& mesh,
const Time& runTime,
const volVectorField& U,
volVectorField& wallShearStress
)
{
#include "createPhi.H"
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<:rasmodel> model
(
incompressible::RASModel::New(U, phi, laminarTransport)
);
const volSymmTensorField Reff(model->devReff());
forAll(wallShearStress.boundaryField(), patchI)
{
wallShearStress.boundaryField()[patchI] =
(
-mesh.Sf().boundaryField()[patchI]
/mesh.magSf().boundaryField()[patchI]
) & Reff.boundaryField()[patchI];
}
}
tmp kEpsilon::devReff() const
{
return tmp
(
new volSymmTensorField
(
IOobject
(
"devRhoReff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
-nuEff()*dev(twoSymm(fvc::grad(U_)))
)
);
}
By egp@vt.edu
OpenFOAM for AOE 5984, Fall 2013. This lectures will cover data analysis and visualization for OpenFOAM CFD simulations.
Eric Paterson is Professor and Department Head of Aerospace and Ocean Engineering. For Fall 2013, he is teaching AOE 5984, Intro to Parallel Computing Applications with faculty from Virginia Tech's Advanced Research Computing.