mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Adjust some utilities to use postCalc wrapper or timeSelector directly.
When required, also adjusted to use XXXApp.C for the source name. Adjusted some names in preparation for merge with master.
This commit is contained in:
@ -1,25 +0,0 @@
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
autoPtr<transportModel> laminarTransport
|
||||
(
|
||||
transportModel::New(U, phi)
|
||||
);
|
||||
|
||||
autoPtr<turbulenceModel> turbulence
|
||||
(
|
||||
turbulenceModel::New(U, phi, laminarTransport())
|
||||
);
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
wallGradU
|
||||
wallGradU
|
||||
|
||||
Description
|
||||
Calculates and writes the gradient of U at the wall
|
||||
@ -33,31 +33,19 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "incompressible/turbulenceModel/turbulenceModel.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "addTimeOptions.H"
|
||||
# include "setRootCase.H"
|
||||
|
||||
timeSelector::addOptions();
|
||||
#include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
// Get times list
|
||||
instantList Times = runTime.times();
|
||||
|
||||
// set startTime and endTime depending on -time and -latestTime options
|
||||
# include "checkTimeOptions.H"
|
||||
|
||||
runTime.setTime(Times[startTime], startTime);
|
||||
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
|
||||
for (label i=startTime; i<endTime; i++)
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
runTime.setTime(Times[i], i);
|
||||
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
|
||||
IOobject Uheader
|
||||
@ -113,7 +101,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "End" << endl;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -41,32 +41,21 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "addTimeOptions.H"
|
||||
# include "setRootCase.H"
|
||||
timeSelector::addOptions();
|
||||
#include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
// Get times list
|
||||
instantList Times = runTime.times();
|
||||
|
||||
// set startTime and endTime depending on -time and -latestTime options
|
||||
# include "checkTimeOptions.H"
|
||||
|
||||
runTime.setTime(Times[startTime], startTime);
|
||||
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
|
||||
for (label i=startTime; i<endTime; i++)
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
runTime.setTime(Times[i], i);
|
||||
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
|
||||
mesh.readUpdate();
|
||||
|
||||
# include "createFields.H"
|
||||
|
||||
surfaceScalarField heatFlux =
|
||||
surfaceScalarField heatFlux =
|
||||
fvc::interpolate(turbulence->alphaEff())*fvc::snGrad(h);
|
||||
|
||||
const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
|
||||
@ -83,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
mesh.magSf().boundaryField()[patchi]
|
||||
*patchHeatFlux[patchi]
|
||||
)
|
||||
)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
@ -111,8 +100,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "End" << endl;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -26,8 +26,7 @@ Application
|
||||
wallShearStress
|
||||
|
||||
Description
|
||||
Calculates and writes the wall shear stress for the current
|
||||
time step.
|
||||
Calculates and writes the wall shear stress, for the specified times.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -35,33 +34,20 @@ Description
|
||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||
#include "incompressible/turbulenceModel/turbulenceModel.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "addTimeOptions.H"
|
||||
# include "setRootCase.H"
|
||||
|
||||
timeSelector::addOptions();
|
||||
#include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
// Get times list
|
||||
instantList Times = runTime.times();
|
||||
|
||||
// set startTime and endTime depending on -time and -latestTime options
|
||||
# include "checkTimeOptions.H"
|
||||
|
||||
runTime.setTime(Times[startTime], startTime);
|
||||
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
|
||||
for (label i=startTime; i<endTime; i++)
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
runTime.setTime(Times[i], i);
|
||||
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
|
||||
mesh.readUpdate();
|
||||
|
||||
# include "createFields.H"
|
||||
@ -101,7 +87,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "End" << endl;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ Application
|
||||
yPlusLES
|
||||
|
||||
Description
|
||||
Calculates and reports yPlus for all wall patches, for each time.
|
||||
Calculates and reports yPlus for all wall patches, for the specified times.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -39,27 +39,16 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "addTimeOptions.H"
|
||||
timeSelector::addOptions();
|
||||
#include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
|
||||
#include "createTime.H"
|
||||
|
||||
// Get times list
|
||||
instantList Times = runTime.times();
|
||||
|
||||
// set startTime and endTime depending on -time and -latestTime options
|
||||
#include "checkTimeOptions.H"
|
||||
|
||||
runTime.setTime(Times[startTime], startTime);
|
||||
|
||||
#include "createMesh.H"
|
||||
|
||||
for (label i=startTime; i<endTime; i++)
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
runTime.setTime(Times[i], i);
|
||||
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
|
||||
mesh.readUpdate();
|
||||
|
||||
volScalarField yPlus
|
||||
@ -90,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
# include "createPhi.H"
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
@ -121,8 +110,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Patch " << patchi
|
||||
<< " named " << currPatch.name()
|
||||
<< " y+ : min: " << min(Yp) << " max: " << max(Yp)
|
||||
<< " average: " << average(Yp) << nl << endl;
|
||||
<< " y+ : min: " << min(yPlus) << " max: " << max(yPlus)
|
||||
<< " average: " << average(yPlus) << nl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,7 +120,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
checkYPlus.C
|
||||
yPlusRAS.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/checkYPlus
|
||||
EXE = $(FOAM_APPBIN)/yPlusRAS
|
||||
|
||||
@ -26,7 +26,7 @@ Application
|
||||
yPlusRAS
|
||||
|
||||
Description
|
||||
Calculates and reports yPlus for all wall patches, for each time.
|
||||
Calculates and reports yPlus for all wall patches, for the specified times.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -39,27 +39,16 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "addTimeOptions.H"
|
||||
timeSelector::addOptions();
|
||||
#include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
|
||||
#include "createTime.H"
|
||||
|
||||
// Get times list
|
||||
instantList Times = runTime.times();
|
||||
|
||||
// set startTime and endTime depending on -time and -latestTime options
|
||||
#include "checkTimeOptions.H"
|
||||
|
||||
runTime.setTime(Times[startTime], startTime);
|
||||
|
||||
#include "createMesh.H"
|
||||
|
||||
for (label i=startTime; i<endTime; i++)
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
runTime.setTime(Times[i], i);
|
||||
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
|
||||
mesh.readUpdate();
|
||||
|
||||
volScalarField yPlus
|
||||
@ -90,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
# include "createPhi.H"
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
@ -122,8 +111,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user