diff --git a/applications/solvers/basic/laplacianFoam/Make/options b/applications/solvers/basic/laplacianFoam/Make/options index 04ef6c148d..4676308597 100644 --- a/applications/solvers/basic/laplacianFoam/Make/options +++ b/applications/solvers/basic/laplacianFoam/Make/options @@ -4,5 +4,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools diff --git a/applications/solvers/basic/laplacianFoam/createFields.H b/applications/solvers/basic/laplacianFoam/createFields.H index 79ad99a1af..14c54aaf62 100644 --- a/applications/solvers/basic/laplacianFoam/createFields.H +++ b/applications/solvers/basic/laplacianFoam/createFields.H @@ -36,4 +36,5 @@ dimensionedScalar DT transportProperties.lookup("DT") ); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/basic/laplacianFoam/laplacianFoam.C b/applications/solvers/basic/laplacianFoam/laplacianFoam.C index 1384ce0659..672a34dd90 100644 --- a/applications/solvers/basic/laplacianFoam/laplacianFoam.C +++ b/applications/solvers/basic/laplacianFoam/laplacianFoam.C @@ -30,7 +30,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,7 +55,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); while (simple.correctNonOrthogonal()) { @@ -62,12 +63,12 @@ int main(int argc, char *argv[]) ( fvm::ddt(T) - fvm::laplacian(DT, T) == - fvOptions(T) + fvModels.source(T) ); - fvOptions.constrain(TEqn); + fvConstraints.constrain(TEqn); TEqn.solve(); - fvOptions.constrain(T); + fvConstraints.constrain(T); } #include "write.H" diff --git a/applications/solvers/basic/scalarTransportFoam/Make/options b/applications/solvers/basic/scalarTransportFoam/Make/options index acbe7a6475..919bc18eda 100644 --- a/applications/solvers/basic/scalarTransportFoam/Make/options +++ b/applications/solvers/basic/scalarTransportFoam/Make/options @@ -5,6 +5,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools \ -lsampling diff --git a/applications/solvers/basic/scalarTransportFoam/createFields.H b/applications/solvers/basic/scalarTransportFoam/createFields.H index 8e9750850c..9233d4b6fa 100644 --- a/applications/solvers/basic/scalarTransportFoam/createFields.H +++ b/applications/solvers/basic/scalarTransportFoam/createFields.H @@ -54,4 +54,5 @@ dimensionedScalar DT #include "createPhi.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C index 2ea1166b9b..a2be270ed7 100644 --- a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C +++ b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C @@ -30,7 +30,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,7 +56,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); while (simple.correctNonOrthogonal()) { @@ -65,13 +66,13 @@ int main(int argc, char *argv[]) + fvm::div(phi, T) - fvm::laplacian(DT, T) == - fvOptions(T) + fvModels.source(T) ); TEqn.relax(); - fvOptions.constrain(TEqn); + fvConstraints.constrain(TEqn); TEqn.solve(); - fvOptions.constrain(T); + fvConstraints.constrain(T); } runTime.write(); diff --git a/applications/solvers/combustion/PDRFoam/EaEqn.H b/applications/solvers/combustion/PDRFoam/EaEqn.H index 8830d66c2a..5268099496 100644 --- a/applications/solvers/combustion/PDRFoam/EaEqn.H +++ b/applications/solvers/combustion/PDRFoam/EaEqn.H @@ -16,16 +16,16 @@ : -betav*dpdt ) - fvm::laplacian(Db, hea) - + betav*fvOptions(rho, hea) + + betav*fvModels.source(rho, hea) ); EaEqn.relax(); - fvOptions.constrain(EaEqn); + fvConstraints.constrain(EaEqn); EaEqn.solve(); - fvOptions.constrain(hea); + fvConstraints.constrain(hea); thermo.correct(); } diff --git a/applications/solvers/combustion/PDRFoam/EauEqn.H b/applications/solvers/combustion/PDRFoam/EauEqn.H index 62507a2265..98d3d53f6b 100644 --- a/applications/solvers/combustion/PDRFoam/EauEqn.H +++ b/applications/solvers/combustion/PDRFoam/EauEqn.H @@ -24,12 +24,12 @@ if (ign.ignited()) //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau) //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau) == - betav*fvOptions(rho, heau) + betav*fvModels.source(rho, heau) ); - fvOptions.constrain(heauEqn); + fvConstraints.constrain(heauEqn); heauEqn.solve(); - fvOptions.constrain(heau); + fvConstraints.constrain(heau); } diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index c7b13c6874..2b45f534eb 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -45,4 +45,5 @@ EXE_LIBS = \ -llaminarFlameSpeedModels \ -lfiniteVolume \ -ldynamicFvMesh \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index 639ed9a59a..291f74ed90 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -78,7 +78,8 @@ Description #include "Switch.H" #include "bound.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -120,7 +121,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" diff --git a/applications/solvers/combustion/PDRFoam/UEqn.H b/applications/solvers/combustion/PDRFoam/UEqn.H index 094b7dc4b4..114131c94e 100644 --- a/applications/solvers/combustion/PDRFoam/UEqn.H +++ b/applications/solvers/combustion/PDRFoam/UEqn.H @@ -7,10 +7,10 @@ + turbulence->divDevTau(U) == betav*rho*g - + betav*fvOptions(rho, U) + + betav*fvModels.source(rho, U) ); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu())); @@ -18,6 +18,6 @@ { U = invA & (UEqn.H() - betav*fvc::grad(p)); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H index 92b8da165f..286174e3ef 100644 --- a/applications/solvers/combustion/PDRFoam/bEqn.H +++ b/applications/solvers/combustion/PDRFoam/bEqn.H @@ -74,7 +74,7 @@ if (ign.ignited()) - fvm::Sp(fvc::div(phiSt), b) - fvm::laplacian(Db, b) == - betav*fvOptions(rho, b) + betav*fvModels.source(rho, b) ); @@ -86,11 +86,11 @@ if (ign.ignited()) // ~~~~~~~~~~~ bEqn.relax(); - fvOptions.constrain(bEqn); + fvConstraints.constrain(bEqn); bEqn.solve(); - fvOptions.constrain(b); + fvConstraints.constrain(b); Info<< "min(b) = " << min(b).value() << endl; diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index fc90852f22..d43f864769 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -238,4 +238,5 @@ fields.add(thermo.heu()); flameWrinkling->addXi(fields); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/combustion/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H index 39bd460541..6239b7f8b4 100644 --- a/applications/solvers/combustion/PDRFoam/pEqn.H +++ b/applications/solvers/combustion/PDRFoam/pEqn.H @@ -24,7 +24,7 @@ if (pimple.transonic()) + fvm::div(phid, p) - fvm::laplacian(rho*invA, p) == - betav*fvOptions(psi, p, rho.name()) + betav*fvModels.source(psi, p, rho.name()) ); pEqn.solve(); @@ -54,7 +54,7 @@ else + fvc::div(phiHbyA) - fvm::laplacian(rho*invA, p) == - betav*fvOptions(psi, p, rho.name()) + betav*fvModels.source(psi, p, rho.name()) ); pEqn.solve(); @@ -71,7 +71,7 @@ else U = HbyA - (invA & (betav*fvc::grad(p))); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/combustion/XiFoam/EaEqn.H b/applications/solvers/combustion/XiFoam/EaEqn.H index a65f2179d8..aa44299d1d 100644 --- a/applications/solvers/combustion/XiFoam/EaEqn.H +++ b/applications/solvers/combustion/XiFoam/EaEqn.H @@ -16,16 +16,16 @@ : -dpdt ) - fvm::laplacian(thermophysicalTransport->alphaEff(), hea) - + fvOptions(rho, hea) + + fvModels.source(rho, hea) ); EaEqn.relax(); - fvOptions.constrain(EaEqn); + fvConstraints.constrain(EaEqn); EaEqn.solve(); - fvOptions.constrain(hea); + fvConstraints.constrain(hea); thermo.correct(); } diff --git a/applications/solvers/combustion/XiFoam/EauEqn.H b/applications/solvers/combustion/XiFoam/EauEqn.H index 73e329c955..33703a7f80 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) == - fvOptions(rho, heau) + fvModels.source(rho, heau) ); - fvOptions.constrain(heauEqn); + fvConstraints.constrain(heauEqn); heauEqn.solve(); - fvOptions.constrain(heau); + fvConstraints.constrain(heau); } diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index 92f6e1d556..3e08145754 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -21,6 +21,7 @@ EXE_LIBS = \ -lspecie \ -llaminarFlameSpeedModels \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling \ -lmeshTools diff --git a/applications/solvers/combustion/XiFoam/UEqn.H b/applications/solvers/combustion/XiFoam/UEqn.H index 286c660b8b..1c08541677 100644 --- a/applications/solvers/combustion/XiFoam/UEqn.H +++ b/applications/solvers/combustion/XiFoam/UEqn.H @@ -6,17 +6,17 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/XiFoam/XiEngineFoam/Make/options b/applications/solvers/combustion/XiFoam/XiEngineFoam/Make/options index f552a3460d..b3244273b5 100644 --- a/applications/solvers/combustion/XiFoam/XiEngineFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/XiEngineFoam/Make/options @@ -14,7 +14,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling \ -lmeshTools \ -lengine \ diff --git a/applications/solvers/combustion/XiFoam/XiEngineFoam/UEqn.H b/applications/solvers/combustion/XiFoam/XiEngineFoam/UEqn.H index 1a7c0d364a..a6ba28c748 100644 --- a/applications/solvers/combustion/XiFoam/XiEngineFoam/UEqn.H +++ b/applications/solvers/combustion/XiFoam/XiEngineFoam/UEqn.H @@ -4,13 +4,13 @@ + fvm::div(phi, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/XiFoam/XiEngineFoam/XiEngineFoam.C b/applications/solvers/combustion/XiFoam/XiEngineFoam/XiEngineFoam.C index e44d74a6dc..d4b1eb8447 100644 --- a/applications/solvers/combustion/XiFoam/XiEngineFoam/XiEngineFoam.C +++ b/applications/solvers/combustion/XiFoam/XiEngineFoam/XiEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,8 @@ Description #include "OFstream.H" #include "mathematicalConstants.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/XiFoam/XiEngineFoam/pEqn.H b/applications/solvers/combustion/XiFoam/XiEngineFoam/pEqn.H index 57932a1861..ef9a7a3d85 100644 --- a/applications/solvers/combustion/XiFoam/XiEngineFoam/pEqn.H +++ b/applications/solvers/combustion/XiFoam/XiEngineFoam/pEqn.H @@ -32,7 +32,7 @@ if (pimple.transonic()) + fvm::div(phid, p) - fvm::laplacian(rhorAUf, p) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); pEqn.solve(); @@ -68,7 +68,7 @@ else + fvc::div(phiHbyA) - fvm::laplacian(rhorAUf, p) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); pEqn.solve(); @@ -85,7 +85,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); K = 0.5*magSqr(U); { diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index ff76cbf56c..5efa24d231 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -57,7 +57,8 @@ Description #include "ignition.H" #include "Switch.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -97,7 +98,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H index 631ca90099..b653d36cdd 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(thermophysicalTransport->alphaEff(), b) == - fvOptions(rho, b) + fvModels.source(rho, b) ); @@ -67,11 +67,11 @@ if (ign.ignited()) // ~~~~~~~~~~~ bEqn.relax(); - fvOptions.constrain(bEqn); + fvConstraints.constrain(bEqn); bEqn.solve(); - fvOptions.constrain(b); + fvConstraints.constrain(b); Info<< "min(b) = " << min(b).value() << endl; @@ -163,16 +163,16 @@ if (ign.ignited()) == - fvm::SuSp(-rho*Rc*Su0/Su, Su) - fvm::SuSp(rho*(sigmas + Rc), Su) - + fvOptions(rho, Su) + + fvModels.source(rho, Su) ); SuEqn.relax(); - fvOptions.constrain(SuEqn); + fvConstraints.constrain(SuEqn); SuEqn.solve(); - fvOptions.constrain(Su); + fvConstraints.constrain(Su); // Limit the maximum Su // ~~~~~~~~~~~~~~~~~~~~ @@ -250,16 +250,16 @@ if (ign.ignited()) ), Xi ) - + fvOptions(rho, Xi) + + fvModels.source(rho, Xi) ); XiEqn.relax(); - fvOptions.constrain(XiEqn); + fvConstraints.constrain(XiEqn); XiEqn.solve(); - fvOptions.constrain(Xi); + fvConstraints.constrain(Xi); // Correct boundedness of Xi // ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 3bfc22fec3..243026ee67 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -146,4 +146,5 @@ fields.add(thermo.he()); fields.add(thermo.heu()); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/combustion/XiFoam/ftEqn.H b/applications/solvers/combustion/XiFoam/ftEqn.H index ce543d79f1..dd06214bac 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(thermophysicalTransport->alphaEff(), ft) == - fvOptions(rho, ft) + fvModels.source(rho, ft) ); - fvOptions.constrain(ftEqn); + fvConstraints.constrain(ftEqn); ftEqn.solve(); - fvOptions.constrain(ft); + fvConstraints.constrain(ft); } diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H index 9201de8759..b7a5f85824 100644 --- a/applications/solvers/combustion/XiFoam/pEqn.H +++ b/applications/solvers/combustion/XiFoam/pEqn.H @@ -26,7 +26,7 @@ if (pimple.transonic()) + fvm::div(phid, p) - fvm::laplacian(rhorAUf, p) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); pEqn.solve(); @@ -61,7 +61,7 @@ else + fvc::div(phiHbyA) - fvm::laplacian(rhorAUf, p) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); pEqn.solve(); @@ -78,7 +78,7 @@ else U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(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 a259fa4d3f..f90006861a 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -23,4 +23,5 @@ EXE_LIBS = \ -lspecie \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index 561d8743c7..e365399328 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -36,7 +36,8 @@ Description #include "fluidThermoMomentumTransportModel.H" #include "fluidThermophysicalTransportModel.H" #include "OFstream.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -84,7 +85,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" diff --git a/applications/solvers/combustion/coldEngineFoam/createFields.H b/applications/solvers/combustion/coldEngineFoam/createFields.H index 65cf7e5fd1..d4974eb0d6 100644 --- a/applications/solvers/combustion/coldEngineFoam/createFields.H +++ b/applications/solvers/combustion/coldEngineFoam/createFields.H @@ -74,4 +74,5 @@ Info<< "Creating field kinetic energy K\n" << endl; volScalarField K("K", 0.5*magSqr(U)); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index eb4ec5504e..b26f04c300 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -22,7 +22,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools \ -lsampling \ -lmomentumTransportModels \ diff --git a/applications/solvers/combustion/fireFoam/UEqn.H b/applications/solvers/combustion/fireFoam/UEqn.H index 4c084714a8..a2f3df232d 100644 --- a/applications/solvers/combustion/fireFoam/UEqn.H +++ b/applications/solvers/combustion/fireFoam/UEqn.H @@ -7,12 +7,12 @@ + turbulence->divDevTau(U) == parcels.SU(U) - + fvOptions(rho, U) + + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -29,6 +29,6 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/fireFoam/YEEqn.H b/applications/solvers/combustion/fireFoam/YEEqn.H index 6e31f94ef4..5cf0242f8a 100644 --- a/applications/solvers/combustion/fireFoam/YEEqn.H +++ b/applications/solvers/combustion/fireFoam/YEEqn.H @@ -26,16 +26,16 @@ tmp> mvConvection parcels.SYi(i, Yi) + surfaceFilm.Srho(i) + combustion->R(Yi) - + fvOptions(rho, Yi) + + fvModels.source(rho, Yi) ); YiEqn.relax(); - fvOptions.constrain(YiEqn); + fvConstraints.constrain(YiEqn); YiEqn.solve("Yi"); - fvOptions.constrain(Yi); + fvConstraints.constrain(Yi); } } @@ -62,16 +62,16 @@ tmp> mvConvection combustion->Qdot() + parcels.Sh(he) + surfaceFilm.Sh() - + fvOptions(rho, he) + + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 0f0d187a35..d615250c18 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -134,5 +134,6 @@ volScalarField K("K", 0.5*magSqr(U)); #include "createClouds.H" #include "createSurfaceFilmModel.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" #include "checkRadiationModel.H" diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index 94c49d8ff6..f04b0727f7 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -39,7 +39,8 @@ Description #include "fluidReactionThermo.H" #include "combustionModel.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -86,7 +87,7 @@ int main(int argc, char *argv[]) // --- PIMPLE loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "YEEqn.H" diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index e7f7a374a1..c6f0d3ce13 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -33,7 +33,7 @@ while (pimple.correctNonOrthogonal()) == parcels.Srho() + surfaceFilm.Srho() - + fvOptions(psi, p_rgh, rho.name()) + + fvModels.source(psi, p_rgh, rho.name()) ); p_rghEqn.solve(); @@ -43,7 +43,7 @@ while (pimple.correctNonOrthogonal()) phi = phiHbyA + p_rghEqn.flux(); U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/combustion/fireFoam/rhoEqn.H b/applications/solvers/combustion/fireFoam/rhoEqn.H index 206244e5d2..8124d200ba 100644 --- a/applications/solvers/combustion/fireFoam/rhoEqn.H +++ b/applications/solvers/combustion/fireFoam/rhoEqn.H @@ -37,12 +37,12 @@ Description == parcels.Srho(rho) + surfaceFilm.Srho() - + fvOptions(rho) + + fvModels.source(rho) ); rhoEqn.solve(); - fvOptions.constrain(rho); + fvConstraints.constrain(rho); } // ************************************************************************* // diff --git a/applications/solvers/combustion/reactingFoam/EEqn.H b/applications/solvers/combustion/reactingFoam/EEqn.H index 6137839246..0827cd91d7 100644 --- a/applications/solvers/combustion/reactingFoam/EEqn.H +++ b/applications/solvers/combustion/reactingFoam/EEqn.H @@ -18,16 +18,16 @@ + thermophysicalTransport->divq(he) == reaction->Qdot() - + fvOptions(rho, he) + + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index 983e134865..9f6717ea54 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -31,4 +31,5 @@ EXE_LIBS = \ -ltopoChangerFvMesh \ -lmeshTools \ -lsampling \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/combustion/reactingFoam/UEqn.H b/applications/solvers/combustion/reactingFoam/UEqn.H index 90eb71c427..9083f9485f 100644 --- a/applications/solvers/combustion/reactingFoam/UEqn.H +++ b/applications/solvers/combustion/reactingFoam/UEqn.H @@ -8,18 +8,18 @@ tmp tUEqn + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); -fvOptions.constrain(UEqn); +fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H index ff029b535c..676b223269 100644 --- a/applications/solvers/combustion/reactingFoam/YEqn.H +++ b/applications/solvers/combustion/reactingFoam/YEqn.H @@ -24,16 +24,16 @@ forAll(Y, i) + thermophysicalTransport->divj(Yi) == reaction->R(Yi) - + fvOptions(rho, Yi) + + fvModels.source(rho, Yi) ); YiEqn.relax(); - fvOptions.constrain(YiEqn); + fvConstraints.constrain(YiEqn); YiEqn.solve("Yi"); - fvOptions.constrain(Yi); + fvConstraints.constrain(Yi); } } diff --git a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/Make/options index 7ba1bb1b49..bd003d5929 100644 --- a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/Make/options @@ -19,7 +19,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools \ -lsampling \ -lmomentumTransportModels \ diff --git a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/UEqn.H b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/UEqn.H index 093eb51028..f000c20a29 100644 --- a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/UEqn.H +++ b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/UEqn.H @@ -6,13 +6,13 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -29,6 +29,6 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/buoyantReactingFoam.C b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/buoyantReactingFoam.C index 0162685d5c..925b639bfc 100644 --- a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/buoyantReactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/buoyantReactingFoam.C @@ -38,7 +38,8 @@ Description #include "multivariateScheme.H" #include "pimpleControl.H" #include "pressureControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -92,7 +93,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "YEqn.H" diff --git a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/createFields.H index 1588e48139..f914969741 100644 --- a/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/buoyantReactingFoam/createFields.H @@ -130,7 +130,8 @@ forAll(Y, i) fields.add(thermo.he()); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" // This solver does not support moving mesh but it uses the pressure equation diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index 16e38c2ef2..d52985dc66 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -98,4 +98,5 @@ forAll(Y, i) fields.add(thermo.he()); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index c1c3075259..fd89761810 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -39,7 +39,8 @@ Description #include "pimpleControl.H" #include "pressureControl.H" #include "CorrectPhi.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -104,7 +105,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); if (pimple.frozenFlow()) { diff --git a/applications/solvers/compressible/rhoCentralFoam/Make/options b/applications/solvers/compressible/rhoCentralFoam/Make/options index 8f4f1f25f0..2c2db76e50 100644 --- a/applications/solvers/compressible/rhoCentralFoam/Make/options +++ b/applications/solvers/compressible/rhoCentralFoam/Make/options @@ -11,7 +11,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lfluidThermophysicalModels \ -lspecie \ -lrhoCentralFoam \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/EEqn.H b/applications/solvers/compressible/rhoPimpleFoam/EEqn.H index 73f168f5f8..a3844fd766 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/EEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/EEqn.H @@ -17,16 +17,16 @@ ) + thermophysicalTransport->divq(he) == - fvOptions(rho, he) + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index a627ee1fc4..aae8ed46fe 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -20,4 +20,5 @@ EXE_LIBS = \ -ltopoChangerFvMesh \ -lmeshTools \ -lsampling \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H index 90eb71c427..9083f9485f 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H @@ -8,18 +8,18 @@ tmp tUEqn + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); -fvOptions.constrain(UEqn); +fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index fd251fe092..df5da2eb11 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -87,4 +87,5 @@ volScalarField K("K", 0.5*magSqr(U)); dimensionedScalar initialMass = fvc::domainIntegrate(rho); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index 93dca6be5b..a68c68ee47 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -70,7 +70,7 @@ if (pimple.transonic()) fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + fvc::div(phiHbyA) + fvm::div(phid, p) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -112,7 +112,7 @@ else fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + fvc::div(phiHbyA) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -159,7 +159,7 @@ p.relax(); U = HbyA - rAAtU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); K = 0.5*magSqr(U); if (mesh.steady()) diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 1147b4ab61..e774da479d 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -41,7 +41,8 @@ Description #include "pimpleControl.H" #include "pressureControl.H" #include "CorrectPhi.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -144,7 +145,7 @@ int main(int argc, char *argv[]) #include "rhoEqn.H" } - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "EEqn.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/EEqn.H b/applications/solvers/compressible/rhoSimpleFoam/EEqn.H index 39a82dbcdf..b942bc5f4b 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/EEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/EEqn.H @@ -11,16 +11,16 @@ ) + thermophysicalTransport->divq(he) == - fvOptions(rho, he) + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index d81a7e2c19..f4fbdbccc4 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -17,4 +17,5 @@ EXE_LIBS = \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H index 63cc4d6781..33c6f2da99 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H @@ -8,14 +8,14 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index 26ee06ce83..ec2c56de3c 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -69,4 +69,5 @@ autoPtr thermophysicalTransport dimensionedScalar initialMass = fvc::domainIntegrate(rho); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index ccd4feecee..51c51695c8 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -64,7 +64,7 @@ if (simple.transonic()) + fvm::div(phid, p) - fvm::laplacian(rhorAAtUf, p) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); // Relax the pressure equation to ensure diagonal-dominance @@ -101,7 +101,7 @@ else fvc::div(phiHbyA) - fvm::laplacian(rhorAAtUf, p) == - fvOptions(psi, p, rho.name()) + fvModels.source(psi, p, rho.name()) ); pEqn.setReference @@ -126,7 +126,7 @@ p.relax(); U = HbyA - rAAtU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); pressureControl.limit(p); diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options index 5da5515fa5..11adf07def 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options @@ -19,4 +19,5 @@ EXE_LIBS = \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H index 8c8f8da153..cedba27681 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H @@ -8,7 +8,7 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); @@ -28,7 +28,7 @@ trTU = inv(tTU()); trTU.ref().rename("rAU"); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); volVectorField gradp(fvc::grad(p)); @@ -38,17 +38,17 @@ } U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } else { pZones.addResistance(UEqn); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); trAU = 1.0/UEqn.A(); trAU.ref().rename("rAU"); diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H index 7d0b1bfd00..d0753fd4f6 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H @@ -34,7 +34,7 @@ tpEqn = ( fvm::laplacian(rho*trTU(), p) - + fvOptions(psi, p, rho.name()) + + fvModels.source(psi, p, rho.name()) == fvc::div(phiHbyA) ); @@ -44,7 +44,7 @@ tpEqn = ( fvm::laplacian(rho*trAU(), p) - + fvOptions(psi, p, rho.name()) + + fvModels.source(psi, p, rho.name()) == fvc::div(phiHbyA) ); @@ -81,7 +81,7 @@ } U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); pressureControl.limit(p); diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C index 324cc09e45..eb60392bd6 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,8 @@ Description #include "fluidThermophysicalTransportModel.H" #include "simpleControl.H" #include "pressureControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "IOporosityModelList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index ea8ae829b7..4cb4ab2fdd 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -35,7 +35,8 @@ Description #include "fluidThermophysicalTransportModel.H" #include "simpleControl.H" #include "pressureControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,7 +62,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); // Pressure-velocity SIMPLE corrector #include "UEqn.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H index 5aadc9d021..833bff454f 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H @@ -18,16 +18,16 @@ + thermophysicalTransport->divq(he) == rho*(U&g) - + fvOptions(rho, he) + + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); } diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index 3d13487350..f65bfaa160 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -22,4 +22,5 @@ EXE_LIBS = \ -ltopoChangerFvMesh \ -lmeshTools \ -lsampling \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H index cc96d76932..bbec8ff24f 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H @@ -8,13 +8,13 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -31,6 +31,6 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index 15192f198d..e77920a27b 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -42,7 +42,8 @@ Description #include "pimpleControl.H" #include "pressureControl.H" #include "CorrectPhi.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -143,7 +144,7 @@ int main(int argc, char *argv[]) #include "rhoEqn.H" } - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "EEqn.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index 60f9500fdd..1b2f39a67b 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -109,5 +109,6 @@ volScalarField K("K", 0.5*magSqr(U)); dimensionedScalar initialMass = fvc::domainIntegrate(rho); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" #include "checkRadiationModel.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index e87a9aedbb..625a170e81 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -53,7 +53,7 @@ if (pimple.transonic()) fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + fvc::div(phiHbyA) + fvm::div(phid, p_rgh) == - fvOptions(psi, p_rgh, rho.name()) + fvModels.source(psi, p_rgh, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -79,7 +79,7 @@ else fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + fvc::div(phiHbyA) == - fvOptions(psi, p_rgh, rho.name()) + fvModels.source(psi, p_rgh, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -127,7 +127,7 @@ p_rgh.relax(); // calculated from the relaxed pressure U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); K = 0.5*magSqr(U); if (mesh.steady()) diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H index cd1b691358..fff8969262 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H @@ -12,16 +12,16 @@ + thermophysicalTransport->divq(he) == rho*(U&g) - + fvOptions(rho, he) + + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index 7543913e83..f3a0633953 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -10,7 +10,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling \ -lmeshTools \ -lthermophysicalTransportModels \ diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H index 02283cd14e..308f5e6246 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H @@ -8,13 +8,13 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (simple.momentumPredictor()) { @@ -31,5 +31,5 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index ce89cbc7b5..b91b6eb74f 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -35,7 +35,8 @@ Description #include "fluidThermophysicalTransportModel.H" #include "simpleControl.H" #include "pressureControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,7 +62,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); // Pressure-velocity SIMPLE corrector { diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index 9ac2bb8b82..57f56131b4 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -91,5 +91,6 @@ mesh.setFluxRequired(p_rgh.name()); dimensionedScalar initialMass = fvc::domainIntegrate(rho); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" #include "checkRadiationModel.H" diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 1749ff9d49..2a40092b37 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -41,7 +41,7 @@ if (simple.transonic()) fvc::div(phiHbyA) + fvm::div(phid, p_rgh) - fvm::laplacian(rhorAUf, p_rgh) == - fvOptions(psi, p_rgh, rho.name()); + fvModels.source(psi, p_rgh, rho.name()); // Relax the pressure equation to ensure diagonal-dominance p_rghEqn.relax(); @@ -63,7 +63,7 @@ else fvc::div(phiHbyA) - fvm::laplacian(rhorAUf, p_rgh) == - fvOptions(psi, p_rgh, rho.name()); + fvModels.source(psi, p_rgh, rho.name()); p_rghEqn.setReference ( @@ -88,7 +88,7 @@ p_rgh.relax(); // calculated from the relaxed pressure U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); pressureControl.limit(p); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 17f6f41544..cefdcbfa00 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -37,6 +37,7 @@ EXE_LIBS = \ -lfluidReactionThermophysicalTransportModels \ -lmeshTools \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lregionModels \ -lsampling diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 05aa6b5155..e6d4842393 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 | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,8 @@ Description #include "compressibleCourantNo.H" #include "solidRegionDiffNo.H" #include "solidThermo.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "coordinateSystem.H" #include "pimpleMultiRegionControl.H" #include "pressureControl.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H index 7a27f17c70..35530ca7c5 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H @@ -24,16 +24,16 @@ == rho*(U&g) + reaction.Qdot() - + fvOptions(rho, he) + + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H index 6688f18cdb..e95b7548ff 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H @@ -8,13 +8,13 @@ + MRF.DDt(rho, U) + turbulence.divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -31,8 +31,8 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } - fvOptions.constrain(U); + fvConstraints.constrain(U); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/YEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/YEqn.H index 418a2e46cd..7f377bea37 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/YEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/YEqn.H @@ -28,16 +28,16 @@ forAll(Y, i) + thermophysicalTransport.divj(Yi) == reaction.R(Yi) - + fvOptions(rho, Yi) + + fvModels.source(rho, Yi) ); YiEqn.relax(); - fvOptions.constrain(YiEqn); + fvConstraints.constrain(YiEqn); YiEqn.solve("Yi"); - fvOptions.constrain(Yi); + fvConstraints.constrain(Yi); } } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 27d6394a3b..337b88acb2 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -22,7 +22,8 @@ PtrList::fieldTable> List initialMassFluid(fluidRegions.size()); PtrList MRFfluid(fluidRegions.size()); -PtrList fvOptionsFluid(fluidRegions.size()); +PtrList fvModelsFluid(fluidRegions.size()); +PtrList fvConstraintsFluid(fluidRegions.size()); // Populate fluid field pointer lists forAll(fluidRegions, i) @@ -271,11 +272,18 @@ forAll(fluidRegions, i) new IOMRFZoneList(fluidRegions[i]) ); - Info<< " Adding fvOptionsFluid\n" << endl; - fvOptionsFluid.set + Info<< " Adding fvModelsFluid\n" << endl; + fvModelsFluid.set ( i, - new fv::options(fluidRegions[i]) + new Foam::fvModels(fluidRegions[i]) + ); + + Info<< " Adding fvConstraintsFluid\n" << endl; + fvConstraintsFluid.set + ( + i, + new fvConstraints(fluidRegions[i]) ); turbulenceFluid[i].validate(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H index 562b2b6a61..b8e5d41b27 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H @@ -33,7 +33,8 @@ fieldsFluid[i]; IOMRFZoneList& MRF = MRFfluid[i]; - fv::options& fvOptions = fvOptionsFluid[i]; + Foam::fvModels& fvModels = fvModelsFluid[i]; + Foam::fvConstraints& fvConstraints = fvConstraintsFluid[i]; #include "checkRadiationModel.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H index 04ba872a0a..163806b68c 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H @@ -1,6 +1,6 @@ if (pimple.frozenFlow()) { - fvOptions.correct(); + fvModels.correct(); #include "YEqn.H" #include "EEqn.H" @@ -12,7 +12,7 @@ else #include "rhoEqn.H" } - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "YEqn.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H index 12f21ff55e..27cd9cd51a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H @@ -1,6 +1,7 @@ // Initialise solid field pointer lists PtrList thermoSolid(solidRegions.size()); -PtrList fvOptionsSolid(solidRegions.size()); +PtrList fvModelsSolid(solidRegions.size()); +PtrList fvConstraintsSolid(solidRegions.size()); // Populate solid field pointer lists forAll(solidRegions, i) @@ -11,10 +12,17 @@ forAll(solidRegions, i) Info<< " Adding to thermoSolid\n" << endl; thermoSolid.set(i, solidThermo::New(solidRegions[i])); - Info<< " Adding to fvOptionsSolid\n" << endl; - fvOptionsSolid.set + Info<< " Adding to fvModelsSolid\n" << endl; + fvModelsSolid.set ( i, - new fv::options(solidRegions[i]) + new Foam::fvModels(solidRegions[i]) + ); + + Info<< " Adding fvConstraintsSolid\n" << endl; + fvConstraintsSolid.set + ( + i, + new fvConstraints(solidRegions[i]) ); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H index 63bd4d5fd3..ca83f8058d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H @@ -7,7 +7,8 @@ const volScalarField& rho = trho(); volScalarField& e = thermo.he(); -const fv::options& fvOptions = fvOptionsSolid[i]; +const Foam::fvModels& fvModels = fvModelsSolid[i]; +Foam::fvConstraints& fvConstraints = fvConstraintsSolid[i]; #include "checkRadiationModel.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H index a86d814195..986d33a362 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H @@ -6,16 +6,16 @@ fvm::ddt(rho, e) + thermo.divq(e) == - fvOptions(rho, e) + fvModels.source(rho, e) ); eEqn.relax(); - fvOptions.constrain(eEqn); + fvConstraints.constrain(eEqn); eEqn.solve(); - fvOptions.constrain(e); + fvConstraints.constrain(e); } } diff --git a/applications/solvers/heatTransfer/thermoFoam/EEqn.H b/applications/solvers/heatTransfer/thermoFoam/EEqn.H index 73f168f5f8..a3844fd766 100644 --- a/applications/solvers/heatTransfer/thermoFoam/EEqn.H +++ b/applications/solvers/heatTransfer/thermoFoam/EEqn.H @@ -17,16 +17,16 @@ ) + thermophysicalTransport->divq(he) == - fvOptions(rho, he) + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); } diff --git a/applications/solvers/heatTransfer/thermoFoam/Make/options b/applications/solvers/heatTransfer/thermoFoam/Make/options index c9a2ed0c71..09c87fb1aa 100644 --- a/applications/solvers/heatTransfer/thermoFoam/Make/options +++ b/applications/solvers/heatTransfer/thermoFoam/Make/options @@ -11,7 +11,8 @@ EXE_LIBS = \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lfluidThermophysicalModels \ -lspecie \ -lmomentumTransportModels \ diff --git a/applications/solvers/heatTransfer/thermoFoam/createFields.H b/applications/solvers/heatTransfer/thermoFoam/createFields.H index ab42850e76..e929ef96a4 100644 --- a/applications/solvers/heatTransfer/thermoFoam/createFields.H +++ b/applications/solvers/heatTransfer/thermoFoam/createFields.H @@ -69,5 +69,6 @@ volScalarField dpdt Info<< "Creating field kinetic energy K\n" << endl; volScalarField K("K", 0.5*magSqr(U)); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" #include "checkRadiationModel.H" diff --git a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C index 0835229b3d..d92126b46e 100644 --- a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C +++ b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C @@ -34,7 +34,8 @@ Description #include "fluidThermoMomentumTransportModel.H" #include "fluidThermophysicalTransportModel.H" #include "LESModel.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "simpleControl.H" #include "pimpleControl.H" @@ -84,7 +85,7 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); while (pimple.correctNonOrthogonal()) { diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options index e5d4d35052..4f5e9d97f7 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options @@ -14,4 +14,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C index 866a3c360d..72ac3cd5c7 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C @@ -49,7 +49,8 @@ Description #include "singlePhaseTransportModel.H" #include "kinematicMomentumTransportModel.H" #include "simpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" template void zeroCells @@ -103,7 +104,7 @@ int main(int argc, char *argv[]) // Pressure-velocity SIMPLE corrector { - fvOptions.correct(); + fvModels.correct(); // Momentum predictor @@ -113,17 +114,17 @@ int main(int argc, char *argv[]) + turbulence->divDevSigma(U) + fvm::Sp(alpha, U) == - fvOptions(U) + fvModels.source(U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); volScalarField rAU(1.0/UEqn.A()); volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); @@ -159,7 +160,7 @@ int main(int argc, char *argv[]) // Momentum corrector U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } // Adjoint Pressure-velocity SIMPLE corrector @@ -184,17 +185,17 @@ int main(int argc, char *argv[]) + turbulence->divDevSigma(Ua) + fvm::Sp(alpha, Ua) == - fvOptions(Ua) + fvModels.source(Ua) ); fvVectorMatrix& UaEqn = tUaEqn.ref(); UaEqn.relax(); - fvOptions.constrain(UaEqn); + fvConstraints.constrain(UaEqn); solve(UaEqn == -fvc::grad(pa)); - fvOptions.constrain(Ua); + fvConstraints.constrain(Ua); volScalarField rAUa(1.0/UaEqn.A()); volVectorField HbyAa("HbyAa", Ua); @@ -228,7 +229,7 @@ int main(int argc, char *argv[]) // Adjoint momentum corrector Ua = HbyAa - rAUa*fvc::grad(pa); Ua.correctBoundaryConditions(); - fvOptions.constrain(Ua); + fvConstraints.constrain(Ua); } laminarTransport.correct(); diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index 48a9dd2d49..b27751726e 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -110,4 +110,5 @@ volScalarField alpha zeroCells(alpha, inletCells); //zeroCells(alpha, outletCells); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/incompressible/boundaryFoam/Make/options b/applications/solvers/incompressible/boundaryFoam/Make/options index 3000f6bfe8..be1ef5cf89 100644 --- a/applications/solvers/incompressible/boundaryFoam/Make/options +++ b/applications/solvers/incompressible/boundaryFoam/Make/options @@ -12,5 +12,6 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index 4d4bae0b1a..540850701d 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -38,7 +38,8 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "kinematicMomentumTransportModel.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "wallFvPatch.H" #include "makeGraph.H" @@ -65,23 +66,23 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); fvVectorMatrix divR(turbulence->divDevSigma(U)); divR.source() = flowMask & divR.source(); fvVectorMatrix UEqn ( - divR == gradP + fvOptions(U) + divR == gradP + fvModels.source(U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); UEqn.solve(); - fvOptions.constrain(U); + fvConstraints.constrain(U); // Correct driving force for a constant volume flow rate diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index ac94f6cb57..6fd6cc2eae 100644 --- a/applications/solvers/incompressible/boundaryFoam/createFields.H +++ b/applications/solvers/incompressible/boundaryFoam/createFields.H @@ -48,4 +48,5 @@ dimensionedVector gradP Zero ); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/incompressible/pimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/Make/options index c908f122ff..e265b5eb8f 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/Make/options @@ -13,7 +13,8 @@ EXE_LIBS = \ -lincompressibleMomentumTransportModels \ -lincompressibleTransportModels \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options index a699863f86..bcac406a6b 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options @@ -14,5 +14,6 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C index 8284a98c79..19523e6b33 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C @@ -37,7 +37,8 @@ Description #include "kinematicMomentumTransportModel.H" #include "pimpleControl.H" #include "SRFModel.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +73,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UrelEqn.H" diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H index ecc3e3568f..8b358bcaf9 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H @@ -6,14 +6,14 @@ + turbulence->divDevSigma(Urel) + SRF->Su() == - fvOptions(Urel) + fvModels.source(Urel) ); fvVectorMatrix& UrelEqn = tUrelEqn.ref(); UrelEqn.relax(); - fvOptions.constrain(UrelEqn); + fvConstraints.constrain(UrelEqn); solve(UrelEqn == -fvc::grad(p)); - fvOptions.constrain(Urel); + fvConstraints.constrain(Urel); diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H index a3eacbe0c8..2d596c5c81 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H @@ -72,4 +72,5 @@ autoPtr turbulence incompressible::momentumTransportModel::New(U, phi, laminarTransport) ); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H index 5d6b9d978b..1a47f962ad 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H @@ -55,4 +55,4 @@ p.relax(); // Momentum corrector Urel = HbyA - rAtUrel()*fvc::grad(p); Urel.correctBoundaryConditions(); -fvOptions.constrain(Urel); +fvConstraints.constrain(Urel); diff --git a/applications/solvers/incompressible/pimpleFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/UEqn.H index f6055715e2..0201cbecce 100644 --- a/applications/solvers/incompressible/pimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/UEqn.H @@ -8,17 +8,17 @@ tmp tUEqn + MRF.DDt(U) + turbulence->divDevSigma(U) == - fvOptions(U) + fvModels.source(U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); -fvOptions.constrain(UEqn); +fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/incompressible/pimpleFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/createFields.H index 5555fc054b..336255912e 100644 --- a/applications/solvers/incompressible/pimpleFoam/createFields.H +++ b/applications/solvers/incompressible/pimpleFoam/createFields.H @@ -45,4 +45,5 @@ autoPtr turbulence ); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/incompressible/pimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pEqn.H index 336240212a..1d5530ea6f 100644 --- a/applications/solvers/incompressible/pimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pEqn.H @@ -59,7 +59,7 @@ p.relax(); U = HbyA - rAtU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); // Correct Uf if the mesh is moving fvc::correctUf(Uf, U, phi); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index a3ac0e0c85..665125ec99 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -38,7 +38,8 @@ Description #include "kinematicMomentumTransportModel.H" #include "pimpleControl.H" #include "CorrectPhi.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -109,7 +110,7 @@ int main(int argc, char *argv[]) } } - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" diff --git a/applications/solvers/incompressible/pisoFoam/Make/options b/applications/solvers/incompressible/pisoFoam/Make/options index 3000f6bfe8..be1ef5cf89 100644 --- a/applications/solvers/incompressible/pisoFoam/Make/options +++ b/applications/solvers/incompressible/pisoFoam/Make/options @@ -12,5 +12,6 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/incompressible/pisoFoam/UEqn.H b/applications/solvers/incompressible/pisoFoam/UEqn.H index 6b3cf166de..45e6beb60a 100644 --- a/applications/solvers/incompressible/pisoFoam/UEqn.H +++ b/applications/solvers/incompressible/pisoFoam/UEqn.H @@ -8,16 +8,16 @@ fvVectorMatrix UEqn + MRF.DDt(U) + turbulence->divDevSigma(U) == - fvOptions(U) + fvModels.source(U) ); UEqn.relax(); -fvOptions.constrain(UEqn); +fvConstraints.constrain(UEqn); if (piso.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/incompressible/pisoFoam/createFields.H b/applications/solvers/incompressible/pisoFoam/createFields.H index 3f81e6a9dd..a7dad2329d 100644 --- a/applications/solvers/incompressible/pisoFoam/createFields.H +++ b/applications/solvers/incompressible/pisoFoam/createFields.H @@ -43,4 +43,5 @@ autoPtr turbulence ); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/incompressible/pisoFoam/pEqn.H b/applications/solvers/incompressible/pisoFoam/pEqn.H index dcca078d48..c5078b5376 100644 --- a/applications/solvers/incompressible/pisoFoam/pEqn.H +++ b/applications/solvers/incompressible/pisoFoam/pEqn.H @@ -38,4 +38,4 @@ while (piso.correctNonOrthogonal()) U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); diff --git a/applications/solvers/incompressible/pisoFoam/pisoFoam.C b/applications/solvers/incompressible/pisoFoam/pisoFoam.C index 38688876b7..3d2470a922 100644 --- a/applications/solvers/incompressible/pisoFoam/pisoFoam.C +++ b/applications/solvers/incompressible/pisoFoam/pisoFoam.C @@ -38,7 +38,8 @@ Description #include "singlePhaseTransportModel.H" #include "kinematicMomentumTransportModel.H" #include "pisoControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,7 +68,7 @@ int main(int argc, char *argv[]) // Pressure-velocity PISO corrector { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" diff --git a/applications/solvers/incompressible/simpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/Make/options index 24c5c258ea..91fa0e6280 100644 --- a/applications/solvers/incompressible/simpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/Make/options @@ -13,5 +13,6 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options index e34b7d93cd..bee2cd1d77 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options @@ -14,5 +14,6 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C index 069cd78c1b..46d3c3bafd 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C @@ -35,7 +35,8 @@ Description #include "kinematicMomentumTransportModel.H" #include "SRFModel.H" #include "simpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -60,7 +61,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); // --- Pressure-velocity SIMPLE corrector { diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H index 122a270677..46491fb3cf 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H @@ -6,17 +6,17 @@ + turbulence->divDevSigma(Urel) + SRF->Su() == - fvOptions(Urel) + fvModels.source(Urel) ); fvVectorMatrix& UrelEqn = tUrelEqn.ref(); UrelEqn.relax(); - fvOptions.constrain(UrelEqn); + fvConstraints.constrain(UrelEqn); if (simple.momentumPredictor()) { solve(UrelEqn == -fvc::grad(p)); - fvOptions.constrain(Urel); + fvConstraints.constrain(Urel); } diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H index 4cc66cb431..0651e65f6f 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H @@ -69,4 +69,5 @@ autoPtr turbulence incompressible::momentumTransportModel::New(U, phi, laminarTransport) ); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H index 456284483d..3756698814 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H @@ -47,5 +47,5 @@ // Momentum corrector Urel = HbyA - rAtUrel()*fvc::grad(p); Urel.correctBoundaryConditions(); - fvOptions.constrain(Urel); + fvConstraints.constrain(Urel); } diff --git a/applications/solvers/incompressible/simpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/UEqn.H index b79736bf28..16ba8b5e55 100644 --- a/applications/solvers/incompressible/simpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/UEqn.H @@ -8,17 +8,17 @@ + MRF.DDt(U) + turbulence->divDevSigma(U) == - fvOptions(U) + fvModels.source(U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (simple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/incompressible/simpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/createFields.H index 8ad333be38..e0df4af480 100644 --- a/applications/solvers/incompressible/simpleFoam/createFields.H +++ b/applications/solvers/incompressible/simpleFoam/createFields.H @@ -43,4 +43,5 @@ autoPtr turbulence ); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/incompressible/simpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/pEqn.H index 1216533b4f..74266952f7 100644 --- a/applications/solvers/incompressible/simpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/pEqn.H @@ -46,5 +46,5 @@ // Momentum corrector U = HbyA - rAtU()*fvc::grad(p); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options index e34b7d93cd..bee2cd1d77 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options @@ -14,5 +14,6 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H index 50101ffd0a..d831d55fb8 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H @@ -8,7 +8,7 @@ + MRF.DDt(U) + turbulence->divDevSigma(U) == - fvOptions(U) + fvModels.source(U) ); fvVectorMatrix& UEqn = tUEqn.ref(); @@ -28,7 +28,7 @@ trTU = inv(tTU()); trTU.ref().rename("rAU"); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); volVectorField gradp(fvc::grad(p)); @@ -38,17 +38,17 @@ } U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } else { pZones.addResistance(UEqn); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); trAU = 1.0/UEqn.A(); trAU.ref().rename("rAU"); diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H index 568cff1ed7..2a8a9d31fa 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H @@ -56,4 +56,4 @@ else } U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C index 083a534191..50acf3a62b 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C @@ -36,7 +36,8 @@ Description #include "kinematicMomentumTransportModel.H" #include "simpleControl.H" #include "IOporosityModelList.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -63,7 +64,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); // Pressure-velocity SIMPLE corrector { diff --git a/applications/solvers/incompressible/simpleFoam/simpleFoam.C b/applications/solvers/incompressible/simpleFoam/simpleFoam.C index 834032b208..8af385577f 100644 --- a/applications/solvers/incompressible/simpleFoam/simpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/simpleFoam.C @@ -34,7 +34,8 @@ Description #include "singlePhaseTransportModel.H" #include "kinematicMomentumTransportModel.H" #include "simpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,7 +60,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - fvOptions.correct(); + fvModels.correct(); // --- Pressure-velocity SIMPLE corrector { diff --git a/applications/solvers/lagrangian/denseParticleFoam/Make/options b/applications/solvers/lagrangian/denseParticleFoam/Make/options index 09e526ffc3..03e92f2487 100644 --- a/applications/solvers/lagrangian/denseParticleFoam/Make/options +++ b/applications/solvers/lagrangian/denseParticleFoam/Make/options @@ -26,5 +26,6 @@ EXE_LIBS = \ -lfiniteVolume \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools diff --git a/applications/solvers/lagrangian/denseParticleFoam/UcEqn.H b/applications/solvers/lagrangian/denseParticleFoam/UcEqn.H index ce9c9c7d62..11556c8188 100644 --- a/applications/solvers/lagrangian/denseParticleFoam/UcEqn.H +++ b/applications/solvers/lagrangian/denseParticleFoam/UcEqn.H @@ -9,7 +9,7 @@ fvVectorMatrix UcEqn UcEqn.relax(); -fvOptions.constrain(UcEqn); +fvConstraints.constrain(UcEqn); volScalarField rAUc(1.0/UcEqn.A()); volScalarField rASpUc(1.0/(UcEqn.A() - cloudSUp/rhoc)); @@ -39,5 +39,5 @@ if (pimple.momentumPredictor()) + (1.0/rhoc)*(fvm::Sp(cloudSUp, Uc) - cloudSUp*Uc) ); - fvOptions.constrain(Uc); + fvConstraints.constrain(Uc); } diff --git a/applications/solvers/lagrangian/denseParticleFoam/createFields.H b/applications/solvers/lagrangian/denseParticleFoam/createFields.H index 55aac63f32..16530ef9b7 100644 --- a/applications/solvers/lagrangian/denseParticleFoam/createFields.H +++ b/applications/solvers/lagrangian/denseParticleFoam/createFields.H @@ -160,4 +160,5 @@ continuousPhaseTurbulence ) ); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/lagrangian/denseParticleFoam/denseParticleFoam.C b/applications/solvers/lagrangian/denseParticleFoam/denseParticleFoam.C index 35830b1369..075cbef36f 100644 --- a/applications/solvers/lagrangian/denseParticleFoam/denseParticleFoam.C +++ b/applications/solvers/lagrangian/denseParticleFoam/denseParticleFoam.C @@ -81,7 +81,8 @@ namespace Foam #include "PhaseIncompressibleMomentumTransportModel.H" #include "pimpleControl.H" #include "CorrectPhi.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "parcelCloudList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -205,7 +206,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UcEqn.H" diff --git a/applications/solvers/lagrangian/denseParticleFoam/pEqn.H b/applications/solvers/lagrangian/denseParticleFoam/pEqn.H index e748ed199f..e93ed6b7e6 100644 --- a/applications/solvers/lagrangian/denseParticleFoam/pEqn.H +++ b/applications/solvers/lagrangian/denseParticleFoam/pEqn.H @@ -53,7 +53,7 @@ (phicSUSu + phicSUSp*phic - pEqn.flux()/alphacf)/rASpUcf ); Uc.correctBoundaryConditions(); - fvOptions.constrain(Uc); + fvConstraints.constrain(Uc); // Correct Ucf if the mesh is moving fvc::correctUf(Ucf, Uc, phic); diff --git a/applications/solvers/lagrangian/reactingParticleFoam/EEqn.H b/applications/solvers/lagrangian/reactingParticleFoam/EEqn.H index 3fdfd30895..f2ea515de7 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/EEqn.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/EEqn.H @@ -26,16 +26,16 @@ + clouds.Sh(he) + surfaceFilm.Sh() + combustion->Qdot() - + fvOptions(rho, he) + + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); diff --git a/applications/solvers/lagrangian/reactingParticleFoam/Make/options b/applications/solvers/lagrangian/reactingParticleFoam/Make/options index 032b743001..2a10542b0e 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParticleFoam/Make/options @@ -24,7 +24,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling \ -lmeshTools \ -ldynamicFvMesh \ diff --git a/applications/solvers/lagrangian/reactingParticleFoam/UEqn.H b/applications/solvers/lagrangian/reactingParticleFoam/UEqn.H index bcbf02c746..679afdca38 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/UEqn.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/UEqn.H @@ -8,17 +8,17 @@ == rho()*g + clouds.SU(U) - + fvOptions(rho, U) + + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/lagrangian/reactingParticleFoam/YEqn.H b/applications/solvers/lagrangian/reactingParticleFoam/YEqn.H index ac585b1ffb..8ecb32f73c 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/YEqn.H @@ -30,18 +30,18 @@ if (Y.size()) + thermophysicalTransport->divj(Yi) == clouds.SYi(i, Yi) - + fvOptions(rho, Yi) + + fvModels.source(rho, Yi) + combustion->R(Yi) + surfaceFilm.Srho(i) ); YEqn.relax(); - fvOptions.constrain(YEqn); + fvConstraints.constrain(YEqn); YEqn.solve("Yi"); - fvOptions.constrain(Yi); + fvConstraints.constrain(Yi); } } diff --git a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options index 2ca2383535..43716bc846 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/Make/options @@ -25,7 +25,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling \ -lmeshTools \ -ldynamicFvMesh \ diff --git a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/UEqn.H b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/UEqn.H index 1e0c27f491..2537b4bb96 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/UEqn.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/UEqn.H @@ -7,12 +7,12 @@ + turbulence->divDevTau(U) == clouds.SU(U) - + fvOptions(rho, U) + + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -29,6 +29,6 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/buoyantReactingParticleFoam.C b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/buoyantReactingParticleFoam.C index e90665ba0a..9178e4bc72 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/buoyantReactingParticleFoam.C +++ b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/buoyantReactingParticleFoam.C @@ -38,7 +38,8 @@ Description #include "surfaceFilmModel.H" #include "combustionModel.H" #include "SLGThermo.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "pimpleControl.H" #include "pressureControl.H" #include "CorrectPhi.H" @@ -146,7 +147,7 @@ int main(int argc, char *argv[]) // --- PIMPLE loop while (solvePrimaryRegion && pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "YEqn.H" diff --git a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/createFields.H b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/createFields.H index 8659a667c6..ead5fc3e5f 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/createFields.H @@ -127,5 +127,6 @@ fields.add(thermo.he()); #include "createMRF.H" #include "createClouds.H" #include "createSurfaceFilmModel.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" #include "checkRadiationModel.H" diff --git a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/pEqn.H b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/pEqn.H index b5c8c74ca2..8e1477d345 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/buoyantReactingParticleFoam/pEqn.H @@ -35,7 +35,7 @@ fvScalarMatrix p_rghDDtEqn == clouds.Srho() + surfaceFilm.Srho() - + fvOptions(psi, p_rgh, rho.name()) + + fvModels.source(psi, p_rgh, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -57,7 +57,7 @@ while (pimple.correctNonOrthogonal()) U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } } diff --git a/applications/solvers/lagrangian/reactingParticleFoam/createFields.H b/applications/solvers/lagrangian/reactingParticleFoam/createFields.H index 9cc1f8a273..771c74568a 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/createFields.H @@ -108,5 +108,6 @@ fields.add(thermo.he()); #include "createMRF.H" #include "createClouds.H" #include "createSurfaceFilmModel.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" #include "checkRadiationModel.H" diff --git a/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options b/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options index f42e842985..ca337267f3 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/Make/options @@ -26,7 +26,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling \ -lmeshTools \ -ldynamicFvMesh \ diff --git a/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/engineFoam.C b/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/engineFoam.C index b8a3171c9e..b29cd86501 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/engineFoam.C +++ b/applications/solvers/lagrangian/reactingParticleFoam/engineFoam/engineFoam.C @@ -38,7 +38,8 @@ Description #include "surfaceFilmModel.H" #include "combustionModel.H" #include "SLGThermo.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "pimpleControl.H" #include "pressureControl.H" #include "CorrectPhi.H" @@ -145,7 +146,7 @@ int main(int argc, char *argv[]) // --- PIMPLE loop while (solvePrimaryRegion && pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "YEqn.H" diff --git a/applications/solvers/lagrangian/reactingParticleFoam/pEqn.H b/applications/solvers/lagrangian/reactingParticleFoam/pEqn.H index 6cbb7009e8..3d7c7ccb50 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/pEqn.H @@ -32,7 +32,7 @@ fvScalarMatrix pDDtEqn == clouds.Srho() + surfaceFilm.Srho() - + fvOptions(psi, p, rho.name()) + + fvModels.source(psi, p, rho.name()) ); while (pimple.correctNonOrthogonal()) @@ -55,7 +55,7 @@ p.relax(); U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); K = 0.5*magSqr(U); bool limitedp = pressureControl.limit(p); diff --git a/applications/solvers/lagrangian/reactingParticleFoam/reactingParticleFoam.C b/applications/solvers/lagrangian/reactingParticleFoam/reactingParticleFoam.C index 74a5bb4740..f77708e3cb 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/reactingParticleFoam.C +++ b/applications/solvers/lagrangian/reactingParticleFoam/reactingParticleFoam.C @@ -38,7 +38,8 @@ Description #include "surfaceFilmModel.H" #include "combustionModel.H" #include "SLGThermo.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "pimpleControl.H" #include "pressureControl.H" #include "CorrectPhi.H" @@ -142,7 +143,7 @@ int main(int argc, char *argv[]) // --- PIMPLE loop while (solvePrimaryRegion && pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" #include "YEqn.H" diff --git a/applications/solvers/lagrangian/reactingParticleFoam/rhoEqn.H b/applications/solvers/lagrangian/reactingParticleFoam/rhoEqn.H index 1a8e12d594..7d9b8049ee 100644 --- a/applications/solvers/lagrangian/reactingParticleFoam/rhoEqn.H +++ b/applications/solvers/lagrangian/reactingParticleFoam/rhoEqn.H @@ -37,12 +37,12 @@ Description == clouds.Srho(rho) + surfaceFilm.Srho() - + fvOptions(rho) + + fvModels.source(rho) ); rhoEqn.solve(); - fvOptions.constrain(rho); + fvConstraints.constrain(rho); } // ************************************************************************* // diff --git a/applications/solvers/lagrangian/rhoParticleFoam/Make/options b/applications/solvers/lagrangian/rhoParticleFoam/Make/options index cf646ee4be..eed287f87a 100644 --- a/applications/solvers/lagrangian/rhoParticleFoam/Make/options +++ b/applications/solvers/lagrangian/rhoParticleFoam/Make/options @@ -21,7 +21,8 @@ EXE_LIBS = \ -lmomentumTransportModels \ -lfluidThermoMomentumTransportModels \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools \ -lregionModels \ -lsurfaceFilmModels \ diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/EEqn.H b/applications/solvers/lagrangian/simpleReactingParticleFoam/EEqn.H index cdc4bafd22..2ce35faa2f 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/EEqn.H +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/EEqn.H @@ -14,16 +14,16 @@ rho*(U&g) + clouds.Sh(he) + combustion->Qdot() - + fvOptions(rho, he) + + fvModels.source(rho, he) ); EEqn.relax(); - fvOptions.constrain(EEqn); + fvConstraints.constrain(EEqn); EEqn.solve(); - fvOptions.constrain(he); + fvConstraints.constrain(he); thermo.correct(); Info<< "T gas min/max = " << min(T).value() << ", " diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options b/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options index 6d50329a17..0f28199b9d 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/Make/options @@ -42,5 +42,6 @@ EXE_LIBS = \ -lregionModels \ -lsurfaceFilmModels \ -lcombustionModels \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/UEqn.H b/applications/solvers/lagrangian/simpleReactingParticleFoam/UEqn.H index 61fcf167f9..99547def36 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/UEqn.H +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/UEqn.H @@ -8,14 +8,14 @@ == rho()*g + clouds.SU(U) - + fvOptions(rho, U) + + fvModels.source(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); solve(UEqn == -fvc::grad(p)); - fvOptions.constrain(U); + fvConstraints.constrain(U); diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/YEqn.H b/applications/solvers/lagrangian/simpleReactingParticleFoam/YEqn.H index e947a82cfb..d797090d31 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/YEqn.H +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/YEqn.H @@ -25,16 +25,16 @@ tmp> mvConvection == clouds.SYi(i, Yi) + combustion->R(Yi) - + fvOptions(rho, Yi) + + fvModels.source(rho, Yi) ); YEqn.relax(); - fvOptions.constrain(YEqn); + fvConstraints.constrain(YEqn); YEqn.solve("Yi"); - fvOptions.constrain(Yi); + fvConstraints.constrain(Yi); } } diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/createFields.H b/applications/solvers/lagrangian/simpleReactingParticleFoam/createFields.H index f9a9acf781..6ef519f19e 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/createFields.H +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/createFields.H @@ -103,5 +103,6 @@ fields.add(thermo.he()); #include "createMRF.H" #include "createClouds.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" #include "checkRadiationModel.H" diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/pEqn.H b/applications/solvers/lagrangian/simpleReactingParticleFoam/pEqn.H index 4fcb458bf6..6f8ef9b9a6 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/pEqn.H +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/pEqn.H @@ -25,7 +25,7 @@ while (simple.correctNonOrthogonal()) - fvm::laplacian(rhorAUf, p) == clouds.Srho() - + fvOptions(psi, p, rho.name()) + + fvModels.source(psi, p, rho.name()) ); pEqn.solve(); @@ -45,7 +45,7 @@ thermo.correctRho(psi*p - psip0); U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); -fvOptions.constrain(U); +fvConstraints.constrain(U); rho = thermo.rho(); rho = max(rho, rhoMin); diff --git a/applications/solvers/lagrangian/simpleReactingParticleFoam/simpleReactingParticleFoam.C b/applications/solvers/lagrangian/simpleReactingParticleFoam/simpleReactingParticleFoam.C index c0356a843f..1dfb9a44a3 100644 --- a/applications/solvers/lagrangian/simpleReactingParticleFoam/simpleReactingParticleFoam.C +++ b/applications/solvers/lagrangian/simpleReactingParticleFoam/simpleReactingParticleFoam.C @@ -37,7 +37,8 @@ Description #include "fluidReactionThermo.H" #include "combustionModel.H" #include "IOporosityModelList.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "SLGThermo.H" #include "simpleControl.H" @@ -67,7 +68,7 @@ int main(int argc, char *argv[]) clouds.evolve(); - fvOptions.correct(); + fvModels.correct(); // --- Pressure-velocity SIMPLE corrector loop { diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options index 1f70be75bd..d3338b6191 100644 --- a/applications/solvers/multiphase/cavitatingFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/Make/options @@ -17,5 +17,6 @@ EXE_LIBS = \ -lbarotropicCompressibilityModel \ -lfiniteVolume \ -ldynamicFvMesh \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 7725773921..685f4a03e9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -20,7 +20,7 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude + -I$(LIB_SRC)/fvModels/lnInclude EXE_LIBS = \ -ltwoPhaseMixtureThermo \ @@ -38,7 +38,8 @@ EXE_LIBS = \ -lsurfaceFilmModels \ -lsurfaceFilmDerivedFvPatchFields \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools \ -ldynamicMesh \ -ldynamicFvMesh diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H index 5b819ac4a8..72eedb6559 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H @@ -6,23 +6,23 @@ + ( fvc::div(fvc::absolute(phi, U), p)()() // - contErr/rho*p + (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))()() - - (U()&(fvOptions(rho, U)&U)()) - contErr*K + - (U()&(fvModels.source(rho, U)&U)()) - contErr*K ) *( alpha1()/mixture.thermo1().Cv()() + alpha2()/mixture.thermo2().Cv()() ) == - fvOptions(rho, T) + fvModels.source(rho, T) ); TEqn.relax(); - fvOptions.constrain(TEqn); + fvConstraints.constrain(TEqn); TEqn.solve(); - fvOptions.constrain(T); + fvConstraints.constrain(T); mixture.correctThermo(); mixture.correct(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index fcdaa6de00..b7608d1d0d 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -5,12 +5,12 @@ + MRF.DDt(rho, U) + turbulence.divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -28,7 +28,7 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C index 0a9be6713d..8e829200a4 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C @@ -39,7 +39,7 @@ namespace Foam addToRunTimeSelectionTable ( - option, + fvModel, VoFSolidificationMeltingSource, dictionary ); @@ -51,24 +51,24 @@ namespace Foam void Foam::fv::VoFSolidificationMeltingSource::readCoeffs() { - alphaSolidT_.reset(Function1::New("alphaSolidT", coeffs_).ptr()); - L_ = dimensionedScalar("L", dimEnergy/dimMass, coeffs_); - relax_ = coeffs_.lookupOrDefault("relax", 0.9); - Cu_ = coeffs_.lookupOrDefault("Cu", 100000); - q_ = coeffs_.lookupOrDefault("q", 0.001); + alphaSolidT_.reset(Function1::New("alphaSolidT", coeffs()).ptr()); + L_ = dimensionedScalar("L", dimEnergy/dimMass, coeffs()); + relax_ = coeffs().lookupOrDefault("relax", 0.9); + Cu_ = coeffs().lookupOrDefault("Cu", 100000); + q_ = coeffs().lookupOrDefault("q", 0.001); } void Foam::fv::VoFSolidificationMeltingSource::update() const { - if (curTimeIndex_ == mesh_.time().timeIndex()) + if (curTimeIndex_ == mesh().time().timeIndex()) { return; } if (debug) { - Info<< type() << ": " << name_ + Info<< type() << ": " << name() << " - updating solid phase fraction" << endl; } @@ -76,7 +76,7 @@ void Foam::fv::VoFSolidificationMeltingSource::update() const const twoPhaseMixtureThermo& thermo ( - mesh_.lookupObject + mesh().lookupObject ( twoPhaseMixtureThermo::dictName ) @@ -102,7 +102,7 @@ void Foam::fv::VoFSolidificationMeltingSource::update() const alphaSolid_.correctBoundaryConditions(); - curTimeIndex_ = mesh_.time().timeIndex(); + curTimeIndex_ = mesh().time().timeIndex(); } @@ -110,7 +110,7 @@ Foam::word Foam::fv::VoFSolidificationMeltingSource::alphaSolidName() const { const twoPhaseMixtureThermo& thermo ( - mesh_.lookupObject + mesh().lookupObject ( twoPhaseMixtureThermo::dictName ) @@ -132,7 +132,7 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource const fvMesh& mesh ) : - cellSetOption(sourceName, modelType, dict, mesh), + cellSetModel(sourceName, modelType, dict, mesh), alphaSolidT_(), L_("L", dimEnergy/dimMass, NaN), relax_(NaN), @@ -182,7 +182,7 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup const twoPhaseMixtureThermo& thermo ( - mesh_.lookupObject + mesh().lookupObject ( twoPhaseMixtureThermo::dictName ) @@ -216,7 +216,7 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup update(); scalarField& Sp = eqn.diag(); - const scalarField& V = mesh_.V(); + const scalarField& V = mesh().V(); const labelList& cells = this->cells(); @@ -235,7 +235,7 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup bool Foam::fv::VoFSolidificationMeltingSource::read(const dictionary& dict) { - if (cellSetOption::read(dict)) + if (cellSetModel::read(dict)) { readCoeffs(); return true; diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H index 74710bc700..a32f25d2ec 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H @@ -80,7 +80,7 @@ SourceFiles #include "fvMesh.H" #include "volFields.H" -#include "cellSetOption.H" +#include "cellSetModel.H" #include "Function1.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -96,7 +96,7 @@ namespace fv class VoFSolidificationMeltingSource : - public cellSetOption + public cellSetModel { // Private Data diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C index 055d26e09a..8a1addd4e0 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C @@ -39,7 +39,7 @@ namespace Foam addToRunTimeSelectionTable ( - option, + fvModel, VoFSurfaceFilm, dictionary ); @@ -57,22 +57,22 @@ Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm const fvMesh& mesh ) : - option(sourceName, modelType, dict, mesh), + fvModel(sourceName, modelType, dict, mesh), phaseName_(dict.lookup("phase")), thermo_ ( - mesh_.lookupObject + mesh.lookupObject ( IOobject::groupName(basicThermo::dictName, phaseName_) ) ), - slgThermo_(mesh_, thermo_), + slgThermo_(mesh, thermo_), film_ ( regionModels::surfaceFilmModel::New ( - mesh_, - mesh_.lookupObject("g") + mesh, + mesh.lookupObject("g") ) ), curTimeIndex_(-1) @@ -89,20 +89,20 @@ Foam::wordList Foam::fv::VoFSurfaceFilm::addSupFields() const void Foam::fv::VoFSurfaceFilm::correct() { - if (curTimeIndex_ == mesh_.time().timeIndex()) + if (curTimeIndex_ == mesh().time().timeIndex()) { return; } if (debug) { - Info<< type() << ": " << name_ + Info<< type() << ": " << name() << " - updating solid phase fraction" << endl; } film_->evolve(); - curTimeIndex_ = mesh_.time().timeIndex(); + curTimeIndex_ = mesh().time().timeIndex(); } @@ -126,7 +126,7 @@ void Foam::fv::VoFSurfaceFilm::addSup { const twoPhaseMixtureThermo& thermo ( - mesh_.lookupObject + mesh().lookupObject ( twoPhaseMixtureThermo::dictName ) diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H index f5d8d6d511..7e84ba7ab3 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H @@ -46,7 +46,7 @@ SourceFiles #ifndef VoFSurfaceFilm_H #define VoFSurfaceFilm_H -#include "fvOption.H" +#include "fvModel.H" #include "rhoThermo.H" #include "SLGThermo.H" #include "surfaceFilmModel.H" @@ -64,7 +64,7 @@ namespace fv class VoFSurfaceFilm : - public option + public fvModel { // Private Data diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H index 505ed46ce3..b29b4f35e9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H @@ -1,4 +1,4 @@ -fvOptions(alpha1, mixture.thermo1().rho()); +fvModels.source(alpha1, mixture.thermo1().rho()); tmp talphaPhi1(alphaPhi10); @@ -63,7 +63,7 @@ volScalarField::Internal contErr ( ( fvc::ddt(rho) + fvc::div(rhoPhi) - - (fvOptions(alpha1, mixture.thermo1().rho())&rho1) - - (fvOptions(alpha2, mixture.thermo2().rho())&rho2) + - (fvModels.source(alpha1, mixture.thermo1().rho())&rho1) + - (fvModels.source(alpha2, mixture.thermo2().rho())&rho2) )() ); diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index b1db01014d..a0c76f5abe 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -50,7 +50,8 @@ Description #include "compressibleInterPhaseTransportModel.H" #include "noPhaseChange.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "CorrectPhi.H" #include "fvcSmooth.H" @@ -137,7 +138,7 @@ int main(int argc, char *argv[]) divU.clear(); } - fvOptions.correct(); + fvModels.correct(); #include "alphaControls.H" #include "compressibleAlphaEqnSubCycle.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H index 991f08cdcf..645ffb242c 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H @@ -92,4 +92,5 @@ Info<< "Creating field kinetic energy K\n" << endl; volScalarField K("K", 0.5*magSqr(U)); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index 48ac8187a6..2bd71de318 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -52,7 +52,7 @@ ( ( fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f) - - (fvOptions(alpha1, mixture.thermo1().rho())&rho1) + - (fvModels.source(alpha1, mixture.thermo1().rho())&rho1) )/rho1 - fvc::ddt(alpha1) - fvc::div(alphaPhi1) + (alpha1/rho1) @@ -67,7 +67,7 @@ ( ( fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f) - - (fvOptions(alpha2, mixture.thermo2().rho())&rho2) + - (fvModels.source(alpha2, mixture.thermo2().rho())&rho2) )/rho2 - fvc::ddt(alpha2) - fvc::div(alphaPhi2) + (alpha2/rho2) @@ -86,7 +86,7 @@ ( ( fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f) - - (fvOptions(alpha1, mixture.thermo1().rho())&rho1) + - (fvModels.source(alpha1, mixture.thermo1().rho())&rho1) )/rho1 - fvc::ddt(alpha1) - fvc::div(alphaPhi1) + (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh)) @@ -96,7 +96,7 @@ ( ( fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f) - - (fvOptions(alpha2, mixture.thermo2().rho())&rho2) + - (fvModels.source(alpha2, mixture.thermo2().rho())&rho2) )/rho2 - fvc::ddt(alpha2) - fvc::div(alphaPhi2) + (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh)) @@ -150,7 +150,7 @@ U = HbyA + rAU()*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/driftFluxFoam/Make/options b/applications/solvers/multiphase/driftFluxFoam/Make/options index fe026d96de..2765511a0a 100644 --- a/applications/solvers/multiphase/driftFluxFoam/Make/options +++ b/applications/solvers/multiphase/driftFluxFoam/Make/options @@ -16,6 +16,7 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lsampling \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmomentumTransportModels \ -lfluidThermoMomentumTransportModels diff --git a/applications/solvers/multiphase/driftFluxFoam/UEqn.H b/applications/solvers/multiphase/driftFluxFoam/UEqn.H index 22c7935bc7..808512df88 100644 --- a/applications/solvers/multiphase/driftFluxFoam/UEqn.H +++ b/applications/solvers/multiphase/driftFluxFoam/UEqn.H @@ -9,12 +9,12 @@ + fvc::div(UdmModel.tauDm()) + turbulence->divDevTau(U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -31,5 +31,5 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/multiphase/driftFluxFoam/createFields.H b/applications/solvers/multiphase/driftFluxFoam/createFields.H index 5ac579805f..56c425f6ab 100644 --- a/applications/solvers/multiphase/driftFluxFoam/createFields.H +++ b/applications/solvers/multiphase/driftFluxFoam/createFields.H @@ -132,4 +132,5 @@ mesh.setFluxRequired(alpha1.name()); tmp talphaPhiCorr0; #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C index 6411db8a66..924601960b 100644 --- a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C +++ b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C @@ -41,7 +41,8 @@ Description #include "momentumTransportModel.H" #include "CompressibleMomentumTransportModel.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "gaussLaplacianScheme.H" #include "uncorrectedSnGrad.H" @@ -83,7 +84,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - fvOptions.correct(); + fvModels.correct(); UdmModel.correct(); diff --git a/applications/solvers/multiphase/driftFluxFoam/pEqn.H b/applications/solvers/multiphase/driftFluxFoam/pEqn.H index e8427a644a..2a7071e2cd 100644 --- a/applications/solvers/multiphase/driftFluxFoam/pEqn.H +++ b/applications/solvers/multiphase/driftFluxFoam/pEqn.H @@ -42,7 +42,7 @@ U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index 126aa11a65..ee12a0285a 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -20,5 +20,6 @@ EXE_LIBS = \ -lfiniteVolume \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools diff --git a/applications/solvers/multiphase/interFoam/UEqn.H b/applications/solvers/multiphase/interFoam/UEqn.H index 40ce2486bb..e620093f29 100644 --- a/applications/solvers/multiphase/interFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/UEqn.H @@ -7,12 +7,12 @@ + turbulence->divDevTau(rho, U) == phaseChange.SU(rho, rhoPhi, U) - + fvOptions(rho, U) + + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -30,5 +30,5 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index be0b5a6ff9..6a2ab79a27 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -112,4 +112,5 @@ mesh.setFluxRequired(p_rgh.name()); mesh.setFluxRequired(alpha1.name()); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index e28a9cde47..264c3bd578 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -43,7 +43,8 @@ Description #include "noPhaseChange.H" #include "kinematicMomentumTransportModel.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "CorrectPhi.H" #include "fvcSmooth.H" @@ -149,7 +150,7 @@ int main(int argc, char *argv[]) divU.clear(); } - fvOptions.correct(); + fvModels.correct(); surfaceScalarField rhoPhi ( diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index 805645e0f3..086eeba1c9 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -24,5 +24,6 @@ EXE_LIBS = \ -lfiniteVolume \ -ldynamicFvMesh \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/UEqn.H b/applications/solvers/multiphase/interFoam/interMixingFoam/UEqn.H index 3cd6075acf..984ac6f757 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/UEqn.H @@ -6,12 +6,12 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(rho, U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -29,5 +29,5 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H index 0e9168c0aa..8f350e9b73 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H @@ -125,4 +125,5 @@ mesh.setFluxRequired(p_rgh.name()); mesh.setFluxRequired(alpha2.name()); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index c3090d0208..0e7f76418c 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -39,7 +39,8 @@ Description #include "immiscibleIncompressibleThreePhaseMixture.H" #include "kinematicMomentumTransportModel.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "CorrectPhi.H" #include "fvcSmooth.H" @@ -118,7 +119,7 @@ int main(int argc, char *argv[]) } } - fvOptions.correct(); + fvModels.correct(); #include "alphaEqnSubCycle.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interMixingFoam/pEqn.H index a80a751083..5d7efac483 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/pEqn.H @@ -57,7 +57,7 @@ U = HbyA + rAU()*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index ad89b2f716..423fd08e0d 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -61,7 +61,7 @@ U = HbyA + rAU()*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 228b3c3783..2a09534e11 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -26,7 +26,8 @@ License #include "kineticTheoryModel.H" #include "mathematicalConstants.H" #include "phaseSystem.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -470,7 +471,11 @@ void Foam::RASModels::kineticTheoryModel::correct() // 'thermal' conductivity (Table 3.3, p. 49) kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_); - const fv::options& fvOptions(fv::options::New(mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(mesh_) + ); // Construct the granular temperature equation (Eq. 3.20, p. 44) // NB. note that there are two typos in Eq. 3.20: @@ -491,13 +496,13 @@ void Foam::RASModels::kineticTheoryModel::correct() + fvm::Sp(-gammaCoeff, Theta_) + fvm::Sp(-J1, Theta_) + fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_) - + fvOptions(alpha, rho, Theta_) + + fvModels.source(alpha, rho, Theta_) ); ThetaEqn.relax(); - fvOptions.constrain(ThetaEqn); + fvConstraints.constrain(ThetaEqn); ThetaEqn.solve(); - fvOptions.constrain(Theta_); + fvConstraints.constrain(Theta_); } else { diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/EEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/EEqns.H index 48aa1b896e..7647166057 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/EEqns.H @@ -23,13 +23,13 @@ for (int Ecorr=0; Ecorr pEqnComps(phases.size()); } // Option sources - if (fvOptions.addsSupToField(rho.name())) + if (fvModels.addsSupToField(rho.name())) { - pEqnComp -= (fvOptions(alpha, rho) & rho)/rho; + pEqnComp -= (fvModels.source(alpha, rho) & rho)/rho; } // Mass transfer diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/UEqns.H index 47501ba8e9..f9de3628e4 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/UEqns.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/UEqns.H @@ -25,13 +25,13 @@ PtrList UEqns(phases.size()); phase.UEqn() == *momentumTransfer[phase.name()] - + fvOptions(alpha, rho, U) + + fvModels.source(alpha, rho, U) ) ); UEqns[phase.index()].relax(); - fvOptions.constrain(UEqns[phase.index()]); + fvConstraints.constrain(UEqns[phase.index()]); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H index 452563baae..29b47eaefb 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H @@ -321,7 +321,7 @@ while (pimple.correct()) phase.URef().correctBoundaryConditions(); phase.correctUf(); - fvOptions.constrain(phase.URef()); + fvConstraints.constrain(phase.URef()); } } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/UEqns.H index eef675df1f..864d9f811d 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/UEqns.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/UEqns.H @@ -28,13 +28,13 @@ PtrList UEqns(phases.size()); phase.UfEqn() == *momentumTransfer[phase.name()] - + fvOptions(alpha, rho, U) + + fvModels.source(alpha, rho, U) ) ); UEqns[phase.index()].relax(); - fvOptions.constrain(UEqns[phase.index()]); + fvConstraints.constrain(UEqns[phase.index()]); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H index 7dc6754cfb..64ba72126f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H @@ -299,7 +299,7 @@ while (pimple.correct()) phase.URef().correctBoundaryConditions(); phase.correctUf(); - fvOptions.constrain(phase.URef()); + fvConstraints.constrain(phase.URef()); } } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/diameterModels/IATE/IATE.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/diameterModels/IATE/IATE.C index 7b300f2e48..d80056f816 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/diameterModels/IATE/IATE.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/diameterModels/IATE/IATE.C @@ -31,7 +31,8 @@ License #include "fvcDdt.H" #include "fvcDiv.H" #include "fvcAverage.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "mathematicalConstants.H" #include "fundamentalConstants.H" #include "addToRunTimeSelectionTable.H" @@ -142,7 +143,11 @@ void Foam::diameterModels::IATE::correct() R += sources_[j].R(alphaAv, kappai_); } - const fv::options& fvOptions(fv::options::New(phase().mesh())); + const Foam::fvModels& fvModels(Foam::fvModels::New(phase().mesh())); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(phase().mesh()) + ); // Construct the interfacial curvature equation fvScalarMatrix kappaiEqn @@ -151,12 +156,12 @@ void Foam::diameterModels::IATE::correct() - fvm::Sp(fvc::div(phase().phi()), kappai_) == R - + fvOptions(kappai_) + + fvModels.source(kappai_) ); kappaiEqn.relax(); - fvOptions.constrain(kappaiEqn); + fvConstraints.constrain(kappaiEqn); kappaiEqn.solve(); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index d7257579d2..7bc08e3f57 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -767,9 +767,9 @@ void Foam::phaseSystem::correctContinuityError() ) ); - if (fvOptions().addsSupToField(rho.name())) + if (fvModels().addsSupToField(rho.name())) { - source += fvOptions()(alpha, rho)ρ + source += fvModels().source(alpha, rho)ρ } if (dmdts.set(phase.index())) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H index d9c43e1b48..80e662083b 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H @@ -45,7 +45,8 @@ SourceFiles #include "PtrListDictionary.H" #include "IOMRFZoneList.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "volFields.H" #include "surfaceFields.H" @@ -431,11 +432,17 @@ public: //- Return MRF zones inline const IOMRFZoneList& MRF() const; - //- Access the fvOptions - inline fv::options& fvOptions(fvMesh& mesh); + //- Access the fvModels + inline Foam::fvModels& fvModels(fvMesh& mesh); - //- Access the fvOptions - inline const fv::options& fvOptions() const; + //- Access the fvModels + inline const Foam::fvModels& fvModels() const; + + //- Access the fvConstraints + inline Foam::fvConstraints& fvConstraints(fvMesh& mesh); + + //- Access the fvConstraints + inline const Foam::fvConstraints& fvConstraints() const; // Sub-model lookup diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H index 8e3d5c39af..1f5b79336f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H @@ -161,15 +161,27 @@ inline const Foam::IOMRFZoneList& Foam::phaseSystem::MRF() const } -inline Foam::fv::options& Foam::phaseSystem::fvOptions(fvMesh& mesh) +inline Foam::fvModels& Foam::phaseSystem::fvModels(fvMesh& mesh) { - return fv::options::New(mesh); + return Foam::fvModels::New(mesh); } -inline const Foam::fv::options& Foam::phaseSystem::fvOptions() const +inline const Foam::fvModels& Foam::phaseSystem::fvModels() const { - return fv::options::New(mesh_); + return Foam::fvModels::New(mesh_); +} + + +inline Foam::fvConstraints& Foam::phaseSystem::fvConstraints(fvMesh& mesh) +{ + return Foam::fvConstraints::New(mesh); +} + + +inline const Foam::fvConstraints& Foam::phaseSystem::fvConstraints() const +{ + return Foam::fvConstraints::New(mesh_); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C index 0755199dfc..22ea1b44ba 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C @@ -1270,13 +1270,13 @@ void Foam::diameterModels::populationBalanceModel::solve() == Su_[i] - fvm::SuSp(SuSp_[i], fi) - + fluid_.fvOptions()(alpha, rho, fi)/rho + + fluid_.fvModels().source(alpha, rho, fi)/rho + fvc::ddt(residualAlpha, fi) - fvm::ddt(residualAlpha, fi) ); sizeGroupEqn.relax(); - fluid_.fvOptions().constrain(sizeGroupEqn); + fluid_.fvConstraints().constrain(sizeGroupEqn); maxInitialResidual = max ( @@ -1284,7 +1284,7 @@ void Foam::diameterModels::populationBalanceModel::solve() maxInitialResidual ); - fluid_.fvOptions().constrain(fi); + fluid_.fvConstraints().constrain(fi); } } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index 21d4fd9a75..5409f2d81c 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -18,6 +18,7 @@ EXE_LIBS = \ -lincompressibleMomentumTransportModels \ -lfiniteVolume \ -ldynamicFvMesh \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools \ -lsampling diff --git a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H index 3cd6075acf..984ac6f757 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H @@ -6,12 +6,12 @@ + MRF.DDt(rho, U) + turbulence->divDevTau(rho, U) == - fvOptions(rho, U) + fvModels.source(rho, U) ); UEqn.relax(); - fvOptions.constrain(UEqn); + fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { @@ -29,5 +29,5 @@ ) ); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H index a920e87765..8514307490 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H @@ -93,4 +93,5 @@ if (p_rgh.needReference()) mesh.setFluxRequired(p_rgh.name()); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index c00401250f..6a3396fa8c 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -38,7 +38,8 @@ Description #include "multiphaseMixture.H" #include "kinematicMomentumTransportModel.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "CorrectPhi.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -112,7 +113,7 @@ int main(int argc, char *argv[]) } } - fvOptions.correct(); + fvModels.correct(); mixture.solve(); rho = mixture.rho(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H index a80a751083..5d7efac483 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H @@ -57,7 +57,7 @@ U = HbyA + rAU()*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options index 71875b68ed..16732b80ce 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options @@ -15,5 +15,6 @@ EXE_LIBS = \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -lmeshTools \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lsampling diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H index a2dc2b1d02..2db0e87069 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H @@ -6,17 +6,17 @@ tmp tUEqn + MRF.DDt(U) + turbulence->divDevSigma(U) == - fvOptions(U) + fvModels.source(U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); -fvOptions.constrain(UEqn); +fvConstraints.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == -fvc::grad(p_gh)); - fvOptions.constrain(U); + fvConstraints.constrain(U); } diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H index c719e07dde..fc480031d2 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H @@ -77,4 +77,5 @@ setRefCell(p_gh, pimple.dict(), p_ghRefCell, p_ghRefValue); mesh.setFluxRequired(p_gh.name()); #include "createMRF.H" -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H index 333c259633..e061270247 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H @@ -47,7 +47,7 @@ while (pimple.correctNonOrthogonal()) U = HbyA - rAU*fvc::grad(p_gh); U.correctBoundaryConditions(); - fvOptions.constrain(U); + fvConstraints.constrain(U); } } diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C index cda3d891b1..f08024d117 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C @@ -43,7 +43,8 @@ Description #include "singlePhaseTransportModel.H" #include "kinematicMomentumTransportModel.H" #include "pimpleControl.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "CorrectPhi.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -122,7 +123,7 @@ int main(int argc, char *argv[]) } } - fvOptions.correct(); + fvModels.correct(); #include "UEqn.H" diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/Make/options b/applications/solvers/stressAnalysis/solidDisplacementFoam/Make/options index 52346e3cfa..cc1e51ca8a 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/Make/options +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/Make/options @@ -12,5 +12,6 @@ EXE_LIBS = \ -lfiniteVolume \ -lsolidThermo \ -lsolidDisplacementThermo \ - -lfvOptions \ + -lfvModels \ + -lfvConstraints \ -lmeshTools diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H index 5b800e1780..b68905fd12 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H @@ -53,4 +53,5 @@ else mesh.setFluxRequired(D.name()); -#include "createFvOptions.H" +#include "createFvModels.H" +#include "createFvConstraints.H" diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C index 053cab4a97..a2cdd62d6d 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C @@ -37,7 +37,8 @@ Description #include "fvCFD.H" #include "solidDisplacementThermo.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,7 +68,7 @@ int main(int argc, char *argv[]) do { - fvOptions.correct(); + fvModels.correct(); if (thermo.thermalStress()) { @@ -77,14 +78,14 @@ int main(int argc, char *argv[]) fvm::ddt(rho, Cp, T) + thermo.divq(T) == - fvOptions(rho*Cp, T) + fvModels.source(rho*Cp, T) ); - fvOptions.constrain(TEqn); + fvConstraints.constrain(TEqn); TEqn.solve(); - fvOptions.constrain(T); + fvConstraints.constrain(T); } { @@ -94,7 +95,7 @@ int main(int argc, char *argv[]) == fvm::laplacian(2*mu + lambda, D, "laplacian(DD,D)") + divSigmaExp - + rho*fvOptions.d2dt2(D) + + rho*fvModels.d2dt2(D) ); if (thermo.thermalStress()) @@ -102,7 +103,7 @@ int main(int argc, char *argv[]) DEqn += fvc::grad(threeKalpha*thermo.T()); } - fvOptions.constrain(DEqn); + fvConstraints.constrain(DEqn); initialResidual = DEqn.solve().max().initialResidual(); diff --git a/applications/utilities/mesh/advanced/PDRMesh/Make/options b/applications/utilities/mesh/advanced/PDRMesh/Make/options index b70147c399..afdf612f46 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/Make/options +++ b/applications/utilities/mesh/advanced/PDRMesh/Make/options @@ -10,4 +10,4 @@ EXE_LIBS = \ -lmeshTools \ -ldynamicMesh \ -lfiniteVolume \ - -lfvOptions + -lfvModels diff --git a/applications/utilities/postProcessing/postProcess/Make/options b/applications/utilities/postProcessing/postProcess/Make/options index c22c51b71e..c36a50dca2 100644 --- a/applications/utilities/postProcessing/postProcess/Make/options +++ b/applications/utilities/postProcessing/postProcess/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/fvModels/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude @@ -17,7 +17,7 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ -lgenericPatchFields \ -lmeshTools \ -lsampling diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options index 28ffc80850..0d242e09b3 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options +++ b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options @@ -12,4 +12,4 @@ EXE_LIBS = \ -lgenericPatchFields \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions + -lfvModels diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options index f2f054690d..5aadde5cbe 100644 --- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options +++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options @@ -6,5 +6,5 @@ EXE_LIBS = \ -lmomentumTransportModels \ -lfluidThermoMomentumTransportModels \ -lfiniteVolume \ - -lfvOptions \ + -lfvModels \ -lmeshTools diff --git a/bin/compressibleInterFilmFoam b/bin/compressibleInterFilmFoam index 304e7e5c28..5265ba5b9a 100755 --- a/bin/compressibleInterFilmFoam +++ b/bin/compressibleInterFilmFoam @@ -27,7 +27,7 @@ # # Description # Script to inform the user that compressibleInterFilmFoam has been replaced -# by the more general compressibleInterFoam solver with a special fvOption. +# by the more general compressibleInterFoam solver with a special fvModel. # #------------------------------------------------------------------------------ @@ -35,9 +35,9 @@ cat << EOF The compressibleInterFilmFoam solver has solver has been replaced by the more general compressibleInterFoam solver, which now supports surface films using the new -VoFSurfaceFilm fvOption. +VoFSurfaceFilm fvModel. -To run with with surface film create a system/fvOptions dictionary +To run with with surface film create a system/fvModels dictionary containing the VoFSurfaceFilm specification, e.g. VoFSurfaceFilm diff --git a/bin/foamInfo b/bin/foamInfo index 1bf5ee2496..98205474de 100755 --- a/bin/foamInfo +++ b/bin/foamInfo @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -27,7 +27,7 @@ # # Description # Prints description and usage of an application, a script, or a model -# (including boundary conditions, function objects and fvOptions). +# (including boundary conditions, function objects and fvModels). # #------------------------------------------------------------------------------ usage() { @@ -44,7 +44,7 @@ options: specified in the global controlDict file Prints the following for an application, a script, or a model -(including boundary conditions, function objects and fvOptions). +(including boundary conditions, function objects and fvModels). - File: the location of the relevant source code header file; - Description details from the header file; - Usage details from the header file; diff --git a/etc/caseDicts/general/fvOptions/porosity/porousZone b/etc/caseDicts/general/fvModels/porosity/porousZone similarity index 100% rename from etc/caseDicts/general/fvOptions/porosity/porousZone rename to etc/caseDicts/general/fvModels/porosity/porousZone diff --git a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C similarity index 85% rename from etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C rename to etc/codeTemplates/dynamicCode/codedFvModelTemplate.C index 6cff655d5d..eea10867f2 100644 --- a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C +++ b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "codedFvOptionTemplate.H" +#include "codedFvModelTemplate.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -75,24 +75,24 @@ extern "C" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(${typeName}FvOption${SourceType}, 0); +defineTypeNameAndDebug(${typeName}FvModel${SourceType}, 0); addRemovableToRunTimeSelectionTable ( option, - ${typeName}FvOption${SourceType}, + ${typeName}FvModel${SourceType}, dictionary ); -const char* const ${typeName}FvOption${SourceType}::SHA1sum = +const char* const ${typeName}FvModel${SourceType}::SHA1sum = "${SHA1sum}"; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -${typeName}FvOption${SourceType}:: -${typeName}FvOption${SourceType} +${typeName}FvModel${SourceType}:: +${typeName}FvModel${SourceType} ( const word& name, const word& modelType, @@ -112,8 +112,8 @@ ${typeName}FvOption${SourceType} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -${typeName}FvOption${SourceType}:: -~${typeName}FvOption${SourceType}() +${typeName}FvModel${SourceType}:: +~${typeName}FvModel${SourceType}() { if (${verbose:-false}) { @@ -124,7 +124,7 @@ ${typeName}FvOption${SourceType}:: // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void ${typeName}FvOption${SourceType}::addSup +void ${typeName}FvModel${SourceType}::addSup ( fvMatrix<${TemplateType}>& eqn, const word& fieldName @@ -132,7 +132,7 @@ void ${typeName}FvOption${SourceType}::addSup { if (${verbose:-false}) { - Info<<"${typeName}FvOption${SourceType}::addSup()\n"; + Info<<"${typeName}FvModel${SourceType}::addSup()\n"; } //{{{ begin code @@ -141,7 +141,7 @@ void ${typeName}FvOption${SourceType}::addSup } -void ${typeName}FvOption${SourceType}::addSup +void ${typeName}FvModel${SourceType}::addSup ( const volScalarField& rho, fvMatrix<${TemplateType}>& eqn, @@ -150,7 +150,7 @@ void ${typeName}FvOption${SourceType}::addSup { if (${verbose:-false}) { - Info<<"${typeName}FvOption${SourceType}::addSup()\n"; + Info<<"${typeName}FvModel${SourceType}::addSup()\n"; } //{{{ begin code @@ -159,7 +159,7 @@ void ${typeName}FvOption${SourceType}::addSup } -void ${typeName}FvOption${SourceType}::addSup +void ${typeName}FvModel${SourceType}::addSup ( const volScalarField& alpha, const volScalarField& rho, @@ -169,7 +169,7 @@ void ${typeName}FvOption${SourceType}::addSup { if (${verbose:-false}) { - Info<<"${typeName}FvOption${SourceType}::addSup()\n"; + Info<<"${typeName}FvModel${SourceType}::addSup()\n"; } //{{{ begin code diff --git a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H similarity index 92% rename from etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H rename to etc/codeTemplates/dynamicCode/codedFvModelTemplate.H index 397035ba1e..56ea1c2194 100644 --- a/etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H +++ b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H @@ -25,12 +25,12 @@ Description Template for use with dynamic code generation of a source. SourceFiles - codedFvOptionTemplate.C + codedFvModelTemplate.C \*---------------------------------------------------------------------------*/ -#ifndef codedFvOptionTemplate_H -#define codedFvOptionTemplate_H +#ifndef codedFvModelTemplate_H +#define codedFvModelTemplate_H #include "cellSetOption.H" @@ -43,10 +43,10 @@ namespace fv { /*---------------------------------------------------------------------------*\ - A templated CodedFvOption + A templated CodedFvModel \*---------------------------------------------------------------------------*/ -class ${typeName}FvOption${SourceType} +class ${typeName}FvModel${SourceType} : public cellSetOption { @@ -62,7 +62,7 @@ public: // Constructors //- Construct from patch and internal field - ${typeName}FvOption${SourceType} + ${typeName}FvModel${SourceType} ( const word& name, const word& modelType, @@ -72,7 +72,7 @@ public: //- Destructor - virtual ~${typeName}FvOption${SourceType}(); + virtual ~${typeName}FvModel${SourceType}(); // Member Functions diff --git a/etc/config.sh/bash_completion b/etc/config.sh/bash_completion index e60442c523..564cef519f 100644 --- a/etc/config.sh/bash_completion +++ b/etc/config.sh/bash_completion @@ -56,7 +56,7 @@ _adjointShapeOptimizationFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -239,7 +239,7 @@ _boundaryFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -srcDoc" + opts="-case -doc -fileHandler -help -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -289,7 +289,7 @@ _buoyantPimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -314,7 +314,7 @@ _buoyantReactingFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -339,7 +339,7 @@ _buoyantReactingParticleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -364,7 +364,7 @@ _buoyantSimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -546,7 +546,7 @@ _chtMultiRegionFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -571,7 +571,7 @@ _coldEngineFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -650,7 +650,7 @@ _compressibleInterFilmFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -675,7 +675,7 @@ _compressibleInterFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -887,7 +887,7 @@ _denseParticleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -937,7 +937,7 @@ _driftFluxFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -1062,7 +1062,7 @@ _engineFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -1287,7 +1287,7 @@ _fireFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -1943,7 +1943,7 @@ _interFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -1968,7 +1968,7 @@ _interMixingFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -2018,7 +2018,7 @@ _laplacianFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -2458,7 +2458,7 @@ _multiphaseEulerFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -2483,7 +2483,7 @@ _multiphaseInterFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -2742,7 +2742,7 @@ _PDRFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -2792,7 +2792,7 @@ _pimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -2817,7 +2817,7 @@ _pisoFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -2898,7 +2898,7 @@ _porousSimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3004,7 +3004,7 @@ _potentialFreeSurfaceFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3029,7 +3029,7 @@ _reactingFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3054,7 +3054,7 @@ _reactingParticleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3364,7 +3364,7 @@ _rhoPimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3389,7 +3389,7 @@ _rhoPorousSimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3414,7 +3414,7 @@ _rhoSimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3491,7 +3491,7 @@ _scalarTransportFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3676,7 +3676,7 @@ _simpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3701,7 +3701,7 @@ _simpleReactingParticleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3811,7 +3811,7 @@ _solidDisplacementFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3938,7 +3938,7 @@ _SRFPimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -3963,7 +3963,7 @@ _SRFSimpleFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -4913,7 +4913,7 @@ _thermoFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -5125,7 +5125,7 @@ _XiEngineFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" @@ -5150,7 +5150,7 @@ _XiFoam_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvOptions -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" diff --git a/etc/templates/closedVolumeRotating/README b/etc/templates/closedVolumeRotating/README index 1ca7fb98ce..1b4173ae83 100644 --- a/etc/templates/closedVolumeRotating/README +++ b/etc/templates/closedVolumeRotating/README @@ -55,7 +55,7 @@ Initialisation + Initialise the field files in the 0 directory + Set the viscosity in constant/transportProperties + Rotating properties are set in constant/rotatingZoneProperties - + For MRF, this file is included from system/fvOptions + + For MRF, this file is included from system/fvModels + For AMI, this file is included from constant/dynamicMeshDict + Ensure settings are appropriate in controlDict, fvSchemes, fvSolution, for relevant simulation; for AMI, in particular, ensure that deltaT, ddtSchemes diff --git a/etc/templates/inflowOutflowRotating/README b/etc/templates/inflowOutflowRotating/README index 9d48a820d5..d9d80fbf29 100644 --- a/etc/templates/inflowOutflowRotating/README +++ b/etc/templates/inflowOutflowRotating/README @@ -61,7 +61,7 @@ Initialisation + For example, in 0/U, set the inlet velocity Uinlet + Set the viscosity in constant/transportProperties + Rotating properties are set in constant/rotatingZoneProperties - + For MRF, this file is included from system/fvOptions + + For MRF, this file is included from system/fvModels + For AMI, this file is included from constant/dynamicMeshDict + Ensure settings are appropriate in controlDict, fvSchemes, fvSolution, for relevant simulation; for AMI, in particular, ensure that deltaT, ddtSchemes diff --git a/etc/templates/singleFluidCHT/README b/etc/templates/singleFluidCHT/README index 8fd1b27677..a93ed321c0 100644 --- a/etc/templates/singleFluidCHT/README +++ b/etc/templates/singleFluidCHT/README @@ -98,7 +98,7 @@ Initialisation Source Terms ============ -+ An fvOptions file is included in system for the solid regions ++ An fvModels file is included in system for the solid regions + It contains examples of fixed temperature and heat flux sources which can be switched on accordingly diff --git a/etc/templates/singleFluidCHT/templates/constant/solid/fvOptions b/etc/templates/singleFluidCHT/templates/constant/solid/fvModels similarity index 97% rename from etc/templates/singleFluidCHT/templates/constant/solid/fvOptions rename to etc/templates/singleFluidCHT/templates/constant/solid/fvModels index 1f5c78ca5f..326100cd39 100644 --- a/etc/templates/singleFluidCHT/templates/constant/solid/fvOptions +++ b/etc/templates/singleFluidCHT/templates/constant/solid/fvModels @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class dictionary; - object fvOptions; + object fvModels; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/Allwmake b/src/Allwmake index 5de511d6a3..6f86a0e218 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -68,7 +68,8 @@ fvAgglomerationMethods/Allwmake $targetType $* wmake $targetType fvMotionSolver wmake $targetType engine -wmake $targetType fvOptions +wmake $targetType fvModels +wmake $targetType fvConstraints functionObjects/Allwmake $targetType $* diff --git a/src/MomentumTransportModels/momentumTransportModels/Base/kOmegaSST/kOmegaSSTBase.C b/src/MomentumTransportModels/momentumTransportModels/Base/kOmegaSST/kOmegaSSTBase.C index 00bd9785c0..280387a3f2 100644 --- a/src/MomentumTransportModels/momentumTransportModels/Base/kOmegaSST/kOmegaSSTBase.C +++ b/src/MomentumTransportModels/momentumTransportModels/Base/kOmegaSST/kOmegaSSTBase.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "kOmegaSSTBase.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" #include "wallDist.H" @@ -122,7 +123,7 @@ void kOmegaSST::correctNut { this->nut_ = a1_*k_/max(a1_*omega_, b1_*F2*sqrt(S2)); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -429,7 +430,11 @@ void kOmegaSST::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); BasicMomentumTransportModel::correct(); @@ -482,14 +487,14 @@ void kOmegaSST::correct() ) + Qsas(S2(), gamma, beta) + omegaSource() - + fvOptions(alpha, rho, omega_) + + fvModels.source(alpha, rho, omega_) ); omegaEqn.ref().relax(); - fvOptions.constrain(omegaEqn.ref()); + fvConstraints.constrain(omegaEqn.ref()); omegaEqn.ref().boundaryManipulate(omega_.boundaryFieldRef()); solve(omegaEqn); - fvOptions.constrain(omega_); + fvConstraints.constrain(omega_); bound(omega_, this->omegaMin_); } @@ -504,13 +509,13 @@ void kOmegaSST::correct() - fvm::SuSp((2.0/3.0)*alpha()*rho()*divU, k_) - fvm::Sp(alpha()*rho()*epsilonByk(F1, F23), k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(S2, F23); diff --git a/src/MomentumTransportModels/momentumTransportModels/LES/DeardorffDiffStress/DeardorffDiffStress.C b/src/MomentumTransportModels/momentumTransportModels/LES/DeardorffDiffStress/DeardorffDiffStress.C index c5c268895f..c4c832ce29 100644 --- a/src/MomentumTransportModels/momentumTransportModels/LES/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/MomentumTransportModels/momentumTransportModels/LES/DeardorffDiffStress/DeardorffDiffStress.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "DeardorffDiffStress.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,7 +41,7 @@ void DeardorffDiffStress::correctNut() { this->nut_ = Ck_*sqrt(this->k())*this->delta(); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -163,7 +164,11 @@ void DeardorffDiffStress::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volSymmTensorField& R = this->R_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); ReynoldsStress>::correct(); @@ -186,13 +191,13 @@ void DeardorffDiffStress::correct() alpha*rho*P + (4.0/5.0)*alpha*rho*k*D - ((2.0/3.0)*(1.0 - Cm_/this->Ce_)*I)*(alpha*rho*this->epsilon()) - + fvOptions(alpha, rho, R) + + fvModels.source(alpha, rho, R) ); REqn.ref().relax(); - fvOptions.constrain(REqn.ref()); + fvConstraints.constrain(REqn.ref()); REqn.ref().solve(); - fvOptions.constrain(R); + fvConstraints.constrain(R); this->boundNormalStress(R); correctNut(); diff --git a/src/MomentumTransportModels/momentumTransportModels/LES/Smagorinsky/Smagorinsky.C b/src/MomentumTransportModels/momentumTransportModels/LES/Smagorinsky/Smagorinsky.C index 8ffbb24574..a5c77c5ef8 100644 --- a/src/MomentumTransportModels/momentumTransportModels/LES/Smagorinsky/Smagorinsky.C +++ b/src/MomentumTransportModels/momentumTransportModels/LES/Smagorinsky/Smagorinsky.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "Smagorinsky.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -62,7 +63,7 @@ void Smagorinsky::correctNut() this->nut_ = Ck_*this->delta()*sqrt(k); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } diff --git a/src/MomentumTransportModels/momentumTransportModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/MomentumTransportModels/momentumTransportModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C index 5996075e12..50de7073ce 100644 --- a/src/MomentumTransportModels/momentumTransportModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/MomentumTransportModels/momentumTransportModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "SpalartAllmarasDES.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -204,7 +205,7 @@ void SpalartAllmarasDES::correctNut { this->nut_ = nuTilda_*fv1; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -454,7 +455,11 @@ void SpalartAllmarasDES::correct() const rhoField& rho = this->rho_; const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); LESeddyViscosity::correct(); @@ -483,13 +488,13 @@ void SpalartAllmarasDES::correct() Cw1_*alpha()*rho()*fw(Stilda, dTilda)*nuTilda_()/sqr(dTilda), nuTilda_ ) - + fvOptions(alpha, rho, nuTilda_) + + fvModels.source(alpha, rho, nuTilda_) ); nuTildaEqn.ref().relax(); - fvOptions.constrain(nuTildaEqn.ref()); + fvConstraints.constrain(nuTildaEqn.ref()); solve(nuTildaEqn); - fvOptions.constrain(nuTilda_); + fvConstraints.constrain(nuTilda_); bound(nuTilda_, dimensionedScalar(nuTilda_.dimensions(), 0)); nuTilda_.correctBoundaryConditions(); diff --git a/src/MomentumTransportModels/momentumTransportModels/LES/WALE/WALE.C b/src/MomentumTransportModels/momentumTransportModels/LES/WALE/WALE.C index 1e62aa2db9..dd91fcaf4f 100644 --- a/src/MomentumTransportModels/momentumTransportModels/LES/WALE/WALE.C +++ b/src/MomentumTransportModels/momentumTransportModels/LES/WALE/WALE.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "WALE.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,7 +83,7 @@ void WALE::correctNut() { this->nut_ = Ck_*this->delta()*sqrt(this->k(fvc::grad(this->U_))); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } diff --git a/src/MomentumTransportModels/momentumTransportModels/LES/dynamicKEqn/dynamicKEqn.C b/src/MomentumTransportModels/momentumTransportModels/LES/dynamicKEqn/dynamicKEqn.C index f968403ba9..6a09e58afd 100644 --- a/src/MomentumTransportModels/momentumTransportModels/LES/dynamicKEqn/dynamicKEqn.C +++ b/src/MomentumTransportModels/momentumTransportModels/LES/dynamicKEqn/dynamicKEqn.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "dynamicKEqn.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -113,7 +114,7 @@ void dynamicKEqn::correctNut { this->nut_ = Ck(D, KK)*sqrt(k_)*this->delta(); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -233,7 +234,11 @@ void dynamicKEqn::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); LESeddyViscosity::correct(); @@ -256,13 +261,13 @@ void dynamicKEqn::correct() - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_) - fvm::Sp(Ce(D, KK)*alpha*rho*sqrt(k_)/this->delta(), k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(D, KK); diff --git a/src/MomentumTransportModels/momentumTransportModels/LES/dynamicLagrangian/dynamicLagrangian.C b/src/MomentumTransportModels/momentumTransportModels/LES/dynamicLagrangian/dynamicLagrangian.C index 1069b96d2f..c291204576 100644 --- a/src/MomentumTransportModels/momentumTransportModels/LES/dynamicLagrangian/dynamicLagrangian.C +++ b/src/MomentumTransportModels/momentumTransportModels/LES/dynamicLagrangian/dynamicLagrangian.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "dynamicLagrangian.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,7 +44,7 @@ void dynamicLagrangian::correctNut { this->nut_ = (flm_/fmm_)*sqr(this->delta())*mag(dev(symm(gradU))); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -159,7 +160,11 @@ void dynamicLagrangian::correct() const rhoField& rho = this->rho_; const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); LESeddyViscosity::correct(); @@ -193,13 +198,13 @@ void dynamicLagrangian::correct() == invT*LM - fvm::Sp(invT, flm_) - + fvOptions(alpha, rho, flm_) + + fvModels.source(alpha, rho, flm_) ); flmEqn.relax(); - fvOptions.constrain(flmEqn); + fvConstraints.constrain(flmEqn); flmEqn.solve(); - fvOptions.constrain(flm_); + fvConstraints.constrain(flm_); bound(flm_, flm0_); volScalarField MM(M && M); @@ -211,13 +216,13 @@ void dynamicLagrangian::correct() == invT*MM - fvm::Sp(invT, fmm_) - + fvOptions(alpha, rho, fmm_) + + fvModels.source(alpha, rho, fmm_) ); fmmEqn.relax(); - fvOptions.constrain(fmmEqn); + fvConstraints.constrain(fmmEqn); fmmEqn.solve(); - fvOptions.constrain(fmm_); + fvConstraints.constrain(fmm_); bound(fmm_, fmm0_); correctNut(gradU); diff --git a/src/MomentumTransportModels/momentumTransportModels/LES/kEqn/kEqn.C b/src/MomentumTransportModels/momentumTransportModels/LES/kEqn/kEqn.C index 58ee04c5c5..6631b071b8 100644 --- a/src/MomentumTransportModels/momentumTransportModels/LES/kEqn/kEqn.C +++ b/src/MomentumTransportModels/momentumTransportModels/LES/kEqn/kEqn.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "kEqn.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,7 +41,7 @@ void kEqn::correctNut() { this->nut_ = Ck_*sqrt(k_)*this->delta(); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -159,7 +160,11 @@ void kEqn::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); LESeddyViscosity::correct(); @@ -179,13 +184,13 @@ void kEqn::correct() - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_) - fvm::Sp(this->Ce_*alpha*rho*sqrt(k_)/this->delta(), k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/LRR/LRR.C b/src/MomentumTransportModels/momentumTransportModels/RAS/LRR/LRR.C index b7175fe9d7..4f33cb2f50 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/LRR/LRR.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/LRR/LRR.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "LRR.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ void LRR::correctNut() { this->nut_ = this->Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -272,7 +273,11 @@ void LRR::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volSymmTensorField& R = this->R_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); ReynoldsStress>::correct(); @@ -294,14 +299,14 @@ void LRR::correct() == Ceps1_*alpha*rho*G*epsilon_/k_ - fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_) - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); @@ -338,7 +343,7 @@ void LRR::correct() alpha*rho*P - (2.0/3.0*(1 - C1_)*I)*alpha*rho*epsilon_ - C2_*alpha*rho*dev(P) - + fvOptions(alpha, rho, R) + + fvModels.source(alpha, rho, R) ); // Optionally add wall-refection term @@ -358,9 +363,9 @@ void LRR::correct() } REqn.ref().relax(); - fvOptions.constrain(REqn.ref()); + fvConstraints.constrain(REqn.ref()); solve(REqn); - fvOptions.constrain(R); + fvConstraints.constrain(R); this->boundNormalStress(R); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/MomentumTransportModels/momentumTransportModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C index b55bb75296..e4e1a8b7c4 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "LaunderSharmaKE.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +58,7 @@ void LaunderSharmaKE::correctNut() { this->nut_ = Cmu_*fMu()*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -246,7 +247,11 @@ void LaunderSharmaKE::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -275,14 +280,14 @@ void LaunderSharmaKE::correct() - fvm::Sp(C2_*f2()*alpha*rho*epsilon_/k_, epsilon_) + alpha*rho*E + epsilonSource() - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); @@ -296,13 +301,13 @@ void LaunderSharmaKE::correct() alpha*rho*G - fvm::SuSp(2.0/3.0*alpha*rho*divU, k_) - fvm::Sp(alpha*rho*(epsilon_ + D)/k_, k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/MomentumTransportModels/momentumTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C index 6b0cbd4a9f..9d8f1a5d71 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "RNGkEpsilon.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ void RNGkEpsilon::correctNut() { this->nut_ = Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -248,7 +249,11 @@ void RNGkEpsilon::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -296,14 +301,14 @@ void RNGkEpsilon::correct() - fvm::SuSp(((2.0/3.0)*C1_ - C3_)*alpha()*rho()*divU, epsilon_) - fvm::Sp(C2_*alpha()*rho()*epsilon_()/k_(), epsilon_) + epsilonSource() - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); @@ -319,13 +324,13 @@ void RNGkEpsilon::correct() - fvm::SuSp((2.0/3.0)*alpha()*rho()*divU, k_) - fvm::Sp(alpha()*rho()*epsilon_()/k_(), k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/SSG/SSG.C b/src/MomentumTransportModels/momentumTransportModels/RAS/SSG/SSG.C index 58becd871d..09a30626e4 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/SSG/SSG.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/SSG/SSG.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "SSG.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ void SSG::correctNut() { this->nut_ = this->Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -282,7 +283,11 @@ void SSG::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volSymmTensorField& R = this->R_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); ReynoldsStress>::correct(); @@ -304,14 +309,14 @@ void SSG::correct() == Ceps1_*alpha*rho*G*epsilon_/k_ - fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_) - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); @@ -358,13 +363,13 @@ void SSG::correct() + C4_*dev(twoSymm(b&S)) + C5_*twoSymm(b&Omega) ) - + fvOptions(alpha, rho, R) + + fvModels.source(alpha, rho, R) ); REqn.ref().relax(); - fvOptions.constrain(REqn.ref()); + fvConstraints.constrain(REqn.ref()); solve(REqn); - fvOptions.constrain(R); + fvConstraints.constrain(R); this->boundNormalStress(R); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/MomentumTransportModels/momentumTransportModels/RAS/SpalartAllmaras/SpalartAllmaras.C index 392ec65033..e440ba36f7 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "SpalartAllmaras.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" #include "wallDist.H" @@ -141,7 +142,7 @@ void SpalartAllmaras::correctNut { this->nut_ = nuTilda_*fv1; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -355,7 +356,11 @@ void SpalartAllmaras::correct() const alphaField& alpha = this->alpha_; const rhoField& rho = this->rho_; const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -373,13 +378,13 @@ void SpalartAllmaras::correct() == Cb1_*alpha()*rho()*Stilda*nuTilda_() - fvm::Sp(Cw1_*alpha()*rho()*fw(Stilda)*nuTilda_()/sqr(y_), nuTilda_) - + fvOptions(alpha, rho, nuTilda_) + + fvModels.source(alpha, rho, nuTilda_) ); nuTildaEqn.ref().relax(); - fvOptions.constrain(nuTildaEqn.ref()); + fvConstraints.constrain(nuTildaEqn.ref()); solve(nuTildaEqn); - fvOptions.constrain(nuTilda_); + fvConstraints.constrain(nuTilda_); bound(nuTilda_, dimensionedScalar(nuTilda_.dimensions(), 0)); nuTilda_.correctBoundaryConditions(); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/kEpsilon/kEpsilon.C b/src/MomentumTransportModels/momentumTransportModels/RAS/kEpsilon/kEpsilon.C index f468cdc5ce..78dd9b3d8e 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/kEpsilon/kEpsilon.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/kEpsilon/kEpsilon.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "kEpsilon.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ void kEpsilon::correctNut() { this->nut_ = Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -227,7 +228,11 @@ void kEpsilon::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -258,14 +263,14 @@ void kEpsilon::correct() - fvm::SuSp(((2.0/3.0)*C1_ - C3_)*alpha()*rho()*divU, epsilon_) - fvm::Sp(C2_*alpha()*rho()*epsilon_()/k_(), epsilon_) + epsilonSource() - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); // Turbulent kinetic energy equation @@ -279,13 +284,13 @@ void kEpsilon::correct() - fvm::SuSp((2.0/3.0)*alpha()*rho()*divU, k_) - fvm::Sp(alpha()*rho()*epsilon_()/k_(), k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/kOmega/kOmega.C b/src/MomentumTransportModels/momentumTransportModels/RAS/kOmega/kOmega.C index a23a4cd25d..516b4f4028 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/kOmega/kOmega.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/kOmega/kOmega.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "kOmega.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,7 +42,7 @@ void kOmega::correctNut() { this->nut_ = k_/omega_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -216,7 +217,11 @@ void kOmega::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -247,14 +252,14 @@ void kOmega::correct() - fvm::SuSp(((2.0/3.0)*gamma_)*alpha()*rho()*divU, omega_) - fvm::Sp(beta_*alpha()*rho()*omega_(), omega_) + omegaSource() - + fvOptions(alpha, rho, omega_) + + fvModels.source(alpha, rho, omega_) ); omegaEqn.ref().relax(); - fvOptions.constrain(omegaEqn.ref()); + fvConstraints.constrain(omegaEqn.ref()); omegaEqn.ref().boundaryManipulate(omega_.boundaryFieldRef()); solve(omegaEqn); - fvOptions.constrain(omega_); + fvConstraints.constrain(omega_); bound(omega_, this->omegaMin_); @@ -269,13 +274,13 @@ void kOmega::correct() - fvm::SuSp((2.0/3.0)*alpha()*rho()*divU, k_) - fvm::Sp(Cmu_*alpha()*rho()*omega_(), k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C b/src/MomentumTransportModels/momentumTransportModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C index 78a1bbb4fc..55a44c99ee 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C @@ -497,7 +497,11 @@ void kOmegaSSTLM::correctReThetatGammaInt() const tmp tnu = this->nu(); const volScalarField::Internal& nu = tnu()(); const volScalarField::Internal& y = this->y_(); - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); // Fields derived from the velocity gradient tmp tgradU = fvc::grad(U); @@ -524,13 +528,13 @@ void kOmegaSSTLM::correctReThetatGammaInt() - fvm::laplacian(alpha*rho*DReThetatEff(), ReThetat_) == Pthetat*ReThetat0(Us, dUsds, nu) - fvm::Sp(Pthetat, ReThetat_) - + fvOptions(alpha, rho, ReThetat_) + + fvModels.source(alpha, rho, ReThetat_) ); ReThetatEqn.ref().relax(); - fvOptions.constrain(ReThetatEqn.ref()); + fvConstraints.constrain(ReThetatEqn.ref()); solve(ReThetatEqn); - fvOptions.constrain(ReThetat_); + fvConstraints.constrain(ReThetat_); bound(ReThetat_, 0); } @@ -561,13 +565,13 @@ void kOmegaSSTLM::correctReThetatGammaInt() == Pgamma - fvm::Sp(ce1_*Pgamma, gammaInt_) + Egamma - fvm::Sp(ce2_*Egamma, gammaInt_) - + fvOptions(alpha, rho, gammaInt_) + + fvModels.source(alpha, rho, gammaInt_) ); gammaIntEqn.ref().relax(); - fvOptions.constrain(gammaIntEqn.ref()); + fvConstraints.constrain(gammaIntEqn.ref()); solve(gammaIntEqn); - fvOptions.constrain(gammaInt_); + fvConstraints.constrain(gammaInt_); bound(gammaInt_, 0); } diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/realizableKE/realizableKE.C b/src/MomentumTransportModels/momentumTransportModels/RAS/realizableKE/realizableKE.C index 5cc0a96ee0..307343830d 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/realizableKE/realizableKE.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/realizableKE/realizableKE.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "realizableKE.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -79,7 +80,7 @@ void realizableKE::correctNut { this->nut_ = rCmu(gradU, S2, magS)*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -256,7 +257,11 @@ void realizableKE::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -300,14 +305,14 @@ void realizableKE::correct() epsilon_ ) + epsilonSource() - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); @@ -323,13 +328,13 @@ void realizableKE::correct() - fvm::SuSp(2.0/3.0*alpha()*rho()*divU, k_) - fvm::Sp(alpha()*rho()*epsilon_()/k_(), k_) + kSource() - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(tgradU(), S2, magS); diff --git a/src/MomentumTransportModels/momentumTransportModels/RAS/v2f/v2f.C b/src/MomentumTransportModels/momentumTransportModels/RAS/v2f/v2f.C index 977442fa47..772656725b 100644 --- a/src/MomentumTransportModels/momentumTransportModels/RAS/v2f/v2f.C +++ b/src/MomentumTransportModels/momentumTransportModels/RAS/v2f/v2f.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "v2f.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "bound.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +58,7 @@ void v2f::correctNut() { this->nut_ = min(CmuKEps_*sqr(k_)/epsilon_, this->Cmu_*v2_*Ts()); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -282,7 +283,11 @@ void v2f::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -322,14 +327,14 @@ void v2f::correct() Ceps1*alpha*rho*G/Ts - fvm::SuSp(((2.0/3.0)*Ceps1 + Ceps3_)*alpha*rho*divU, epsilon_) - fvm::Sp(Ceps2_*alpha*rho/Ts, epsilon_) - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); @@ -343,13 +348,13 @@ void v2f::correct() alpha*rho*G - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_) - fvm::Sp(alpha*rho*epsilon_/k_, k_) - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); @@ -363,9 +368,9 @@ void v2f::correct() ); fEqn.ref().relax(); - fvOptions.constrain(fEqn.ref()); + fvConstraints.constrain(fEqn.ref()); solve(fEqn); - fvOptions.constrain(f_); + fvConstraints.constrain(f_); bound(f_, fMin_); @@ -378,13 +383,13 @@ void v2f::correct() == alpha*rho*min(k_*f_, C2_*G - v2fAlpha) - fvm::Sp(N*alpha*rho*epsilon_/k_, v2_) - + fvOptions(alpha, rho, v2_) + + fvModels.source(alpha, rho, v2_) ); v2Eqn.ref().relax(); - fvOptions.constrain(v2Eqn.ref()); + fvConstraints.constrain(v2Eqn.ref()); solve(v2Eqn); - fvOptions.constrain(v2_); + fvConstraints.constrain(v2_); bound(v2_, v2Min_); correctNut(); diff --git a/src/MomentumTransportModels/momentumTransportModels/laminar/Maxwell/Maxwell.C b/src/MomentumTransportModels/momentumTransportModels/laminar/Maxwell/Maxwell.C index 6dc6d54158..785d1a825e 100644 --- a/src/MomentumTransportModels/momentumTransportModels/laminar/Maxwell/Maxwell.C +++ b/src/MomentumTransportModels/momentumTransportModels/laminar/Maxwell/Maxwell.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "Maxwell.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "uniformDimensionedFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -332,7 +333,11 @@ void Maxwell::correct() const rhoField& rho = this->rho_; const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); laminarModel::correct(); @@ -379,13 +384,13 @@ void Maxwell::correct() == alpha*rho*P + sigmaSource(modei, sigma) - + fvOptions(alpha, rho, sigma) + + fvModels.source(alpha, rho, sigma) ); sigmaEqn.relax(); - fvOptions.constrain(sigmaEqn); + fvConstraints.constrain(sigmaEqn); sigmaEqn.solve("sigma"); - fvOptions.constrain(sigma); + fvConstraints.constrain(sigma); } if (sigmas_.size()) diff --git a/src/MomentumTransportModels/momentumTransportModels/laminar/lambdaThixotropic/lambdaThixotropic.C b/src/MomentumTransportModels/momentumTransportModels/laminar/lambdaThixotropic/lambdaThixotropic.C index ef0ca441a3..4087a54d0f 100644 --- a/src/MomentumTransportModels/momentumTransportModels/laminar/lambdaThixotropic/lambdaThixotropic.C +++ b/src/MomentumTransportModels/momentumTransportModels/laminar/lambdaThixotropic/lambdaThixotropic.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "lambdaThixotropic.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "uniformDimensionedFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -180,7 +181,11 @@ void lambdaThixotropic::correct() { // Local references const surfaceScalarField& phi = this->phi_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); tmp lambdaEqn ( @@ -189,13 +194,13 @@ void lambdaThixotropic::correct() == a_*pow(1 - lambda_(), b_) - fvm::Sp(c_*pow(strainRate(), d_), lambda_) - + fvOptions(lambda_) + + fvModels.source(lambda_) ); lambdaEqn.ref().relax(); - fvOptions.constrain(lambdaEqn.ref()); + fvConstraints.constrain(lambdaEqn.ref()); solve(lambdaEqn); - fvOptions.constrain(lambda_); + fvConstraints.constrain(lambda_); lambda_.maxMin(scalar(0), scalar(1)); diff --git a/src/MomentumTransportModels/phaseCompressible/LES/Niceno/NicenoKEqn.C b/src/MomentumTransportModels/phaseCompressible/LES/Niceno/NicenoKEqn.C index 5bdb084ac8..3cfe4d2d33 100644 --- a/src/MomentumTransportModels/phaseCompressible/LES/Niceno/NicenoKEqn.C +++ b/src/MomentumTransportModels/phaseCompressible/LES/Niceno/NicenoKEqn.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "NicenoKEqn.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "phaseSystem.H" #include "dragModel.H" @@ -164,7 +165,7 @@ void NicenoKEqn::correctNut() *(mag(this->U_ - gasTurbulence.U())); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } diff --git a/src/MomentumTransportModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C b/src/MomentumTransportModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C index 27ad4d5280..cd075da83e 100644 --- a/src/MomentumTransportModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C +++ b/src/MomentumTransportModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "SmagorinskyZhang.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -142,7 +143,7 @@ void SmagorinskyZhang::correctNut() *(mag(this->U_ - gasTurbulence.U())); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } diff --git a/src/MomentumTransportModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C b/src/MomentumTransportModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C index 8eea534dfc..f3eeb86086 100644 --- a/src/MomentumTransportModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C +++ b/src/MomentumTransportModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "LaheyKEpsilon.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "phaseSystem.H" #include "dragModel.H" @@ -175,7 +176,7 @@ void LaheyKEpsilon::correctNut() *(mag(this->U_ - gasTurbulence.U())); this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } diff --git a/src/MomentumTransportModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C b/src/MomentumTransportModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C index f4d89ed648..52d81a180d 100644 --- a/src/MomentumTransportModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C +++ b/src/MomentumTransportModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "continuousGasKEpsilon.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "phaseSystem.H" #include "dragModel.H" #include "virtualMassModel.H" @@ -141,7 +142,7 @@ void continuousGasKEpsilon::correctNut() volScalarField omega((1 - expThetar)/(1 + expThetar)); nutEff_ = omega*liquidTurbulence.nut(); - fv::options::New(this->mesh_).constrain(nutEff_); + fvConstraints::New(this->mesh_).constrain(nutEff_); } diff --git a/src/MomentumTransportModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C b/src/MomentumTransportModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C index ca0aa089a3..6d0d9bffa5 100644 --- a/src/MomentumTransportModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C +++ b/src/MomentumTransportModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "kOmegaSSTSato.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "phaseSystem.H" @@ -175,7 +176,7 @@ void kOmegaSSTSato::correctNut } this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } diff --git a/src/MomentumTransportModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C b/src/MomentumTransportModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C index dc2eefb702..d3c42562bc 100644 --- a/src/MomentumTransportModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C +++ b/src/MomentumTransportModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "mixtureKEpsilon.H" -#include "fvOptions.H" +#include "fvModels.H" #include "bound.H" #include "phaseSystem.H" #include "dragModel.H" @@ -344,7 +344,7 @@ void mixtureKEpsilon::correctNut() { this->nut_ = Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -596,7 +596,11 @@ void mixtureKEpsilon::correct() volScalarField& km = km_(); volScalarField& epsilonm = epsilonm_(); - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -680,14 +684,14 @@ void mixtureKEpsilon::correct() - fvm::SuSp(((2.0/3.0)*C1_)*divUm, epsilonm) - fvm::Sp(C2_*epsilonm/km, epsilonm) + epsilonSource() - + fvOptions(epsilonm) + + fvModels.source(epsilonm) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilonm.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilonm); + fvConstraints.constrain(epsilonm); bound(epsilonm, this->epsilonMin_); @@ -703,13 +707,13 @@ void mixtureKEpsilon::correct() - fvm::SuSp((2.0/3.0)*divUm, km) - fvm::Sp(epsilonm/km, km) + kSource() - + fvOptions(km) + + fvModels.source(km) ); kmEqn.ref().relax(); - fvOptions.constrain(kmEqn.ref()); + fvConstraints.constrain(kmEqn.ref()); solve(kmEqn); - fvOptions.constrain(km); + fvConstraints.constrain(km); bound(km, this->kMin_); km.correctBoundaryConditions(); diff --git a/src/OpenFOAM/include/listOptions.H b/src/OpenFOAM/include/listOptions.H index cf81acf824..7e90d6aaa2 100644 --- a/src/OpenFOAM/include/listOptions.H +++ b/src/OpenFOAM/include/listOptions.H @@ -25,11 +25,11 @@ argList::addBoolOption ); #endif -#ifdef fvOption_H +#ifdef fvModel_H argList::addBoolOption ( - "listFvOptions", - "List fvOptions" + "listFvModels", + "List fvModels" ); #endif diff --git a/src/OpenFOAM/include/listOutput.H b/src/OpenFOAM/include/listOutput.H index 418545dc34..401c0a8f23 100644 --- a/src/OpenFOAM/include/listOutput.H +++ b/src/OpenFOAM/include/listOutput.H @@ -34,11 +34,11 @@ if (args.optionFound("listFunctionObjects")) } #endif -#ifdef fvOption_H -if (args.optionFound("listFvOptions")) +#ifdef fvModel_H +if (args.optionFound("listFvModels")) { - Info<< "fvOptions" - << fv::option::dictionaryConstructorTablePtr_->sortedToc() + Info<< "fvModels" + << Foam::fvModel::dictionaryConstructorTablePtr_->sortedToc() << endl; listOptions = true; } diff --git a/src/atmosphericModels/Make/options b/src/atmosphericModels/Make/options index f8d1c00f4a..ab3f4d60f9 100644 --- a/src/atmosphericModels/Make/options +++ b/src/atmosphericModels/Make/options @@ -5,7 +5,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude + -I$(LIB_SRC)/fvModels/lnInclude LIB_LIBS = \ -lmomentumTransportModels \ @@ -14,4 +14,5 @@ LIB_LIBS = \ -lfiniteVolume \ -lmeshTools \ -ltriSurface \ - -lfvOptions + -lfvModels \ + -lfvConstraints diff --git a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C index 38b315578c..775af34850 100644 --- a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C +++ b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "kEpsilonLopesdaCosta.H" -#include "fvOptions.H" +#include "fvModels.H" +#include "fvConstraints.H" #include "explicitPorositySource.H" #include "bound.H" @@ -98,14 +99,17 @@ template void kEpsilonLopesdaCosta:: setPorosityCoefficients() { - const fv::options::optionList& fvOptions(fv::options::New(this->mesh_)); + const PtrListDictionary& fvModels + ( + Foam::fvModels::New(this->mesh_) + ); - forAll(fvOptions, i) + forAll(fvModels, i) { - if (isA(fvOptions[i])) + if (isA(fvModels[i])) { const fv::explicitPorositySource& eps = - refCast(fvOptions[i]); + refCast(fvModels[i]); if (isA(eps.model())) { @@ -137,7 +141,7 @@ void kEpsilonLopesdaCosta::correctNut() { this->nut_ = Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); - fv::options::New(this->mesh_).constrain(this->nut_); + fvConstraints::New(this->mesh_).constrain(this->nut_); } @@ -398,7 +402,11 @@ void kEpsilonLopesdaCosta::correct() const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; - const fv::options& fvOptions(fv::options::New(this->mesh_)); + const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); + const Foam::fvConstraints& fvConstraints + ( + Foam::fvConstraints::New(this->mesh_) + ); eddyViscosity>::correct(); @@ -432,14 +440,14 @@ void kEpsilonLopesdaCosta::correct() - fvm::SuSp(((2.0/3.0)*C1_)*alpha()*rho()*divU, epsilon_) - fvm::Sp(C2_*alpha()*rho()*epsilon_()/k_(), epsilon_) + epsilonSource(magU, magU3) - + fvOptions(alpha, rho, epsilon_) + + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); - fvOptions.constrain(epsEqn.ref()); + fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); - fvOptions.constrain(epsilon_); + fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); // Turbulent kinetic energy equation @@ -453,13 +461,13 @@ void kEpsilonLopesdaCosta::correct() - fvm::SuSp((2.0/3.0)*alpha()*rho()*divU, k_) - fvm::Sp(alpha()*rho()*epsilon_()/k_(), k_) + kSource(magU, magU3) - + fvOptions(alpha, rho, k_) + + fvModels.source(alpha, rho, k_) ); kEqn.ref().relax(); - fvOptions.constrain(kEqn.ref()); + fvConstraints.constrain(kEqn.ref()); solve(kEqn); - fvOptions.constrain(k_); + fvConstraints.constrain(k_); bound(k_, this->kMin_); correctNut(); diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 8f00490895..4b912aaab0 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -457,10 +457,12 @@ $(SRF)/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVect $(SRF)/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.C $(SRF)/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C -fvOptions = $(general)/fvOptions -$(fvOptions)/fvOption.C -$(fvOptions)/fvOptionIO.C -$(fvOptions)/fvOptionList.C -$(fvOptions)/fvOptions.C +fvModels = $(general)/fvModels +$(fvModels)/fvModel.C +$(fvModels)/fvModels.C + +fvConstraints = $(general)/fvConstraints +$(fvConstraints)/fvConstraint.C +$(fvConstraints)/fvConstraints.C LIB = $(FOAM_LIBBIN)/libfiniteVolume diff --git a/src/finiteVolume/cfdTools/compressible/rhoEqn.H b/src/finiteVolume/cfdTools/compressible/rhoEqn.H index 4ea798113d..d6de088c22 100644 --- a/src/finiteVolume/cfdTools/compressible/rhoEqn.H +++ b/src/finiteVolume/cfdTools/compressible/rhoEqn.H @@ -35,14 +35,14 @@ Description fvm::ddt(rho) + fvc::div(phi) == - fvOptions(rho) + fvModels.source(rho) ); - fvOptions.constrain(rhoEqn); + fvConstraints.constrain(rhoEqn); rhoEqn.solve(); - fvOptions.constrain(rho); + fvConstraints.constrain(rho); } // ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraint.C b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraint.C new file mode 100644 index 0000000000..98d5a73434 --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraint.C @@ -0,0 +1,157 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2021 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvConstraint.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(fvConstraint, 0); + defineRunTimeSelectionTable(fvConstraint, dictionary); +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +void Foam::fvConstraint::constrainType +( + fvMatrix& eqn, + const word& fieldName +) const +{} + + +template +void Foam::fvConstraint::constrainType(VolField& field) const +{} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fvConstraint::fvConstraint +( + const word& name, + const word& constraintType, + const dictionary& dict, + const fvMesh& mesh +) +: + name_(name), + constraintType_(constraintType), + mesh_(mesh), + dict_(dict), + coeffs_(dict.optionalSubDict(constraintType + "Coeffs")) +{ + Info<< incrIndent << indent << "Name: " << name_ + << endl << decrIndent; +} + + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::fvConstraint::New +( + const word& name, + const dictionary& coeffs, + const fvMesh& mesh +) +{ + const word constraintType(coeffs.lookup("type")); + + Info<< indent + << "Selecting finite volume constraint type " << constraintType << endl; + + libs.open + ( + coeffs, + "libs", + dictionaryConstructorTablePtr_ + ); + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(constraintType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalIOErrorInFunction(coeffs) + << "Unknown fvConstraint " << constraintType << nl << nl + << "Valid fvConstraints are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return autoPtr + ( + cstrIter()(name, constraintType, coeffs, mesh) + ); +} + + +Foam::fvConstraint::~fvConstraint() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::wordList Foam::fvConstraint::constrainedFields() const +{ + return wordList::null(); +} + + +bool Foam::fvConstraint::constrainsField(const word& fieldName) const +{ + return findIndex(constrainedFields(), fieldName) != -1; +} + + +FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_CONSTRAINT_CONSTRAIN, fvConstraint); + + +FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_CONSTRAINT_CONSTRAIN_FIELD, fvConstraint); + + +bool Foam::fvConstraint::read(const dictionary& dict) +{ + coeffs_ = dict.optionalSubDict(constraintType_ + "Coeffs"); + + return true; +} + + +void Foam::fvConstraint::updateMesh(const mapPolyMesh& mpm) +{} + + +bool Foam::fvConstraint::movePoints() +{ + return true; +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraint.H b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraint.H new file mode 100644 index 0000000000..a1dfabd5b3 --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraint.H @@ -0,0 +1,240 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2021 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 . + +Class + Foam::fvConstraint + +Description + Finite volume options abstract base class. + +SourceFiles + fvConstraint.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fvConstraint_H +#define fvConstraint_H + +#include "fvMatricesFwd.H" +#include "volFieldsFwd.H" +#include "dictionary.H" +#include "fvConstraintM.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class fvMesh; +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class option Declaration +\*---------------------------------------------------------------------------*/ + +class fvConstraint +{ + // Private Member Data + + //- Constraint name + const word name_; + + //- Constraint type + const word constraintType_; + + //- Reference to the mesh database + const fvMesh& mesh_; + + //- Top level source dictionary + dictionary dict_; + + //- Dictionary containing source coefficients + dictionary coeffs_; + + + // Private Member Functions + + //- Apply a constraint to an equation + template + void constrainType + ( + fvMatrix& eqn, + const word& fieldName + ) const; + + //- Apply constraint to a field + template + void constrainType(VolField& field) const; + + +public: + + //- Runtime type information + TypeName("fvConstraint"); + + + // Declare run-time constructor selection table + + declareRunTimeSelectionTable + ( + autoPtr, + fvConstraint, + dictionary, + ( + const word& name, + const word& constraintType, + const dictionary& dict, + const fvMesh& mesh + ), + (name, constraintType, dict, mesh) + ); + + + // Constructors + + //- Construct from components + fvConstraint + ( + const word& name, + const word& constraintType, + const dictionary& dict, + const fvMesh& mesh + ); + + //- Return clone + autoPtr clone() const + { + NotImplemented; + return autoPtr(nullptr); + } + + //- Return pointer to new fvConstraint object created + // on the freestore from an Istream + class iNew + { + //- Reference to the mesh + const fvMesh& mesh_; + + const word& name_; + + public: + + iNew + ( + const fvMesh& mesh, + const word& name + ) + : + mesh_(mesh), + name_(name) + {} + + autoPtr operator()(Istream& is) const + { + // const word name(is); + const dictionary dict(is); + + return autoPtr + ( + fvConstraint::New(name_, dict, mesh_) + ); + } + }; + + + // Selectors + + //- Return a reference to the selected fvConstraint + static autoPtr New + ( + const word& name, + const dictionary& dict, + const fvMesh& mesh + ); + + + //- Destructor + virtual ~fvConstraint(); + + + // Member Functions + + // Access + + //- Return const access to the source name + inline const word& name() const; + + //- Return const access to the mesh database + inline const fvMesh& mesh() const; + + //- Return dictionary + inline const dictionary& coeffs() const; + + + // Checks + + //- Return the list of constrained fields + virtual wordList constrainedFields() const; + + //- Return true if the given field is constrained + virtual bool constrainsField(const word& fieldName) const; + + + // Constraints + + //- Apply a constraint to an equation + FOR_ALL_FIELD_TYPES(DEFINE_FV_CONSTRAINT_CONSTRAIN); + + //- Apply contraint to a field + FOR_ALL_FIELD_TYPES(DEFINE_FV_CONSTRAINT_CONSTRAIN_FIELD); + + + // Mesh changes + + //- Update for mesh changes + virtual void updateMesh(const mapPolyMesh&); + + //- Update for mesh motion + virtual bool movePoints(); + + + // IO + + //- Read source dictionary + virtual bool read(const dictionary& dict); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "fvConstraintI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintI.H b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintI.H new file mode 100644 index 0000000000..d76d1796dd --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintI.H @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2021 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 . + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline const Foam::word& Foam::fvConstraint::name() const +{ + return name_; +} + + +inline const Foam::fvMesh& Foam::fvConstraint::mesh() const +{ + return mesh_; +} + + +inline const Foam::dictionary& Foam::fvConstraint::coeffs() const +{ + return coeffs_; +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintM.H b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintM.H new file mode 100644 index 0000000000..dde2de657d --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintM.H @@ -0,0 +1,56 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2021 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 . + +\*---------------------------------------------------------------------------*/ + +#define DEFINE_FV_CONSTRAINT_CONSTRAIN(Type, nullArg) \ + virtual void constrain \ + ( \ + fvMatrix& eqn, \ + const word& fieldName \ + ) const; + +#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN(Type, constraintType) \ + void Foam::constraintType::constrain \ + ( \ + fvMatrix& eqn, \ + const word& fieldName \ + ) const \ + { \ + constrainType(eqn, fieldName); \ + } + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define DEFINE_FV_CONSTRAINT_CONSTRAIN_FIELD(Type, nullArg) \ + virtual void constrain(VolField& field) const; + +#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN_FIELD(Type, constraintType) \ + void Foam::constraintType::constrain(VolField& field) const \ + { \ + constrainType(field); \ + } + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraints.C b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraints.C new file mode 100644 index 0000000000..3cc6dd6c9a --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraints.C @@ -0,0 +1,318 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2021 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvConstraints.H" +#include "fvModel.H" +#include "fvMesh.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(fvConstraints, 0); +} + + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +Foam::IOobject Foam::fvConstraints::createIOobject +( + const fvMesh& mesh +) const +{ + IOobject io + ( + typeName, + mesh.time().system(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ); + + if (io.typeHeaderOk(true)) + { + Info<< "Creating fvConstraints from " + << io.instance()/io.name() << nl + << endl; + + io.readOpt() = IOobject::MUST_READ_IF_MODIFIED; + return io; + } + else + { + // For backward-compatibility + // check if the fvOptions file is in system + io.rename("fvOptions"); + + if (io.typeHeaderOk(true)) + { + Warning + << "Creating fvConstraints from " + << io.instance()/io.name() << nl + << endl; + + io.readOpt() = IOobject::MUST_READ_IF_MODIFIED; + return io; + } + else + { + // For backward-compatibility + // check if the fvOptions file is in constant + io.instance() = mesh.time().constant(); + + if (io.typeHeaderOk(true)) + { + Warning + << "Creating fvConstraints from " + << io.instance()/io.name() + << " rather than system/fvConstraints" + << endl; + + io.readOpt() = IOobject::MUST_READ_IF_MODIFIED; + return io; + } + else + { + io.rename(typeName); + io.readOpt() = IOobject::NO_READ; + return io; + } + } + } +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void Foam::fvConstraints::checkApplied() const +{ + if (mesh().time().timeIndex() > checkTimeIndex_) + { + const PtrListDictionary& constraintList(*this); + + forAll(constraintList, i) + { + const fvConstraint& constraint = constraintList[i]; + + wordHashSet notConstrainedFields(constraint.constrainedFields()); + notConstrainedFields -= constrainedFields_[i]; + + forAllConstIter(wordHashSet, notConstrainedFields, iter) + { + WarningInFunction + << "Constraint " << constraint.name() + << " defined for field " << iter.key() + << " but never used" << endl; + } + } + + checkTimeIndex_ = mesh().time().timeIndex(); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fvConstraints::fvConstraints +( + const fvMesh& mesh +) +: + MeshObject + ( + mesh, + createIOobject(mesh) + ), + PtrListDictionary(0), + checkTimeIndex_(mesh.time().timeIndex() + 1), + constrainedFields_() +{ + readHeaderOk(IOstream::ASCII, typeName); + + const bool readFromFvConstraints(IOobject::name() == typeName); + + const dictionary& dict(*this); + + // Count number of active fvConstraints + label count = 0; + forAllConstIter(dictionary, dict, iter) + { + if (iter().isDict()) + { + count++; + } + } + + PtrListDictionary::setSize(count); + + constrainedFields_.setSize(count); + + label i = 0; + forAllConstIter(dictionary, dict, iter) + { + if (iter().isDict()) + { + const word& name = iter().keyword(); + const dictionary& constraintDict = iter().dict(); + + const word constraintType(constraintDict.lookup("type")); + + if + ( + readFromFvConstraints + || !fvModel::dictionaryConstructorTablePtr_->found + ( + constraintType + ) + ) + { + PtrListDictionary::set + ( + i, + name, + fvConstraint::New(name, constraintDict, mesh).ptr() + ); + + constrainedFields_.set(i, new wordHashSet()); + + i++; + } + } + } + + PtrListDictionary::setSize(i); + constrainedFields_.setSize(i); + + if (readFromFvConstraints) + { + // Add file watch on the fvConstraints dictionary for + // MUST_READ_IF_MODIFIED + addWatch(); + } + else + { + // If the fvOptions file was read re-name to fvConstraints + rename(typeName); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::fvConstraints::constrainsField(const word& fieldName) const +{ + const PtrListDictionary& constraintList(*this); + + forAll(constraintList, i) + { + if (constraintList[i].constrainsField(fieldName)) + { + return true; + } + } + + return false; +} + + +void Foam::fvConstraints::updateMesh(const mapPolyMesh& mpm) +{ + PtrListDictionary& constraintList(*this); + + forAll(constraintList, i) + { + constraintList[i].updateMesh(mpm); + } +} + + +bool Foam::fvConstraints::movePoints() +{ + bool allOk = true; + + PtrListDictionary& constraintList(*this); + + forAll(constraintList, i) + { + allOk = allOk && constraintList[i].movePoints(); + } + + return allOk; +} + + +bool Foam::fvConstraints::readData(Istream& is) +{ + is >> *this; + return !is.bad(); +} + + +bool Foam::fvConstraints::writeData(Ostream& os) const +{ + dictionary::write(os, false); + return os.good(); +} + + +bool Foam::fvConstraints::read() +{ + if (IOdictionary::regIOobject::read()) + { + checkTimeIndex_ = mesh().time().timeIndex() + 1; + + bool allOk = true; + + PtrListDictionary& constraintList(*this); + + forAll(constraintList, i) + { + fvConstraint& constraint = constraintList[i]; + bool ok = constraint.read(subDict(constraint.name())); + allOk = (allOk && ok); + } + return allOk; + } + else + { + return false; + } +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const fvConstraints& constraints +) +{ + constraints.writeData(os); + return os; +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.H b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraints.H similarity index 53% rename from src/finiteVolume/cfdTools/general/fvOptions/fvOptions.H rename to src/finiteVolume/cfdTools/general/fvConstraints/fvConstraints.H index 92c3be7f9f..0770791229 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.H +++ b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraints.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,71 +22,89 @@ License along with OpenFOAM. If not, see . Class - Foam::fv::options + Foam::fvConstraints Description - Finite-volume options + Finite volume constraints SourceFiles - options.C + fvConstraints.C \*---------------------------------------------------------------------------*/ -#ifndef fvOptions_H -#define fvOptions_H +#ifndef fvConstraints_H +#define fvConstraints_H -#include "fvOptionList.H" +#include "fvConstraint.H" +#include "PtrListDictionary.H" #include "MeshObject.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace fv -{ + +// Forward declaration of friend functions and operators +class fvConstraints; + +Ostream& operator<<(Ostream& os, const fvConstraints& constraints); + /*---------------------------------------------------------------------------*\ - Class options Declaration + Class fvConstraints Declaration \*---------------------------------------------------------------------------*/ -class options +class fvConstraints : - public MeshObject, + public MeshObject, public dictionary, - public optionList + public PtrListDictionary { + // Private Member Data + + //- Time index to check that all defined sources have been applied + mutable label checkTimeIndex_; + + //- Sets of the fields that have been constrained by the fvConstraints + mutable PtrList constrainedFields_; + + // Private Member Functions //- Create IO object if dictionary is present IOobject createIOobject(const fvMesh& mesh) const; + //- Check that all fvConstraints have been applied + void checkApplied() const; + public: //- Runtime type information - TypeName("fvOptions"); + TypeName("fvConstraints"); // Constructors //- Construct from components with list of field names - options(const fvMesh& mesh); + fvConstraints(const fvMesh& mesh); //- Disallow default bitwise copy construction - options(const options&) = delete; + fvConstraints(const fvConstraints&) = delete; //- Inherit the base New method - using MeshObject::New; + using MeshObject::New; //- Destructor - virtual ~options() + virtual ~fvConstraints() {} // Member Functions - //- Declare fvOptions to be a global dictionary + //- Declare fvConstraints to be a global dictionary virtual bool global() const { return true; @@ -99,17 +117,25 @@ public: return globalFilePath(type()); } - //- ReadData function required for regIOobject read operation - virtual bool readData(Istream&); - //- Inherit the base read method - using optionList::read; + // Checks - //- Read dictionary - virtual bool read(); + //- Return true if an fvConstraint constrains the given field + virtual bool constrainsField(const word& fieldName) const; - //- WriteData function required for regIOobject write operation - virtual bool writeData(Ostream&) const; + + // Constraints + + //- Apply constraints to an equation + template + void constrain(fvMatrix& eqn) const; + + //- Apply constraints to a field + template + void constrain + ( + GeometricField& field + ) const; // Mesh changes @@ -121,27 +147,54 @@ public: virtual bool movePoints(); + // IO + + //- ReadData function which reads the fvConstraints dictionary + // required for regIOobject read operation + virtual bool readData(Istream&); + + //- Write data to Ostream + virtual bool writeData(Ostream& os) const; + + //- Read the fvConstraints dictionary if it has changed + // and update the constraints + virtual bool read(); + + // Member Operators //- Disallow default bitwise assignment - void operator=(const options&) = delete; + void operator=(const fvConstraints&) = delete; + + + // IOstream Operators + + //- Ostream operator + friend Ostream& operator<< + ( + Ostream& os, + const fvConstraints& constraints + ); }; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace fv - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //- Template function for obtaining global status template<> -inline bool typeGlobal() +inline bool typeGlobal() { return true; } +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "fvConstraintsTemplates.C" +#endif + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintsTemplates.C b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintsTemplates.C new file mode 100644 index 0000000000..75ed2d8fda --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fvConstraints/fvConstraintsTemplates.C @@ -0,0 +1,85 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2021 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 . + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // + +template +void Foam::fvConstraints::constrain(fvMatrix& eqn) const +{ + checkApplied(); + + const PtrListDictionary& constraintList(*this); + + forAll(constraintList, i) + { + const fvConstraint& constraint = constraintList[i]; + + if (constraint.constrainsField(eqn.psi().name())) + { + constrainedFields_[i].insert(eqn.psi().name()); + + if (debug) + { + Info<< "Applying constraint " << constraint.name() + << " to field " << eqn.psi().name() << endl; + } + + constraint.constrain(eqn, eqn.psi().name()); + } + } +} + + +template +void Foam::fvConstraints::constrain +( + GeometricField& field +) const +{ + const word& fieldName = field.name(); + + const PtrListDictionary& constraintList(*this); + + forAll(constraintList, i) + { + const fvConstraint& constraint = constraintList[i]; + + if (constraint.constrainsField(fieldName)) + { + constrainedFields_[i].insert(fieldName); + + if (debug) + { + Info<< "Applying constraint " << constraint.name() + << " for field " << fieldName << endl; + } + + constraint.constrain(field); + } + } +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C b/src/finiteVolume/cfdTools/general/fvModels/fvModel.C similarity index 60% rename from src/finiteVolume/cfdTools/general/fvOptions/fvOption.C rename to src/finiteVolume/cfdTools/general/fvModels/fvModel.C index 943f66e006..0c5fb02ec2 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C +++ b/src/finiteVolume/cfdTools/general/fvModels/fvModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,25 +23,22 @@ License \*---------------------------------------------------------------------------*/ -#include "fvOption.H" +#include "fvModel.H" #include "volFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - namespace fv - { - defineTypeNameAndDebug(option, 0); - defineRunTimeSelectionTable(option, dictionary); - } + defineTypeNameAndDebug(fvModel, 0); + defineRunTimeSelectionTable(fvModel, dictionary); } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template -void Foam::fv::option::addSupType +void Foam::fvModel::addSupType ( fvMatrix& eqn, const word& fieldName @@ -50,7 +47,7 @@ void Foam::fv::option::addSupType template -void Foam::fv::option::addSupType +void Foam::fvModel::addSupType ( const volScalarField& rho, fvMatrix& eqn, @@ -60,7 +57,7 @@ void Foam::fv::option::addSupType template -void Foam::fv::option::addSupType +void Foam::fvModel::addSupType ( const volScalarField& alpha, const volScalarField& rho, @@ -70,23 +67,9 @@ void Foam::fv::option::addSupType {} -template -void Foam::fv::option::constrainType -( - fvMatrix& eqn, - const word& fieldName -) const -{} - - -template -void Foam::fv::option::constrainType(VolField& field) const -{} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fv::option::option +Foam::fvModel::fvModel ( const word& name, const word& modelType, @@ -100,23 +83,24 @@ Foam::fv::option::option dict_(dict), coeffs_(dict.optionalSubDict(modelType + "Coeffs")) { - Info<< incrIndent << indent << "Source: " << name_ << endl << decrIndent; + Info<< incrIndent << indent << "Name: " << name_ + << endl << decrIndent; } // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::fv::option::New +Foam::autoPtr Foam::fvModel::New ( const word& name, const dictionary& coeffs, const fvMesh& mesh ) { - word modelType(coeffs.lookup("type")); + const word modelType(coeffs.lookup("type")); Info<< indent - << "Selecting finite volume options model type " << modelType << endl; + << "Selecting finite volume model type " << modelType << endl; libs.open ( @@ -130,74 +114,67 @@ Foam::autoPtr Foam::fv::option::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorInFunction - << "Unknown Model type " << modelType << nl << nl - << "Valid model types are:" << nl + FatalIOErrorInFunction(coeffs) + << "Unknown fvModel " << modelType << nl << nl + << "Valid fvModels are:" << nl << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); + << exit(FatalIOError); } - return autoPtr