Commit d2b84dc5 authored by andy's avatar andy
Browse files

ENH: Updated fieldSources->fvOptions for solvers

parent ffb49af0
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
......@@ -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)
);
}
......
......@@ -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();
}
......@@ -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);
}
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 \
......
......@@ -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);
}
......@@ -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"
......
......@@ -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
// ~~~~~~~~~~~~~~~~~~~~~~~~~
......
......@@ -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);
}
......@@ -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())
......
......@@ -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
......@@ -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"
......
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 \
......
......@@ -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);
}
......@@ -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"
......
......@@ -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())
......
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 \
......
......@@ -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);
}
......@@ -30,16 +30,16 @@ tmp<fv::convectionScheme<scalar> > 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<fv::convectionScheme<scalar> > 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();
......
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment