Pe: Create and write volScalarField in addition to the surfaceScalarField for ease of post-processing
This commit is contained in:
parent
3f249821ce
commit
6cc8fc128f
1 changed files with 39 additions and 32 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -25,23 +25,21 @@ Application
|
||||||
Pe
|
Pe
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Calculates and writes the Pe number as a surfaceScalarField obtained from
|
Calculates the Peclet number Pe from the flux phi and writes the maximum
|
||||||
field phi.
|
value, the surfaceScalarField Pef and volScalarField Pe.
|
||||||
|
|
||||||
The -noWrite option just outputs the max/min values without writing
|
With the -noWrite option just outputs the max value without writing
|
||||||
the field.
|
the fields.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "calc.H"
|
#include "calc.H"
|
||||||
#include "fvc.H"
|
#include "surfaceInterpolate.H"
|
||||||
|
#include "fvcAverage.H"
|
||||||
|
|
||||||
|
#include "turbulentTransportModel.H"
|
||||||
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||||
#include "incompressible/RAS/RASModel/RASModel.H"
|
|
||||||
#include "incompressible/LES/LESModel/LESModel.H"
|
|
||||||
#include "fluidThermo.H"
|
|
||||||
#include "compressible/RAS/RASModel/RASModel.H"
|
|
||||||
#include "compressible/LES/LESModel/LESModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
@ -120,10 +118,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"Pe",
|
"Pef",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
),
|
||||||
mag(phi)
|
mag(phi)
|
||||||
/(
|
/(
|
||||||
|
|
@ -151,10 +148,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"Pe",
|
"Pef",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
),
|
||||||
mag(phi)
|
mag(phi)
|
||||||
/(
|
/(
|
||||||
|
|
@ -187,10 +183,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"Pe",
|
"Pef",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
),
|
||||||
mag(phi)
|
mag(phi)
|
||||||
/(
|
/(
|
||||||
|
|
@ -238,10 +233,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"Pe",
|
"Pef",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
),
|
||||||
mag(phi)
|
mag(phi)
|
||||||
/(
|
/(
|
||||||
|
|
@ -280,10 +274,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"Pe",
|
"Pef",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
),
|
||||||
mag(phi)
|
mag(phi)
|
||||||
/(
|
/(
|
||||||
|
|
@ -316,10 +309,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"Pe",
|
"Pef",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
),
|
||||||
mag(phi)
|
mag(phi)
|
||||||
/(
|
/(
|
||||||
|
|
@ -338,19 +330,34 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Pe max : " << max(PePtr()).value() << endl;
|
Info<< " Pe max : " << max(PePtr()).value() << endl;
|
||||||
|
|
||||||
if (writeResults)
|
if (writeResults)
|
||||||
{
|
{
|
||||||
|
Info<< " Writing surfaceScalarField : "
|
||||||
|
<< PePtr().name() << endl;
|
||||||
PePtr().write();
|
PePtr().write();
|
||||||
|
|
||||||
|
volScalarField Pe
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Pe",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
fvc::average(PePtr())
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< " Writing volScalarField : "
|
||||||
|
<< Pe.name() << endl;
|
||||||
|
Pe.write();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< " No phi" << endl;
|
Info<< " No phi" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\nEnd\n" << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue