Commit 0b673095 authored by sergio's avatar sergio
Browse files

Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

parents 7113c90c 180cb0bb
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/randomProcesses/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
-I$(LIB_SRC)/randomProcesses/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lrandomProcesses \
-lsampling \
-lmeshTools
-lrandomProcesses
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = -lfiniteVolume
EXE_LIBS = \
-lfiniteVolume \
-lfieldSources \
-lmeshTools \
-lsampling
......@@ -45,7 +45,7 @@
);
Info<< "Reading diffusivity D\n" << endl;
Info<< "Reading diffusivity DT\n" << endl;
dimensionedScalar DT
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -30,6 +30,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "IObasicSourceList.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -40,6 +41,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "createSources.H"
simpleControl simple(mesh);
......@@ -60,6 +62,8 @@ int main(int argc, char *argv[])
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
==
sources(T)
);
}
......
......@@ -5,7 +5,6 @@ EXE_INC = \
-IPDRModels/dragModels/PDRDragModel \
-IlaminarFlameSpeed/SCOPE \
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
......
......@@ -116,7 +116,7 @@ void PDRkEpsilon::correct()
}
tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G("RASModel.G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear();
// Update espsilon and G at the wall
......
......@@ -16,10 +16,16 @@
: -dpdt
)
- fvm::laplacian(turbulence->alphaEff(), hea)
+ sources(rho, hea)
);
EaEqn.relax();
sources.constrain(EaEqn);
EaEqn.solve();
sources.correct(hea);
thermo.correct();
}
......@@ -2,7 +2,7 @@ if (ign.ignited())
{
volScalarField& heau = thermo.heu();
solve
fvScalarMatrix heauEqn
(
fvm::ddt(rho, heau) + mvConvection->fvmDiv(phi, heau)
+ (fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou()
......@@ -23,5 +23,14 @@ if (ign.ignited())
// A possible solution would be to solve for ftu as well as ft.
//- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau)
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau)
==
sources(rho, heau)
);
sources.constrain(heauEqn);
heauEqn.solve();
sources.correct(heau);
}
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude\
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfieldSources \
-lsampling \
-lmeshTools \
-lengine \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
......@@ -16,6 +22,4 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lspecie \
-llaminarFlameSpeedModels \
-lfiniteVolume \
-lmeshTools
-llaminarFlameSpeedModels
......@@ -5,12 +5,17 @@
+ turbulence->divDevRhoReff(U)
==
rho*g
+ sources(rho, U)
);
UEqn.relax();
sources.constrain(UEqn);
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
sources.correct(U);
K = 0.5*magSqr(U);
}
......@@ -56,6 +56,7 @@ Description
#include "ignition.H"
#include "Switch.H"
#include "pimpleControl.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -68,6 +69,7 @@ int main(int argc, char *argv[])
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createSources.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
......
......@@ -34,7 +34,7 @@ if (ign.ignited())
// Calculate turbulent flame speed flux
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
surfaceScalarField phiSt(fvc::interpolate(rhou*StCorr*Su*Xi)*nf);
surfaceScalarField phiSt("phiSt", fvc::interpolate(rhou*StCorr*Su*Xi)*nf);
scalar StCoNum = max
(
......@@ -50,9 +50,11 @@ if (ign.ignited())
(
fvm::ddt(rho, b)
+ mvConvection->fvmDiv(phi, b)
+ fvm::div(phiSt, b, "div(phiSt,b)")
+ fvm::div(phiSt, b)
- fvm::Sp(fvc::div(phiSt), b)
- fvm::laplacian(turbulence->alphaEff(), b)
==
sources(rho, b)
);
......@@ -64,8 +66,13 @@ if (ign.ignited())
// Solve for b
// ~~~~~~~~~~~
bEqn.relax();
sources.constrain(bEqn);
bEqn.solve();
sources.correct(b);
Info<< "min(b) = " << min(b).value() << endl;
......@@ -153,11 +160,17 @@ if (ign.ignited())
==
- fvm::SuSp(-rho*Rc*Su0/Su, Su)
- fvm::SuSp(rho*(sigmas + Rc), Su)
+ sources(rho, Su)
);
SuEqn.relax();
sources.constrain(SuEqn);
SuEqn.solve();
sources.correct(Su);
// Limit the maximum Su
// ~~~~~~~~~~~~~~~~~~~~
Su.min(SuMax);
......@@ -234,11 +247,17 @@ if (ign.ignited())
),
Xi
)
+ sources(rho, Xi)
);
XiEqn.relax();
sources.constrain(XiEqn);
XiEqn.solve();
sources.correct(Xi);
// Correct boundedness of Xi
// ~~~~~~~~~~~~~~~~~~~~~~~~~
Xi.max(1.0);
......
......@@ -13,10 +13,18 @@ if (composition.contains("ft"))
{
volScalarField& ft = composition.Y("ft");
solve
fvScalarMatrix ftEqn
(
fvm::ddt(rho, ft)
+ mvConvection->fvmDiv(phi, ft)
- fvm::laplacian(turbulence->alphaEff(), ft)
==
sources(rho, ft)
);
sources.constrain(ftEqn);
ftEqn.solve();
sources.correct(ft);
}
......@@ -16,6 +16,8 @@ if (pimple.transonic())
)
);
sources.relativeFlux(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
......@@ -23,8 +25,12 @@ if (pimple.transonic())
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho*rAU, p)
==
sources(psi, p, rho.name())
);
sources.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -45,6 +51,8 @@ else
)
);
sources.relativeFlux(phiHbyA);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
......@@ -52,8 +60,12 @@ else
fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p)
==
sources(psi, p, rho.name())
);
sources.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -68,6 +80,7 @@ else
U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
K = 0.5*magSqr(U);
if (thermo.dpdt())
......
......@@ -12,6 +12,7 @@ EXE_INC = \
EXE_LIBS = \
-lfiniteVolume \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lreactionThermophysicalModels \
-lfluidThermophysicalModels \
......
......@@ -20,6 +20,5 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lfieldSources
......@@ -47,6 +47,7 @@ int main(int argc, char *argv[])
#include "createEngineTime.H"
#include "createEngineMesh.H"
#include "createFields.H"
#include "createSources.H"
#include "initContinuityErrs.H"
#include "readEngineTimeControls.H"
#include "compressibleCourantNo.H"
......
......@@ -69,6 +69,3 @@
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
Info<< "Creating sources\n" << endl;
IObasicSourceList sources(mesh);
EXE_INC = \
-I../XiFoam \
-I$(FOAM_SOLVERS)/combustion/XiFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfieldSources \
-lsampling \
-lmeshTools \
-lengine \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
......@@ -16,5 +23,4 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lspecie \
-llaminarFlameSpeedModels \
-lfiniteVolume
-llaminarFlameSpeedModels
......@@ -3,10 +3,14 @@
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
==
sources(rho, U)
);
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
sources.correct(U);
K = 0.5*magSqr(U);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment