Merge branch 'master' into cvm

Conflicts:
	src/OpenFOAM/meshes/boundBox/boundBox.H
This commit is contained in:
graham
2011-01-05 11:53:37 +00:00
5860 changed files with 15156 additions and 11933 deletions

View File

@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || {
exit 1 exit 1
} }
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error: FOAM_EXT_LIBBIN not set"
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
# wmake is required for subsequent targets # wmake is required for subsequent targets
( cd wmake/src && make ) ( cd wmake/src && make )

View File

@ -1,6 +1,6 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
OpenFOAM(R) is Copyright (C) 1991-2010 OpenCFD Ltd. OpenFOAM(R) is Copyright (C) 1991-2011 OpenCFD Ltd.
Contact: OpenCFD (enquiries@OpenCFD.co.uk) Contact: OpenCFD (enquiries@OpenCFD.co.uk)
You may use, distribute and copy the OpenFOAM CFD Toolbox under the terms You may use, distribute and copy the OpenFOAM CFD Toolbox under the terms

View File

@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
exit 1 exit 1
} }
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error: FOAM_EXT_LIBBIN not set"
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
set -x set -x
wmake all utilities wmake all utilities

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
for (int corr=1; corr<=1; corr++) for (int corr=1; corr<=1; corr++)
{ {
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); U = rAU*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf()) phi = (fvc::interpolate(U) & mesh.Sf())

View File

@ -12,8 +12,10 @@
) )
); );
volVectorField force = volVectorField force
U/dimensionedScalar("dt", dimTime, runTime.deltaTValue()); (
U/dimensionedScalar("dt", dimTime, runTime.deltaTValue())
);
Kmesh K(mesh); Kmesh K(mesh);
UOprocess forceGen(K, runTime.deltaTValue(), turbulenceProperties); UOprocess forceGen(K, runTime.deltaTValue(), turbulenceProperties);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -1,6 +1,6 @@
if (runTime.outputTime()) if (runTime.outputTime())
{ {
volVectorField gradT = fvc::grad(T); volVectorField gradT(fvc::grad(T));
volScalarField gradTx volScalarField gradTx
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiEqModels
{ {
defineTypeNameAndDebug(basicSubGrid, 0); defineTypeNameAndDebug(basicSubGrid, 0);
addToRunTimeSelectionTable(XiEqModel, basicSubGrid, dictionary); addToRunTimeSelectionTable(XiEqModel, basicSubGrid, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -123,20 +123,24 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
const objectRegistry& db = Su_.db(); const objectRegistry& db = Su_.db();
const volVectorField& U = db.lookupObject<volVectorField>("U"); const volVectorField& U = db.lookupObject<volVectorField>("U");
volScalarField magU = mag(U); volScalarField magU(mag(U));
volVectorField Uhat = volVectorField Uhat
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4)); (
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
);
volScalarField n = max(N_ - (Uhat & ns_ & Uhat), scalar(1e-4)); volScalarField n(max(N_ - (Uhat & ns_ & Uhat), scalar(1e-4)));
volScalarField b = (Uhat & B_ & Uhat)/n; volScalarField b((Uhat & B_ & Uhat)/n);
volScalarField up = sqrt((2.0/3.0)*turbulence_.k()); volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
volScalarField XiSubEq = volScalarField XiSubEq
(
scalar(1) scalar(1)
+ max(2.2*sqrt(b), min(0.34*magU/up, scalar(1.6))) + max(2.2*sqrt(b), min(0.34*magU/up, scalar(1.6)))
*min(0.25*n, scalar(1)); *min(0.25*n, scalar(1))
);
return XiSubEq*XiEqModel_->XiEq(); return XiSubEq*XiEqModel_->XiEq();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiGModels
{ {
defineTypeNameAndDebug(basicSubGrid, 0); defineTypeNameAndDebug(basicSubGrid, 0);
addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary); addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,7 +31,7 @@ namespace Foam
{ {
defineTypeNameAndDebug(PDRDragModel, 0); defineTypeNameAndDebug(PDRDragModel, 0);
defineRunTimeSelectionTable(PDRDragModel, dictionary); defineRunTimeSelectionTable(PDRDragModel, dictionary);
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace PDRDragModels
{ {
defineTypeNameAndDebug(basic, 0); defineTypeNameAndDebug(basic, 0);
addToRunTimeSelectionTable(PDRDragModel, basic, dictionary); addToRunTimeSelectionTable(PDRDragModel, basic, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -78,7 +78,7 @@ void PDRkEpsilon::correct()
RASModel::correct(); RASModel::correct();
volScalarField divU = fvc::div(phi_/fvc::interpolate(rho_)); volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_)));
if (mesh_.moving()) if (mesh_.moving())
{ {
@ -99,7 +99,7 @@ void PDRkEpsilon::correct()
const PDRDragModel& drag = const PDRDragModel& drag =
U_.db().lookupObject<PDRDragModel>("PDRDragModel"); U_.db().lookupObject<PDRDragModel>("PDRDragModel");
volScalarField GR = drag.Gk(); volScalarField GR(drag.Gk());
// Dissipation equation // Dissipation equation
tmp<fvScalarMatrix> epsEqn tmp<fvScalarMatrix> epsEqn

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,9 +34,11 @@ Description
if (mesh.nInternalFaces()) if (mesh.nInternalFaces())
{ {
scalarField sumPhi = scalarField sumPhi
(
fvc::surfaceSum(mag(phiSt))().internalField() fvc::surfaceSum(mag(phiSt))().internalField()
/rho.internalField(); / rho.internalField()
);
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

View File

@ -7,7 +7,7 @@
betav*rho*g betav*rho*g
); );
volSymmTensorField invA = inv(I*UEqn.A() + drag->Dcu()); volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu()));
if (momentumPredictor) if (momentumPredictor)
{ {

View File

@ -1,91 +0,0 @@
// Calculate Xi according to the selected flame wrinkling model
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Calculate coefficients for Gulder's flame speed correlation
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField up = uPrimeCoef*sqrt((2.0/3.0)*k);
volScalarField epsilonPlus = pow(uPrimeCoef, 3)*epsilon;
volScalarField tauEta = sqrt(mag(thermo->muu()/(rhou*epsilonPlus)));
volScalarField Reta = up/
(
sqrt(epsilonPlus*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
);
else if (XiModel == "algebraic")
{
// Simple algebraic model for Xi based on Gulders correlation
// with a linear correction function to give a plausible profile for Xi
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField GEta = GEtaCoef/tauEta;
volScalarField XiEqEta = 1.0 + XiCoef*sqrt(up/(Su + SuMin))*Reta;
volScalarField R =
GEta*XiEqEta/(XiEqEta - 0.999) + GIn*XiIn/(XiIn - 0.999);
volScalarField XiEqStar = R/(R - GEta - GIn);
//- Calculate the unweighted b
//volScalarField Rrho = thermo->rhou()/thermo->rhob();
//volScalarField bbar = b/(b + (Rrho*(1.0 - b)));
Xi == 1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b))*(XiEqStar - 1.0);
}
else if (XiModel == "transport")
{
// Calculate Xi transport coefficients based on Gulders correlation
// and DNS data for the rate of generation
// with a linear correction function to give a plausible profile for Xi
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField GEta = GEtaCoef/tauEta;
volScalarField XiEqEta = 1.0 + XiCoef*sqrt(up/(Su + SuMin))*Reta;
volScalarField R =
GEta*XiEqEta/(XiEqEta - 0.999) + GIn*XiIn/(XiIn - 0.999);
volScalarField XiEqStar = R/(R - GEta - GIn);
volScalarField XiEq =
1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b))*(XiEqStar - 1.0);
volScalarField G = R*(XiEq - 1.0)/XiEq;
// Calculate Xi flux
// ~~~~~~~~~~~~~~~~~
surfaceScalarField phiXi =
phiSt
+ (
- fvc::interpolate(fvc::laplacian(Dbf, b)/mgb)*nf
+ fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf
);
// Solve for the flame wrinkling
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
solve
(
betav*fvm::ddt(rho, Xi)
+ mvConvection->fvmDiv(phi, Xi)
+ fvm::div(phiXi, Xi, "div(phiXi,Xi)")
- fvm::Sp(fvc::div(phiXi), Xi)
==
betav*rho*R
- fvm::Sp(betav*rho*(R - G), Xi)
);
// Correct boundedness of Xi
// ~~~~~~~~~~~~~~~~~~~~~~~~~
Xi.max(1.0);
Xi = min(Xi, 2.0*XiEq);
Info<< "max(Xi) = " << max(Xi).value() << endl;
Info<< "max(XiEq) = " << max(XiEq).value() << endl;
}
else
{
FatalError
<< args.executable() << " : Unknown Xi model " << XiModel
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiEqModels
{ {
defineTypeNameAndDebug(Gulder, 0); defineTypeNameAndDebug(Gulder, 0);
addToRunTimeSelectionTable(XiEqModel, Gulder, dictionary); addToRunTimeSelectionTable(XiEqModel, Gulder, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -64,15 +64,18 @@ Foam::XiEqModels::Gulder::~Gulder()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
{ {
volScalarField up = sqrt((2.0/3.0)*turbulence_.k()); volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon(); const volScalarField& epsilon = turbulence_.epsilon();
volScalarField tauEta = sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))); volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
volScalarField Reta = up/ volScalarField Reta
( (
sqrt(epsilon*tauEta) up
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8) / (
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
)
); );
return 1.0 + XiEqCoef*sqrt(up/(Su_ + SuMin))*Reta; return 1.0 + XiEqCoef*sqrt(up/(Su_ + SuMin))*Reta;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiEqModels
{ {
defineTypeNameAndDebug(SCOPEBlend, 0); defineTypeNameAndDebug(SCOPEBlend, 0);
addToRunTimeSelectionTable(XiEqModel, SCOPEBlend, dictionary); addToRunTimeSelectionTable(XiEqModel, SCOPEBlend, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiEqModels
{ {
defineTypeNameAndDebug(SCOPEXiEq, 0); defineTypeNameAndDebug(SCOPEXiEq, 0);
addToRunTimeSelectionTable(XiEqModel, SCOPEXiEq, dictionary); addToRunTimeSelectionTable(XiEqModel, SCOPEXiEq, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -83,13 +83,13 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
const volScalarField& k = turbulence_.k(); const volScalarField& k = turbulence_.k();
const volScalarField& epsilon = turbulence_.epsilon(); const volScalarField& epsilon = turbulence_.epsilon();
volScalarField up = sqrt((2.0/3.0)*k); volScalarField up(sqrt((2.0/3.0)*k));
volScalarField l = (lCoef*sqrt(3.0/2.0))*up*k/epsilon; volScalarField l((lCoef*sqrt(3.0/2.0))*up*k/epsilon);
volScalarField Rl = up*l*thermo_.rhou()/thermo_.muu(); volScalarField Rl(up*l*thermo_.rhou()/thermo_.muu());
volScalarField upBySu = up/(Su_ + SuMin); volScalarField upBySu(up/(Su_ + SuMin));
volScalarField K = 0.157*upBySu/sqrt(Rl); volScalarField K(0.157*upBySu/sqrt(Rl));
volScalarField Ma = MaModel.Ma(); volScalarField Ma(MaModel.Ma());
tmp<volScalarField> tXiEq tmp<volScalarField> tXiEq
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,7 +31,7 @@ namespace Foam
{ {
defineTypeNameAndDebug(XiEqModel, 0); defineTypeNameAndDebug(XiEqModel, 0);
defineRunTimeSelectionTable(XiEqModel, dictionary); defineRunTimeSelectionTable(XiEqModel, dictionary);
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiEqModels
{ {
defineTypeNameAndDebug(instability, 0); defineTypeNameAndDebug(instability, 0);
addToRunTimeSelectionTable(XiEqModel, instability, dictionary); addToRunTimeSelectionTable(XiEqModel, instability, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -64,7 +64,7 @@ Foam::XiEqModels::instability::~instability()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability::XiEq() const Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability::XiEq() const
{ {
volScalarField turbXiEq = XiEqModel_->XiEq(); volScalarField turbXiEq(XiEqModel_->XiEq());
return XiEqIn/turbXiEq + turbXiEq; return XiEqIn/turbXiEq + turbXiEq;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiGModels
{ {
defineTypeNameAndDebug(KTS, 0); defineTypeNameAndDebug(KTS, 0);
addToRunTimeSelectionTable(XiGModel, KTS, dictionary); addToRunTimeSelectionTable(XiGModel, KTS, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -63,10 +63,11 @@ Foam::XiGModels::KTS::~KTS()
Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::G() const Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::G() const
{ {
volScalarField up = sqrt((2.0/3.0)*turbulence_.k()); // volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon(); const volScalarField& epsilon = turbulence_.epsilon();
volScalarField tauEta = sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))); tmp<volScalarField> tauEta =
sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)));
return GEtaCoef/tauEta; return GEtaCoef/tauEta;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,7 +31,7 @@ namespace Foam
{ {
defineTypeNameAndDebug(XiGModel, 0); defineTypeNameAndDebug(XiGModel, 0);
defineRunTimeSelectionTable(XiGModel, dictionary); defineRunTimeSelectionTable(XiGModel, dictionary);
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiGModels
{ {
defineTypeNameAndDebug(instabilityG, 0); defineTypeNameAndDebug(instabilityG, 0);
addToRunTimeSelectionTable(XiGModel, instabilityG, dictionary); addToRunTimeSelectionTable(XiGModel, instabilityG, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -65,7 +65,7 @@ Foam::XiGModels::instabilityG::~instabilityG()
Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::G() const Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::G() const
{ {
volScalarField turbXiG = XiGModel_->G(); volScalarField turbXiG(XiGModel_->G());
return GIn*GIn/(GIn + turbXiG) + turbXiG; return GIn*GIn/(GIn + turbXiG) + turbXiG;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,7 +31,7 @@ namespace Foam
{ {
defineTypeNameAndDebug(XiModel, 0); defineTypeNameAndDebug(XiModel, 0);
defineRunTimeSelectionTable(XiModel, dictionary); defineRunTimeSelectionTable(XiModel, dictionary);
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiModels
{ {
defineTypeNameAndDebug(algebraic, 0); defineTypeNameAndDebug(algebraic, 0);
addToRunTimeSelectionTable(XiModel, algebraic, dictionary); addToRunTimeSelectionTable(XiModel, algebraic, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -74,12 +74,12 @@ Foam::tmp<Foam::volScalarField> Foam::XiModels::algebraic::Db() const
void Foam::XiModels::algebraic::correct() void Foam::XiModels::algebraic::correct()
{ {
volScalarField XiEqEta = XiEqModel_->XiEq(); volScalarField XiEqEta(XiEqModel_->XiEq());
volScalarField GEta = XiGModel_->G(); volScalarField GEta(XiGModel_->G());
volScalarField R = GEta*XiEqEta/(XiEqEta - 0.999); volScalarField R(GEta*XiEqEta/(XiEqEta - 0.999));
volScalarField XiEqStar = R/(R - GEta); volScalarField XiEqStar(R/(R - GEta));
Xi_ == 1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0); Xi_ == 1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiModels
{ {
defineTypeNameAndDebug(fixed, 0); defineTypeNameAndDebug(fixed, 0);
addToRunTimeSelectionTable(XiModel, fixed, dictionary); addToRunTimeSelectionTable(XiModel, fixed, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ namespace XiModels
{ {
defineTypeNameAndDebug(transport, 0); defineTypeNameAndDebug(transport, 0);
addToRunTimeSelectionTable(XiModel, transport, dictionary); addToRunTimeSelectionTable(XiModel, transport, dictionary);
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -77,17 +77,19 @@ void Foam::XiModels::transport::correct
const fv::convectionScheme<scalar>& mvConvection const fv::convectionScheme<scalar>& mvConvection
) )
{ {
volScalarField XiEqEta = XiEqModel_->XiEq(); volScalarField XiEqEta(XiEqModel_->XiEq());
volScalarField GEta = XiGModel_->G(); volScalarField GEta(XiGModel_->G());
volScalarField R = GEta*XiEqEta/(XiEqEta - 0.999); volScalarField R(GEta*XiEqEta/(XiEqEta - 0.999));
volScalarField XiEqStar = R/(R - GEta); volScalarField XiEqStar(R/(R - GEta));
volScalarField XiEq = volScalarField XiEq
1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0); (
1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0)
);
volScalarField G = R*(XiEq - 1.0)/XiEq; volScalarField G(R*(XiEq - 1.0)/XiEq);
const objectRegistry& db = b_.db(); const objectRegistry& db = b_.db();
const volScalarField& betav = db.lookupObject<volScalarField>("betav"); const volScalarField& betav = db.lookupObject<volScalarField>("betav");

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -25,20 +25,20 @@ if (ign.ignited())
// Unburnt gas density // Unburnt gas density
// ~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~
volScalarField rhou = thermo.rhou(); volScalarField rhou(thermo.rhou());
// Calculate flame normal etc. // Calculate flame normal etc.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//volVectorField n = fvc::grad(b); // volVectorField n(fvc::grad(b));
volVectorField n = fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()); volVectorField n(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()));
volScalarField mgb("mgb", mag(n)); volScalarField mgb("mgb", mag(n));
dimensionedScalar dMgb("dMgb", mgb.dimensions(), SMALL); dimensionedScalar dMgb("dMgb", mgb.dimensions(), SMALL);
{ {
volScalarField bc = b*c; volScalarField bc(b*c);
dMgb += 1.0e-3* dMgb += 1.0e-3*
(bc*mgb)().weightedAverage(mesh.V()) (bc*mgb)().weightedAverage(mesh.V())
@ -47,8 +47,8 @@ if (ign.ignited())
mgb += dMgb; mgb += dMgb;
surfaceVectorField Sfhat = mesh.Sf()/mesh.magSf(); surfaceVectorField Sfhat(mesh.Sf()/mesh.magSf());
surfaceVectorField nfVec = fvc::interpolate(n); surfaceVectorField nfVec(fvc::interpolate(n));
nfVec += Sfhat*(fvc::snGrad(b) - (Sfhat & nfVec)); nfVec += Sfhat*(fvc::snGrad(b) - (Sfhat & nfVec));
nfVec /= (mag(nfVec) + dMgb); nfVec /= (mag(nfVec) + dMgb);
surfaceScalarField nf("nf", mesh.Sf() & nfVec); surfaceScalarField nf("nf", mesh.Sf() & nfVec);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -1,6 +1,6 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
U = invA & UEqn.H(); U = invA & UEqn.H();
if (transonic) if (transonic)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,18 +2,18 @@ if (ign.ignited())
{ {
// progress variable // progress variable
// ~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~
volScalarField c = scalar(1) - b; volScalarField c(scalar(1) - b);
// Unburnt gas density // Unburnt gas density
// ~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~
volScalarField rhou = thermo.rhou(); volScalarField rhou(thermo.rhou());
// Calculate flame normal etc. // Calculate flame normal etc.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
volVectorField n = fvc::grad(b); volVectorField n(fvc::grad(b));
volScalarField mgb = mag(n); volScalarField mgb(mag(n));
dimensionedScalar dMgb = 1.0e-3* dimensionedScalar dMgb = 1.0e-3*
(b*c*mgb)().weightedAverage(mesh.V()) (b*c*mgb)().weightedAverage(mesh.V())
@ -22,11 +22,11 @@ if (ign.ignited())
mgb += dMgb; mgb += dMgb;
surfaceVectorField SfHat = mesh.Sf()/mesh.magSf(); surfaceVectorField SfHat(mesh.Sf()/mesh.magSf());
surfaceVectorField nfVec = fvc::interpolate(n); surfaceVectorField nfVec(fvc::interpolate(n));
nfVec += SfHat*(fvc::snGrad(b) - (SfHat & nfVec)); nfVec += SfHat*(fvc::snGrad(b) - (SfHat & nfVec));
nfVec /= (mag(nfVec) + dMgb); nfVec /= (mag(nfVec) + dMgb);
surfaceScalarField nf = (mesh.Sf() & nfVec); surfaceScalarField nf((mesh.Sf() & nfVec));
n /= mgb; n /= mgb;
@ -34,7 +34,7 @@ if (ign.ignited())
// Calculate turbulent flame speed flux // Calculate turbulent flame speed flux
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
surfaceScalarField phiSt = fvc::interpolate(rhou*StCorr*Su*Xi)*nf; surfaceScalarField phiSt(fvc::interpolate(rhou*StCorr*Su*Xi)*nf);
scalar StCoNum = max scalar StCoNum = max
( (
@ -71,16 +71,20 @@ if (ign.ignited())
// Calculate coefficients for Gulder's flame speed correlation // Calculate coefficients for Gulder's flame speed correlation
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField up = uPrimeCoef*sqrt((2.0/3.0)*turbulence->k()); volScalarField up(uPrimeCoef*sqrt((2.0/3.0)*turbulence->k()));
//volScalarField up = sqrt(mag(diag(n * n) & diag(turbulence->r()))); //volScalarField up(sqrt(mag(diag(n * n) & diag(turbulence->r()))));
volScalarField epsilon = pow(uPrimeCoef, 3)*turbulence->epsilon(); volScalarField epsilon(pow(uPrimeCoef, 3)*turbulence->epsilon());
volScalarField tauEta = sqrt(thermo.muu()/(rhou*epsilon)); volScalarField tauEta(sqrt(thermo.muu()/(rhou*epsilon)));
volScalarField Reta = up/ volScalarField Reta
( (
sqrt(epsilon*tauEta) + dimensionedScalar("1e-8", up.dimensions(), 1e-8) up
/ (
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
)
); );
//volScalarField l = 0.337*k*sqrt(k)/epsilon; //volScalarField l = 0.337*k*sqrt(k)/epsilon;
@ -88,34 +92,38 @@ if (ign.ignited())
// Calculate Xi flux // Calculate Xi flux
// ~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~
surfaceScalarField phiXi = surfaceScalarField phiXi
(
phiSt phiSt
- fvc::interpolate(fvc::laplacian(turbulence->alphaEff(), b)/mgb)*nf - fvc::interpolate(fvc::laplacian(turbulence->alphaEff(), b)/mgb)*nf
+ fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf; + fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf
);
// Calculate mean and turbulent strain rates // Calculate mean and turbulent strain rates
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volVectorField Ut = U + Su*Xi*n; volVectorField Ut(U + Su*Xi*n);
volScalarField sigmat = (n & n)*fvc::div(Ut) - (n & fvc::grad(Ut) & n); volScalarField sigmat((n & n)*fvc::div(Ut) - (n & fvc::grad(Ut) & n));
volScalarField sigmas = volScalarField sigmas
(
((n & n)*fvc::div(U) - (n & fvc::grad(U) & n))/Xi ((n & n)*fvc::div(U) - (n & fvc::grad(U) & n))/Xi
+ ( + (
(n & n)*fvc::div(Su*n) (n & n)*fvc::div(Su*n)
- (n & fvc::grad(Su*n) & n) - (n & fvc::grad(Su*n) & n)
)*(Xi + scalar(1))/(2*Xi); )*(Xi + scalar(1))/(2*Xi)
);
// Calculate the unstrained laminar flame speed // Calculate the unstrained laminar flame speed
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField Su0 = unstrainedLaminarFlameSpeed()(); volScalarField Su0(unstrainedLaminarFlameSpeed()());
// Calculate the laminar flame speed in equilibrium with the applied strain // Calculate the laminar flame speed in equilibrium with the applied strain
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField SuInf = Su0*max(scalar(1) - sigmas/sigmaExt, scalar(0.01)); volScalarField SuInf(Su0*max(scalar(1) - sigmas/sigmaExt, scalar(0.01)));
if (SuModel == "unstrained") if (SuModel == "unstrained")
{ {
@ -130,9 +138,11 @@ if (ign.ignited())
// Solve for the strained laminar flame speed // Solve for the strained laminar flame speed
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField Rc = volScalarField Rc
(
(sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt) (sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt)
/(sqr(Su0 - SuInf) + sqr(SuMin)); /(sqr(Su0 - SuInf) + sqr(SuMin))
);
fvScalarMatrix SuEqn fvScalarMatrix SuEqn
( (
@ -183,17 +193,21 @@ if (ign.ignited())
// with a linear correction function to give a plausible profile for Xi // with a linear correction function to give a plausible profile for Xi
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField XiEqStar = volScalarField XiEqStar
scalar(1.001) + XiCoef*sqrt(up/(Su + SuMin))*Reta; (
scalar(1.001) + XiCoef*sqrt(up/(Su + SuMin))*Reta
);
volScalarField XiEq = volScalarField XiEq
(
scalar(1.001) scalar(1.001)
+ (scalar(1) + (2*XiShapeCoef)*(scalar(0.5) - b)) + (scalar(1) + (2*XiShapeCoef)*(scalar(0.5) - b))
*(XiEqStar - scalar(1.001)); *(XiEqStar - scalar(1.001))
);
volScalarField Gstar = 0.28/tauEta; volScalarField Gstar(0.28/tauEta);
volScalarField R = Gstar*XiEqStar/(XiEqStar - scalar(1)); volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1)));
volScalarField G = R*(XiEq - scalar(1.001))/XiEq; volScalarField G(R*(XiEq - scalar(1.001))/XiEq);
//R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar; //R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar;

View File

@ -61,8 +61,10 @@
); );
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt = volScalarField DpDt
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); (
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
Info<< "Creating field Xi\n" << endl; Info<< "Creating field Xi\n" << endl;

View File

@ -1,6 +1,6 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); U = rAU*UEqn.H();
if (transonic) if (transonic)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -55,5 +55,7 @@
); );
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt = volScalarField DpDt
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); (
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);

View File

@ -12,7 +12,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
{ {
label inertIndex = -1; label inertIndex = -1;
volScalarField Yt = 0.0*Y[0]; volScalarField Yt(0.0*Y[0]);
forAll(Y, i) forAll(Y, i)
{ {

View File

@ -82,8 +82,10 @@ autoPtr<compressible::turbulenceModel> turbulence
); );
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt = volScalarField DpDt
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); (
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,11 +94,13 @@ int main(int argc, char *argv[])
// turbulent time scale // turbulent time scale
{ {
volScalarField tk = volScalarField tk
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); (
volScalarField tc = chemistry.tc(); Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc(chemistry.tc());
//Chalmers PaSR model // Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
} }

View File

@ -1,6 +1,6 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField A = UEqn.A(); volScalarField A(UEqn.A());
U = UEqn.H()/A; U = UEqn.H()/A;
if (transonic) if (transonic)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,9 +85,11 @@ int main(int argc, char *argv[])
// turbulent time scale // turbulent time scale
{ {
volScalarField tk = volScalarField tk
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); (
volScalarField tc = chemistry.tc(); Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc(chemistry.tc());
// Chalmers PaSR model // Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT()+tc+tk); kappa = (runTime.deltaT() + tc)/(runTime.deltaT()+tc+tk);

View File

@ -1,6 +1,6 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); U = rAU*UEqn.H();
if (transonic) if (transonic)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -1,6 +1,6 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); U = rAU*UEqn.H();
if (transonic) if (transonic)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,7 +32,7 @@ namespace Foam
{ {
defineTypeNameAndDebug(combustionModel, 0); defineTypeNameAndDebug(combustionModel, 0);
defineRunTimeSelectionTable(combustionModel, dictionary); defineRunTimeSelectionTable(combustionModel, dictionary);
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -78,8 +78,8 @@ Foam::combustionModel::combustionModel::R(volScalarField& fu) const
{ {
const basicMultiComponentMixture& composition = thermo_.composition(); const basicMultiComponentMixture& composition = thermo_.composition();
const volScalarField& ft = composition.Y("ft"); const volScalarField& ft = composition.Y("ft");
volScalarField fres = composition.fres(ft, stoicRatio_.value()); volScalarField fres(composition.fres(ft, stoicRatio_.value()));
volScalarField wFuelNorm = this->wFuelNorm()*pos(fu - fres); volScalarField wFuelNorm(this->wFuelNorm()*pos(fu - fres));
return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu); return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,8 +39,8 @@ namespace combustionModels
infinitelyFastChemistry, infinitelyFastChemistry,
dictionary dictionary
); );
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,8 +39,8 @@ namespace combustionModels
noCombustion, noCombustion,
dictionary dictionary
); );
}; }
}; }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -123,8 +123,10 @@ volScalarField dQ
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt = volScalarField DpDt
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); (
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho); dimensionedScalar initialMass = fvc::domainIntegrate(rho);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -1,7 +1,7 @@
{ {
// Solve fuel equation // Solve fuel equation
// ~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~
fvScalarMatrix R = combustion->R(fu); fvScalarMatrix R(combustion->R(fu));
{ {
fvScalarMatrix fuEqn fvScalarMatrix fuEqn

View File

@ -1,6 +1,6 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn.H(); U = rAU*UEqn.H();
@ -17,7 +17,7 @@ phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
surfaceScalarField rhorAUf = fvc::interpolate(rho*rAU); surfaceScalarField rhorAUf(fvc::interpolate(rho*rAU));
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (

View File

@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
{ {
label inertIndex = -1; label inertIndex = -1;
volScalarField Yt = 0.0*Y[0]; volScalarField Yt(0.0*Y[0]);
forAll(Y, i) forAll(Y, i)
{ {

View File

@ -10,9 +10,14 @@
// turbulent time scale // turbulent time scale
if (turbulentReaction) if (turbulentReaction)
{ {
volScalarField tk = volScalarField tk
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); (
volScalarField tc = chemistry.tc(); Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc
(
chemistry.tc()
);
// Chalmers PaSR model // Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);

View File

@ -72,8 +72,10 @@ autoPtr<compressible::turbulenceModel> turbulence
); );
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt = volScalarField DpDt
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); (
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

View File

@ -1,6 +1,6 @@
rho = thermo.rho(); rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); U = rAU*UEqn.H();
if (transonic) if (transonic)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
{ {
label inertIndex = -1; label inertIndex = -1;
volScalarField Yt = 0.0*Y[0]; volScalarField Yt(0.0*Y[0]);
forAll(Y, i) forAll(Y, i)
{ {

View File

@ -10,9 +10,11 @@
// turbulent time scale // turbulent time scale
if (turbulentReaction) if (turbulentReaction)
{ {
volScalarField tk = volScalarField tk
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); (
volScalarField tc = chemistry.tc(); Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc(chemistry.tc());
// Chalmers PaSR model // Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);

View File

@ -73,8 +73,10 @@ autoPtr<compressible::turbulenceModel> turbulence
); );
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt = volScalarField DpDt
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); (
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

View File

@ -5,14 +5,16 @@
// pressure solution - done in 2 parts. Part 1: // pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p; thermo.rho() -= psi*p;
volScalarField rAU = 1.0/UEqn.A(); volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H(); U = rAU*UEqn.H();
if (transonic) if (transonic)
{ {
surfaceScalarField phiv = surfaceScalarField phiv
(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi); + fvc::ddtPhiCorr(rAU, rho, U, phi)
);
phi = fvc::interpolate(rho)*phiv; phi = fvc::interpolate(rho)*phiv;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -181,13 +181,16 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
) )
); );
Field<scalar> C2 = pmu/prho Field<scalar> C2
(
pmu/prho
*sqrt(ppsi*constant::mathematical::piByTwo) *sqrt(ppsi*constant::mathematical::piByTwo)
*2.0*gamma_/Pr.value()/(gamma_ + 1.0) *2.0*gamma_/Pr.value()/(gamma_ + 1.0)
*(2.0 - accommodationCoeff_)/accommodationCoeff_; *(2.0 - accommodationCoeff_)/accommodationCoeff_
);
Field<scalar> aCoeff = prho.snGrad() - prho/C2; Field<scalar> aCoeff(prho.snGrad() - prho/C2);
Field<scalar> KEbyRho = 0.5*magSqr(pU); Field<scalar> KEbyRho(0.5*magSqr(pU));
valueFraction() = (1.0/(1.0 + patch().deltaCoeffs()*C2)); valueFraction() = (1.0/(1.0 + patch().deltaCoeffs()*C2));
refValue() = Twall_; refValue() = Twall_;
@ -214,9 +217,11 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
namespace Foam namespace Foam
{ {
makePatchTypeField
makePatchTypeField(fvPatchScalarField, smoluchowskiJumpTFvPatchScalarField); (
fvPatchScalarField,
smoluchowskiJumpTFvPatchScalarField
);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -83,8 +83,7 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
if if
( (
mag(accommodationCoeff_) < SMALL mag(accommodationCoeff_) < SMALL
|| || mag(accommodationCoeff_) > 2.0
mag(accommodationCoeff_) > 2.0
) )
{ {
FatalIOErrorIn FatalIOErrorIn
@ -142,10 +141,13 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
const fvPatchField<scalar>& ppsi = const fvPatchField<scalar>& ppsi =
patch().lookupPatchField<volScalarField, scalar>("psi"); patch().lookupPatchField<volScalarField, scalar>("psi");
Field<scalar> C1 = sqrt(ppsi*constant::mathematical::piByTwo) Field<scalar> C1
*(2.0 - accommodationCoeff_)/accommodationCoeff_; (
sqrt(ppsi*constant::mathematical::piByTwo)
* (2.0 - accommodationCoeff_)/accommodationCoeff_
);
Field<scalar> pnu = pmu/prho; Field<scalar> pnu(pmu/prho);
valueFraction() = (1.0/(1.0 + patch().deltaCoeffs()*C1*pnu)); valueFraction() = (1.0/(1.0 + patch().deltaCoeffs()*C1*pnu));
refValue() = Uwall_; refValue() = Uwall_;
@ -156,8 +158,8 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
this->db().objectRegistry::lookupObject<volScalarField>("T"); this->db().objectRegistry::lookupObject<volScalarField>("T");
label patchi = this->patch().index(); label patchi = this->patch().index();
const fvPatchScalarField& pT = vsfT.boundaryField()[patchi]; const fvPatchScalarField& pT = vsfT.boundaryField()[patchi];
Field<vector> gradpT = fvc::grad(vsfT)().boundaryField()[patchi]; Field<vector> gradpT(fvc::grad(vsfT)().boundaryField()[patchi]);
vectorField n = patch().nf(); vectorField n(patch().nf());
refValue() -= 3.0*pnu/(4.0*pT)*transform(I - n*n, gradpT); refValue() -= 3.0*pnu/(4.0*pT)*transform(I - n*n, gradpT);
} }
@ -166,7 +168,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
{ {
const fvPatchTensorField& ptauMC = const fvPatchTensorField& ptauMC =
patch().lookupPatchField<volTensorField, tensor>("tauMC"); patch().lookupPatchField<volTensorField, tensor>("tauMC");
vectorField n = patch().nf(); vectorField n(patch().nf());
refValue() -= C1/prho*transform(I - n*n, (n & ptauMC)); refValue() -= C1/prho*transform(I - n*n, (n & ptauMC));
} }
@ -196,7 +198,11 @@ void maxwellSlipUFvPatchVectorField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchVectorField, maxwellSlipUFvPatchVectorField); makePatchTypeField
(
fvPatchVectorField,
maxwellSlipUFvPatchVectorField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -135,8 +135,8 @@ void mixedFixedValueSlipFvPatchField<Type>::rmap
template<class Type> template<class Type>
tmp<Field<Type> > mixedFixedValueSlipFvPatchField<Type>::snGrad() const tmp<Field<Type> > mixedFixedValueSlipFvPatchField<Type>::snGrad() const
{ {
vectorField nHat = this->patch().nf(); tmp<vectorField> nHat = this->patch().nf();
Field<Type> pif = this->patchInternalField(); Field<Type> pif(this->patchInternalField());
return return
( (
@ -155,7 +155,7 @@ void mixedFixedValueSlipFvPatchField<Type>::evaluate(const Pstream::commsTypes)
this->updateCoeffs(); this->updateCoeffs();
} }
vectorField nHat = this->patch().nf(); vectorField nHat(this->patch().nf());
Field<Type>::operator= Field<Type>::operator=
( (
@ -174,7 +174,7 @@ template<class Type>
tmp<Field<Type> > tmp<Field<Type> >
mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
{ {
vectorField nHat = this->patch().nf(); vectorField nHat(this->patch().nf());
vectorField diag(nHat.size()); vectorField diag(nHat.size());
diag.replace(vector::X, mag(nHat.component(vector::X))); diag.replace(vector::X, mag(nHat.component(vector::X)));

Some files were not shown because too many files have changed in this diff Show More