diff --git a/applications/solvers/basic/scalarTransportFoam/Make/options b/applications/solvers/basic/scalarTransportFoam/Make/options index e6fbbb8000..51402dfc99 100644 --- a/applications/solvers/basic/scalarTransportFoam/Make/options +++ b/applications/solvers/basic/scalarTransportFoam/Make/options @@ -1,11 +1,11 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lmeshTools \ -lsampling diff --git a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C index deae96ea02..3539ad3e30 100644 --- a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C +++ b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" simpleControl simple(mesh); @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) + fvm::div(phi, T) - fvm::laplacian(DT, T) == - sources(T) + fvOptions(T) ); } diff --git a/applications/solvers/combustion/XiFoam/EaEqn.H b/applications/solvers/combustion/XiFoam/EaEqn.H index 2565e3f9e3..c6cc5efc51 100644 --- a/applications/solvers/combustion/XiFoam/EaEqn.H +++ b/applications/solvers/combustion/XiFoam/EaEqn.H @@ -16,16 +16,16 @@ : -dpdt ) - fvm::laplacian(turbulence->alphaEff(), hea) - + sources(rho, hea) + + fvOptions(rho, hea) ); EaEqn.relax(); - sources.constrain(EaEqn); + fvOptions.constrain(EaEqn); EaEqn.solve(); - sources.correct(hea); + fvOptions.correct(hea); thermo.correct(); } diff --git a/applications/solvers/combustion/XiFoam/EauEqn.H b/applications/solvers/combustion/XiFoam/EauEqn.H index 092cdc2a6d..dd4c455518 100644 --- a/applications/solvers/combustion/XiFoam/EauEqn.H +++ b/applications/solvers/combustion/XiFoam/EauEqn.H @@ -25,12 +25,12 @@ if (ign.ignited()) //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau) == - sources(rho, heau) + fvOptions(rho, heau) ); - sources.constrain(heauEqn); + fvOptions.constrain(heauEqn); heauEqn.solve(); - sources.correct(heau); + fvOptions.correct(heau); } diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index fdebdc8ce8..468cc1919b 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude\ -I$(LIB_SRC)/engine/lnInclude \ @@ -12,7 +12,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lsampling \ -lmeshTools \ -lengine \ diff --git a/applications/solvers/combustion/XiFoam/UEqn.H b/applications/solvers/combustion/XiFoam/UEqn.H index 95f10bfcc9..60c2a8a71f 100644 --- a/applications/solvers/combustion/XiFoam/UEqn.H +++ b/applications/solvers/combustion/XiFoam/UEqn.H @@ -5,17 +5,17 @@ + turbulence->divDevRhoReff(U) == rho*g - + sources(rho, U) + + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index bebbd49266..84fac04820 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Description #include "ignition.H" #include "Switch.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) #include "readCombustionProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H index e10be7b6df..2c6000afd8 100644 --- a/applications/solvers/combustion/XiFoam/bEqn.H +++ b/applications/solvers/combustion/XiFoam/bEqn.H @@ -54,7 +54,7 @@ if (ign.ignited()) - fvm::Sp(fvc::div(phiSt), b) - fvm::laplacian(turbulence->alphaEff(), b) == - sources(rho, b) + fvOptions(rho, b) ); @@ -67,11 +67,11 @@ if (ign.ignited()) // ~~~~~~~~~~~ bEqn.relax(); - sources.constrain(bEqn); + fvOptions.constrain(bEqn); bEqn.solve(); - sources.correct(b); + fvOptions.correct(b); Info<< "min(b) = " << min(b).value() << endl; @@ -160,16 +160,16 @@ if (ign.ignited()) == - fvm::SuSp(-rho*Rc*Su0/Su, Su) - fvm::SuSp(rho*(sigmas + Rc), Su) - + sources(rho, Su) + + fvOptions(rho, Su) ); SuEqn.relax(); - sources.constrain(SuEqn); + fvOptions.constrain(SuEqn); SuEqn.solve(); - sources.correct(Su); + fvOptions.correct(Su); // Limit the maximum Su // ~~~~~~~~~~~~~~~~~~~~ @@ -247,16 +247,16 @@ if (ign.ignited()) ), Xi ) - + sources(rho, Xi) + + fvOptions(rho, Xi) ); XiEqn.relax(); - sources.constrain(XiEqn); + fvOptions.constrain(XiEqn); XiEqn.solve(); - sources.correct(Xi); + fvOptions.correct(Xi); // Correct boundedness of Xi // ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/applications/solvers/combustion/XiFoam/ftEqn.H b/applications/solvers/combustion/XiFoam/ftEqn.H index 013e8b3180..87bfaa9790 100644 --- a/applications/solvers/combustion/XiFoam/ftEqn.H +++ b/applications/solvers/combustion/XiFoam/ftEqn.H @@ -19,12 +19,12 @@ if (composition.contains("ft")) + mvConvection->fvmDiv(phi, ft) - fvm::laplacian(turbulence->alphaEff(), ft) == - sources(rho, ft) + fvOptions(rho, ft) ); - sources.constrain(ftEqn); + fvOptions.constrain(ftEqn); ftEqn.solve(); - sources.correct(ft); + fvOptions.correct(ft); } diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H index b5a6d173fb..76cfbc4658 100644 --- a/applications/solvers/combustion/XiFoam/pEqn.H +++ b/applications/solvers/combustion/XiFoam/pEqn.H @@ -16,7 +16,7 @@ if (pimple.transonic()) ) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); while (pimple.correctNonOrthogonal()) { @@ -26,10 +26,10 @@ if (pimple.transonic()) + fvm::div(phid, p) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -51,7 +51,7 @@ else ) ); - sources.relativeFlux(phiHbyA); + fvOptions.relativeFlux(phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -61,10 +61,10 @@ else + fvc::div(phiHbyA) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -80,7 +80,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options index 2eaea744b0..d688fb1e2d 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -10,7 +10,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude + -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lengine \ @@ -21,4 +21,4 @@ EXE_LIBS = \ -lspecie \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources + -lfvOptions diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index 3b229ded14..bd5e2c3b99 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "psiThermo.H" #include "turbulenceModel.H" #include "OFstream.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) #include "createEngineTime.H" #include "createEngineMesh.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readEngineTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/combustion/engineFoam/Make/options b/applications/solvers/combustion/engineFoam/Make/options index c7b3219f2d..fcbc3a4206 100644 --- a/applications/solvers/combustion/engineFoam/Make/options +++ b/applications/solvers/combustion/engineFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I$(FOAM_SOLVERS)/combustion/XiFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/engine/lnInclude \ @@ -13,7 +13,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lsampling \ -lmeshTools \ -lengine \ diff --git a/applications/solvers/combustion/engineFoam/UEqn.H b/applications/solvers/combustion/engineFoam/UEqn.H index a8b0207225..d35e71101c 100644 --- a/applications/solvers/combustion/engineFoam/UEqn.H +++ b/applications/solvers/combustion/engineFoam/UEqn.H @@ -4,13 +4,13 @@ + fvm::div(phi, U) + turbulence->divDevRhoReff(U) == - sources(rho, U) + fvOptions(rho, U) ); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index f11f677398..592abbd3e6 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,7 +59,7 @@ Description #include "OFstream.H" #include "mathematicalConstants.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) #include "createEngineMesh.H" #include "readCombustionProperties.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readEngineTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/combustion/engineFoam/pEqn.H b/applications/solvers/combustion/engineFoam/pEqn.H index b38d6dbf4b..6bb80b1eaf 100644 --- a/applications/solvers/combustion/engineFoam/pEqn.H +++ b/applications/solvers/combustion/engineFoam/pEqn.H @@ -13,7 +13,7 @@ if (pimple.transonic()) *((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U)) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); while (pimple.correctNonOrthogonal()) { @@ -23,10 +23,10 @@ if (pimple.transonic()) + fvm::div(phid, p) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -45,7 +45,7 @@ else *((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U)) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -55,10 +55,10 @@ else + fvc::div(phiHbyA) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -74,7 +74,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index 73804d8283..c243c07e3d 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ @@ -31,7 +31,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lmeshTools \ -lsampling \ -lcompressibleRASModels \ diff --git a/applications/solvers/combustion/fireFoam/UEqn.H b/applications/solvers/combustion/fireFoam/UEqn.H index 81d90bd695..205eb09156 100644 --- a/applications/solvers/combustion/fireFoam/UEqn.H +++ b/applications/solvers/combustion/fireFoam/UEqn.H @@ -5,12 +5,12 @@ + turbulence->divDevRhoReff(U) == parcels.SU(U) - + sources(rho, U) + + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -27,6 +27,6 @@ ) ); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/fireFoam/YEEqn.H b/applications/solvers/combustion/fireFoam/YEEqn.H index 358e4953d1..da485e7305 100644 --- a/applications/solvers/combustion/fireFoam/YEEqn.H +++ b/applications/solvers/combustion/fireFoam/YEEqn.H @@ -30,16 +30,16 @@ tmp > mvConvection parcels.SYi(i, Yi) + surfaceFilm.Srho(i) + combustion->R(Yi) - + sources(rho, Yi) + + fvOptions(rho, Yi) ); YiEqn.relax(); - sources.constrain(YiEqn); + fvOptions.constrain(YiEqn); YiEqn.solve(mesh.solver("Yi")); - sources.correct(Yi); + fvOptions.correct(Yi); Yi.max(0.0); Yt += Yi; @@ -75,16 +75,16 @@ tmp > mvConvection + radiation->Sh(thermo) + parcels.Sh(he) + surfaceFilm.Sh() - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index afe1b815e5..14e46bef66 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ Description #include "solidChemistryModel.H" #include "psiCombustionModel.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createClouds.H" #include "createSurfaceFilmModel.H" #include "createPyrolysisModel.H" diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 6101c9dd5d..4fa4799ff2 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -21,7 +21,7 @@ surfaceScalarField phiHbyA + phig ); -sources.relativeFlux(phiHbyA); +fvOptions.relativeFlux(phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -34,10 +34,10 @@ while (pimple.correctNonOrthogonal()) == parcels.Srho() + surfaceFilm.Srho() - + sources(psi, p_rgh, rho.name()) + + fvOptions(psi, p_rgh, rho.name()) ); - sources.constrain(p_rghEqn); + fvOptions.constrain(p_rghEqn); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); @@ -46,7 +46,7 @@ while (pimple.correctNonOrthogonal()) phi = phiHbyA + p_rghEqn.flux(); U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } } diff --git a/applications/solvers/combustion/fireFoam/rhoEqn.H b/applications/solvers/combustion/fireFoam/rhoEqn.H index 5cc780abb1..45c93a1488 100644 --- a/applications/solvers/combustion/fireFoam/rhoEqn.H +++ b/applications/solvers/combustion/fireFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,14 +37,14 @@ Description == parcels.Srho(rho) + surfaceFilm.Srho() - + sources(rho) + + fvOptions(rho) ); - sources.constrain(rhoEqn); + fvOptions.constrain(rhoEqn); rhoEqn.solve(); - sources.correct(rho); + fvOptions.correct(rho); } // ************************************************************************* // diff --git a/applications/solvers/combustion/reactingFoam/EEqn.H b/applications/solvers/combustion/reactingFoam/EEqn.H index c3f25da17d..56ddf867e7 100644 --- a/applications/solvers/combustion/reactingFoam/EEqn.H +++ b/applications/solvers/combustion/reactingFoam/EEqn.H @@ -19,16 +19,16 @@ // - fvm::laplacian(turbulence->muEff(), he) // unit lewis no. == reaction->Sh() - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index d29dc0ed9a..15cf68cb5e 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ @@ -13,7 +13,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lmeshTools \ -lsampling \ -lcompressibleTurbulenceModel \ diff --git a/applications/solvers/combustion/reactingFoam/UEqn.H b/applications/solvers/combustion/reactingFoam/UEqn.H index 95f10bfcc9..60c2a8a71f 100644 --- a/applications/solvers/combustion/reactingFoam/UEqn.H +++ b/applications/solvers/combustion/reactingFoam/UEqn.H @@ -5,17 +5,17 @@ + turbulence->divDevRhoReff(U) == rho*g - + sources(rho, U) + + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H index c9b4942a5b..c8d34cf1d5 100644 --- a/applications/solvers/combustion/reactingFoam/YEqn.H +++ b/applications/solvers/combustion/reactingFoam/YEqn.H @@ -28,16 +28,16 @@ tmp > mvConvection - fvm::laplacian(turbulence->muEff(), Yi) == reaction->R(Yi) - + sources(rho, Yi) + + fvOptions(rho, Yi) ); YiEqn.relax(); - sources.constrain(YiEqn); + fvOptions.constrain(YiEqn); YiEqn.solve(mesh.solver("Yi")); - sources.correct(Yi); + fvOptions.correct(Yi); Yi.max(0.0); Yt += Yi; diff --git a/applications/solvers/combustion/reactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/pEqn.H index 2ed1bc1ca5..9172736266 100644 --- a/applications/solvers/combustion/reactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/pEqn.H @@ -16,7 +16,7 @@ if (pimple.transonic()) ) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); while (pimple.correctNonOrthogonal()) { @@ -26,10 +26,10 @@ if (pimple.transonic()) + fvm::div(phid, p) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -51,7 +51,7 @@ else ) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -61,10 +61,10 @@ else + fvc::div(phiHbyA) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -80,7 +80,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index 5ebd3573a8..831df5c9a3 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Description #include "psiCombustionModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options index 0d1336e1ac..bf015097e3 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ @@ -15,7 +15,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lmeshTools \ -lsampling \ -lcompressibleTurbulenceModel \ diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/UEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/UEqn.H index d9aca344a9..7d1a350e16 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/UEqn.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/UEqn.H @@ -4,12 +4,12 @@ + fvm::div(phi, U) + turbulence->divDevRhoReff(U) == - sources(rho, U) + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -26,6 +26,6 @@ ) ); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H index 4fbe3b15a0..9b5d81522a 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H @@ -24,14 +24,14 @@ + phig ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); fvScalarMatrix p_rghDDtEqn ( fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + fvc::div(phiHbyA) == - sources(psi, p_rgh, rho.name()) + fvOptions(psi, p_rgh, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -42,7 +42,7 @@ - fvm::laplacian(rhorAUf, p_rgh) ); - sources.constrain(p_rghEqn); + fvOptions.constrain(p_rghEqn); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); @@ -58,7 +58,7 @@ // calculated from the relaxed pressure U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } } diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C index 19356b0fe6..19e9f96f51 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "turbulenceModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options index 0d1336e1ac..bf015097e3 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ @@ -15,7 +15,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lmeshTools \ -lsampling \ -lcompressibleTurbulenceModel \ diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H index cb25d83662..3fb6dfe45e 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H @@ -18,7 +18,7 @@ + fvc::ddtPhiCorr(rAU, rho, U, phi) ); - sources.relativeFlux(phiHbyA); + fvOptions.relativeFlux(phiHbyA); surfaceScalarField phid("phid", fvc::interpolate(thermo.psi())*phiHbyA); @@ -37,10 +37,10 @@ pDDtEqn - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -62,14 +62,14 @@ ) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); fvScalarMatrix pDDtEqn ( fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + fvc::div(phiHbyA) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -80,7 +80,7 @@ - fvm::laplacian(rho*rAU, p) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -99,7 +99,7 @@ U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C index fffbf485d8..192fb74051 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "turbulenceModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/EEqn.H b/applications/solvers/compressible/rhoPimpleFoam/EEqn.H index 712a3a9ab4..ee2a95f208 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/EEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/EEqn.H @@ -17,16 +17,16 @@ ) - fvm::laplacian(turbulence->alphaEff(), he) == - sources(rho, he) + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index c96a146eca..c25d770148 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude + -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lfluidThermophysicalModels \ @@ -16,4 +16,4 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lsampling \ - -lfieldSources + -lfvOptions diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H index daa25ac316..1adabbc1f0 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H @@ -6,17 +6,17 @@ tmp UEqn + fvm::div(phi, U) + turbulence->divDevRhoReff(U) == - sources(rho, U) + fvOptions(rho, U) ); UEqn().relax(); -sources.constrain(UEqn()); +fvOptions.constrain(UEqn()); if (pimple.momentumPredictor()) { solve(UEqn() == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index a656d77248..78f4ddb031 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -24,7 +24,7 @@ if (pimple.transonic()) ) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); volScalarField Dp("Dp", rho*rAU); @@ -36,10 +36,10 @@ if (pimple.transonic()) + fvm::div(phid, p) - fvm::laplacian(Dp, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -61,7 +61,7 @@ else ) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); volScalarField Dp("Dp", rho*rAU); @@ -74,10 +74,10 @@ else + fvc::div(phiHbyA) - fvm::laplacian(Dp, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -104,7 +104,7 @@ Info<< "rho max/min : " << max(rho).value() U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options index 2976366c08..11053f31a9 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options @@ -7,7 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude + -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lfluidThermophysicalModels \ @@ -18,4 +18,4 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lsampling \ - -lfieldSources + -lfvOptions diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C index f3d088b4d6..8f2943f84c 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,8 @@ Application Description Transient solver for laminar or turbulent flow of compressible fluids - with support for run-time selectable sources, e.g. MRF, explicit porosity. + with support for run-time selectable finite volume options, e.g. MRF, + explicit porosity. Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and pseudo-transient simulations with support for local time-stepping for @@ -37,7 +38,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" #include "turbulenceModel.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "fvcSmooth.H" #include "pimpleControl.H" #include "bound.H" @@ -54,7 +55,7 @@ int main(int argc, char *argv[]) #include "setInitialrDeltaT.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index a2b951de7c..6c6c4e99ab 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ Description #include "turbulenceModel.H" #include "bound.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) pimpleControl pimple(mesh); #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options index c78d474b4f..502938c53c 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude + -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lfluidThermophysicalModels \ @@ -17,4 +17,4 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lsampling \ - -lfieldSources + -lfvOptions diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H index aa3e615af6..8a83efdd86 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H @@ -7,7 +7,7 @@ volScalarField rAU(1.0/UEqn().A()); volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); volVectorField HbyA("HbyA", U); -HbyA = rAU*(UEqn() == sources(rho, U))().H(); +HbyA = rAU*(UEqn() == fvOptions(rho, U))().H(); if (pimple.nCorrPIMPLE() <= 1) { @@ -45,13 +45,13 @@ if (pimple.transonic()) + fvc::div(phic) - fvm::laplacian(Dp, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); // Relax the pressure equation to maintain diagonal dominance pEqn.relax(); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(); @@ -86,10 +86,10 @@ else + fvc::div(phiHbyA) - fvm::laplacian(Dp, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(); @@ -108,7 +108,7 @@ p.relax(); U = HbyA - rAtU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C index c1c323e7ab..308a90e51a 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ Description #include "turbulenceModel.H" #include "bound.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) pimpleControl pimple(mesh); #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/compressible/rhoSimpleFoam/EEqn.H b/applications/solvers/compressible/rhoSimpleFoam/EEqn.H index 7adacc8fd1..56e78ff630 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/EEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/EEqn.H @@ -11,16 +11,16 @@ ) - fvm::laplacian(turbulence->alphaEff(), he) == - sources(rho, he) + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index 741dc4f822..4606400cbd 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude + -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lfluidThermophysicalModels \ @@ -16,4 +16,4 @@ EXE_LIBS = \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfieldSources + -lfvOptions diff --git a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H index c01b4d7984..323af72fb2 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H @@ -5,13 +5,13 @@ fvm::div(phi, U) + turbulence->divDevRhoReff(U) == - sources(rho, U) + fvOptions(rho, U) ); UEqn().relax(); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); solve(UEqn() == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index 2782d20652..61917fcefd 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -20,7 +20,7 @@ fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf()) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); while (simple.correctNonOrthogonal()) { @@ -29,13 +29,13 @@ fvm::div(phid, p) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); // Relax the pressure equation to ensure diagonal-dominance pEqn.relax(); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.setReference(pRefCell, pRefValue); @@ -55,7 +55,7 @@ fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf()) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); closedVolume = adjustPhi(phiHbyA, U, p); @@ -66,12 +66,12 @@ fvc::div(phiHbyA) - fvm::laplacian(rho*rAU, p) == - sources(psi, p, rho.name()) + fvOptions(psi, p, rho.name()) ); pEqn.setReference(pRefCell, pRefValue); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(); @@ -90,7 +90,7 @@ U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/EEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/EEqn.H index 7adacc8fd1..56e78ff630 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/EEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/EEqn.H @@ -11,16 +11,16 @@ ) - fvm::laplacian(turbulence->alphaEff(), he) == - sources(rho, he) + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options index 4ba7ed1f7d..39d6f696eb 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options @@ -7,7 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude + -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lfluidThermophysicalModels \ @@ -17,4 +17,4 @@ EXE_LIBS = \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfieldSources + -lfvOptions diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H index e1c964a179..9398c3e8d0 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H @@ -24,27 +24,27 @@ trTU = inv(tTU()); trTU().rename("rAU"); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); volVectorField gradp(fvc::grad(p)); for (int UCorr=0; UCorralphaEff(), he) == - sources(rho, he) + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); } diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index 6962643dcd..192c63bff4 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel @@ -11,7 +11,7 @@ EXE_LIBS = \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lfluidThermophysicalModels \ -lradiationModels \ -lspecie \ diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H index 892de138bf..75f5e955fa 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H @@ -6,12 +6,12 @@ + fvm::div(phi, U) + turbulence->divDevRhoReff(U) == - sources(rho, U) + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -28,6 +28,6 @@ ) ); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index bac6d8d03e..b1b6ceede2 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "rhoThermo.H" #include "turbulenceModel.H" #include "radiationModel.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createRadiationModel.H" #include "initContinuityErrs.H" #include "readTimeControls.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index 99bef3a118..92643394f9 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -24,14 +24,14 @@ + phig ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); fvScalarMatrix p_rghDDtEqn ( fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + fvc::div(phiHbyA) == - sources(psi, p_rgh, rho.name()) + fvOptions(psi, p_rgh, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -42,7 +42,7 @@ - fvm::laplacian(rhorAUf, p_rgh) ); - sources.constrain(p_rghEqn); + fvOptions.constrain(p_rghEqn); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); @@ -58,7 +58,7 @@ // calculated from the relaxed pressure U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H index f84961f181..cf7743817d 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H @@ -12,16 +12,16 @@ - fvm::laplacian(turbulence->alphaEff(), he) == radiation->Sh(thermo) - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); radiation->correct(); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index 5103b2dd72..9e6e4f0455 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -11,7 +11,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lsampling \ -lmeshTools \ -lfluidThermophysicalModels \ diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H index 82e85ca563..ccb13caf68 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H @@ -5,12 +5,12 @@ fvm::div(phi, U) + turbulence->divDevRhoReff(U) == - sources(rho, U) + fvOptions(rho, U) ); UEqn().relax(); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); if (simple.momentumPredictor()) { @@ -27,5 +27,5 @@ ) ); - sources.correct(U); + fvOptions.correct(U); } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index 0b401c974c..3d2c18e668 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "RASModel.H" #include "radiationModel.H" #include "simpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createRadiationModel.H" #include "initContinuityErrs.H" diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 2e6cbf3d47..91d6eaf84e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -17,7 +17,7 @@ fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf()) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); bool closedVolume = adjustPhi(phiHbyA, U, p_rgh); @@ -45,7 +45,7 @@ // calculated from the relaxed pressure U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index f5520125f7..06126f0bf8 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -15,7 +15,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude @@ -28,6 +28,6 @@ EXE_LIBS = \ -lmeshTools \ -lfiniteVolume \ -lradiationModels \ - -lfieldSources \ + -lfvOptions \ -lregionModels \ -lsampling diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 7805adf8d7..48b28a07e4 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ Description #include "solidRegionDiffNo.H" #include "solidThermo.H" #include "radiationModel.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options index 7418bfd694..ccd275ad87 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options @@ -12,7 +12,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude @@ -25,6 +25,6 @@ EXE_LIBS = \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lradiationModels \ - -lfieldSources \ + -lfvOptions \ -lregionModels \ -lsampling diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C index 149a81a3a4..d076652a1d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description #include "regionProperties.H" #include "solidThermo.H" #include "radiationModel.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/EEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/EEqn.H index 01f2d32233..4ebeacb5bc 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/EEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/EEqn.H @@ -12,16 +12,16 @@ - fvm::laplacian(turb.alphaEff(), he) == rad.Sh(thermo) - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); rad.correct(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H index e5ab958f10..212d726797 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H @@ -4,12 +4,12 @@ fvm::div(phi, U) + turb.divDevRhoReff(U) == - sources(rho, U) + fvOptions(rho, U) ); UEqn().relax(); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); solve ( @@ -24,4 +24,4 @@ ) ); - sources.correct(U); + fvOptions.correct(U); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index cc5eda691d..99f14113f3 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -17,7 +17,7 @@ PtrList rhoMax(fluidRegions.size()); PtrList rhoMin(fluidRegions.size()); - PtrList fluidSources(fluidRegions.size()); + PtrList fluidFvOptions(fluidRegions.size()); // Populate fluid field pointer lists forAll(fluidRegions, i) @@ -193,11 +193,11 @@ ) ); - Info<< " Adding sources\n" << endl; - fluidSources.set + Info<< " Adding fvOptions\n" << endl; + fluidFvOptions.set ( i, - new IObasicSourceList(fluidRegions[i]) + new fv::IOoptionList(fluidRegions[i]) ); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H index fca0848912..3e566a21cf 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H @@ -23,7 +23,7 @@ phiHbyA += phig; - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); dimensionedScalar compressibility = fvc::domainIntegrate(psi); bool compressible = (compressibility.value() > SMALL); @@ -56,7 +56,7 @@ // calculated from the relaxed pressure U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H index 935b27d57c..34aea7643e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H @@ -12,7 +12,7 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - IObasicSourceList& sources = fluidSources[i]; + fv::IOoptionList& fvOptions = fluidFvOptions[i]; const dimensionedScalar initialMass ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H index d0f5dbc656..7573002af5 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H @@ -4,16 +4,16 @@ fvScalarMatrix hEqn ( - fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)") - + sources(rho, h) + + fvOptions(rho, h) ); hEqn.relax(); - sources.constrain(hEqn); + fvOptions.constrain(hEqn); hEqn.solve(); - sources.correct(h); + fvOptions.correct(h); } } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H index 143ca3a742..7f9f602121 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H @@ -18,16 +18,16 @@ - fvm::laplacian(turb.alphaEff(), he) == rad.Sh(thermo) - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(mesh.solver(he.select(finalIter))); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); rad.correct(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H index 9c32ec054e..35881bb544 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H @@ -4,12 +4,12 @@ fvm::ddt(rho, U) + fvm::div(phi, U) + turb.divDevRhoReff(U) - + sources(rho, U) + + fvOptions(rho, U) ); UEqn().relax(); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); if (momentumPredictor) { @@ -27,6 +27,6 @@ mesh.solver(U.select(finalIter)) ); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index fbc39c8556..9afa705c11 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -14,7 +14,7 @@ List initialMassFluid(fluidRegions.size()); - PtrList fluidSources(fluidRegions.size()); + PtrList fluidFvOptions(fluidRegions.size()); // Populate fluid field pointer lists forAll(fluidRegions, i) @@ -190,10 +190,10 @@ ) ); - Info<< " Adding sources\n" << endl; - fluidSources.set + Info<< " Adding fvOptions\n" << endl; + fluidFvOptions.set ( i, - new IObasicSourceList(fluidRegions[i]) + new fv::IOoptionList(fluidRegions[i]) ); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index 2944c6aef0..58ee6ae1b4 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -24,7 +24,7 @@ + phig ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); { fvScalarMatrix p_rghDDtEqn @@ -66,7 +66,7 @@ U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H index 84a22048e4..867585f43a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H @@ -20,7 +20,7 @@ radiation::radiationModel& rad = radiation[i]; - IObasicSourceList& sources = fluidSources[i]; + fv::IOoptionList& fvOptions = fluidFvOptions[i]; const dimensionedScalar initialMass ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H index 8edfe413bb..df3915980b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H @@ -1,7 +1,7 @@ // Initialise solid field pointer lists PtrList thermos(solidRegions.size()); PtrList radiations(solidRegions.size()); - PtrList solidHeatSources(solidRegions.size()); + PtrList solidHeatSources(solidRegions.size()); PtrList betavSolid(solidRegions.size()); // Populate solid field pointer lists @@ -16,11 +16,11 @@ Info<< " Adding to radiations\n" << endl; radiations.set(i, radiation::radiationModel::New(thermos[i].T())); - Info<< " Adding sources\n" << endl; + Info<< " Adding fvOptions\n" << endl; solidHeatSources.set ( i, - new IObasicSourceList(solidRegions[i]) + new fv::IOoptionList(solidRegions[i]) ); IOobject betavSolidIO diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H index 7e95615b14..ad8894a631 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H @@ -17,4 +17,4 @@ const volScalarField& betav = betavSolid[i]; - IObasicSourceList& sources = solidHeatSources[i]; + fv::IOoptionList& fvOptions = solidHeatSources[i]; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H index be24cc2ba0..86f23292e3 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H @@ -11,16 +11,16 @@ if (finalIter) fvm::ddt(betav*rho, h) - fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)") == - sources(rho, h) + fvOptions(rho, h) ); hEqn().relax(); - sources.constrain(hEqn()); + fvOptions.constrain(hEqn()); hEqn().solve(mesh.solver(h.select(finalIter))); - sources.correct(h); + fvOptions.correct(h); } } diff --git a/applications/solvers/incompressible/pimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/Make/options index 1be54a53a3..a597aafbc7 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/Make/options @@ -4,7 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -15,5 +15,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options index 5e77cdd21e..7cdb6a5551 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options @@ -4,7 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -14,5 +14,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C index 19b42eb4d5..1eb1edb5c1 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "turbulenceModel.H" #include "pimpleControl.H" #include "SRFModel.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" pimpleControl pimple(mesh); diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H index 4c5ec3c9a9..6750d98f36 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H @@ -9,8 +9,8 @@ UrelEqn().relax(); - sources.constrain(UrelEqn()); + fvOptions.constrain(UrelEqn()); - solve(UrelEqn() == -fvc::grad(p) + sources(Urel)); + solve(UrelEqn() == -fvc::grad(p) + fvOptions(Urel)); - sources.correct(Urel); + fvOptions.correct(Urel); diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H index 29f1c48c07..9b5b1a89a4 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H @@ -1,6 +1,6 @@ volScalarField rAUrel(1.0/UrelEqn().A()); volVectorField HbyA("HbyA", Urel); -HbyA = rAUrel*(UrelEqn() == sources(Urel))().H(); +HbyA = rAUrel*(UrelEqn() == fvOptions(Urel))().H(); if (pimple.nCorrPISO() <= 1) { @@ -42,4 +42,4 @@ p.relax(); // Momentum corrector Urel = HbyA - rAUrel*fvc::grad(p); Urel.correctBoundaryConditions(); -sources.correct(Urel); +fvOptions.correct(Urel); diff --git a/applications/solvers/incompressible/pimpleFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/UEqn.H index 94913478a6..7bd10afc47 100644 --- a/applications/solvers/incompressible/pimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/UEqn.H @@ -6,12 +6,12 @@ tmp UEqn + fvm::div(phi, U) + turbulence->divDevReff(U) == - sources(U) + fvOptions(U) ); UEqn().relax(); -sources.constrain(UEqn()); +fvOptions.constrain(UEqn()); volScalarField rAU(1.0/UEqn().A()); @@ -19,5 +19,5 @@ if (pimple.momentumPredictor()) { solve(UEqn() == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); } diff --git a/applications/solvers/incompressible/pimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pEqn.H index 9fc62bd9f1..1d133108d0 100644 --- a/applications/solvers/incompressible/pimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pEqn.H @@ -15,7 +15,7 @@ surfaceScalarField phiHbyA adjustPhi(phiHbyA, U, p); -sources.relativeFlux(phiHbyA); +fvOptions.relativeFlux(phiHbyA); // Non-orthogonal pressure corrector loop while (pimple.correctNonOrthogonal()) @@ -43,4 +43,4 @@ p.relax(); U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options index 11c10272ff..5cc44fea11 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options @@ -7,7 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -21,5 +21,5 @@ EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H index c125d2ac2a..7a7d604b48 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H @@ -9,13 +9,13 @@ tmp UEqn UEqn().relax(); -sources.constrain(UEqn()); +fvOptions.constrain(UEqn()); rAU = 1.0/UEqn().A(); if (pimple.momentumPredictor()) { - solve(UEqn() == -fvc::grad(p) + sources(U)); + solve(UEqn() == -fvc::grad(p) + fvOptions(U)); - sources.correct(U); + fvOptions.correct(U); } diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H index d9a6f672a0..217304168b 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H @@ -1,5 +1,5 @@ volVectorField HbyA("HbyA", U); -HbyA = rAU*(UEqn() == sources(U))().H(); +HbyA = rAU*(UEqn() == fvOptions(U))().H(); if (pimple.nCorrPISO() <= 1) { @@ -51,4 +51,4 @@ fvc::makeRelative(phi, U); U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C index 27fc93f341..3f68ebbcd3 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "turbulenceModel.H" #include "dynamicFvMesh.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "readTimeControls.H" pimpleControl pimple(mesh); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index ceb186cdbf..000948514e 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,7 @@ Description Sub-models include: - turbulence modelling, i.e. laminar, RAS or LES - - run-time selectable sources, e.g. MRF, explicit porosity + - run-time selectable finitie volume options, e.g. MRF, explicit porosity \*---------------------------------------------------------------------------*/ @@ -38,7 +38,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulenceModel.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "IOporosityModelList.H" #include "IOMRFZoneList.H" @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" pimpleControl pimple(mesh); diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options b/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options index 1be54a53a3..a597aafbc7 100644 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options +++ b/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options @@ -4,7 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -15,5 +15,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H b/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H index 123eaf7ac6..4c84e256c0 100644 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H +++ b/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H @@ -8,11 +8,11 @@ tmp UEqn UEqn().relax(); -sources.constrain(UEqn()); +fvOptions.constrain(UEqn()); if (pimple.momentumPredictor()) { - solve(UEqn() == -fvc::grad(p_gh) + sources(U)); + solve(UEqn() == -fvc::grad(p_gh) + fvOptions(U)); - sources.correct(U); + fvOptions.correct(U); } diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H index 42b72484d1..780bb28022 100644 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H +++ b/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H @@ -2,7 +2,7 @@ volScalarField rAU(1.0/UEqn().A()); surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); volVectorField HbyA("HbyA", U); -HbyA = rAU*(UEqn() == sources(U))().H(); +HbyA = rAU*(UEqn() == fvOptions(U))().H(); if (pimple.nCorrPISO() <= 1) { @@ -46,4 +46,4 @@ p = p_gh + (g & mesh.C()); U = HbyA - rAU*fvc::grad(p_gh); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C index 114c183c4c..ca35e81116 100644 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C +++ b/applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulenceModel.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) pimpleControl pimple(mesh); #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/incompressible/simpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/Make/options index 9ba4552938..f9913bf0dd 100644 --- a/applications/solvers/incompressible/simpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -15,5 +15,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options index 046cbd0baf..cae6c88fed 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -15,5 +15,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C index eab6907e8d..5387b736db 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "RASModel.H" #include "SRFModel.H" #include "simpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" simpleControl simple(mesh); diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H index 265a731269..75df41d00b 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H @@ -6,13 +6,13 @@ + turbulence->divDevReff(Urel) + SRF->Su() == - sources(Urel) + fvOptions(Urel) ); UrelEqn().relax(); - sources.constrain(UrelEqn()); + fvOptions.constrain(UrelEqn()); solve(UrelEqn() == -fvc::grad(p)); - sources.correct(Urel); + fvOptions.correct(Urel); diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H index e30ef7baaa..b9fa52c0ff 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H @@ -33,5 +33,5 @@ // Momentum corrector Urel = HbyA - rAUrel*fvc::grad(p); Urel.correctBoundaryConditions(); - sources.correct(Urel); + fvOptions.correct(Urel); } diff --git a/applications/solvers/incompressible/simpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/UEqn.H index 719e294a08..0c5932ff2c 100644 --- a/applications/solvers/incompressible/simpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/UEqn.H @@ -5,13 +5,13 @@ fvm::div(phi, U) + turbulence->divDevReff(U) == - sources(U) + fvOptions(U) ); UEqn().relax(); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); solve(UEqn() == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); diff --git a/applications/solvers/incompressible/simpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/pEqn.H index 116929e3ea..79f4f56076 100644 --- a/applications/solvers/incompressible/simpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/pEqn.H @@ -7,7 +7,7 @@ surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf()); adjustPhi(phiHbyA, U, p); - sources.relativeFlux(phiHbyA); + fvOptions.relativeFlux(phiHbyA); // Non-orthogonal pressure corrector loop while (simple.correctNonOrthogonal()) @@ -35,5 +35,5 @@ // Momentum corrector U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options index 8ffc7f6d58..6cee67f66f 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -16,5 +16,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H index 3ce7e2f533..31b817bf82 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H @@ -5,7 +5,7 @@ fvm::div(phi, U) + turbulence->divDevReff(U) == - sources(U) + fvOptions(U) ); mrfZones.addCoriolis(UEqn()); @@ -26,7 +26,7 @@ trTU = inv(tTU()); trTU().rename("rAU"); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); volVectorField gradp(fvc::grad(p)); @@ -36,17 +36,17 @@ } U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } else { pZones.addResistance(UEqn()); - sources.constrain(UEqn()); + fvOptions.constrain(UEqn()); solve(UEqn() == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); trAU = 1.0/UEqn().A(); trAU().rename("rAU"); diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H index 7aa494744f..b05a9fe270 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H @@ -52,4 +52,4 @@ else } U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C index 4c3563ac8f..01c1dc16fb 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "simpleControl.H" #include "IOMRFZoneList.H" #include "IOporosityModelList.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) simpleControl simple(mesh); #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createZones.H" #include "initContinuityErrs.H" diff --git a/applications/solvers/incompressible/simpleFoam/simpleFoam.C b/applications/solvers/incompressible/simpleFoam/simpleFoam.C index 80bca738bd..80521c3969 100644 --- a/applications/solvers/incompressible/simpleFoam/simpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/simpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description #include "singlePhaseTransportModel.H" #include "RASModel.H" #include "simpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" simpleControl simple(mesh); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H index 37ca5e82a4..19b7a0de0f 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H @@ -21,16 +21,16 @@ + coalParcels.Sh(he) + limestoneParcels.Sh(he) + radiation->Sh(thermo) - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); radiation->correct(); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index adc629c4f2..85cd3a4713 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -22,7 +22,7 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -51,6 +51,6 @@ EXE_LIBS = \ -lsurfaceFilmModels \ -lODE \ -lcombustionModels \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H index 3dee99c1c7..24d3a9ebb1 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H @@ -7,17 +7,17 @@ rho.dimensionedInternalField()*g + coalParcels.SU(U) + limestoneParcels.SU(U) - + sources(rho, U) + + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H index a5c39e8473..a719c83cd7 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H @@ -30,16 +30,16 @@ tmp > mvConvection == coalParcels.SYi(i, Yi) + combustion->R(Yi) - + sources(rho, Yi) + + fvOptions(rho, Yi) ); YiEqn.relax(); - sources.constrain(YiEqn); + fvOptions.constrain(YiEqn); YiEqn.solve(mesh.solver("Yi")); - sources.correct(Yi); + fvOptions.correct(Yi); Yi.max(0.0); Yt += Yi; diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 2197ae8d52..208b7b9ce9 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ Description #include "fluidThermoCloud.H" #include "coalCloud.H" #include "psiCombustionModel.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createClouds.H" #include "createRadiationModel.H" #include "initContinuityErrs.H" diff --git a/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H index 0baee1ad30..03e9033edb 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H @@ -16,7 +16,7 @@ if (pimple.transonic()) ) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); while (pimple.correctNonOrthogonal()) { @@ -27,10 +27,10 @@ if (pimple.transonic()) - fvm::laplacian(rho*rAU, p) == coalParcels.Srho() - + sources(psi, p, rho.name()) + + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -52,7 +52,7 @@ else ) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -63,10 +63,10 @@ else - fvm::laplacian(rho*rAU, p) == coalParcels.Srho() - + sources(psi, p, rho.name()) + + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -82,7 +82,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/rhoEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/rhoEqn.H index 5c37255fef..564368f8a4 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/rhoEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,14 +36,14 @@ Description + fvc::div(phi) == coalParcels.Srho(rho) - + sources(rho) + + fvOptions(rho) ); - sources.constrain(rhoEqn); + fvOptions.constrain(rhoEqn); rhoEqn.solve(); - sources.correct(rho); + fvOptions.correct(rho); } // ************************************************************************* // diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H index 4abcdcf441..6bbd7cc788 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H @@ -21,16 +21,16 @@ + surfaceFilm.Sh() + radiation->Sh(thermo) + combustion->Sh() - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); radiation->correct(); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index a2d24b6d11..e0aac8c5db 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ @@ -27,7 +27,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfieldSources \ + -lfvOptions \ -lsampling \ -lmeshTools \ -lcompressibleRASModels \ diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H index 81d90bd695..205eb09156 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H @@ -5,12 +5,12 @@ + turbulence->divDevRhoReff(U) == parcels.SU(U) - + sources(rho, U) + + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -27,6 +27,6 @@ ) ); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H index 615342c436..b23f00dbf1 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -29,18 +29,18 @@ tmp > mvConvection - fvm::laplacian(turbulence->alphaEff(), Yi) == parcels.SYi(i, Yi) - + sources(rho, Yi) + + fvOptions(rho, Yi) + combustion->R(Yi) + surfaceFilm.Srho(i) ); YEqn.relax(); - sources.constrain(YEqn); + fvOptions.constrain(YEqn); YEqn.solve(mesh.solver("Yi")); - sources.correct(Yi); + fvOptions.correct(Yi); Yi.max(0.0); Yt += Yi; diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H index bcdd3beca4..26c3a6f062 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H @@ -18,7 +18,7 @@ surfaceScalarField phiHbyA + phig ); -sources.relativeFlux(fvc::interpolate(rho), phiHbyA); +fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -31,10 +31,10 @@ while (pimple.correctNonOrthogonal()) == parcels.Srho() + surfaceFilm.Srho() - + sources(psi, p_rgh, rho.name()) + + fvOptions(psi, p_rgh, rho.name()) ); - sources.constrain(p_rghEqn); + fvOptions.constrain(p_rghEqn); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); @@ -43,7 +43,7 @@ while (pimple.correctNonOrthogonal()) phi = phiHbyA + p_rghEqn.flux(); U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } } diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C index 80add60630..65cfcb4516 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "psiCombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createClouds.H" #include "createRadiationModel.H" #include "createSurfaceFilmModel.H" diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H index 5cc780abb1..45c93a1488 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,14 +37,14 @@ Description == parcels.Srho(rho) + surfaceFilm.Srho() - + sources(rho) + + fvOptions(rho) ); - sources.constrain(rhoEqn); + fvOptions.constrain(rhoEqn); rhoEqn.solve(); - sources.correct(rho); + fvOptions.correct(rho); } // ************************************************************************* // diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Allwmake b/applications/solvers/lagrangian/reactingParcelFoam/Allwmake index ecd3f26015..f615df216c 100755 --- a/applications/solvers/lagrangian/reactingParcelFoam/Allwmake +++ b/applications/solvers/lagrangian/reactingParcelFoam/Allwmake @@ -3,6 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x wmake +wmake simpleReactingParcelFoam wmake LTSReactingParcelFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H index 57456fe791..d4f9d7f6ac 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H @@ -20,16 +20,16 @@ parcels.Sh(he) + radiation->Sh(thermo) + combustion->Sh() - + sources(rho, he) + + fvOptions(rho, he) ); EEqn.relax(); - sources.constrain(EEqn); + fvOptions.constrain(EEqn); EEqn.solve(); - sources.correct(he); + fvOptions.correct(he); thermo.correct(); radiation->correct(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C index c0b7519607..34aecb65b4 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,8 +27,8 @@ Application Description Local time stepping (LTS) solver for steady, compressible, laminar or turbulent reacting and non-reacting flow with multiphase Lagrangian - parcels and porous media, including explicit sources for mass, momentum - and energy + parcels and porous media, including run-time selectable finitite volume + options, e.g. sources, constraints Note: ddtPhiCorr not used here when porous zones are active - not well defined for porous calculations @@ -41,7 +41,7 @@ Description #include "rhoCombustionModel.H" #include "radiationModel.H" #include "IOporosityModelList.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "SLGThermo.H" #include "fvcSmooth.H" #include "pimpleControl.H" @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) #include "readTimeControls.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createRDeltaT.H" #include "createRadiationModel.H" #include "createClouds.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options index fad2ee86fa..9aa1847960 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options @@ -22,7 +22,7 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -49,5 +49,5 @@ EXE_LIBS = \ -lregionModels \ -lsurfaceFilmModels \ -lcombustionModels \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/timeScales.H b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/timeScales.H index c1e9c20290..50ceb3b433 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/timeScales.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/timeScales.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ Info<< "Time scales min/max:" << endl; *mag ( parcels.hsTrans()/(mesh.V()*runTime.deltaT()) - // + sources(rho, hs) + // + fvOptions(rho, hs) + combustion->Sh()() - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")() ) diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index 572cd1fb2c..705cfc9433 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -21,7 +21,7 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam @@ -49,5 +49,5 @@ EXE_LIBS = \ -lregionModels \ -lsurfaceFilmModels \ -lcombustionModels \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H index 11d4b27ef8..6a12aae3bc 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H @@ -6,17 +6,17 @@ == rho.dimensionedInternalField()*g + parcels.SU(U) - + sources(rho, U) + + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H index b7e40dcc59..fbcc0a0f65 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H @@ -29,16 +29,16 @@ tmp > mvConvection == parcels.SYi(i, Yi) + combustion->R(Yi) - + sources(rho, Yi) + + fvOptions(rho, Yi) ); YEqn.relax(); - sources.constrain(YEqn); + fvOptions.constrain(YEqn); YEqn.solve(mesh.solver("Yi")); - sources.correct(Yi); + fvOptions.correct(Yi); Yi.max(0.0); Yt += Yi; diff --git a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H index 569beae058..fb2e125a58 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H @@ -19,7 +19,7 @@ ) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); fvScalarMatrix pDDtEqn ( @@ -27,7 +27,7 @@ + fvc::div(phiHbyA) == parcels.Srho() - + sources(psi, p, rho.name()) + + fvOptions(psi, p, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -38,7 +38,7 @@ - fvm::laplacian(rho*rAU, p) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -58,7 +58,7 @@ U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index c273f71856..c4503cc101 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,20 +22,12 @@ License along with OpenFOAM. If not, see . Application - porousExplicitSourceReactingParcelFoam + reactingParcelFoam Description Transient PIMPLE solver for compressible, laminar or turbulent flow with - reacting multiphase Lagrangian parcels for porous media, including explicit - sources for mass, momentum and energy - - The solver includes: - - reacting multiphase parcel cloud - - porous media - - mass, momentum and energy sources - - Note: ddtPhiCorr not used here when porous zones are active - - not well defined for porous calculations + reacting multiphase Lagrangian parcels, including run-time selectable + finite volume options, e.g. sources, constraints \*---------------------------------------------------------------------------*/ @@ -45,7 +37,7 @@ Description #include "rhoCombustionModel.H" #include "radiationModel.H" #include "IOporosityModelList.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "SLGThermo.H" #include "pimpleControl.H" @@ -64,7 +56,7 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "createRadiationModel.H" #include "createClouds.H" - #include "createSources.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H index 6ad34d56c7..581280230f 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,14 +36,14 @@ Description + fvc::div(phi) == parcels.Srho(rho) - + sources(rho) + + fvOptions(rho) ); - sources.constrain(rhoEqn); + fvOptions.constrain(rhoEqn); rhoEqn.solve(); - sources.correct(rho); + fvOptions.correct(rho); Info<< "rho min/max = " << min(rho).value() << ", " << max(rho).value() << endl; diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H new file mode 100644 index 0000000000..d4d686e355 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H @@ -0,0 +1,32 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + mvConvection->fvmDiv(phi, he) + + ( + he.name() == "e" + ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho)) + : fvc::div(phi, volScalarField("K", 0.5*magSqr(U))) + ) + - fvm::laplacian(turbulence->alphaEff(), he) + == + parcels.Sh(he) + + radiation->Sh(thermo) + + combustion->Sh() + + fvOptions(rho, he) + ); + + EEqn.relax(); + + fvOptions.constrain(EEqn); + + EEqn.solve(); + + fvOptions.correct(he); + thermo.correct(); + radiation->correct(); + + Info<< "T gas min/max = " << min(T).value() << ", " + << max(T).value() << endl; +} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files new file mode 100644 index 0000000000..4a202fcd4d --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files @@ -0,0 +1,3 @@ +simpleReactingParcelFoam.C + +EXE = $(FOAM_APPBIN)/simpleReactingParcelFoam diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options new file mode 100644 index 0000000000..705cfc9433 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options @@ -0,0 +1,53 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I${LIB_SRC}/meshTools/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ + -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ + -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(FOAM_SOLVERS)/combustion/reactingFoam + + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -llagrangian \ + -llagrangianIntermediate \ + -lspecie \ + -lfluidThermophysicalModels \ + -lliquidProperties \ + -lliquidMixtureProperties \ + -lsolidProperties \ + -lsolidMixtureProperties \ + -lthermophysicalFunctions \ + -lreactionThermophysicalModels \ + -lSLGThermo \ + -lchemistryModel \ + -lradiationModels \ + -lODE \ + -lregionModels \ + -lsurfaceFilmModels \ + -lcombustionModels \ + -lfvOptions \ + -lsampling diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H new file mode 100644 index 0000000000..eabbb40454 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H @@ -0,0 +1,17 @@ + tmp UEqn + ( + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + rho.dimensionedInternalField()*g + + parcels.SU(U) + + fvOptions(rho, U) + ); + + UEqn().relax(); + + fvOptions.constrain(UEqn()); + + solve(UEqn() == -fvc::grad(p)); + + fvOptions.correct(U); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H new file mode 100644 index 0000000000..cd0a45f0f0 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H @@ -0,0 +1,53 @@ +tmp > mvConvection +( + fv::convectionScheme::New + ( + mesh, + fields, + phi, + mesh.divScheme("div(phi,Yi_h)") + ) +); + +{ + combustion->correct(); + dQ = combustion->dQ(); + label inertIndex = -1; + volScalarField Yt(0.0*Y[0]); + + forAll(Y, i) + { + if (Y[i].name() != inertSpecie) + { + volScalarField& Yi = Y[i]; + + fvScalarMatrix YEqn + ( + mvConvection->fvmDiv(phi, Yi) + - fvm::laplacian(turbulence->muEff(), Yi) + == + parcels.SYi(i, Yi) + + combustion->R(Yi) + + fvOptions(rho, Yi) + ); + + YEqn.relax(); + + fvOptions.constrain(YEqn); + + YEqn.solve(mesh.solver("Yi")); + + fvOptions.correct(Yi); + + Yi.max(0.0); + Yt += Yi; + } + else + { + inertIndex = i; + } + } + + Y[inertIndex] = scalar(1) - Yt; + Y[inertIndex].max(0.0); +} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createClouds.H new file mode 100644 index 0000000000..954b74e069 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createClouds.H @@ -0,0 +1,9 @@ +Info<< "\nConstructing reacting cloud" << endl; +basicReactingMultiphaseCloud parcels +( + "reactingCloud1", + rho, + U, + g, + slgThermo +); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H new file mode 100644 index 0000000000..d6df24cb48 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H @@ -0,0 +1,98 @@ + Info<< "Creating combustion model\n" << endl; + + autoPtr combustion + ( + combustionModels::rhoCombustionModel::New(mesh) + ); + + rhoReactionThermo& thermo = combustion->thermo(); + thermo.validate(args.executable(), "h", "e"); + + SLGThermo slgThermo(mesh, thermo); + + basicMultiComponentMixture& composition = thermo.composition(); + PtrList& Y = composition.Y(); + + const word inertSpecie(thermo.lookup("inertSpecie")); + + if (!composition.contains(inertSpecie)) + { + FatalErrorIn(args.executable()) + << "Specified inert specie '" << inertSpecie << "' not found in " + << "species list. Available species:" << composition.species() + << exit(FatalError); + } + + volScalarField& p = thermo.p(); + const volScalarField& T = thermo.T(); + const volScalarField& psi = thermo.psi(); + + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() + ); + + Info<< "\nReading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + #include "compressibleCreatePhi.H" + + dimensionedScalar rhoMax(simple.dict().lookup("rhoMax")); + dimensionedScalar rhoMin(simple.dict().lookup("rhoMin")); + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); + + Info<< "Creating multi-variate interpolation scheme\n" << endl; + multivariateSurfaceInterpolationScheme::fieldTable fields; + + forAll(Y, i) + { + fields.add(Y[i]); + } + fields.add(thermo.he()); + + volScalarField dQ + ( + IOobject + ( + "dQ", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H new file mode 100644 index 0000000000..0d1aa2e238 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H @@ -0,0 +1,59 @@ +{ + rho = thermo.rho(); + + // Thermodynamic density needs to be updated by psi*d(p) after the + // pressure solution - done in 2 parts. Part 1: + thermo.rho() -= psi*p; + + volScalarField rAU(1.0/UEqn().A()); + volVectorField HbyA("HbyA", U); + HbyA = rAU*UEqn().H(); + + UEqn.clear(); + + surfaceScalarField phiHbyA + ( + "phiHbyA", + fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf()) + ); + + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); + + while (simple.correctNonOrthogonal()) + { + fvScalarMatrix pEqn + ( + fvc::div(phiHbyA) + - fvm::laplacian(rho*rAU, p) + == + parcels.Srho() + + fvOptions(psi, p, rho.name()) + ); + + fvOptions.constrain(pEqn); + + pEqn.solve(); + + if (simple.finalNonOrthogonalIter()) + { + phi = phiHbyA + pEqn.flux(); + } + } + + p.relax(); + + // Second part of thermodynamic density update + thermo.rho() += psi*p; + + #include "compressibleContinuityErrs.H" + + U = HbyA - rAU*fvc::grad(p); + U.correctBoundaryConditions(); + fvOptions.correct(U); + + rho = thermo.rho(); + rho = max(rho, rhoMin); + rho = min(rho, rhoMax); + + Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl; +} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C new file mode 100644 index 0000000000..6620d2af52 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 3 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, see . + +Application + simpleReactingParcelFoam + +Description + Steady state SIMPLE solver for compressible, laminar or turbulent flow with + reacting multiphase Lagrangian parcels, including run-time selectable + finite volume options, e.g. sources, constraints + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "turbulenceModel.H" +#include "basicReactingMultiphaseCloud.H" +#include "rhoCombustionModel.H" +#include "radiationModel.H" +#include "IOporosityModelList.H" +#include "fvIOoptionList.H" +#include "SLGThermo.H" +#include "simpleControl.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + #include "readGravitationalAcceleration.H" + + simpleControl simple(mesh); + + #include "createFields.H" + #include "createRadiationModel.H" + #include "createClouds.H" + #include "createFvOptions.H" + #include "initContinuityErrs.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (simple.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + + parcels.evolve(); + + // --- Pressure-velocity SIMPLE corrector loop + { + #include "UEqn.H" + #include "YEqn.H" + #include "EEqn.H" + #include "pEqn.H" + } + + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/lagrangian/sprayFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/Make/options index bcbb2fb5cb..9dce65d023 100644 --- a/applications/solvers/lagrangian/sprayFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/Make/options @@ -22,7 +22,7 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude @@ -50,5 +50,5 @@ EXE_LIBS = \ -lODE \ -lregionModels \ -lsurfaceFilmModels \ - -lfieldSources \ + -lfvOptions \ -lcombustionModels diff --git a/applications/solvers/lagrangian/sprayFoam/UEqn.H b/applications/solvers/lagrangian/sprayFoam/UEqn.H index 11d4b27ef8..6a12aae3bc 100644 --- a/applications/solvers/lagrangian/sprayFoam/UEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/UEqn.H @@ -6,17 +6,17 @@ == rho.dimensionedInternalField()*g + parcels.SU(U) - + sources(rho, U) + + fvOptions(rho, U) ); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - sources.correct(U); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/lagrangian/sprayFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/pEqn.H index 9d95ee6dec..590e00d81f 100644 --- a/applications/solvers/lagrangian/sprayFoam/pEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/pEqn.H @@ -16,7 +16,7 @@ if (pimple.transonic()) ) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); while (pimple.correctNonOrthogonal()) { @@ -27,10 +27,10 @@ if (pimple.transonic()) - fvm::laplacian(rho*rAU, p) == parcels.Srho() - + sources(psi, p, rho.name()) + + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -52,7 +52,7 @@ else ) ); - sources.relativeFlux(fvc::interpolate(psi), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(psi), phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -63,10 +63,10 @@ else - fvm::laplacian(rho*rAU, p) == parcels.Srho() - + sources(psi, p, rho.name()) + + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -82,7 +82,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/lagrangian/sprayFoam/rhoEqn.H b/applications/solvers/lagrangian/sprayFoam/rhoEqn.H index ecda54ee83..f0fce23ccd 100644 --- a/applications/solvers/lagrangian/sprayFoam/rhoEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,14 +36,14 @@ Description + fvc::div(phi) == parcels.Srho(rho) - + sources(rho) + + fvOptions(rho) ); - sources.constrain(rhoEqn); + fvOptions.constrain(rhoEqn); rhoEqn.solve(); - sources.correct(rho); + fvOptions.correct(rho); } // ************************************************************************* // diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options index d2d83e3920..77034c9ef3 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options @@ -24,7 +24,7 @@ EXE_INC = \ -I$(LIB_SRC)/engine/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude @@ -53,5 +53,5 @@ EXE_LIBS = \ -lengine \ -lregionModels \ -lsurfaceFilmModels \ - -lfieldSources \ + -lfvOptions \ -lcombustionModels diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H index d3435a8163..b7998b9e84 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H @@ -16,7 +16,7 @@ if (pimple.transonic()) ) ); - sources.relativeFlux(fvc::interpolate(psi), phid); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); while (pimple.correctNonOrthogonal()) { @@ -27,10 +27,10 @@ if (pimple.transonic()) - fvm::laplacian(rho*rAU, p) == parcels.Srho() - + sources(psi, p, rho.name()) + + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -52,7 +52,7 @@ else ) ); - sources.relativeFlux(fvc::interpolate(rho), phiHbyA); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); while (pimple.correctNonOrthogonal()) { @@ -63,10 +63,10 @@ else - fvm::laplacian(rho*rAU, p) == parcels.Srho() - + sources(psi, p, rho.name()) + + fvOptions(psi, p, rho.name()) ); - sources.constrain(pEqn); + fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -82,7 +82,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -sources.correct(U); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C index fd2df8b2ac..baafc8d5e3 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ Description #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) #include "createEngineMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createClouds.H" #include "createRadiationModel.H" #include "initContinuityErrs.H" diff --git a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C index 243c9a6058..1c93d3ab13 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" - #include "createSources.H" + #include "createFvOptions.H" #include "createClouds.H" #include "createRadiationModel.H" #include "initContinuityErrs.H" diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H new file mode 100644 index 0000000000..c894b36b41 --- /dev/null +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H @@ -0,0 +1,49 @@ +{ + volScalarField k1 + ( + "k1", + alpha1*(thermo1.alpha()/rho1 + sqr(Ct)*nut2*thermo1.CpByCpv()/Prt) + ); + + volScalarField k2 + ( + "k2", + alpha2*(thermo2.alpha()/rho2 + nut2*thermo2.CpByCpv()/Prt) + ); + + volScalarField& he1 = thermo1.he(); + volScalarField& he2 = thermo2.he(); + + Info<< max(he1) << min(he1) << endl; + + fvScalarMatrix he1Eqn + ( + fvm::ddt(alpha1, he1) + + fvm::div(alphaPhi1, he1) + - fvm::laplacian(k1, he1) + == + heatTransferCoeff*(he1/thermo1.Cp())/rho1 + - fvm::Sp(heatTransferCoeff/thermo1.Cp()/rho1, he1) + + alpha1*(dpdt/rho1 - (fvc::ddt(K1) + fvc::div(phi1, K1))) + ); + + fvScalarMatrix he2Eqn + ( + fvm::ddt(alpha2, he2) + + fvm::div(alphaPhi2, he2) + - fvm::laplacian(k2, he2) + == + heatTransferCoeff*(he2/thermo2.Cp())/rho2 + - fvm::Sp(heatTransferCoeff/thermo2.Cp()/rho2, he2) + + alpha2*(dpdt/rho2 - (fvc::ddt(K2) + fvc::div(phi2, K2))) + ); + + he1Eqn.relax(); + he1Eqn.solve(); + + he2Eqn.relax(); + he2Eqn.solve(); + + thermo1.correct(); + thermo2.correct(); +} diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/Make/options b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/Make/options index 16ce2e3674..d90ba7bbbd 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -IturbulenceModel \ @@ -8,6 +9,8 @@ EXE_INC = \ -Iaveraging EXE_LIBS = \ + -lfluidThermophysicalModels \ + -lspecie \ -lincompressibleTransportModels \ -lcompressiblePhaseModel \ -lcompressibleEulerianInterfacialModels \ diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/TEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/TEqns.H deleted file mode 100644 index 8f38ca9d91..0000000000 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/TEqns.H +++ /dev/null @@ -1,36 +0,0 @@ -{ - volScalarField kByCp1("kByCp1", alpha1*(k1/Cp1/rho1 + sqr(Ct)*nut2/Prt)); - volScalarField kByCp2("kByCp2", alpha2*(k2/Cp2/rho2 + nut2/Prt)); - - fvScalarMatrix T1Eqn - ( - fvm::ddt(alpha1, T1) - + fvm::div(alphaPhi1, T1) - - fvm::laplacian(kByCp1, T1) - == - heatTransferCoeff*T2/Cp1/rho1 - - fvm::Sp(heatTransferCoeff/Cp1/rho1, T1) - + alpha1*(dpdt/rho1 - (fvc::ddt(K1) + fvc::div(phi1, K1)))/Cp1 - ); - - fvScalarMatrix T2Eqn - ( - fvm::ddt(alpha2, T2) - + fvm::div(alphaPhi2, T2) - - fvm::laplacian(kByCp2, T2) - == - heatTransferCoeff*T1/Cp2/rho2 - - fvm::Sp(heatTransferCoeff/Cp2/rho2, T2) - + alpha2*(dpdt/rho2 - (fvc::ddt(K2) + fvc::div(phi2, K2)))/Cp2 - ); - - T1Eqn.relax(); - T1Eqn.solve(); - - T2Eqn.relax(); - T2Eqn.solve(); - - // Update compressibilities - psi1 = 1.0/(R1*T1); - psi2 = 1.0/(R2*T2); -} diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H index 606b4573e4..a243db6300 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H @@ -12,12 +12,12 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime); } else // If not using kinetic theory is using Ct model { - nuEff1 = sqr(Ct)*nut2 + nu1; + nuEff1 = sqr(Ct)*nut2 + thermo1.mu()/rho1; } volTensorField Rc1 ( - "Rc1", + "Rc", (((2.0/3.0)*I)*nuEff1)*tr(gradU1T) - nuEff1*gradU1T ); @@ -52,7 +52,7 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime); volTensorField gradU2T(fvc::grad(U2)().T()); volTensorField Rc2 ( - "Rc2", + "Rc", (((2.0/3.0)*I)*nuEff2)*tr(gradU2T) - nuEff2*gradU2T ); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H index ba08045be1..86d9203dce 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H @@ -1,9 +1,9 @@ -surfaceScalarField alphaPhi1("alphaPhi1", phi1); -surfaceScalarField alphaPhi2("alphaPhi2", phi2); +surfaceScalarField alphaPhi1("alphaPhi", phi1); +surfaceScalarField alphaPhi2("alphaPhi", phi2); { - word scheme("div(phi,alpha1)"); - word schemer("div(phir,alpha1)"); + word scheme("div(phi,alpha)"); + word schemer("div(phir,alpha)"); surfaceScalarField phic("phic", phi); surfaceScalarField phir("phir", phi1 - phi2); @@ -68,16 +68,22 @@ surfaceScalarField alphaPhi2("alphaPhi2", phi2); if (g0.value() > 0.0) { + surfaceScalarField alpha1f(fvc::interpolate(alpha1)); + ppMagf = fvc::interpolate((1.0/rho1)*rAU1) - *fvc::interpolate - ( - g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax) - ); + *g0*min(exp(preAlphaExp*(alpha1f - alphaMax)), expMax); + + // ppMagf = + // fvc::interpolate((1.0/rho1)*rAU1) + // *fvc::interpolate + // ( + // g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax) + // ); alpha1Eqn -= fvm::laplacian ( - (fvc::interpolate(alpha1) + scalar(0.0001))*ppMagf, + alpha1f*ppMagf, alpha1, "laplacian(alphaPpMag,alpha1)" ); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C index 855a862b6b..65372612b6 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,6 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "rhoThermo.H" #include "nearWallDist.H" #include "wallFvPatch.H" #include "fixedValueFvsPatchFields.H" @@ -86,7 +87,7 @@ int main(int argc, char *argv[]) #include "alphaEqn.H" #include "kEpsilon.H" #include "interfacialCoeffs.H" - #include "TEqns.H" + #include "EEqns.H" #include "UEqns.H" // --- Pressure corrector loop diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H index e0cd5328c9..6095ad6845 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H @@ -12,55 +12,43 @@ ) ); + word phase1Name + ( + transportProperties.found("phases") + ? wordList(transportProperties.lookup("phases"))[0] + : "phase1" + ); + + word phase2Name + ( + transportProperties.found("phases") + ? wordList(transportProperties.lookup("phases"))[1] + : "phase2" + ); + autoPtr phase1 = phaseModel::New ( mesh, transportProperties, - "1" + phase1Name ); autoPtr phase2 = phaseModel::New ( mesh, transportProperties, - "2" + phase2Name ); + volScalarField& alpha1 = phase1(); + volScalarField& alpha2 = phase2(); + alpha2 = scalar(1) - alpha1; + volVectorField& U1 = phase1->U(); surfaceScalarField& phi1 = phase1->phi(); - const dimensionedScalar& nu1 = phase1->nu(); - const dimensionedScalar& k1 = phase1->kappa(); - const dimensionedScalar& Cp1 = phase1->Cp(); - dimensionedScalar rho10 - ( - "rho0", - dimDensity, - transportProperties.subDict("phase1").lookup("rho0") - ); - dimensionedScalar R1 - ( - "R", - dimensionSet(0, 2, -2, -1, 0), - transportProperties.subDict("phase1").lookup("R") - ); volVectorField& U2 = phase2->U(); surfaceScalarField& phi2 = phase2->phi(); - const dimensionedScalar& nu2 = phase2->nu(); - const dimensionedScalar& k2 = phase2->kappa(); - const dimensionedScalar& Cp2 = phase2->Cp(); - dimensionedScalar rho20 - ( - "rho0", - dimDensity, - transportProperties.subDict("phase2").lookup("rho0") - ); - dimensionedScalar R2 - ( - "R", - dimensionSet(0, 2, -2, -1, 0), - transportProperties.subDict("phase2").lookup("R") - ); dimensionedScalar pMin ( @@ -69,102 +57,16 @@ transportProperties.lookup("pMin") ); + rhoThermo& thermo1 = phase1->thermo(); + rhoThermo& thermo2 = phase2->thermo(); - Info<< "Reading field T1" << endl; - volScalarField T1 - ( - IOobject - ( - "T1", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + volScalarField& p = thermo1.p(); - Info<< "Reading field T2" << endl; - volScalarField T2 - ( - IOobject - ( - "T2", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + volScalarField rho1("rho" + phase1Name, thermo1.rho()); + const volScalarField& psi1 = thermo1.psi(); - volScalarField psi1 - ( - IOobject - ( - "psi1", - runTime.timeName(), - mesh - ), - 1.0/(R1*T1) - ); - - volScalarField psi2 - ( - IOobject - ( - "psi2", - runTime.timeName(), - mesh - ), - 1.0/(R2*T2) - ); - psi2.oldTime(); - - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField rho1("rho1", rho10 + psi1*p); - volScalarField rho2("rho2", rho20 + psi2*p); - - - Info<< "Reading field alpha1\n" << endl; - volScalarField alpha1 - ( - IOobject - ( - "alpha1", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField alpha2 - ( - IOobject - ( - "alpha2", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - scalar(1) - alpha1 - ); + volScalarField rho2("rho" + phase2Name, thermo2.rho()); + const volScalarField& psi2 = thermo2.psi(); volVectorField U ( @@ -179,27 +81,6 @@ alpha1*U1 + alpha2*U2 ); - dimensionedScalar Cvm - ( - "Cvm", - dimless, - transportProperties.lookup("Cvm") - ); - - dimensionedScalar Cl - ( - "Cl", - dimless, - transportProperties.lookup("Cl") - ); - - dimensionedScalar Ct - ( - "Ct", - dimless, - transportProperties.lookup("Ct") - ); - surfaceScalarField phi ( IOobject @@ -226,8 +107,6 @@ alpha1*rho1 + alpha2*rho2 ); - #include "createRASTurbulence.H" - Info<< "Calculating field DDtU1 and DDtU2\n" << endl; volVectorField DDtU1 @@ -248,6 +127,29 @@ Info<< "Calculating field g.h\n" << endl; volScalarField gh("gh", g & mesh.C()); + dimensionedScalar Cvm + ( + "Cvm", + dimless, + transportProperties.lookup("Cvm") + ); + + dimensionedScalar Cl + ( + "Cl", + dimless, + transportProperties.lookup("Cl") + ); + + dimensionedScalar Ct + ( + "Ct", + dimless, + transportProperties.lookup("Ct") + ); + + #include "createRASTurbulence.H" + IOdictionary interfacialProperties ( IOobject @@ -297,8 +199,8 @@ if ( !( - dispersedPhase == "1" - || dispersedPhase == "2" + dispersedPhase == phase1Name + || dispersedPhase == phase2Name || dispersedPhase == "both" ) ) @@ -337,7 +239,7 @@ ( IOobject ( - "rAU1", + "rAU" + phase1Name, runTime.timeName(), mesh, IOobject::NO_READ, @@ -387,5 +289,5 @@ ); Info<< "Creating field kinetic energy K\n" << endl; - volScalarField K1("K1", 0.5*magSqr(U1)); - volScalarField K2("K2", 0.5*magSqr(U2)); + volScalarField K1("K" + phase1Name, 0.5*magSqr(U1)); + volScalarField K2("K" + phase2Name, 0.5*magSqr(U2)); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createRASTurbulence.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createRASTurbulence.H index 8f05a1d1b3..0a782ef51e 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createRASTurbulence.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createRASTurbulence.H @@ -151,7 +151,7 @@ ( IOobject ( - "nut2", + "nut" + phase2Name, runTime.timeName(), mesh, IOobject::NO_READ, @@ -165,13 +165,13 @@ ( IOobject ( - "nuEff1", + "nuEff" + phase1Name, runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), - sqr(Ct)*nut2 + nu1 + sqr(Ct)*nut2 + thermo1.mu()/rho1 ); Info<< "Calculating field nuEff2\n" << endl; @@ -179,11 +179,11 @@ ( IOobject ( - "nuEff2", + "nuEff" + phase2Name, runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), - nut2 + nu2 + nut2 + thermo2.mu()/rho2 ); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H index d6ccf90289..d53bec5ea4 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H @@ -38,12 +38,12 @@ volScalarField heatTransferCoeff volVectorField Ur(U1 - U2); volScalarField magUr(mag(Ur) + residualSlip); - if (dispersedPhase == "1") + if (dispersedPhase == phase1Name) { dragCoeff = drag1->K(magUr); heatTransferCoeff = heatTransfer1->K(magUr); } - else if (dispersedPhase == "2") + else if (dispersedPhase == phase2Name) { dragCoeff = drag2->K(magUr); heatTransferCoeff = heatTransfer2->K(magUr); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/Make/options b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/Make/options index 92fe0b0d74..f031e05898 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/Make/options +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I../phaseModel/lnInclude LIB_LIBS = \ - -lcompressiblePhaseModel - + -lcompressiblePhaseModel \ + -lfluidThermophysicalModels \ + -lspecie diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.C index 9bc6cadaf6..95ade6ba05 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,8 +72,7 @@ Foam::tmp Foam::heatTransferModels::RanzMarshall::K ) const { volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); - dimensionedScalar Prb = - phase2_.rho()*phase2_.nu()*phase2_.Cp()/phase2_.kappa(); + volScalarField Prb(phase2_.rho()*phase2_.nu()*phase2_.Cp()/phase2_.kappa()); volScalarField Nu(scalar(2) + 0.6*sqrt(Re)*cbrt(Prb)); return 6.0*phase2_.kappa()*Nu/sqr(phase1_.d()); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/options b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/options index 2fcce9913d..7fdabf5730 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/options +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/foam/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I../phaseModel/lnInclude \ -I../interfacialModels/lnInclude diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 7d0767914e..18db3a70df 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,8 +45,8 @@ Foam::kineticTheoryModel::kineticTheoryModel phi1_(phase1.phi()), draga_(draga), - rho1_(phase1.rho()), - nu1_(phase1.nu()), + rho1_(phase1.rho()[0]), //***HGW + nu1_(phase1.nu()()[0]), //***HGW kineticTheoryProperties_ ( @@ -120,7 +120,7 @@ Foam::kineticTheoryModel::kineticTheoryModel ( IOobject ( - "mu1", + "mu" + phase1.name(), U1_.time().timeName(), U1_.mesh(), IOobject::NO_READ, diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index f7010b1c45..f9a7807d00 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -1,6 +1,6 @@ { - rho1 = rho10 + psi1*p; - rho2 = rho20 + psi2*p; + rho1 = thermo1.rho(); + rho2 = thermo2.rho(); surfaceScalarField alpha1f(fvc::interpolate(alpha1)); surfaceScalarField alpha2f(scalar(1) - alpha1f); @@ -11,10 +11,10 @@ surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1)); surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2)); - volVectorField HbyA1("HbyA1", U1); + volVectorField HbyA1("HbyA" + phase1Name, U1); HbyA1 = rAU1*U1Eqn.H(); - volVectorField HbyA2("HbyA2", U2); + volVectorField HbyA2("HbyA" + phase2Name, U2); HbyA2 = rAU2*U2Eqn.H(); mrfZones.absoluteFlux(phi1.oldTime()); @@ -38,14 +38,14 @@ surfaceScalarField phiHbyA1 ( - "phiHbyA1", + "phiHbyA" + phase1Name, (fvc::interpolate(HbyA1) & mesh.Sf()) + fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1) ); surfaceScalarField phiHbyA2 ( - "phiHbyA2", + "phiHbyA" + phase2Name, (fvc::interpolate(HbyA2) & mesh.Sf()) + fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2) ); @@ -96,8 +96,16 @@ //} //else { - surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi1); - surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi2); + surfaceScalarField phid1 + ( + "phid" + phase1Name, + fvc::interpolate(psi1)*phi1 + ); + surfaceScalarField phid2 + ( + "phid" + phase2Name, + fvc::interpolate(psi2)*phi2 + ); pEqnComp1 = fvc::ddt(rho1) + psi1*correction(fvm::ddt(p)) @@ -174,13 +182,15 @@ p = max(p, pMin); - rho1 = rho10 + psi1*p; - rho2 = rho20 + psi2*p; + thermo1.correct(); + thermo2.correct(); + rho1 = thermo1.rho(); + rho2 = thermo2.rho(); K1 = 0.5*magSqr(U1); K2 = 0.5*magSqr(U2); - //***HGW if (thermo.dpdt()) + if (thermo1.dpdt()) { dpdt = fvc::ddt(p); } diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/Make/options b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/Make/options index 0ec1139209..e441b0417b 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/Make/options +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/Make/options @@ -1,6 +1,9 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude LIB_LIBS = \ - -lincompressibleTransportModels + -lincompressibleTransportModels \ + -lfluidThermophysicalModels \ + -lspecie diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C index d80758ac8c..64d59b436d 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,35 +37,22 @@ Foam::phaseModel::phaseModel const word& phaseName ) : - dict_ + volScalarField ( - transportProperties.subDict("phase" + phaseName) + IOobject + ( + "alpha" + phaseName, + mesh.time().timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("alpha", dimless, 0) ), name_(phaseName), - nu_ - ( - "nu", - dimensionSet(0, 2, -1, 0, 0), - dict_.lookup("nu") - ), - kappa_ - ( - "kappa", - dimensionSet(1, 1, -3, -1, 0), - dict_.lookup("kappa") - ), - Cp_ - ( - "Cp", - dimensionSet(0, 2, -2, -1, 0), - dict_.lookup("Cp") - ), - rho_ - ( - "rho", - dimDensity, - dict_.lookup("rho") - ), + phaseDict_(transportProperties.subDict(phaseName)), + thermo_(rhoThermo::New(mesh, phaseName)), U_ ( IOobject @@ -79,6 +66,8 @@ Foam::phaseModel::phaseModel mesh ) { + thermo_->validate("phaseModel " + phaseName, "h", "e"); + const word phiName = "phi" + phaseName; IOobject phiHeader @@ -147,7 +136,7 @@ Foam::phaseModel::phaseModel dPtr_ = diameterModel::New ( - dict_, + phaseDict_, *this ); } diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.H index 90b2d2184e..18f5a47e46 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,6 +36,7 @@ SourceFiles #include "dimensionedScalar.H" #include "volFields.H" #include "surfaceFields.H" +#include "rhoThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,25 +51,18 @@ class diameterModel; \*---------------------------------------------------------------------------*/ class phaseModel +: + public volScalarField { // Private data - dictionary dict_; - //- Name of phase word name_; - //- Kinematic viscosity - dimensionedScalar nu_; + dictionary phaseDict_; - //- Thermal conductivity - dimensionedScalar kappa_; - - //- Heat capacity - dimensionedScalar Cp_; - - //- Density - dimensionedScalar rho_; + //- Thermophysical properties + autoPtr thermo_; //- Velocity volVectorField U_; @@ -116,24 +110,34 @@ public: tmp d() const; - const dimensionedScalar& nu() const + tmp nu() const { - return nu_; + return thermo_->mu()/thermo_->rho(); } - const dimensionedScalar& kappa() const + tmp kappa() const { - return kappa_; + return thermo_->kappa(); } - const dimensionedScalar& Cp() const + tmp Cp() const { - return Cp_; + return thermo_->Cp(); } - const dimensionedScalar& rho() const + const volScalarField& rho() const { - return rho_; + return thermo_->rho(); + } + + const rhoThermo& thermo() const + { + return thermo_(); + } + + rhoThermo& thermo() + { + return thermo_(); } const volVectorField& U() const diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H index 7f53411529..bc9a07b0a8 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H @@ -61,4 +61,4 @@ if (turbulence) #include "wallViscosity.H" } -nuEff2 = nut2 + nu2; +nuEff2 = nut2 + thermo2.mu()/rho2; diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallFunctions.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallFunctions.H index c91cce9a00..d85181cba2 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallFunctions.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallFunctions.H @@ -4,7 +4,6 @@ scalar Cmu25 = ::pow(Cmu.value(), 0.25); scalar Cmu75 = ::pow(Cmu.value(), 0.75); scalar kappa_ = kappa.value(); - scalar nu2_ = nu2.value(); const fvPatchList& patches = mesh.boundary(); @@ -30,6 +29,8 @@ forAll(patches, patchi) { const fvPatch& currPatch = patches[patchi]; + const scalarField& mu2_ = thermo2.mu().boundaryField()[patchi]; + const scalarField& rho2_ = rho2.boundaryField()[patchi]; if (isA(currPatch)) { @@ -52,7 +53,8 @@ /(kappa_*y[patchi][facei]); G[faceCelli] += - (nut2w[facei] + nu2_)*magFaceGradU[facei] + (nut2w[facei] + mu2_[facei]/rho2_[facei]) + *magFaceGradU[facei] *Cmu25*::sqrt(k[faceCelli]) /(kappa_*y[patchi][facei]); } diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallViscosity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallViscosity.H index b153a36014..9aa032149c 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallViscosity.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/wallViscosity.H @@ -2,13 +2,14 @@ scalar Cmu25 = ::pow(Cmu.value(), 0.25); scalar kappa_ = kappa.value(); scalar E_ = E.value(); - scalar nu2_ = nu2.value(); const fvPatchList& patches = mesh.boundary(); forAll(patches, patchi) { const fvPatch& currPatch = patches[patchi]; + const scalarField& mu2_ = thermo2.mu().boundaryField()[patchi]; + const scalarField& rho2_ = rho2.boundaryField()[patchi]; if (isA(currPatch)) { @@ -20,11 +21,14 @@ // calculate yPlus scalar yPlus = - Cmu25*y[patchi][facei]*::sqrt(k[faceCelli])/nu2_; + Cmu25*y[patchi][facei]*::sqrt(k[faceCelli]) + /(mu2_[facei]/rho2_[facei]); if (yPlus > 11.6) { - nutw[facei] = nu2_*(yPlus*kappa_/::log(E_*yPlus) - 1); + nutw[facei] = + (mu2_[facei]/rho2_[facei]) + *(yPlus*kappa_/::log(E_*yPlus) - 1); } else { diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C index 208e1c03b2..7580c3f9ac 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ Description #include "turbulenceModel.H" #include "fvcSmooth.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options index 437d8c57f3..b5c7b88e4f 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -18,5 +18,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C b/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C index 8950d265b0..99cc1dd8bd 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Description #include "turbulenceModel.H" #include "IOMRFZoneList.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options index 437d8c57f3..b5c7b88e4f 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -18,5 +18,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H index 50f0e4fb91..c0a9b615a0 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H @@ -13,12 +13,12 @@ - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) == - sources(rho, U) + fvOptions(rho, U) ); mrfZones.addCoriolis(rho, UEqn); UEqn.relax(); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H index 086f39cc3a..f5f349f227 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H @@ -42,7 +42,7 @@ U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } } diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index 3791297ea0..b87380d8a1 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -17,5 +17,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 17f31e6fc6..df1edf04e1 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -132,4 +132,4 @@ p_rgh = p - rho*gh; } - IObasicSourceList sources(mesh); + fv::IOoptionList fvOptions(mesh); diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options index b01465ff8c..4fa14dd6d2 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options @@ -8,7 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -23,5 +23,5 @@ EXE_LIBS = \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index 7304a7841f..1a9d210e23 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ Description #include "twoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H index 84519dbcdd..6fa4330997 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H @@ -48,7 +48,7 @@ U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } } diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 0cca9e81e5..53cc2719b9 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Description #include "twoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index aeaf998111..6c54b4454b 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -8,7 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -19,5 +19,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H index ae024d4807..a425d40e7f 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H @@ -166,4 +166,4 @@ p_rgh = p - rho*gh; } - IObasicSourceList sources(mesh); + fv::IOoptionList fvOptions(mesh); diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index dcb314025d..1fb80a4b2c 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "threePhaseInterfaceProperties.H" #include "turbulenceModel.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index 83341e0246..0ec531f0dd 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -42,7 +42,7 @@ U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); - sources.correct(U); + fvOptions.correct(U); } } diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options index 437d8c57f3..b5c7b88e4f 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -18,5 +18,5 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ - -lfieldSources \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H index e6e58b35e3..f8dcecf6ac 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H @@ -17,12 +17,12 @@ - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) == - sources(rho, U) + fvOptions(rho, U) ); UEqn.relax(); pZones.addResistance(UEqn); - sources.constrain(UEqn); + fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C index f32d6f3e6d..ea1a15b032 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ Description #include "turbulenceModel.H" #include "IOporosityModelList.H" #include "pimpleControl.H" -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H index 34fdc24afc..ddb923cf87 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H @@ -13,7 +13,7 @@ surfaceScalarField alpha1f(fvc::interpolate(alpha1)); surfaceScalarField phipp(ppMagf*fvc::snGrad(alpha1)*mesh.magSf()); phir += phipp; - phic += fvc::interpolate(alpha1)*phipp; + phic += alpha1f*phipp; } for (int acorr=0; acorr 0) { - ppMagf = rAU1f*fvc::interpolate - ( - (1.0/(rho1*(alpha1 + scalar(0.0001)))) - *g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax) - ); + surfaceScalarField alpha1f(fvc::interpolate(alpha1)); + + // ppMagf = rAU1f*fvc::interpolate + // ( + // (1.0/(rho1*(alpha1 + scalar(0.0001)))) + // *g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax) + // ); + ppMagf = + rAU1f/(alpha1f + scalar(0.0001)) + *(g0/rho1)*min(exp(preAlphaExp*(alpha1f - alphaMax)), expMax); fvScalarMatrix alpha1Eqn ( fvm::ddt(alpha1) - fvc::ddt(alpha1) - fvm::laplacian ( - (fvc::interpolate(alpha1) + scalar(0.0001))*ppMagf, + alpha1f*ppMagf, alpha1, "laplacian(alpha1PpMag,alpha1)" ) diff --git a/applications/test/Circulator/Test-Circulator.C b/applications/test/Circulator/Test-Circulator.C index 19a21f6b79..2d8ecd3765 100644 --- a/applications/test/Circulator/Test-Circulator.C +++ b/applications/test/Circulator/Test-Circulator.C @@ -38,94 +38,6 @@ Description using namespace Foam; -// return -// 0: no match -// +1: identical -// -1: same face, but different orientation -label compare(const face& a, const face& b) -{ - // Basic rule: we assume that the sequence of labels in each list - // will be circular in the same order (but not necessarily in the - // same direction or from the same starting point). - - // Trivial reject: faces are different size - label sizeA = a.size(); - label sizeB = b.size(); - - if (sizeA != sizeB || sizeA == 0) - { - return 0; - } - - const_circulator aCirc(a); - const_circulator bCirc(b); - - // Rotate face b until its element matches the starting element of face a. - do - { - if (aCirc() == bCirc()) - { - // Set bCirc fulcrum to its iterator and increment the iterators - bCirc.setFulcrumToIterator(); - ++aCirc; - ++bCirc; - - break; - } - } while (bCirc.circulate(CirculatorBase::CLOCKWISE)); - - // Look forwards around the faces for a match - do - { - if (aCirc() != bCirc()) - { - break; - } - } - while - ( - aCirc.circulate(CirculatorBase::CLOCKWISE), - bCirc.circulate(CirculatorBase::CLOCKWISE) - ); - - // If the circulator has stopped then faces a and b matched. - if (!aCirc.circulate()) - { - return 1; - } - else - { - // Reset the circulators back to their fulcrum - aCirc.setIteratorToFulcrum(); - bCirc.setIteratorToFulcrum(); - ++aCirc; - --bCirc; - } - - // Look backwards around the faces for a match - do - { - if (aCirc() != bCirc()) - { - break; - } - } - while - ( - aCirc.circulate(CirculatorBase::CLOCKWISE), - bCirc.circulate(CirculatorBase::ANTICLOCKWISE) - ); - - // If the circulator has stopped then faces a and b matched. - if (!aCirc.circulate()) - { - return -1; - } - - return 0; -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: @@ -184,40 +96,44 @@ int main(int argc, char *argv[]) Info<< nl << nl << "Compare two faces: " << endl; face a(identity(5)); - Info<< "Compare " << a << " and " << a << " Match = " << compare(a, a) + Info<< "Compare " << a << " and " << a << " Match = " << face::compare(a, a) << endl; face b(reverseList(a)); - Info<< "Compare " << a << " and " << b << " Match = " << compare(a, b) + Info<< "Compare " << a << " and " << b << " Match = " << face::compare(a, b) << endl; face c(a); c[4] = 3; - Info<< "Compare " << a << " and " << c << " Match = " << compare(a, c) + Info<< "Compare " << a << " and " << c << " Match = " << face::compare(a, c) << endl; face d(rotateList(a, 2)); - Info<< "Compare " << a << " and " << d << " Match = " << compare(a, d) + Info<< "Compare " << a << " and " << d << " Match = " << face::compare(a, d) << endl; face g(labelList(5, 1)); face h(g); - Info<< "Compare " << g << " and " << h << " Match = " << compare(g, h) + Info<< "Compare " << g << " and " << h << " Match = " << face::compare(g, h) << endl; g[0] = 2; h[3] = 2; - Info<< "Compare " << g << " and " << h << " Match = " << compare(g, h) + Info<< "Compare " << g << " and " << h << " Match = " << face::compare(g, h) << endl; g[4] = 3; h[4] = 3; - Info<< "Compare " << g << " and " << h << " Match = " << compare(g, h) + Info<< "Compare " << g << " and " << h << " Match = " << face::compare(g, h) << endl; face face1(identity(1)); Info<< "Compare " << face1 << " and " << face1 - << " Match = " << compare(face1, face1) << endl; + << " Match = " << face::compare(face1, face1) << endl; + + face face2(identity(1)+1); + Info<< "Compare " << face1 << " and " << face2 + << " Match = " << face::compare(face1, face2) << endl; Info<< nl << nl << "Zero face" << nl << endl; diff --git a/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C b/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C index cfc402e14a..6a8aeb9de0 100644 --- a/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C +++ b/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "volFields.H" #include "PatchEdgeFaceWave.H" #include "patchEdgeFaceInfo.H" -#include "patchDist.H" +#include "patchPatchDist.H" using namespace Foam; @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) << " from edges shared with patches " << otherPatchIDs << endl; - patchDist pwd(patch, otherPatchIDs); + patchPatchDist pwd(patch, otherPatchIDs); // Extract as patchField volScalarField vsf diff --git a/applications/test/vectorTools/Make/files b/applications/test/vectorTools/Make/files deleted file mode 100644 index 0b30b98f8f..0000000000 --- a/applications/test/vectorTools/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -Test-vectorTools.C - -EXE = $(FOAM_USER_APPBIN)/Test-vectorTools diff --git a/applications/test/vectorTools/Make/options b/applications/test/vectorTools/Make/options deleted file mode 100644 index 9e015e6078..0000000000 --- a/applications/test/vectorTools/Make/options +++ /dev/null @@ -1 +0,0 @@ -EXE_INC = -I$(FOAM_APP)/utilities/mesh/generation/cvMesh/vectorTools diff --git a/applications/test/vectorTools/Test-vectorTools.C b/applications/test/vectorTools/Test-vectorTools.C deleted file mode 100644 index 85d18ed989..0000000000 --- a/applications/test/vectorTools/Test-vectorTools.C +++ /dev/null @@ -1,71 +0,0 @@ -#include "vector.H" -#include "IOstreams.H" -#include "vectorTools.H" -#include "unitConversion.H" - -using namespace Foam; - - -void test(const vector& a, const vector& b, const scalar tolerance) -{ - Info<< "Vectors " << a << " and " << b - << " are (to tolerance of " << tolerance << "): "; - - if (vectorTools::areParallel(a, b, tolerance)) - Info<< " parallel "; - - if (vectorTools::areOrthogonal(a, b, tolerance)) - Info<< " orthogonal "; - - if (vectorTools::areAcute(a, b)) - Info<< " acute "; - - if (vectorTools::areObtuse(a, b)) - Info<< " obtuse "; - - Info<< ", angle = " << vectorTools::degAngleBetween(a, b); - - Info<< endl; -} - - -int main() -{ - vector a(1.0, 1.0, 1.0); - vector b(2.0, 2.0, 2.0); - - test(a, b, 0.0); - test(a, b, VSMALL); - test(a, b, SMALL); - test(a, b, 1e-3); - test(a, b, 1e-1); - - a = vector(1,0,0); - b = vector(0,2,0); - - test(a, b, 0.0); - test(a, b, VSMALL); - test(a, b, SMALL); - test(a, b, 1e-3); - test(a, b, 1e-1); - - a = vector(1,0,0); - b = vector(-1,0,0); - - test(a, b, 0.0); - test(a, b, VSMALL); - test(a, b, SMALL); - test(a, b, 1e-3); - test(a, b, 1e-1); - - a = vector(1,0,0); - b = vector(-1,2,0); - - test(a, b, 0.0); - test(a, b, VSMALL); - test(a, b, SMALL); - test(a, b, 1e-3); - test(a, b, 1e-1); - - return 0; -} diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseDict b/applications/utilities/mesh/advanced/collapseEdges/collapseDict index 78905475e3..340c33049f 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseDict +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseDict @@ -2,30 +2,22 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | -| \\ / A nd | Web: http://www.openfoam.org | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ - FoamFile { - version 2.0; - format ascii; - - root ""; - case ""; - instance ""; - local ""; - - class dictionary; - object collapseDict; + version 2.0; + format ascii; + class dictionary; + object collapseDict; } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // collapseEdgesCoeffs { // Edges shorter than this absolute value will be merged - minimumEdgeLength 1e-8; + minimumEdgeLength 1e-6; // The maximum angle between two edges that share a point attached to // no other edges @@ -33,7 +25,7 @@ collapseEdgesCoeffs // The amount that minimumEdgeLength will be reduced by for each // edge if that edge's collapse generates a poor quality face - reductionFactor 0.5; + reductionFactor 0.5; } @@ -75,10 +67,17 @@ meshQualityCoeffs { // Name of the dictionary that has the mesh quality coefficients used // by motionSmoother::checkMesh - meshQualityCoeffDict meshQualityDict; + #include "meshQualityDict"; + + // Maximum number of smoothing iterations for the reductionFactors + maximumSmoothingIterations 2; // Maximum number of outer iterations is mesh quality checking is enabled - maximumIterations 30; + maximumIterations 10; + + // Maximum number of iterations deletion of a point can cause a bad face + // to be constructed before it is forced to not be deleted + maxPointErrorCount 5; } diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index 132a602b1a..f617fd6ad1 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,6 +70,12 @@ int main(int argc, char *argv[]) "Collapse small and sliver faces as well as small edges" ); + argList::addBoolOption + ( + "collapseIndirectPatchFaces", + "Collapse faces that are in the face zone indirectPatchFaces" + ); + # include "addOverwriteOption.H" # include "setRootCase.H" # include "createTime.H" @@ -84,6 +90,8 @@ int main(int argc, char *argv[]) const bool overwrite = args.optionFound("overwrite"); const bool collapseFaces = args.optionFound("collapseFaces"); + const bool collapseIndirectPatchFaces = + args.optionFound("collapseIndirectPatchFaces"); forAll(timeDirs, timeI) { @@ -105,6 +113,18 @@ int main(int argc, char *argv[]) meshMod.changeMesh(mesh, false); } + if (collapseIndirectPatchFaces) + { + // Filter faces. Pass in the number of bad faces that are present + // from the previous edge filtering to use as a stopping criterion. + meshFilter.filterIndirectPatchFaces(); + { + polyTopoChange meshMod(newMesh); + + meshMod.changeMesh(mesh, false); + } + } + if (collapseFaces) { // Filter faces. Pass in the number of bad faces that are present diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake index a1141cfb1b..d557fa34f8 100755 --- a/applications/utilities/mesh/generation/Allwmake +++ b/applications/utilities/mesh/generation/Allwmake @@ -9,9 +9,5 @@ extrude2DMesh/Allwmake wmake snappyHexMesh -if [ -d "$CGAL_ARCH_PATH" ] -then - cvMesh/Allwmake -fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/mesh/generation/cvMesh/Allwclean b/applications/utilities/mesh/generation/cvMesh/Allwclean deleted file mode 100755 index 3eff84006a..0000000000 --- a/applications/utilities/mesh/generation/cvMesh/Allwclean +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # run from this directory -set -x - -wclean libso conformalVoronoiMesh -wclean -wclean cvMeshSurfaceSimplify -wclean cvMeshBackgroundMesh - -# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/mesh/generation/cvMesh/Allwmake b/applications/utilities/mesh/generation/cvMesh/Allwmake deleted file mode 100755 index d88e8cee4a..0000000000 --- a/applications/utilities/mesh/generation/cvMesh/Allwmake +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # run from this directory -set -x - -wmake libso conformalVoronoiMesh -wmake -#wmake cvMeshBackgroundMesh -(cd cvMeshSurfaceSimplify && ./Allwmake) -wmake cellSizeAndAlignmentGrid - -# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/mesh/generation/cvMesh/Make/files b/applications/utilities/mesh/generation/cvMesh/Make/files deleted file mode 100644 index 425e0f5b83..0000000000 --- a/applications/utilities/mesh/generation/cvMesh/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -cvMesh.C - -EXE = $(FOAM_APPBIN)/cvMesh diff --git a/applications/utilities/mesh/generation/cvMesh/Make/options b/applications/utilities/mesh/generation/cvMesh/Make/options deleted file mode 100644 index 9461fa3725..0000000000 --- a/applications/utilities/mesh/generation/cvMesh/Make/options +++ /dev/null @@ -1,38 +0,0 @@ -EXE_DEBUG = -DFULLDEBUG -g -O0 -EXE_FROUNDING_MATH = -frounding-math -EXE_NDEBUG = -DNDEBUG - -CGAL_EXACT = /*-DCGAL_DONT_USE_LAZY_KERNEL*/ -CGAL_INEXACT = -DCGAL_INEXACT - -include $(GENERAL_RULES)/CGAL - -EXE_INC = \ - ${EXE_FROUNDING_MATH} \ - ${EXE_NDEBUG} \ - ${CGAL_INEXACT} \ - ${CGAL_INC} \ - -IconformalVoronoiMesh/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ - -I$(LIB_SRC)/edgeMesh/lnInclude \ - -I$(LIB_SRC)/fileFormats/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/triSurface/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -IvectorTools - -EXE_LIBS = \ - $(CGAL_LIBS) \ - -lboost_thread \ - -lmpfr \ - -lconformalVoronoiMesh \ - -lmeshTools \ - -ldecompositionMethods \ - -L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \ - -ledgeMesh \ - -lfileFormats \ - -ltriSurface \ - -ldynamicMesh \ - -lsampling diff --git a/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/Make/files b/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/Make/files deleted file mode 100644 index 83b77fdc77..0000000000 --- a/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/Make/files +++ /dev/null @@ -1,2 +0,0 @@ -cellSizeAndAlignmentGrid.C -EXE = $(FOAM_USER_APPBIN)/cellSizeAndAlignmentGrid diff --git a/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/Make/options b/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/Make/options deleted file mode 100644 index 31d0d80858..0000000000 --- a/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/Make/options +++ /dev/null @@ -1,40 +0,0 @@ -EXE_DEBUG = -DFULLDEBUG -g -O0 -EXE_FROUNDING_MATH = -frounding-math -EXE_NDEBUG = -DNDEBUG - -CGAL_EXACT = /*-DCGAL_DONT_USE_LAZY_KERNEL*/ -CGAL_INEXACT = -DCGAL_INEXACT - -include $(GENERAL_RULES)/CGAL - - -EXE_INC = \ - ${EXE_FROUNDING_MATH} \ - ${EXE_NDEBUG} \ - ${CGAL_INEXACT} \ - ${CGAL_INC} \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/triSurface/lnInclude \ - -I$(LIB_SRC)/fileFormats/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ - -I$(LIB_SRC)/edgeMesh/lnInclude \ - -I$(HOME)/OpenFOAM/OpenFOAM-dev/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/lnInclude \ - -I$(HOME)/OpenFOAM/OpenFOAM-dev/applications/utilities/mesh/generation/cvMesh/vectorTools - -EXE_LIBS = \ - $(CGAL_LIBS) \ - -lmpfr \ - -lboost_thread \ - -lconformalVoronoiMesh \ - -lfiniteVolume \ - -lmeshTools \ - -ldecompositionMethods \ - -L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \ - -ledgeMesh \ - -ltriSurface \ - -ldynamicMesh \ - -lsampling \ - -lfileFormats diff --git a/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C b/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C deleted file mode 100644 index 18109761a5..0000000000 --- a/applications/utilities/mesh/generation/cvMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C +++ /dev/null @@ -1,711 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ 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 3 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, see . - -Application - Test-distributedDelaunayMesh - -Description - -\*---------------------------------------------------------------------------*/ - -#include "CGALTriangulation3DKernel.H" - -#include "indexedVertex.H" -#include "indexedCell.H" - -#include "argList.H" -#include "Time.H" -#include "DistributedDelaunayMesh.H" -#include "backgroundMeshDecomposition.H" -#include "searchableSurfaces.H" -#include "conformationSurfaces.H" -#include "PrintTable.H" -#include "Random.H" -#include "boundBox.H" -#include "point.H" -#include "cellShapeControlMesh.H" -#include "triadField.H" -#include "scalarIOField.H" -#include "pointIOField.H" -#include "triadIOField.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Main program: - -template -Foam::tmp > filterFarPoints -( - const Triangulation& mesh, - const Field& field -) -{ - tmp > tNewField(new Field(field.size())); - Field& newField = tNewField(); - - label added = 0; - label count = 0; - - for - ( - typename Triangulation::Finite_vertices_iterator vit = - mesh.finite_vertices_begin(); - vit != mesh.finite_vertices_end(); - ++vit - ) - { - if (vit->real()) - { - newField[added++] = field[count]; - } - - count++; - } - - newField.resize(added); - - return tNewField; -} - - -template -autoPtr buildMap -( - const T& mesh, - labelListList& pointPoints -) -{ - pointPoints.setSize(mesh.vertexCount()); - - globalIndex globalIndexing(mesh.vertexCount()); - - for - ( - typename T::Finite_vertices_iterator vit = mesh.finite_vertices_begin(); - vit != mesh.finite_vertices_end(); - ++vit - ) - { - if (!vit->real()) - { - continue; - } - - std::list adjVerts; - mesh.finite_adjacent_vertices(vit, std::back_inserter(adjVerts)); - - DynamicList