diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C index ca4e0dcb584b61420b431965e32823ea11e8dd1a..891befab216900e04a1ec5e1c9666182b80d472d 100644 --- a/applications/solvers/DNS/dnsFoam/dnsFoam.C +++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C @@ -41,17 +41,16 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMeshNoClear.H" + #include "readTransportProperties.H" + #include "createFields.H" + #include "readTurbulenceProperties.H" + #include "initContinuityErrs.H" -# include "createTime.H" -# include "createMeshNoClear.H" -# include "readTransportProperties.H" -# include "createFields.H" -# include "readTurbulenceProperties.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< nl << "Starting time loop" << endl; @@ -59,7 +58,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" + #include "readPISOControls.H" force.internalField() = ReImSum ( @@ -69,12 +68,12 @@ int main(int argc, char *argv[]) ) ); -# include "globalProperties.H" + #include "globalProperties.H" fvVectorMatrix UEqn ( - fvm::ddt(U) - + fvm::div(phi, U) + fvm::ddt(U) + + fvm::div(phi, U) - fvm::laplacian(nu, U) == force @@ -90,7 +89,7 @@ int main(int argc, char *argv[]) volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); - phi = (fvc::interpolate(U) & mesh.Sf()) + phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, U, phi); fvScalarMatrix pEqn @@ -102,7 +101,7 @@ int main(int argc, char *argv[]) phi -= pEqn.flux(); -# include "continuityErrs.H" + #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index daeed4ebf086e874af5251c7101bcba8e20de81b..58bea3ed998e6951352a8be4943088bb4a66ec99 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -77,7 +77,6 @@ int main(int argc, char *argv[]) #include "readCombustionProperties.H" #include "readEnvironmentalProperties.H" #include "createFields.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "CourantNo.H" diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index cb7f7d2f959a4542ea5462e3943b05c52bbe37bc..13a464a7550a5907d680772c21f565537eb37f2c 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -61,50 +61,49 @@ Description int main(int argc, char *argv[]) { -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "readCombustionProperties.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" + #include "setRootCase.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "createTime.H" + #include "createMesh.H" + #include "readCombustionProperties.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readTimeControls.H" -# include "readPISOControls.H" -# include "compressibleCourantNo.H" -# include "setDeltaT.H" + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; -# include "rhoEqn.H" -# include "UEqn.H" + #include "rhoEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { -# include "ftEqn.H" -# include "bEqn.H" -# include "huEqn.H" -# include "hEqn.H" + #include "ftEqn.H" + #include "bEqn.H" + #include "huEqn.H" + #include "hEqn.H" if (!ign.ignited()) { hu == h; } -# include "pEqn.H" + #include "pEqn.H" } turbulence->correct(); diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index 33a8ea6f5d64deeca30d0c2805a81341e35175fa..9adf73cc67c167a7cbbee0474c461aea7afdafb8 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -67,7 +67,6 @@ int main(int argc, char *argv[]) #include "createEngineTime.H" #include "createEngineMesh.H" - #include "readPISOControls.H" #include "readCombustionProperties.H" #include "createFields.H" #include "initContinuityErrs.H" diff --git a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C index 2d9cccd29e6515482f043586d98217c606a8830c..cd462c28ab0efd926645aede91b206a5fcd423a1 100644 --- a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C +++ b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C @@ -43,14 +43,13 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C index fbc27d884603ac2c9c80a702d0c7dc9286bd6211..10bfeb61db53b4769d3cfd5b006a12ba587fa4fb 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C @@ -40,14 +40,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -55,17 +54,17 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" -# include "initConvergenceCheck.H" + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" p.storePrevIter(); rho.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "hEqn.H" -# include "pEqn.H" + #include "UEqn.H" + #include "hEqn.H" + #include "pEqn.H" } turbulence->correct(); @@ -75,7 +74,7 @@ int main(int argc, char *argv[]) << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C b/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C index 7cd692b71dce38874e8e4a4555e8e0a449df8390..3d71de6324737b321553dd0945566e76e39372d8 100644 --- a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C +++ b/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C @@ -42,14 +42,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readThermodynamicProperties.H" + #include "createFields.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -57,10 +56,10 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.value() << nl << endl; -# include "readPISOControls.H" + #include "readPISOControls.H" scalar HbyAblend = readScalar(piso.lookup("HbyAblend")); -# include "readTimeControls.H" + #include "readTimeControls.H" scalar CoNum = max ( @@ -70,7 +69,7 @@ int main(int argc, char *argv[]) Info<< "Max Courant Number = " << CoNum << endl; -# include "setDeltaT.H" + #include "setDeltaT.H" for (int outerCorr=0; outerCorr<nOuterCorr; outerCorr++) { @@ -145,9 +144,9 @@ int main(int argc, char *argv[]) phi -= phiGradp; -# include "resetPhiPatches.H" + #include "resetPhiPatches.H" - surfaceScalarField rhof = + surfaceScalarField rhof = mvConvection.interpolationScheme()()(rho)() .interpolate(rho); @@ -165,7 +164,7 @@ int main(int argc, char *argv[]) phi += phiGradp + pEqn.flux(); rho = psi*p; - rhof = + rhof = mvConvection.interpolationScheme()()(rho)() .interpolate(rho); phiv = phi/rhof; diff --git a/applications/solvers/compressible/sonicDyMFoam/createFields.H b/applications/solvers/compressible/sonicDyMFoam/createFields.H index bbb5d105269512474d7753bb93ef97affda1e8cc..93dac20e076c44a31a4848b83987429bafa87b1d 100644 --- a/applications/solvers/compressible/sonicDyMFoam/createFields.H +++ b/applications/solvers/compressible/sonicDyMFoam/createFields.H @@ -7,7 +7,7 @@ basicPsiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); + volScalarField& e = thermo.h(); const volScalarField& psi = thermo.psi(); volScalarField rho diff --git a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C index d86e41913e94044061c9084c219c934c2df3c63a..cef51b6c58392cb7ebe33657b93784ffc1eb8675 100644 --- a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) solve(UEqn == -fvc::grad(p)); - #include "hEqn.H" + #include "eEqn.H" // --- PISO loop diff --git a/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C b/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C index ff0b3ad21a0ac248b21e9f4a6926c3e836a1c684..e2a3f3ea39575daa252841621d8fa7e262106aaf 100644 --- a/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C +++ b/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C @@ -36,14 +36,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting iteration loop\n" << endl; diff --git a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C index d89b636d04392ffff0dae5344587421aec0278c1..f09b35efc97f93eac30fda4fdf212a436eedd22d 100644 --- a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C +++ b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C @@ -26,7 +26,7 @@ Application mhdFoam Description - Solver for magnetohydrodynamics (MHD): incompressible, laminar flow of a + Solver for magnetohydrodynamics (MHD): incompressible, laminar flow of a conducting fluid under the influence of a magnetic field. An applied magnetic field H acts as a driving force, @@ -58,27 +58,25 @@ 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<< nl << "Starting time loop" << endl; while (runTime.loop()) { -# include "readPISOControls.H" -# include "readBPISOControls.H" + #include "readPISOControls.H" + #include "readBPISOControls.H" Info<< "Time = " << runTime.timeName() << nl << endl; -# include "CourantNo.H" + #include "CourantNo.H" { fvVectorMatrix UEqn @@ -101,7 +99,7 @@ int main(int argc, char *argv[]) U = rUA*UEqn.H(); - phi = (fvc::interpolate(U) & mesh.Sf()) + phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, U, phi); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -120,7 +118,7 @@ int main(int argc, char *argv[]) } } -# include "continuityErrs.H" + #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); @@ -154,7 +152,7 @@ int main(int argc, char *argv[]) phiB -= pBEqn.flux(); -# include "magneticFieldErr.H" + #include "magneticFieldErr.H" } runTime.write(); diff --git a/applications/solvers/financial/financialFoam/financialFoam.C b/applications/solvers/financial/financialFoam/financialFoam.C index 86c18e2ac44a516d05f2ce0a9a5a8aaa49ff01e4..4bbb74e95f28bf9dcf176180f06f6cf12a4ae27a 100644 --- a/applications/solvers/financial/financialFoam/financialFoam.C +++ b/applications/solvers/financial/financialFoam/financialFoam.C @@ -38,14 +38,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -#include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" -#include "createTime.H" -#include "createMesh.H" -#include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< nl << "Calculating value(price of comodities)" << endl; diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C index e3cece5b91f321694941d087e194fb3b07dec430..067ae6a992487e9e1c2d113e1e330b4aa306db30 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C @@ -54,18 +54,17 @@ Description int main(int argc, char *argv[]) { - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "CourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -73,25 +72,25 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readTimeControls.H" -# include "readPISOControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" -# include "UEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=0; corr<nCorr; corr++) { -# include "TEqn.H" -# include "pdEqn.H" + #include "TEqn.H" + #include "pdEqn.H" } turbulence->correct(); if (runTime.write()) { -# include "writeAdditionalFields.H" + #include "writeAdditionalFields.H" } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index fafb49d84846c8ab4505a3770bfd9fc55d90dd89..58947fe295498057e57fb51c557a5782b8f2ef9e 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -54,15 +54,14 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -70,30 +69,30 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" -# include "initConvergenceCheck.H" + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" pd.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "TEqn.H" -# include "pdEqn.H" + #include "UEqn.H" + #include "TEqn.H" + #include "pdEqn.H" } turbulence->correct(); if (runTime.write()) { -# include "writeAdditionalFields.H" + #include "writeAdditionalFields.H" } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index ab10aab8d47e9359e9ca395e28d2315aef190f62..2ee69c120e09b41acb0edb4f9e8f6a736cd0d783 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -47,14 +47,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/incompressible/icoFoam/icoFoam.C b/applications/solvers/incompressible/icoFoam/icoFoam.C index 9ac6bd4fa6fcacb849ab033471623d499e978b52..fef690f831a08a6db3da3c936caa96c35ac5c445 100644 --- a/applications/solvers/incompressible/icoFoam/icoFoam.C +++ b/applications/solvers/incompressible/icoFoam/icoFoam.C @@ -36,15 +36,14 @@ 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; @@ -52,8 +51,8 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" -# include "CourantNo.H" + #include "readPISOControls.H" + #include "CourantNo.H" fvVectorMatrix UEqn ( @@ -92,7 +91,7 @@ int main(int argc, char *argv[]) } } -# include "continuityErrs.H" + #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C index c5d2b0576c6e2acd547a1d2abf6bd94cf249964d..fb7ff1c8904c263cabb3a8dfcdb39266cbefb45d 100644 --- a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C +++ b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C @@ -37,15 +37,14 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMeshNoClear.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "createTime.H" -# include "createMeshNoClear.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -53,8 +52,8 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" -# include "CourantNo.H" + #include "readPISOControls.H" + #include "CourantNo.H" fluid.correct(); @@ -95,7 +94,7 @@ int main(int argc, char *argv[]) } } -# include "continuityErrs.H" + #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C index 66692cc4a854491f4d6339ccce0e4ab11e194e25..a9bcb42b451303ce7ea2c541a0eddde2f228da76 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C @@ -42,29 +42,28 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createDynamicFvMesh.H" + #include "readPIMPLEControls.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "readTimeControls.H" -# include "createTime.H" -# include "createDynamicFvMesh.H" -# include "readPIMPLEControls.H" -# include "initContinuityErrs.H" -# include "createFields.H" -# include "readTimeControls.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readControls.H" -# include "CourantNo.H" + #include "readControls.H" + #include "CourantNo.H" // Make the fluxes absolute fvc::makeAbsolute(phi, U); -# include "setDeltaT.H" + #include "setDeltaT.H" runTime++; @@ -74,7 +73,7 @@ int main(int argc, char *argv[]) if (mesh.changing() && correctPhi) { -# include "correctPhi.H" + #include "correctPhi.H" } // Make the fluxes relative to the mesh motion @@ -82,7 +81,7 @@ int main(int argc, char *argv[]) if (mesh.changing() && checkMeshCourantNo) { -# include "meshCourantNo.H" + #include "meshCourantNo.H" } // --- PIMPLE loop @@ -93,7 +92,7 @@ int main(int argc, char *argv[]) p.storePrevIter(); } -# include "UEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=0; corr<nCorr; corr++) @@ -138,7 +137,7 @@ int main(int argc, char *argv[]) } } -# include "continuityErrs.H" + #include "continuityErrs.H" // Explicitly relax pressure for momentum corrector if (ocorr != nOuterCorr-1) diff --git a/applications/solvers/incompressible/simpleFoam/simpleFoam.C b/applications/solvers/incompressible/simpleFoam/simpleFoam.C index b5ac02c563c533dfb80b50e4afb1cab762f1b59d..4828bd507f61a4dc8a6c40932b2607e7e19b5d46 100644 --- a/applications/solvers/incompressible/simpleFoam/simpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/simpleFoam.C @@ -38,14 +38,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -53,15 +52,15 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" -# include "initConvergenceCheck.H" + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" p.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "pEqn.H" + #include "UEqn.H" + #include "pEqn.H" } turbulence->correct(); @@ -72,7 +71,7 @@ int main(int argc, char *argv[]) << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 9abc94a829723b9e1db1d27fe30fd34569e9a5b3..0791c2e3583ccfc940772b2fc0f78bec15be0aca 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -55,7 +55,6 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "createClouds.H" #include "createRadiationModel.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index 3db0d3827dc6bcd9ecbcac2541de7e97d576ef81..c7e4fee7b6d08106bf2e132a49ede475a65cc27d 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -61,7 +61,6 @@ int main(int argc, char *argv[]) #include "createClouds.H" #include "createMulticomponentPointSources.H" #include "createPorousZones.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index f60de4a3690648beffdbd72e14e1077c1902180b..8c26cb652829a95fb6a9e74733c9759798a9d345 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -53,7 +53,6 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "createClouds.H" #include "createRadiationModel.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C index 4574ef7f1c5cc46bf4ddbee646b4f8ed4eb9e003..e7f432d29d8f25b3ddb8837309c371ddbe5435ee 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C @@ -43,17 +43,16 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readMechanicalProperties.H" + #include "readThermalProperties.H" + #include "readSolidDisplacementFoamControls.H" + #include "createFields.H" -# include "createTime.H" -# include "createMesh.H" -# include "readMechanicalProperties.H" -# include "readThermalProperties.H" -# include "readSolidDisplacementFoamControls.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nCalculating displacement field\n" << endl; @@ -61,7 +60,7 @@ int main(int argc, char *argv[]) { Info<< "Iteration: " << runTime.value() << nl << endl; -# include "readSolidDisplacementFoamControls.H" + #include "readSolidDisplacementFoamControls.H" int iCorr = 0; scalar initialResidual = 0; @@ -91,7 +90,7 @@ int main(int argc, char *argv[]) const volScalarField& T = Tptr(); DEqn += fvc::grad(threeKalpha*T); } - + //DEqn.setComponentReference(1, 0, vector::X, 0); //DEqn.setComponentReference(1, 0, vector::Z, 0); @@ -123,7 +122,7 @@ int main(int argc, char *argv[]) } while (initialResidual > convergenceTolerance && ++iCorr < nCorr); -# include "calculateStress.H" + #include "calculateStress.H" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s"