diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C index a124288dc5..ea10d9129f 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C +++ b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H index 8289d014b0..b94745d9df 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H +++ b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H @@ -14,5 +14,5 @@ IOdictionary mdEquilibrationDict scalar targetTemperature = readScalar ( - mdEquilibrationDict.lookup("equilibrationTargetTemperature") + mdEquilibrationDict.lookup("targetTemperature") ); diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C index 287065754e..9fafafe1c9 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C +++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options index a53061a93c..041d2e0605 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I../buoyantBoussinesqSimpleFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H index e2a89d1441..ece4b8ffe5 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H @@ -2,7 +2,7 @@ volScalarField kappaEff ( "kappaEff", - turbulence->nu() + turbulence->nut()/Prt + turbulence->nu()/Pr + turbulence->nut()/Prt ); fvScalarMatrix TEqn @@ -15,4 +15,6 @@ TEqn.relax(); TEqn.solve(); + + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H index 3b5b5be249..35387f4ff4 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H @@ -1,23 +1,26 @@ // Solve the momentum equation - tmp UEqn + fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) ); - UEqn().relax(); + UEqn.relax(); - solve - ( - UEqn() - == - -fvc::reconstruct + if (momentumPredictor) + { + solve ( + UEqn + == + fvc::reconstruct ( - fvc::snGrad(pd) - - betaghf*fvc::snGrad(T) - ) * mesh.magSf() - ) - ); + ( + fvc::interpolate(rhok)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) + ) + ); + } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C index e3cece5b91..3f0ece93cb 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,26 +72,23 @@ 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" + #include "TEqn.H" // --- PISO loop for (int corr=0; corrcorrect(); - if (runTime.write()) - { -# include "writeAdditionalFields.H" - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H index 5f3f13626d..dde0e38b33 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H @@ -14,13 +14,12 @@ mesh ); - // kinematic pd - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -53,15 +52,25 @@ incompressible::RASModel::New(U, phi, laminarTransport) ); - Info<< "Calculating field beta*(g.h)\n" << endl; - surfaceScalarField betaghf("betagh", beta*(g & mesh.Cf())); - - label pdRefCell = 0; - scalar pdRefValue = 0.0; + label pRefCell = 0; + scalar pRefValue = 0.0; setRefCell ( - pd, - mesh.solutionDict().subDict("SIMPLE"), - pdRefCell, - pdRefValue + p, + mesh.solutionDict().subDict("PISO"), + pRefCell, + pRefValue + ); + + + // Kinematic density for buoyancy force + volScalarField rhok + ( + IOobject + ( + "rhok", + runTime.timeName(), + mesh + ), + 1.0 - beta*(T - TRef) ); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pdEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H similarity index 55% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pdEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H index 25e2a9817f..ff0c26f058 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pdEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H @@ -1,9 +1,8 @@ { - volScalarField rUA("rUA", 1.0/UEqn().A()); + volScalarField rUA("rUA", 1.0/UEqn.A()); surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - U = rUA*UEqn().H(); - UEqn.clear(); + U = rUA*UEqn.H(); surfaceScalarField phiU ( @@ -11,31 +10,31 @@ + fvc::ddtPhiCorr(rUA, U, phi) ); - phi = phiU + betaghf*fvc::snGrad(T)*rUAf*mesh.magSf(); + phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rUAf, pd) == fvc::div(phi) + fvm::laplacian(rUAf, p) == fvc::div(phi) ); if (corr == nCorr-1 && nonOrth == nNonOrthCorr) { - pdEqn.solve(mesh.solver(pd.name() + "Final")); + pEqn.solve(mesh.solver(p.name() + "Final")); } else { - pdEqn.solve(mesh.solver(pd.name())); + pEqn.solve(mesh.solver(p.name())); } if (nonOrth == nNonOrthCorr) { - phi += pdEqn.flux(); + phi -= pEqn.flux(); } } - U -= rUA*fvc::reconstruct((phi - phiU)/rUAf); + U += rUA*fvc::reconstruct((phi - phiU)/rUAf); U.correctBoundaryConditions(); #include "continuityErrs.H" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/readTransportProperties.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/readTransportProperties.H deleted file mode 100644 index 585128dfde..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/readTransportProperties.H +++ /dev/null @@ -1,13 +0,0 @@ - singlePhaseTransportModel laminarTransport(U, phi); - - // thermal expansion coefficient [1/K] - dimensionedScalar beta(laminarTransport.lookup("beta")); - - // reference temperature [K] - dimensionedScalar TRef(laminarTransport.lookup("TRef")); - - // reference kinematic pressure [m2/s2] - dimensionedScalar pRef(laminarTransport.lookup("pRef")); - - // turbulent Prandtl number - dimensionedScalar Prt(laminarTransport.lookup("Prt")); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/writeAdditionalFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/writeAdditionalFields.H deleted file mode 100644 index 20f7c6ae1d..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/writeAdditionalFields.H +++ /dev/null @@ -1,29 +0,0 @@ -{ - volScalarField rhoEff - ( - IOobject - ( - "rhoEff", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - 1.0 - beta*(T - TRef) - ); - rhoEff.write(); - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rhoEff*(g & mesh.C()) + pRef - ); - p.write(); -} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H index d00f0877ea..7452a0495a 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -2,7 +2,7 @@ volScalarField kappaEff ( "kappaEff", - turbulence->nu() + turbulence->nut()/Prt + turbulence->nu()/Pr + turbulence->nut()/Prt ); fvScalarMatrix TEqn @@ -16,4 +16,6 @@ eqnResidual = TEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); + + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H index cf5c4a1978..a813a2d8b7 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -13,12 +13,12 @@ ( UEqn() == - -fvc::reconstruct + fvc::reconstruct ( ( - fvc::snGrad(pd) - - betaghf*fvc::snGrad(T) - ) * mesh.magSf() + fvc::interpolate(rhok)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) ) ).initialResidual(); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index fafb49d848..63b938fa36 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,27 @@ 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(); + p.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "TEqn.H" -# include "pdEqn.H" + #include "UEqn.H" + #include "TEqn.H" + #include "pEqn.H" } turbulence->correct(); - if (runTime.write()) - { -# include "writeAdditionalFields.H" - } + runTime.write(); 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/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H index 5f3f13626d..0e668e9d98 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -14,13 +14,12 @@ mesh ); - // kinematic pd - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -56,12 +55,25 @@ Info<< "Calculating field beta*(g.h)\n" << endl; surfaceScalarField betaghf("betagh", beta*(g & mesh.Cf())); - label pdRefCell = 0; - scalar pdRefValue = 0.0; + label pRefCell = 0; + scalar pRefValue = 0.0; setRefCell ( - pd, + p, mesh.solutionDict().subDict("SIMPLE"), - pdRefCell, - pdRefValue + pRefCell, + pRefValue + ); + + + // Kinematic density for buoyancy force + volScalarField rhok + ( + IOobject + ( + "rhok", + runTime.timeName(), + mesh + ), + 1.0 - beta*(T - TRef) ); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H similarity index 64% rename from applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H index e782d26c8d..e1d42d738e 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H @@ -6,41 +6,42 @@ UEqn.clear(); phi = fvc::interpolate(U) & mesh.Sf(); - adjustPhi(phi, U, pd); - surfaceScalarField buoyancyPhi = -betaghf*fvc::snGrad(T)*rUAf*mesh.magSf(); - phi -= buoyancyPhi; + adjustPhi(phi, U, p); + surfaceScalarField buoyancyPhi = + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); + phi += buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rUAf, pd) == fvc::div(phi) + fvm::laplacian(rUAf, p) == fvc::div(phi) ); - pdEqn.setReference(pdRefCell, pdRefValue); + pEqn.setReference(pRefCell, pRefValue); // retain the residual from the first iteration if (nonOrth == 0) { - eqnResidual = pdEqn.solve().initialResidual(); + eqnResidual = pEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); } else { - pdEqn.solve(); + pEqn.solve(); } if (nonOrth == nNonOrthCorr) { // Calculate the conservative fluxes - phi -= pdEqn.flux(); + phi -= pEqn.flux(); // Explicitly relax pressure for momentum corrector - pd.relax(); + p.relax(); // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U -= rUA*fvc::reconstruct((buoyancyPhi + pdEqn.flux())/rUAf); + U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf); U.correctBoundaryConditions(); } } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H index 585128dfde..82d101d8c1 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H @@ -1,13 +1,13 @@ singlePhaseTransportModel laminarTransport(U, phi); - // thermal expansion coefficient [1/K] + // Thermal expansion coefficient [1/K] dimensionedScalar beta(laminarTransport.lookup("beta")); - // reference temperature [K] + // Reference temperature [K] dimensionedScalar TRef(laminarTransport.lookup("TRef")); - // reference kinematic pressure [m2/s2] - dimensionedScalar pRef(laminarTransport.lookup("pRef")); + // Laminar Prandtl number + dimensionedScalar Pr(laminarTransport.lookup("Pr")); - // turbulent Prandtl number + // Turbulent Prandtl number dimensionedScalar Prt(laminarTransport.lookup("Prt")); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H deleted file mode 100644 index 20f7c6ae1d..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H +++ /dev/null @@ -1,29 +0,0 @@ -{ - volScalarField rhoEff - ( - IOobject - ( - "rhoEff", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - 1.0 - beta*(T - TRef) - ); - rhoEff.write(); - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rhoEff*(g & mesh.C()) + pRef - ); - p.write(); -} diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H index b5c84e435e..b8ac5595e4 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H @@ -65,4 +65,3 @@ dimensionedScalar initialMass = fvc::domainIntegrate(rho); dimensionedScalar totalVolume = sum(mesh.V()); - diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C index 0862d20bb2..c869eff899 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C @@ -41,16 +41,15 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "createRadiationModel.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "createRadiationModel.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -58,17 +57,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(); @@ -79,7 +78,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/utilities/preProcessing/mdInitialise/mdInitialise.C b/applications/utilities/preProcessing/mdInitialise/mdInitialise.C index 2f06531e33..ecd0221957 100644 --- a/applications/utilities/preProcessing/mdInitialise/mdInitialise.C +++ b/applications/utilities/preProcessing/mdInitialise/mdInitialise.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/preProcessing/mdInitialise/molConfig_old/Make/files b/applications/utilities/preProcessing/mdInitialise/molConfig_old/Make/files deleted file mode 100755 index 6501e68426..0000000000 --- a/applications/utilities/preProcessing/mdInitialise/molConfig_old/Make/files +++ /dev/null @@ -1,8 +0,0 @@ -latticeStructures = latticeStructures -velocityDistributions = velocityDistributions - -createMolecules.C -molConfig.C -genMolConfig.C - -EXE = $(FOAM_APPBIN)/molConfig diff --git a/applications/utilities/preProcessing/mdInitialise/molConfig_old/Make/options b/applications/utilities/preProcessing/mdInitialise/molConfig_old/Make/options deleted file mode 100755 index aab9a2ca4f..0000000000 --- a/applications/utilities/preProcessing/mdInitialise/molConfig_old/Make/options +++ /dev/null @@ -1,17 +0,0 @@ -EXE_INC = \ - -I$(latticeStructures) \ - -I$(velocityDistributions) \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/lagrangian/molecularDynamics/molecule/lnInclude \ - -I$(LIB_SRC)/lagrangian/molecularDynamics/potential/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lmeshTools \ - -ldynamicMesh \ - -lfiniteVolume \ - -llagrangian \ - -lmolecule \ - -lpotential diff --git a/applications/utilities/preProcessing/mdInitialise/molConfig_old/correctVelocities.H b/applications/utilities/preProcessing/mdInitialise/molConfig_old/correctVelocities.H deleted file mode 100644 index 0c69f15c7c..0000000000 --- a/applications/utilities/preProcessing/mdInitialise/molConfig_old/correctVelocities.H +++ /dev/null @@ -1,21 +0,0 @@ -for (molN = totalMols; molN < totalMols + totalZoneMols; molN++) -{ - - // Remove bulk momentum introduced by random numbers and add - // desired bulk velocity - - // For systems with molecules of significantly differing masses, this may - // need to be an iterative process or employ a better algorithm for - // removing an appropriate share of the excess momentum from each molecule. - - initialVelocities(molN) += bulkVelocity - momentumSum/totalZoneMols/mass; -} - -// momentumSum = vector::zero; -// -// for (molN = totalMols; molN < totalMols + totalZoneMols; molN++) -// { -// momentumSum += mass*initialVelocities(molN); -// } -// -// Info << "Check momentum adjustment: " << momentumSum << endl; diff --git a/applications/utilities/preProcessing/mdInitialise/molConfig_old/createMolecules.C b/applications/utilities/preProcessing/mdInitialise/molConfig_old/createMolecules.C deleted file mode 100644 index dbb0f680ce..0000000000 --- a/applications/utilities/preProcessing/mdInitialise/molConfig_old/createMolecules.C +++ /dev/null @@ -1,253 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*----------------------------------------------------------------------------*/ - -#include "molConfig.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -void Foam::molConfig::createMolecules() -{ - Info<< nl << "Creating molecules from zone specifications\n" << endl; - - DynamicList initialPositions(0); - - DynamicList