From 88af0f59d9731d27429bbc48552e384b76b41b5d Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 12 May 2008 17:38:47 +0100 Subject: [PATCH] Removed averaging (now in function objects) --- .../DNSandLES/channelOodles/channelOodles.C | 37 +++++++------------ .../solvers/DNSandLES/coodles/coodles.C | 26 ++++++------- .../solvers/DNSandLES/oodles/oodles.C | 2 - .../solvers/combustion/Xoodles/Xoodles.C | 2 - 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/applications/solvers/DNSandLES/channelOodles/channelOodles.C b/applications/solvers/DNSandLES/channelOodles/channelOodles.C index 22d39a83f4..b4b73741fc 100644 --- a/applications/solvers/DNSandLES/channelOodles/channelOodles.C +++ b/applications/solvers/DNSandLES/channelOodles/channelOodles.C @@ -41,17 +41,13 @@ Description int main(int argc, char *argv[]) { - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readTransportProperties.H" -# include "createFields.H" -# include "createAverages.H" -# include "initContinuityErrs.H" -# include "createGradP.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readTransportProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "createGradP.H" Info<< "\nStarting time loop\n" << endl; @@ -59,9 +55,9 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" + #include "readPISOControls.H" -# include "CourantNo.H" + #include "CourantNo.H" sgsModel->correct(); @@ -116,7 +112,7 @@ int main(int argc, char *argv[]) } } -# include "continuityErrs.H" + #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); @@ -126,12 +122,12 @@ int main(int argc, char *argv[]) // Correct driving force for a constant mass flow rate // Extract the velocity in the flow direction - dimensionedScalar magUbarStar = + dimensionedScalar magUbarStar = (flowDirection & U)().weightedAverage(mesh.V()); - // Calculate the pressure gradient increment needed to + // Calculate the pressure gradient increment needed to // adjust the average flow-rate to the correct value - dimensionedScalar gragPplus = + dimensionedScalar gragPplus = (magUbar - magUbarStar)/rUA.weightedAverage(mesh.V()); U += flowDirection*rUA*gragPplus; @@ -141,14 +137,9 @@ int main(int argc, char *argv[]) Info<< "Uncorrected Ubar = " << magUbarStar.value() << tab << "pressure gradient = " << gradP.value() << endl; - -# include "calculateAverages.H" - runTime.write(); -# include "writeNaveragingSteps.H" - -# include "writeGradP.H" + #include "writeGradP.H" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/DNSandLES/coodles/coodles.C b/applications/solvers/DNSandLES/coodles/coodles.C index 5d2e02caf4..a8bc87061e 100644 --- a/applications/solvers/DNSandLES/coodles/coodles.C +++ b/applications/solvers/DNSandLES/coodles/coodles.C @@ -26,6 +26,7 @@ Application coodles Description + Compressible LES solver. \*---------------------------------------------------------------------------*/ @@ -39,15 +40,12 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" Info<< "\nStarting time loop\n" << endl; @@ -55,17 +53,17 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" -# include "compressibleCourantNo.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" -# include "rhoEqn.H" -# include "UEqn.H" + #include "rhoEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { -# include "hEqn.H" -# include "pEqn.H" + #include "hEqn.H" + #include "pEqn.H" } turbulence->correct(); diff --git a/applications/solvers/DNSandLES/oodles/oodles.C b/applications/solvers/DNSandLES/oodles/oodles.C index c2afbe56d1..883eefe9e6 100644 --- a/applications/solvers/DNSandLES/oodles/oodles.C +++ b/applications/solvers/DNSandLES/oodles/oodles.C @@ -48,8 +48,6 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "initContinuityErrs.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< "\nStarting time loop\n" << endl; for (runTime++; !runTime.end(); runTime++) diff --git a/applications/solvers/combustion/Xoodles/Xoodles.C b/applications/solvers/combustion/Xoodles/Xoodles.C index b2562f991a..8da304cf84 100644 --- a/applications/solvers/combustion/Xoodles/Xoodles.C +++ b/applications/solvers/combustion/Xoodles/Xoodles.C @@ -74,8 +74,6 @@ int main(int argc, char *argv[]) #include "readCombustionProperties.H" #include "initContinuityErrs.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< "\nStarting time loop\n" << endl; for (runTime++; !runTime.end(); runTime++)