mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -27,7 +27,7 @@ PDRModels/XiGModels/basicXiSubG/basicXiSubG.C
|
||||
|
||||
laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C
|
||||
|
||||
/* PDRFoamAutoRefine.C */
|
||||
/*PDRFoamAutoRefine.C*/
|
||||
PDRFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/PDRFoam
|
||||
|
||||
@ -9,13 +9,14 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
scalar StCoNum = 0.0;
|
||||
@ -91,11 +91,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
scalar StCoNum = 0.0;
|
||||
@ -89,17 +89,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
bool hasChanged = false;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||
|
||||
// Indicators for refinement. Note: before runTime++
|
||||
// only for postprocessing reasons.
|
||||
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
|
||||
@ -111,7 +109,10 @@ int main(int argc, char *argv[])
|
||||
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
|
||||
tmagGradP.clear();
|
||||
|
||||
bool meshChanged = false;
|
||||
runTime++;
|
||||
|
||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||
|
||||
{
|
||||
// Make the fluxes absolute
|
||||
fvc::makeAbsolute(phi, rho, U);
|
||||
@ -134,29 +135,27 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
//volScalarField pIndicator("pIndicator",
|
||||
// p*(fvc::laplacian(p))
|
||||
// / (
|
||||
// magSqr(fvc::grad(p))
|
||||
// + dimensionedScalar
|
||||
// (
|
||||
// "smallish",
|
||||
// sqr(p.dimensions()/dimLength),
|
||||
// 1E-6
|
||||
// )
|
||||
// ));
|
||||
//pIndicator.writeOpt() = IOobject::AUTO_WRITE;
|
||||
|
||||
// Flux estimate for introduced faces.
|
||||
volVectorField rhoU("rhoU", rho*U);
|
||||
|
||||
// Do any mesh changes
|
||||
meshChanged = mesh.update();
|
||||
bool meshChanged = mesh.update();
|
||||
|
||||
// if (mesh.moving() || meshChanged)
|
||||
// {
|
||||
// #include "correctPhi.H"
|
||||
// }
|
||||
|
||||
if (meshChanged)
|
||||
{
|
||||
hasChanged = true;
|
||||
}
|
||||
|
||||
if (runTime.write() && hasChanged)
|
||||
{
|
||||
betav.write();
|
||||
Lobs.write();
|
||||
CT.write();
|
||||
drag->writeFields();
|
||||
flameWrinkling->writeFields();
|
||||
hasChanged = false;
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phi, rho, U);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,55 +50,12 @@ Foam::XiEqModels::basicSubGrid::basicSubGrid
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
|
||||
N_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"N",
|
||||
Su.mesh().time().findInstance(polyMesh::meshSubDir, "N"),
|
||||
polyMesh::meshSubDir,
|
||||
Su.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Su.mesh()
|
||||
),
|
||||
|
||||
ns_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"ns",
|
||||
Su.mesh().time().findInstance(polyMesh::meshSubDir, "ns"),
|
||||
polyMesh::meshSubDir,
|
||||
Su.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Su.mesh()
|
||||
),
|
||||
|
||||
B_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"B",
|
||||
Su.mesh().time().findInstance(polyMesh::meshSubDir, "B"),
|
||||
polyMesh::meshSubDir,
|
||||
Su.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Su.mesh()
|
||||
),
|
||||
|
||||
Lobs_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Lobs",
|
||||
Su.mesh().time().findInstance(polyMesh::meshSubDir, "Lobs"),
|
||||
polyMesh::meshSubDir,
|
||||
Su.mesh().facesInstance(),
|
||||
Su.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -120,8 +77,12 @@ Foam::XiEqModels::basicSubGrid::~basicSubGrid()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
||||
{
|
||||
const objectRegistry& db = Su_.db();
|
||||
const volVectorField& U = db.lookupObject<volVectorField>("U");
|
||||
const fvMesh& mesh = Su_.mesh();
|
||||
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
|
||||
|
||||
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
|
||||
const volSymmTensorField& nsv =
|
||||
mesh.lookupObject<volSymmTensorField>("nsv");
|
||||
|
||||
volScalarField magU(mag(U));
|
||||
volVectorField Uhat
|
||||
@ -129,20 +90,71 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
||||
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
|
||||
);
|
||||
|
||||
volScalarField n(max(N_ - (Uhat & ns_ & Uhat), scalar(1e-4)));
|
||||
const scalarField Cw = pow(mesh.V(), 2.0/3.0);
|
||||
|
||||
volScalarField b((Uhat & B_ & Uhat)/n);
|
||||
tmp<volScalarField> tN
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tN",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& N = tN();
|
||||
|
||||
N.internalField() = Nv.internalField()*Cw;
|
||||
|
||||
tmp<volSymmTensorField> tns
|
||||
(
|
||||
new volSymmTensorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tns",
|
||||
U.mesh().time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
),
|
||||
zeroGradientFvPatchSymmTensorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
volSymmTensorField& ns = tns();
|
||||
|
||||
ns.internalField() = nsv.internalField()*Cw;
|
||||
|
||||
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
|
||||
|
||||
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
|
||||
|
||||
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
|
||||
|
||||
volScalarField XiSubEq
|
||||
(
|
||||
scalar(1)
|
||||
+ max(2.2*sqrt(b), min(0.34*magU/up, scalar(1.6)))
|
||||
*min(0.25*n, scalar(1))
|
||||
+ max(2.2*sqrt(b), min(0.34*magU/up*sqrt(b), scalar(1.6)))
|
||||
* min(n, scalar(1))
|
||||
);
|
||||
|
||||
return XiSubEq*XiEqModel_->XiEq();
|
||||
return (XiSubEq*XiEqModel_->XiEq());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -85,18 +85,9 @@ class basicSubGrid
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Count
|
||||
volScalarField N_;
|
||||
|
||||
//- Sub-count
|
||||
volSymmTensorField ns_;
|
||||
|
||||
//- tblock
|
||||
volSymmTensorField B_;
|
||||
|
||||
//- Typical obstacle diameters per cell
|
||||
volScalarField Lobs_;
|
||||
|
||||
//- Equilibrium Xi model due to turbulence
|
||||
autoPtr<XiEqModel> XiEqModel_;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,8 +34,8 @@ namespace XiGModels
|
||||
{
|
||||
defineTypeNameAndDebug(basicSubGrid, 0);
|
||||
addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -66,12 +66,37 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
|
||||
{
|
||||
const objectRegistry& db = Su_.db();
|
||||
const volVectorField& U = db.lookupObject<volVectorField>("U");
|
||||
const volScalarField& N = db.lookupObject<volScalarField>("N");
|
||||
const volScalarField& Nv = db.lookupObject<volScalarField>("Nv");
|
||||
const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
|
||||
|
||||
tmp<volScalarField> tGtot = XiGModel_->G();
|
||||
volScalarField& Gtot = tGtot();
|
||||
|
||||
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
|
||||
|
||||
tmp<volScalarField> tN
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tN",
|
||||
Su_.mesh().time().timeName(),
|
||||
Su_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
Su_.mesh(),
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& N = tN();
|
||||
|
||||
N.internalField() = Nv.internalField()*Cw;
|
||||
|
||||
forAll(N, celli)
|
||||
{
|
||||
if (N[celli] > 1e-3)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,7 +31,7 @@ namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(PDRDragModel, 0);
|
||||
defineRunTimeSelectionTable(PDRDragModel, dictionary);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -162,6 +162,11 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void writeFields() const
|
||||
{
|
||||
notImplemented("PDRDragModel::write()");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -53,34 +53,12 @@ Foam::PDRDragModels::basic::basic
|
||||
Csu("Csu", dimless, PDRDragModelCoeffs_.lookup("Csu")),
|
||||
Csk("Csk", dimless, PDRDragModelCoeffs_.lookup("Csk")),
|
||||
|
||||
Aw2_
|
||||
(
|
||||
"Aw2",
|
||||
sqr
|
||||
(
|
||||
volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Aw",
|
||||
U_.mesh().time().findInstance(polyMesh::meshSubDir, "Aw"),
|
||||
polyMesh::meshSubDir,
|
||||
U_.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U_.mesh()
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
CR_
|
||||
Aw_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"CR",
|
||||
U_.mesh().time().findInstance(polyMesh::meshSubDir, "CR"),
|
||||
polyMesh::meshSubDir,
|
||||
"Aw",
|
||||
U_.mesh().facesInstance(),
|
||||
U_.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -88,13 +66,12 @@ Foam::PDRDragModels::basic::basic
|
||||
U_.mesh()
|
||||
),
|
||||
|
||||
CT_
|
||||
CR_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"CT",
|
||||
U_.mesh().time().findInstance(polyMesh::meshSubDir, "CT"),
|
||||
polyMesh::meshSubDir,
|
||||
"CR",
|
||||
U_.mesh().facesInstance(),
|
||||
U_.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -114,19 +91,24 @@ Foam::PDRDragModels::basic::~basic()
|
||||
|
||||
Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
||||
{
|
||||
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
|
||||
const volScalarField& betav =
|
||||
U_.db().lookupObject<volScalarField>("betav");
|
||||
|
||||
return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_;
|
||||
return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*sqr(Aw_);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
|
||||
{
|
||||
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
|
||||
const volScalarField& betav =
|
||||
U_.db().lookupObject<volScalarField>("betav");
|
||||
|
||||
const volSymmTensorField& CT =
|
||||
U_.db().lookupObject<volSymmTensorField>("CT");
|
||||
|
||||
return
|
||||
(0.5*rho_)*mag(U_)*(U_ & CT_ & U_)
|
||||
+ Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_);
|
||||
(0.5*rho_)*mag(U_)*(U_ & CT & U_)
|
||||
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_);
|
||||
}
|
||||
|
||||
|
||||
@ -141,4 +123,10 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
|
||||
}
|
||||
|
||||
|
||||
void Foam::PDRDragModels::basic::writeFields() const
|
||||
{
|
||||
Aw_.write();
|
||||
CR_.write();
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -102,9 +102,8 @@ class basic
|
||||
dimensionedScalar Csu;
|
||||
dimensionedScalar Csk;
|
||||
|
||||
volScalarField Aw2_;
|
||||
volScalarField Aw_;
|
||||
volSymmTensorField CR_;
|
||||
volSymmTensorField CT_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -149,6 +148,9 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& PDRProperties);
|
||||
|
||||
//- Write fields
|
||||
void writeFields() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -55,12 +55,42 @@ PDRkEpsilon::PDRkEpsilon
|
||||
const word& modelName
|
||||
)
|
||||
:
|
||||
kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName)
|
||||
kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName),
|
||||
|
||||
C4_
|
||||
(
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"C4",
|
||||
coeffDict_,
|
||||
0.1
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
PDRkEpsilon::~PDRkEpsilon()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool PDRkEpsilon::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
C4_.readIfPresent(coeffDict_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PDRkEpsilon::correct()
|
||||
{
|
||||
if (!turbulence_)
|
||||
@ -89,18 +119,25 @@ void PDRkEpsilon::correct()
|
||||
volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
|
||||
tgradU.clear();
|
||||
|
||||
// Update epsilon and G at the wall
|
||||
// Update espsilon and G at the wall
|
||||
epsilon_.boundaryField().updateCoeffs();
|
||||
|
||||
// Add the blockage generation term so that it is included consistently
|
||||
// in both the k and epsilon equations
|
||||
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
|
||||
const volScalarField& betav =
|
||||
U_.db().lookupObject<volScalarField>("betav");
|
||||
|
||||
const volScalarField& Lobs =
|
||||
U_.db().lookupObject<volScalarField>("Lobs");
|
||||
|
||||
const PDRDragModel& drag =
|
||||
U_.db().lookupObject<PDRDragModel>("PDRDragModel");
|
||||
|
||||
volScalarField GR(drag.Gk());
|
||||
|
||||
volScalarField LI =
|
||||
C4_*(Lobs + dimensionedScalar("minLength", dimLength, VSMALL));
|
||||
|
||||
// Dissipation equation
|
||||
tmp<fvScalarMatrix> epsEqn
|
||||
(
|
||||
@ -108,7 +145,8 @@ void PDRkEpsilon::correct()
|
||||
+ fvm::div(phi_, epsilon_)
|
||||
- fvm::laplacian(DepsilonEff(), epsilon_)
|
||||
==
|
||||
C1_*(betav*G + GR)*epsilon_/k_
|
||||
C1_*betav*G*epsilon_/k_
|
||||
+ 1.5*pow(Cmu_, 3.0/4.0)*GR*sqrt(k_)/LI
|
||||
- fvm::SuSp(((2.0/3.0)*C1_)*betav*rho_*divU, epsilon_)
|
||||
- fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_)
|
||||
);
|
||||
@ -138,7 +176,6 @@ void PDRkEpsilon::correct()
|
||||
solve(kEqn);
|
||||
bound(k_, kMin_);
|
||||
|
||||
|
||||
// Re-calculate viscosity
|
||||
mut_ = rho_*Cmu_*sqr(k_)/epsilon_;
|
||||
mut_.correctBoundaryConditions();
|
||||
|
||||
@ -25,23 +25,23 @@ Class
|
||||
Foam::compressible::RASModels::PDRkEpsilon
|
||||
|
||||
Description
|
||||
Standard k-epsilon turbulence model for compressible flow
|
||||
with additional source terms
|
||||
Standard k-epsilon turbulence model with additional source terms
|
||||
corresponding to PDR basic drag model (\link basic.H \endlink)
|
||||
|
||||
The default model coefficients correspond to the following:
|
||||
\verbatim
|
||||
@verbatim
|
||||
PDRkEpsilonCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
C3 -0.33; // only for compressible
|
||||
C4 0.1;
|
||||
sigmak 1.0; // only for compressible
|
||||
sigmaEps 1.3;
|
||||
Prt 1.0; // only for compressible
|
||||
}
|
||||
\endverbatim
|
||||
@endverbatim
|
||||
|
||||
The turbulence source term \f$ G_{R} \f$ appears in the
|
||||
\f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to
|
||||
@ -60,7 +60,7 @@ SourceFiles
|
||||
#ifndef compressiblePDRkEpsilon_H
|
||||
#define compressiblePDRkEpsilon_H
|
||||
|
||||
#include "RASModel.H"
|
||||
|
||||
#include "kEpsilon.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -80,6 +80,11 @@ class PDRkEpsilon
|
||||
:
|
||||
public kEpsilon
|
||||
{
|
||||
// Private data
|
||||
|
||||
// Model coefficients
|
||||
dimensionedScalar C4_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -102,15 +107,16 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~PDRkEpsilon()
|
||||
{}
|
||||
virtual ~PDRkEpsilon();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
bool read();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,7 +34,7 @@ Description
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
scalarField sumPhi
|
||||
scalarField sumPhi
|
||||
(
|
||||
fvc::surfaceSum(mag(phiSt))().internalField()
|
||||
/ rho.internalField()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,8 +49,9 @@ Foam::XiEqModels::Gulder::Gulder
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqCoef(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
SuMin(0.01*Su.average())
|
||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
SuMin_(0.01*Su.average()),
|
||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef")))
|
||||
{}
|
||||
|
||||
|
||||
@ -66,19 +67,92 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
|
||||
{
|
||||
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
|
||||
const volScalarField& epsilon = turbulence_.epsilon();
|
||||
const fvMesh& mesh = Su_.mesh();
|
||||
|
||||
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
|
||||
|
||||
const volSymmTensorField& CT = mesh.lookupObject<volSymmTensorField>("CT");
|
||||
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
|
||||
const volSymmTensorField& nsv =
|
||||
mesh.lookupObject<volSymmTensorField>("nsv");
|
||||
|
||||
tmp<volScalarField> tN
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tN",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& N = tN();
|
||||
|
||||
N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0);
|
||||
|
||||
tmp<volSymmTensorField> tns
|
||||
(
|
||||
new volSymmTensorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tns",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
volSymmTensorField& ns = tns();
|
||||
|
||||
ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0);
|
||||
|
||||
const volVectorField Uhat
|
||||
(
|
||||
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
|
||||
);
|
||||
|
||||
const volScalarField nr(sqrt(max(N - (Uhat & ns & Uhat), 1e-4)));
|
||||
|
||||
const scalarField cellWidth(pow(mesh.V(), 1.0/3.0));
|
||||
|
||||
const scalarField upLocal(uPrimeCoef_*sqrt((U & CT & U)*cellWidth));
|
||||
|
||||
const scalarField deltaUp(upLocal*(max(1.0, pow(nr, 0.5)) - 1.0));
|
||||
|
||||
up.internalField() += deltaUp;
|
||||
|
||||
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
|
||||
|
||||
volScalarField Reta
|
||||
volScalarField Reta =
|
||||
(
|
||||
up
|
||||
/ (
|
||||
/
|
||||
(
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +160,8 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef;
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -55,8 +55,14 @@ class Gulder
|
||||
{
|
||||
// Private data
|
||||
|
||||
scalar XiEqCoef;
|
||||
dimensionedScalar SuMin;
|
||||
//- Model constant
|
||||
scalar XiEqCoef_;
|
||||
|
||||
//- Minimum laminar burning velocity
|
||||
const dimensionedScalar SuMin_;
|
||||
|
||||
//- Model constant
|
||||
scalar uPrimeCoef_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -97,6 +103,7 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiEqProperties);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ Class
|
||||
Description
|
||||
Simple SCOPEBlendXiEq model for XiEq based on SCOPEXiEqs correlation
|
||||
with a linear correction function to give a plausible profile for XiEq.
|
||||
See \link SCOPELaminarFlameSpeed.H \endlink for details on the SCOPE
|
||||
See @link SCOPELaminarFlameSpeed.H @endlink for details on the SCOPE
|
||||
laminar flame speed model.
|
||||
|
||||
SourceFiles
|
||||
@ -105,6 +105,7 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,10 +49,10 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqCoef(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
XiEqExp(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
|
||||
lCoef(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
|
||||
SuMin(0.01*Su.average()),
|
||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
|
||||
lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
|
||||
SuMin_(0.01*Su.average()),
|
||||
MaModel
|
||||
(
|
||||
IOdictionary
|
||||
@ -62,7 +62,7 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
||||
"combustionProperties",
|
||||
Su.mesh().time().constant(),
|
||||
Su.mesh(),
|
||||
IOobject::MUST_READ_IF_MODIFIED
|
||||
IOobject::MUST_READ
|
||||
)
|
||||
),
|
||||
thermo
|
||||
@ -84,10 +84,10 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
|
||||
const volScalarField& epsilon = turbulence_.epsilon();
|
||||
|
||||
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 upBySu(up/(Su_ + SuMin));
|
||||
volScalarField upBySu(up/(Su_ + SuMin_));
|
||||
volScalarField K(0.157*upBySu/sqrt(Rl));
|
||||
volScalarField Ma(MaModel.Ma());
|
||||
|
||||
@ -114,7 +114,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
|
||||
if (Ma[celli] > 0.01)
|
||||
{
|
||||
xieq[celli] =
|
||||
XiEqCoef*pow(K[celli]*Ma[celli], -XiEqExp)*upBySu[celli];
|
||||
XiEqCoef_*pow(K[celli]*Ma[celli], -XiEqExp_)*upBySu[celli];
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +130,8 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
|
||||
if (Ma[facei] > 0.01)
|
||||
{
|
||||
xieqp[facei] =
|
||||
XiEqCoef*pow(Kp[facei]*Map[facei], -XiEqExp)*upBySup[facei];
|
||||
XiEqCoef_*pow(Kp[facei]*Map[facei], -XiEqExp_)
|
||||
*upBySup[facei];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -143,9 +144,9 @@ bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef;
|
||||
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp;
|
||||
XiEqModelCoeffs_.lookup("lCoef") >> lCoef;
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp_;
|
||||
XiEqModelCoeffs_.lookup("lCoef") >> lCoef_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,10 +58,10 @@ class SCOPEXiEq
|
||||
{
|
||||
// Private data
|
||||
|
||||
scalar XiEqCoef;
|
||||
scalar XiEqExp;
|
||||
scalar lCoef;
|
||||
dimensionedScalar SuMin;
|
||||
scalar XiEqCoef_;
|
||||
scalar XiEqExp_;
|
||||
scalar lCoef_;
|
||||
dimensionedScalar SuMin_;
|
||||
|
||||
//- The SCOPE laminar flame speed model used to obtain the
|
||||
// Marstein number. Note: the laminar flame speed need not be
|
||||
@ -107,6 +107,7 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiEqProperties);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -53,7 +53,31 @@ Foam::XiEqModel::XiEqModel
|
||||
),
|
||||
thermo_(thermo),
|
||||
turbulence_(turbulence),
|
||||
Su_(Su)
|
||||
Su_(Su),
|
||||
Nv_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Nv",
|
||||
Su.mesh().facesInstance(),
|
||||
Su.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Su.mesh()
|
||||
),
|
||||
nsv_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"nsv",
|
||||
Su.mesh().facesInstance(),
|
||||
Su.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Su.mesh()
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -73,4 +97,16 @@ bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
|
||||
}
|
||||
|
||||
|
||||
void Foam::XiEqModel::writeFields() const
|
||||
{
|
||||
Nv_.write();
|
||||
nsv_.write();
|
||||
if (Su_.mesh().foundObject<volSymmTensorField>("B"))
|
||||
{
|
||||
const volSymmTensorField& B =
|
||||
Su_.mesh().lookupObject<volSymmTensorField>("B");
|
||||
B.write();
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,6 +67,8 @@ protected:
|
||||
const hhuCombustionThermo& thermo_;
|
||||
const compressible::RASModel& turbulence_;
|
||||
const volScalarField& Su_;
|
||||
volScalarField Nv_;
|
||||
volSymmTensorField nsv_;
|
||||
|
||||
|
||||
private:
|
||||
@ -146,6 +148,9 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiEqProperties) = 0;
|
||||
|
||||
//- Write fields
|
||||
void writeFields() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,7 +64,7 @@ Foam::XiEqModels::instability::~instability()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability::XiEq() const
|
||||
{
|
||||
volScalarField turbXiEq(XiEqModel_->XiEq());
|
||||
volScalarField turbXiEq = XiEqModel_->XiEq();
|
||||
return XiEqIn/turbXiEq + turbXiEq;
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ Class
|
||||
Description
|
||||
This is the equilibrium level of the flame wrinkling generated by
|
||||
instability. It is a constant (default 2.5). It is used in
|
||||
\link XiModel.H \endlink.
|
||||
@link XiModel.H @endlink.
|
||||
|
||||
SourceFiles
|
||||
instability.C
|
||||
@ -101,6 +101,7 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiEqProperties);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,7 +49,7 @@ Foam::XiGModels::KTS::KTS
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
GEtaCoef(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
|
||||
GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
|
||||
{}
|
||||
|
||||
|
||||
@ -63,13 +63,12 @@ Foam::XiGModels::KTS::~KTS()
|
||||
|
||||
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();
|
||||
|
||||
tmp<volScalarField> tauEta =
|
||||
sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)));
|
||||
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
|
||||
|
||||
return GEtaCoef/tauEta;
|
||||
return (GEtaCoef_/tauEta);
|
||||
}
|
||||
|
||||
|
||||
@ -77,7 +76,7 @@ bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef;
|
||||
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -55,7 +55,7 @@ class KTS
|
||||
{
|
||||
// Private data
|
||||
|
||||
scalar GEtaCoef;
|
||||
scalar GEtaCoef_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,8 +49,8 @@ Foam::XiGModels::instabilityG::instabilityG
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
GIn(XiGModelCoeffs_.lookup("GIn")),
|
||||
lambdaIn(XiGModelCoeffs_.lookup("lambdaIn")),
|
||||
GIn_(XiGModelCoeffs_.lookup("GIn")),
|
||||
lambdaIn_(XiGModelCoeffs_.lookup("lambdaIn")),
|
||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||
{}
|
||||
|
||||
@ -66,7 +66,7 @@ Foam::XiGModels::instabilityG::~instabilityG()
|
||||
Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::G() const
|
||||
{
|
||||
volScalarField turbXiG(XiGModel_->G());
|
||||
return GIn*GIn/(GIn + turbXiG) + turbXiG;
|
||||
return (GIn_*GIn_/(GIn_ + turbXiG) + turbXiG);
|
||||
}
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::Db() const
|
||||
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
||||
|
||||
return XiGModel_->Db()
|
||||
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn)/(mgb + 1.0/lambdaIn);
|
||||
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn_)/(mgb + 1.0/lambdaIn_);
|
||||
}
|
||||
|
||||
|
||||
@ -86,8 +86,8 @@ bool Foam::XiGModels::instabilityG::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.lookup("GIn") >> GIn;
|
||||
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn;
|
||||
XiGModelCoeffs_.lookup("GIn") >> GIn_;
|
||||
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,10 +58,10 @@ class instabilityG
|
||||
// Private data
|
||||
|
||||
//- Flame instabilityG wrinling generation rate coefficient
|
||||
dimensionedScalar GIn;
|
||||
dimensionedScalar GIn_;
|
||||
|
||||
//- InstabilityG length-scale
|
||||
dimensionedScalar lambdaIn;
|
||||
dimensionedScalar lambdaIn_;
|
||||
|
||||
//- Xi generation rate model due to all other processes
|
||||
autoPtr<XiGModel> XiGModel_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -237,6 +237,9 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiProperties) = 0;
|
||||
|
||||
//- Write fields related to Xi model
|
||||
virtual void writeFields() = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -109,6 +109,13 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiProperties);
|
||||
|
||||
//- Write fields of the XiEq model
|
||||
virtual void writeFields()
|
||||
{
|
||||
XiEqModel_().writeFields();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -95,6 +95,11 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiProperties);
|
||||
|
||||
//- Write fields of the XiEq model
|
||||
virtual void writeFields()
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -124,6 +124,12 @@ public:
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiProperties);
|
||||
|
||||
//- Write fields of the XiEq model
|
||||
virtual void writeFields()
|
||||
{
|
||||
XiEqModel_().writeFields();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ if (ign.ignited())
|
||||
// Calculate flame normal etc.
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// volVectorField n(fvc::grad(b));
|
||||
//volVectorField n(fvc::grad(b));
|
||||
volVectorField n(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()));
|
||||
|
||||
volScalarField mgb("mgb", mag(n));
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
//const volScalarField& T = thermo->T();
|
||||
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
@ -94,8 +93,35 @@
|
||||
IOobject
|
||||
(
|
||||
"betav",
|
||||
runTime.findInstance(polyMesh::meshSubDir, "betav"),
|
||||
polyMesh::meshSubDir,
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field Lobs\n" << endl;
|
||||
volScalarField Lobs
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Lobs",
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field CT\n" << endl;
|
||||
volSymmTensorField CT
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"CT",
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,6 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "IFstream.H"
|
||||
#include "SCOPELaminarFlameSpeed.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -68,7 +69,19 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
|
||||
:
|
||||
laminarFlameSpeed(dict, ct),
|
||||
|
||||
coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
|
||||
coeffsDict_
|
||||
(
|
||||
dictionary
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
fileName
|
||||
(
|
||||
dict.lookup("fuelFile")
|
||||
)
|
||||
)()
|
||||
).subDict(typeName + "Coeffs")
|
||||
),
|
||||
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
|
||||
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
|
||||
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -134,7 +134,7 @@ class SCOPE
|
||||
polynomial MaPolyU_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
// Private member functions
|
||||
|
||||
//- Polynomial evaluated from the given equivalence ratio
|
||||
// and polynomial coefficients
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
icoUncoupledKinematicParcelDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/icoUncoupledKinematicParcelDyMFoam
|
||||
@ -1,4 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I../icoUncoupledKinematicParcelFoam \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicKinematicCloud.H"
|
||||
#include "basicKinematicCollidingCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
icoUncoupledKinematicParcelFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/icoUncoupledKinematicParcelFoam
|
||||
@ -75,7 +75,7 @@
|
||||
args.optionReadIfPresent("cloudName", kinematicCloudName);
|
||||
|
||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||
basicKinematicCloud kinematicCloud
|
||||
basicKinematicCollidingCloud kinematicCloud
|
||||
(
|
||||
kinematicCloudName,
|
||||
rhoInf,
|
||||
@ -89,30 +89,17 @@
|
||||
"H",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
autoPtr<volVectorField> HPtr_;
|
||||
autoPtr<volVectorField> HPtr;
|
||||
|
||||
if (Hheader.headerOk())
|
||||
{
|
||||
Info<< "\nReading field H\n" << endl;
|
||||
|
||||
HPtr_.reset
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"H",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
HPtr.reset(new volVectorField (Hheader, mesh));
|
||||
}
|
||||
|
||||
IOobject HdotGradHheader
|
||||
@ -120,28 +107,17 @@
|
||||
"HdotGradH",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
autoPtr<volVectorField> HdotGradHPtr_;
|
||||
autoPtr<volVectorField> HdotGradHPtr;
|
||||
|
||||
if (HdotGradHheader.headerOk())
|
||||
{
|
||||
Info<< "Reading field HdotGradH" << endl;
|
||||
|
||||
HdotGradHPtr_.reset
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"HdotGradH",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
HdotGradHPtr.reset(new volVectorField(HdotGradHheader, mesh));
|
||||
}
|
||||
|
||||
#include "createNonInertialFrameFields.H"
|
||||
@ -0,0 +1,88 @@
|
||||
Info<< "Reading non-inertial frame fields" << endl;
|
||||
|
||||
IOobject linearAccelerationHeader
|
||||
(
|
||||
"linearAcceleration",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
autoPtr<uniformDimensionedVectorField> linearAccelerationPtr;
|
||||
|
||||
if (linearAccelerationHeader.headerOk())
|
||||
{
|
||||
Info<< " Reading " << linearAccelerationHeader.name() << endl;
|
||||
|
||||
linearAccelerationPtr.reset
|
||||
(
|
||||
new uniformDimensionedVectorField(linearAccelerationHeader)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
IOobject angularVelocityHeader
|
||||
(
|
||||
"angularVelocity",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
autoPtr<uniformDimensionedVectorField> angularVelocityPtr;
|
||||
|
||||
if (angularVelocityHeader.headerOk())
|
||||
{
|
||||
Info<< " Reading " << angularVelocityHeader.name() << endl;
|
||||
|
||||
angularVelocityPtr.reset
|
||||
(
|
||||
new uniformDimensionedVectorField(angularVelocityHeader)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
IOobject angularAccelerationHeader
|
||||
(
|
||||
"angularAcceleration",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
autoPtr<uniformDimensionedVectorField> angularAccelerationPtr;
|
||||
|
||||
if (angularAccelerationHeader.headerOk())
|
||||
{
|
||||
Info<< " Reading " << angularAccelerationHeader.name() << endl;
|
||||
|
||||
angularAccelerationPtr.reset
|
||||
(
|
||||
new uniformDimensionedVectorField(angularAccelerationHeader)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
IOobject centreOfRotationHeader
|
||||
(
|
||||
"centreOfRotation",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
autoPtr<uniformDimensionedVectorField> centreOfRotationPtr;
|
||||
|
||||
if (centreOfRotationHeader.headerOk())
|
||||
{
|
||||
Info<< " Reading " << centreOfRotationHeader.name() << endl;
|
||||
|
||||
centreOfRotationPtr.reset
|
||||
(
|
||||
new uniformDimensionedVectorField(centreOfRotationHeader)
|
||||
);
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,7 +35,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicKinematicCloud.H"
|
||||
#include "basicKinematicCollidingCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
incompressibleUncoupledKinematicParcelDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/incompressibleUncoupledKinematicParcelDyMFoam
|
||||
@ -1,147 +0,0 @@
|
||||
Info<< "\nReading transportProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar rhoInfValue
|
||||
(
|
||||
transportProperties.lookup("rhoInf")
|
||||
);
|
||||
|
||||
volScalarField rhoInf
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
rhoInfValue
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
const volScalarField nu(laminarTransport.nu());
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
volScalarField mu
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"mu",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
nu*rhoInfValue
|
||||
);
|
||||
|
||||
word kinematicCloudName("kinematicCloud");
|
||||
args.optionReadIfPresent("cloudName", kinematicCloudName);
|
||||
|
||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||
basicKinematicCloud kinematicCloud
|
||||
(
|
||||
kinematicCloudName,
|
||||
rhoInf,
|
||||
U,
|
||||
mu,
|
||||
g
|
||||
);
|
||||
|
||||
IOobject Hheader
|
||||
(
|
||||
"H",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
autoPtr<volVectorField> HPtr_;
|
||||
|
||||
if (Hheader.headerOk())
|
||||
{
|
||||
Info<< "\nReading field H\n" << endl;
|
||||
|
||||
HPtr_.reset
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"H",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
IOobject HdotGradHheader
|
||||
(
|
||||
"HdotGradH",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
autoPtr<volVectorField> HdotGradHPtr_;
|
||||
|
||||
if (HdotGradHheader.headerOk())
|
||||
{
|
||||
Info<< "Reading field HdotGradH" << endl;
|
||||
|
||||
HdotGradHPtr_.reset
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"HdotGradH",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
incompressibleUncoupledKinematicParcelFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/incompressibleUncoupledKinematicParcelFoam
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -61,7 +61,7 @@ Foam::UniformDimensionedField<Type>::UniformDimensionedField
|
||||
{
|
||||
dictionary dict(readStream(typeName));
|
||||
this->dimensions().reset(dict.lookup("dimensions"));
|
||||
this->value() = dict.lookup("value");
|
||||
dict.lookup("value") >> this->value();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -334,11 +334,14 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime)
|
||||
}
|
||||
}
|
||||
|
||||
reduce(nTrackingRescues_, sumOp<label>());
|
||||
|
||||
if (nTrackingRescues_ > 0)
|
||||
if (cloud::debug)
|
||||
{
|
||||
Info<< nTrackingRescues_ << " tracking rescue corrections" << endl;
|
||||
reduce(nTrackingRescues_, sumOp<label>());
|
||||
|
||||
if (nTrackingRescues_ > 0)
|
||||
{
|
||||
Info<< nTrackingRescues_ << " tracking rescue corrections" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -207,7 +207,7 @@ public:
|
||||
//- Switch to specify if particles of the cloud can return
|
||||
// non-zero wall distance values. By default, assume
|
||||
// that they can't (default for wallImpactDistance in
|
||||
// Particle is 0.0).
|
||||
// particle is 0.0).
|
||||
virtual bool hasWallImpactDistance() const
|
||||
{
|
||||
return false;
|
||||
|
||||
@ -130,6 +130,14 @@ void Foam::particle::transformProperties(const vector&)
|
||||
{}
|
||||
|
||||
|
||||
Foam::scalar Foam::particle::wallImpactDistance(const vector&) const
|
||||
{
|
||||
Info<< "particle::wallImpactDistance" << endl;
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::operator==(const particle& pA, const particle& pB)
|
||||
|
||||
@ -38,7 +38,6 @@ Description
|
||||
#include "labelList.H"
|
||||
#include "pointField.H"
|
||||
#include "faceList.H"
|
||||
//#include "typeInfo.H"
|
||||
#include "OFstream.H"
|
||||
#include "tetPointRef.H"
|
||||
#include "FixedList.H"
|
||||
@ -445,10 +444,6 @@ public:
|
||||
const label faceI
|
||||
) const;
|
||||
|
||||
//- The nearest distance to a wall that
|
||||
// the particle can be in the n direction
|
||||
inline scalar wallImpactDistance(const vector& n) const;
|
||||
|
||||
//- Return the fraction of time-step completed
|
||||
inline scalar& stepFraction();
|
||||
|
||||
@ -508,6 +503,10 @@ public:
|
||||
// according to the given separation vector
|
||||
virtual void transformProperties(const vector& separation);
|
||||
|
||||
//- The nearest distance to a wall that
|
||||
// the particle can be in the n direction
|
||||
virtual scalar wallImpactDistance(const vector& n) const;
|
||||
|
||||
|
||||
// Parallel transfer
|
||||
|
||||
|
||||
@ -784,23 +784,26 @@ inline void Foam::particle::initCellFacePt()
|
||||
<< position_ << abort(FatalError);
|
||||
}
|
||||
|
||||
WarningIn("void Foam::particle::initCellFacePt()")
|
||||
<< "Particle moved from " << position_
|
||||
<< " to " << newPosition
|
||||
<< " in cell " << cellI_
|
||||
<< " tetFace " << tetFaceI_
|
||||
<< " tetPt " << tetPtI_ << nl
|
||||
<< " (A fraction of "
|
||||
<< 1.0 - mag(cC - newPosition)/mag(cC - position_)
|
||||
<< " of the distance to the cell centre)"
|
||||
<< " because a decomposition tetFace and tetPt "
|
||||
<< "could not be found."
|
||||
<< endl;
|
||||
if (debug)
|
||||
{
|
||||
WarningIn("void Foam::particle::initCellFacePt()")
|
||||
<< "Particle moved from " << position_
|
||||
<< " to " << newPosition
|
||||
<< " in cell " << cellI_
|
||||
<< " tetFace " << tetFaceI_
|
||||
<< " tetPt " << tetPtI_ << nl
|
||||
<< " (A fraction of "
|
||||
<< 1.0 - mag(cC - newPosition)/mag(cC - position_)
|
||||
<< " of the distance to the cell centre)"
|
||||
<< " because a decomposition tetFace and tetPt "
|
||||
<< "could not be found."
|
||||
<< endl;
|
||||
}
|
||||
|
||||
position_ = newPosition;
|
||||
}
|
||||
|
||||
if (cellI_ != oldCellI)
|
||||
if (debug && cellI_ != oldCellI)
|
||||
{
|
||||
WarningIn("void Foam::particle::initCellFacePt()")
|
||||
<< "Particle at position " << position_
|
||||
@ -888,7 +891,6 @@ bool Foam::particle::boundaryFace(const label faceI) const
|
||||
|
||||
inline Foam::label Foam::particle::patch(const label faceI) const
|
||||
{
|
||||
// return cloud_.facePatch(faceI);
|
||||
return mesh_.boundaryMesh().whichPatch(faceI);
|
||||
}
|
||||
|
||||
@ -899,18 +901,10 @@ inline Foam::label Foam::particle::patchFace
|
||||
const label faceI
|
||||
) const
|
||||
{
|
||||
// return cloud_.patchFace(patchI, faceI);
|
||||
return mesh_.boundaryMesh()[patchI].whichFace(faceI);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar
|
||||
Foam::particle::wallImpactDistance(const vector&) const
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::label Foam::particle::faceInterpolation() const
|
||||
{
|
||||
return faceI_;
|
||||
|
||||
@ -689,11 +689,15 @@ void Foam::particle::hitWallFaces
|
||||
tetIndices& closestTetIs
|
||||
)
|
||||
{
|
||||
typedef typename CloudType::particleType particleType;
|
||||
|
||||
if (!(cloud.hasWallImpactDistance() && cloud.cellHasWallFaces()[cellI_]))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
particleType& p = static_cast<particleType&>(*this);
|
||||
|
||||
const faceList& pFaces = mesh_.faces();
|
||||
|
||||
const Foam::cell& thisCell = mesh_.cells()[cellI_];
|
||||
@ -734,7 +738,7 @@ void Foam::particle::hitWallFaces
|
||||
// triangle. Assuming that the wallImpactDistance
|
||||
// does not change as the particle or the mesh moves
|
||||
// forward in time.
|
||||
scalar r = wallImpactDistance(nHat);
|
||||
scalar r = p.wallImpactDistance(nHat);
|
||||
|
||||
vector toPlusRNHat = to + r*nHat;
|
||||
|
||||
|
||||
@ -52,8 +52,9 @@ class parcel
|
||||
{
|
||||
// Private member data
|
||||
|
||||
// Reference to the names of the liquid components
|
||||
List<word> liquidComponents_;
|
||||
//- Reference to the names of the liquid components
|
||||
List<word> liquidComponents_;
|
||||
|
||||
|
||||
// Defining data (read and written to field files)
|
||||
|
||||
@ -384,11 +385,11 @@ public:
|
||||
|
||||
//- Transform the position and physical properties of the particle
|
||||
// according to the given transformation tensor
|
||||
void transformProperties(const tensor& T);
|
||||
virtual void transformProperties(const tensor& T);
|
||||
|
||||
//- Transform the position and physical properties of the particle
|
||||
// according to the given separation vector
|
||||
void transformProperties(const vector& separation);
|
||||
virtual void transformProperties(const vector& separation);
|
||||
|
||||
//- fix the 2D plane normal,
|
||||
// when particle hits a face it is slightly perturbed
|
||||
|
||||
@ -293,11 +293,11 @@ public:
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given transformation tensor
|
||||
void transformProperties(const tensor& T);
|
||||
virtual void transformProperties(const tensor& T);
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given separation vector
|
||||
void transformProperties(const vector& separation);
|
||||
virtual void transformProperties(const vector& separation);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
@ -157,6 +157,13 @@ Foam::CollidingCloud<CloudType>::~CollidingCloud()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::CollidingCloud<CloudType>::hasWallImpactDistance() const
|
||||
{
|
||||
return !collision().controlsWallInteraction();
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CollidingCloud<CloudType>::storeState()
|
||||
{
|
||||
|
||||
@ -180,7 +180,7 @@ public:
|
||||
// then the wall impact distance should be zero.
|
||||
// Otherwise, it should be allowed to be the value from
|
||||
// the Parcel.
|
||||
inline bool hasWallImpactDistance() const;
|
||||
virtual bool hasWallImpactDistance() const;
|
||||
|
||||
|
||||
// Sub-models
|
||||
|
||||
@ -33,13 +33,6 @@ Foam::CollidingCloud<CloudType>::cloudCopy() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline bool Foam::CollidingCloud<CloudType>::hasWallImpactDistance() const
|
||||
{
|
||||
return !collision().controlsWallInteraction();
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::CollisionModel<Foam::CollidingCloud<CloudType> >&
|
||||
Foam::CollidingCloud<CloudType>::collision() const
|
||||
|
||||
@ -218,10 +218,10 @@ void Foam::KinematicCloud<CloudType>::evolveCloud(TrackData& td)
|
||||
{
|
||||
// this->surfaceFilm().injectSteadyState(td);
|
||||
|
||||
this->injection().injectSteadyState(td, solution_.deltaTValue());
|
||||
this->injection().injectSteadyState(td, solution_.trackTime());
|
||||
|
||||
td.part() = TrackData::tpLinearTrack;
|
||||
CloudType::move(td, solution_.deltaTValue());
|
||||
CloudType::move(td, solution_.trackTime());
|
||||
}
|
||||
}
|
||||
|
||||
@ -491,6 +491,13 @@ Foam::KinematicCloud<CloudType>::~KinematicCloud()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::KinematicCloud<CloudType>::hasWallImpactDistance() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::checkParcelProperties
|
||||
(
|
||||
@ -504,7 +511,7 @@ void Foam::KinematicCloud<CloudType>::checkParcelProperties
|
||||
parcel.rho() = constProps_.rho0();
|
||||
}
|
||||
|
||||
const scalar carrierDt = solution_.deltaTValue();
|
||||
const scalar carrierDt = mesh_.time().deltaTValue();
|
||||
parcel.stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
|
||||
parcel.typeId() = constProps_.parcelTypeId();
|
||||
}
|
||||
@ -582,7 +589,7 @@ template<class TrackData>
|
||||
void Foam::KinematicCloud<CloudType>::motion(TrackData& td)
|
||||
{
|
||||
td.part() = TrackData::tpLinearTrack;
|
||||
CloudType::move(td, solution_.deltaTValue());
|
||||
CloudType::move(td, solution_.trackTime());
|
||||
|
||||
updateCellOccupancy();
|
||||
}
|
||||
|
||||
@ -304,6 +304,10 @@ public:
|
||||
//- Return a reference to the cloud copy
|
||||
inline const KinematicCloud& cloudCopy() const;
|
||||
|
||||
//- Switch to specify if particles of the cloud can return
|
||||
// non-zero wall distance values - true for kinematic parcels
|
||||
virtual bool hasWallImpactDistance() const;
|
||||
|
||||
|
||||
// References to the mesh and databases
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ Foam::cloudSolution::cloudSolution
|
||||
calcFrequency_(1),
|
||||
maxCo_(0.3),
|
||||
iter_(1),
|
||||
deltaT_(0.0),
|
||||
trackTime_(0.0),
|
||||
coupled_(false),
|
||||
cellValueSourceCorrection_(false),
|
||||
maxTrackTime_(0.0),
|
||||
@ -67,7 +67,7 @@ Foam::cloudSolution::cloudSolution
|
||||
calcFrequency_(cs.calcFrequency_),
|
||||
maxCo_(cs.maxCo_),
|
||||
iter_(cs.iter_),
|
||||
deltaT_(cs.deltaT_),
|
||||
trackTime_(cs.trackTime_),
|
||||
coupled_(cs.coupled_),
|
||||
cellValueSourceCorrection_(cs.cellValueSourceCorrection_),
|
||||
maxTrackTime_(cs.maxTrackTime_),
|
||||
@ -88,7 +88,7 @@ Foam::cloudSolution::cloudSolution
|
||||
calcFrequency_(0),
|
||||
maxCo_(GREAT),
|
||||
iter_(0),
|
||||
deltaT_(0.0),
|
||||
trackTime_(0.0),
|
||||
coupled_(false),
|
||||
cellValueSourceCorrection_(false),
|
||||
maxTrackTime_(0.0),
|
||||
@ -159,10 +159,8 @@ Foam::scalar Foam::cloudSolution::relaxCoeff(const word& fieldName) const
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"scalar cloudSolution::relaxCoeff(const word& fieldName) const"
|
||||
) << "Field name " << fieldName << " not found in schemes"
|
||||
FatalErrorIn("scalar cloudSolution::relaxCoeff(const word&) const")
|
||||
<< "Field name " << fieldName << " not found in schemes"
|
||||
<< abort(FatalError);
|
||||
|
||||
return 1.0;
|
||||
@ -179,10 +177,8 @@ bool Foam::cloudSolution::semiImplicit(const word& fieldName) const
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"bool cloudSolution::semiImplicit(const word& fieldName) const"
|
||||
) << "Field name " << fieldName << " not found in schemes"
|
||||
FatalErrorIn("bool cloudSolution::semiImplicit(const word&) const")
|
||||
<< "Field name " << fieldName << " not found in schemes"
|
||||
<< abort(FatalError);
|
||||
|
||||
return false;
|
||||
@ -202,14 +198,13 @@ bool Foam::cloudSolution::solveThisStep() const
|
||||
|
||||
bool Foam::cloudSolution::canEvolve()
|
||||
{
|
||||
// Set the calculation time step
|
||||
if (transient_)
|
||||
{
|
||||
deltaT_ = mesh_.time().deltaTValue();
|
||||
trackTime_ = mesh_.time().deltaTValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
deltaT_ = maxTrackTime_;
|
||||
trackTime_ = maxTrackTime_;
|
||||
}
|
||||
|
||||
return solveThisStep();
|
||||
|
||||
@ -77,8 +77,8 @@ class cloudSolution
|
||||
//- Current cloud iteration
|
||||
label iter_;
|
||||
|
||||
//- Cloud solution time step
|
||||
scalar deltaT_;
|
||||
//- Particle track time
|
||||
scalar trackTime_;
|
||||
|
||||
|
||||
// Run-time options
|
||||
@ -168,11 +168,8 @@ public:
|
||||
//- Increment and return iter counter
|
||||
inline label nextIter();
|
||||
|
||||
//- Return the time step
|
||||
inline scalar deltaTValue() const;
|
||||
|
||||
//- Return the time step
|
||||
inline const dimensionedScalar deltaT() const;
|
||||
//- Return the particle track time
|
||||
inline scalar trackTime() const;
|
||||
|
||||
//- Return const access to the coupled flag
|
||||
inline const Switch coupled() const;
|
||||
|
||||
@ -95,15 +95,9 @@ inline Foam::label Foam::cloudSolution::nextIter()
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::cloudSolution::deltaTValue() const
|
||||
inline Foam::scalar Foam::cloudSolution::trackTime() const
|
||||
{
|
||||
return deltaT_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::dimensionedScalar Foam::cloudSolution::deltaT() const
|
||||
{
|
||||
return dimensionedScalar("cloudSolution::deltaT", dimTime, deltaT_);
|
||||
return trackTime_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -470,6 +470,16 @@ void Foam::KinematicParcel<ParcelType>::transformProperties
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::scalar Foam::KinematicParcel<ParcelType>::wallImpactDistance
|
||||
(
|
||||
const vector&
|
||||
) const
|
||||
{
|
||||
return 0.5*d_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
|
||||
|
||||
#include "KinematicParcelIO.C"
|
||||
|
||||
@ -496,10 +496,6 @@ public:
|
||||
|
||||
// Helper functions
|
||||
|
||||
//- The nearest distance to a wall that
|
||||
// the particle can be in the n direction
|
||||
inline scalar wallImpactDistance(const vector& n) const;
|
||||
|
||||
//- Return the index of the face to be used in the interpolation
|
||||
// routine
|
||||
inline label faceInterpolation() const;
|
||||
@ -631,11 +627,15 @@ public:
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given transformation tensor
|
||||
void transformProperties(const tensor& T);
|
||||
virtual void transformProperties(const tensor& T);
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given separation vector
|
||||
void transformProperties(const vector& separation);
|
||||
virtual void transformProperties(const vector& separation);
|
||||
|
||||
//- The nearest distance to a wall that the particle can be
|
||||
// in the n direction
|
||||
virtual scalar wallImpactDistance(const vector& n) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
@ -421,16 +421,6 @@ inline Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::KinematicParcel<ParcelType>::wallImpactDistance
|
||||
(
|
||||
const vector&
|
||||
) const
|
||||
{
|
||||
return 0.5*d_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::label Foam::KinematicParcel<ParcelType>::faceInterpolation() const
|
||||
{
|
||||
|
||||
@ -32,6 +32,7 @@ License
|
||||
#include "NonSphereDragForce.H"
|
||||
|
||||
#include "GravityForce.H"
|
||||
#include "NonInertialFrameForce.H"
|
||||
#include "ParamagneticForce.H"
|
||||
#include "PressureGradientForce.H"
|
||||
#include "SRFForce.H"
|
||||
@ -44,6 +45,7 @@ License
|
||||
makeParticleForceModelType(SphereDragForce, CloudType); \
|
||||
makeParticleForceModelType(NonSphereDragForce, CloudType); \
|
||||
makeParticleForceModelType(GravityForce, CloudType); \
|
||||
makeParticleForceModelType(NonInertialFrameForce, CloudType); \
|
||||
makeParticleForceModelType(ParamagneticForce, CloudType); \
|
||||
makeParticleForceModelType(PressureGradientForce, CloudType); \
|
||||
makeParticleForceModelType(SRFForce, CloudType);
|
||||
|
||||
@ -33,6 +33,7 @@ License
|
||||
|
||||
#include "BrownianMotionForce.H"
|
||||
#include "GravityForce.H"
|
||||
#include "NonInertialFrameForce.H"
|
||||
#include "ParamagneticForce.H"
|
||||
#include "PressureGradientForce.H"
|
||||
#include "SRFForce.H"
|
||||
@ -46,6 +47,7 @@ License
|
||||
makeParticleForceModelType(NonSphereDragForce, CloudType); \
|
||||
makeParticleForceModelType(BrownianMotionForce, CloudType); \
|
||||
makeParticleForceModelType(GravityForce, CloudType); \
|
||||
makeParticleForceModelType(NonInertialFrameForce, CloudType); \
|
||||
makeParticleForceModelType(ParamagneticForce, CloudType); \
|
||||
makeParticleForceModelType(PressureGradientForce, CloudType); \
|
||||
makeParticleForceModelType(SRFForce, CloudType);
|
||||
|
||||
@ -520,7 +520,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
}
|
||||
|
||||
const scalar time = this->owner().db().time().value();
|
||||
const scalar carrierDt = this->owner().solution().deltaTValue();
|
||||
const scalar trackTime = this->owner().solution().trackTime();
|
||||
const polyMesh& mesh = this->owner().mesh();
|
||||
|
||||
// Prepare for next time step
|
||||
@ -533,7 +533,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
|
||||
// Duration of injection period during this timestep
|
||||
const scalar deltaT =
|
||||
max(0.0, min(carrierDt, min(time - SOI_, timeEnd() - time0_)));
|
||||
max(0.0, min(trackTime, min(time - SOI_, timeEnd() - time0_)));
|
||||
|
||||
// Pad injection time if injection starts during this timestep
|
||||
const scalar padTime = max(0.0, SOI_ - time0_);
|
||||
|
||||
@ -98,7 +98,7 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the the acceleration due to gravity
|
||||
//- Return the acceleration due to gravity
|
||||
inline const vector& g() const;
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,206 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "NonInertialFrameForce.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
|
||||
(
|
||||
CloudType& owner,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict,
|
||||
const word& forceType
|
||||
)
|
||||
:
|
||||
ParticleForce<CloudType>(owner, mesh, dict),
|
||||
WName_
|
||||
(
|
||||
this->coeffs().template lookupOrDefault<word>
|
||||
(
|
||||
"linearAccelerationName",
|
||||
"linearAcceleration"
|
||||
)
|
||||
),
|
||||
W_(vector::zero),
|
||||
omegaName_
|
||||
(
|
||||
this->coeffs().template lookupOrDefault<word>
|
||||
(
|
||||
"angularVelocityName",
|
||||
"angularVelocity"
|
||||
)
|
||||
),
|
||||
omega_(vector::zero),
|
||||
omegaDotName_
|
||||
(
|
||||
this->coeffs().template lookupOrDefault<word>
|
||||
(
|
||||
"angularAccelerationName",
|
||||
"angularAcceleration"
|
||||
)
|
||||
),
|
||||
omegaDot_(vector::zero),
|
||||
centreOfRotationName_
|
||||
(
|
||||
this->coeffs().template lookupOrDefault<word>
|
||||
(
|
||||
"centreOfRotationName",
|
||||
"centreOfRotation"
|
||||
)
|
||||
),
|
||||
centreOfRotation_(vector::zero)
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
|
||||
(
|
||||
const NonInertialFrameForce& niff
|
||||
)
|
||||
:
|
||||
ParticleForce<CloudType>(niff),
|
||||
WName_(niff.WName_),
|
||||
W_(niff.W_),
|
||||
omegaName_(niff.omegaName_),
|
||||
omega_(niff.omega_),
|
||||
omegaDotName_(niff.omegaDotName_),
|
||||
omegaDot_(niff.omegaDot_),
|
||||
centreOfRotationName_(niff.centreOfRotationName_),
|
||||
centreOfRotation_(niff.centreOfRotation_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::NonInertialFrameForce<CloudType>::~NonInertialFrameForce()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
|
||||
{
|
||||
W_ = vector::zero;
|
||||
omega_ = vector::zero;
|
||||
omegaDot_ = vector::zero;
|
||||
centreOfRotation_ = vector::zero;
|
||||
|
||||
if (store)
|
||||
{
|
||||
if
|
||||
(
|
||||
this->mesh().template foundObject<uniformDimensionedVectorField>
|
||||
(
|
||||
WName_
|
||||
)
|
||||
)
|
||||
{
|
||||
uniformDimensionedVectorField W = this->mesh().template
|
||||
lookupObject<uniformDimensionedVectorField>(WName_);
|
||||
|
||||
W_ = W.value();
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
this->mesh().template foundObject<uniformDimensionedVectorField>
|
||||
(
|
||||
omegaName_
|
||||
)
|
||||
)
|
||||
{
|
||||
uniformDimensionedVectorField omega = this->mesh().template
|
||||
lookupObject<uniformDimensionedVectorField>(omegaName_);
|
||||
|
||||
omega_ = omega.value();
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
this->mesh().template foundObject<uniformDimensionedVectorField>
|
||||
(
|
||||
omegaDotName_
|
||||
)
|
||||
)
|
||||
{
|
||||
uniformDimensionedVectorField omegaDot = this->mesh().template
|
||||
lookupObject<uniformDimensionedVectorField>(omegaDotName_);
|
||||
|
||||
omegaDot_ = omegaDot.value();
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
this->mesh().template foundObject<uniformDimensionedVectorField>
|
||||
(
|
||||
centreOfRotationName_
|
||||
)
|
||||
)
|
||||
{
|
||||
uniformDimensionedVectorField omegaDot = this->mesh().template
|
||||
lookupObject<uniformDimensionedVectorField>
|
||||
(
|
||||
centreOfRotationName_
|
||||
);
|
||||
|
||||
centreOfRotation_ = omegaDot.value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::forceSuSp Foam::NonInertialFrameForce<CloudType>::calcNonCoupled
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const scalar dt,
|
||||
const scalar mass,
|
||||
const scalar Re,
|
||||
const scalar muc
|
||||
) const
|
||||
{
|
||||
forceSuSp value(vector::zero, 0.0);
|
||||
|
||||
const vector& r = p.position() - centreOfRotation_;
|
||||
|
||||
value.Su() =
|
||||
mass
|
||||
*(
|
||||
-W_
|
||||
+ (r ^ omegaDot_)
|
||||
+ 2.0*(p.U() ^ omega_)
|
||||
+ (omega_ ^ (r ^ omega_))
|
||||
);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,168 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::NonInertialFrameForce
|
||||
|
||||
Description
|
||||
Calculates particle non-inertial reference frame force. Variable names as
|
||||
from Landau and Lifshitz, Mechanics, 3rd Ed, p126-129.
|
||||
|
||||
SourceFiles
|
||||
NonInertialFrameForce.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef NonInertialFrameForce_H
|
||||
#define NonInertialFrameForce_H
|
||||
|
||||
#include "ParticleForce.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class fvMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class NonInertialFrameForce Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class NonInertialFrameForce
|
||||
:
|
||||
public ParticleForce<CloudType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of the linear acceleration field
|
||||
word WName_;
|
||||
|
||||
//- The linear acceleration of the reference frame
|
||||
vector W_;
|
||||
|
||||
//- Name of the angular velocity field
|
||||
word omegaName_;
|
||||
|
||||
//- The angular velocity of the reference frame
|
||||
vector omega_;
|
||||
|
||||
//- Name of the angular acceleration field
|
||||
word omegaDotName_;
|
||||
|
||||
//- The angular acceleration of the reference frame
|
||||
vector omegaDot_;
|
||||
|
||||
//- Name of the centre of rotation field
|
||||
word centreOfRotationName_;
|
||||
|
||||
//- The centre of rotation of the reference frame
|
||||
vector centreOfRotation_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("nonInertialFrame");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
NonInertialFrameForce
|
||||
(
|
||||
CloudType& owner,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict,
|
||||
const word& forceType
|
||||
);
|
||||
|
||||
//- Construct copy
|
||||
NonInertialFrameForce(const NonInertialFrameForce& niff);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<ParticleForce<CloudType> > clone() const
|
||||
{
|
||||
return autoPtr<ParticleForce<CloudType> >
|
||||
(
|
||||
new ParticleForce<CloudType>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~NonInertialFrameForce();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the linear acceleration of the reference frame
|
||||
inline const vector& W() const;
|
||||
|
||||
//- Return the angular velocity of the reference frame
|
||||
inline const vector& omega() const;
|
||||
|
||||
//- Return the angular acceleration of the reference frame
|
||||
inline const vector& omegaDot() const;
|
||||
|
||||
//- Return the centre of rotation of the reference frame
|
||||
inline const vector& centreOfRotation() const;
|
||||
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Cache fields
|
||||
virtual void cacheFields(const bool store);
|
||||
|
||||
//- Calculate the non-coupled force
|
||||
virtual forceSuSp calcNonCoupled
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const scalar dt,
|
||||
const scalar mass,
|
||||
const scalar Re,
|
||||
const scalar muc
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "NonInertialFrameForceI.H"
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "NonInertialFrameForce.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::vector& Foam::NonInertialFrameForce<CloudType>::W() const
|
||||
{
|
||||
return W_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::vector& Foam::NonInertialFrameForce<CloudType>::omega() const
|
||||
{
|
||||
return omega_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::vector&
|
||||
Foam::NonInertialFrameForce<CloudType>::omegaDot() const
|
||||
{
|
||||
return omegaDot_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::vector&
|
||||
Foam::NonInertialFrameForce<CloudType>::centreOfRotation() const
|
||||
{
|
||||
return centreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -92,12 +92,11 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
|
||||
const typename SRF::SRFModel& srf = *srfPtr_;
|
||||
|
||||
const vector& omega = srf.omega().value();
|
||||
const vector& axis = srf.axis();
|
||||
|
||||
const vector r = p.position() - axis*(axis & p.position());
|
||||
const vector& r = p.position();
|
||||
|
||||
// Coriolis and centrifugal acceleration terms
|
||||
value.Su() = mass*2.0*(p.U() ^ omega) + (omega ^ (r ^ omega));
|
||||
value.Su() = mass*(2.0*(p.U() ^ omega) + (omega ^ (r ^ omega)));
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -28,7 +28,6 @@ Description
|
||||
Calculates particle SRF reference frame force
|
||||
|
||||
SourceFiles
|
||||
SRFForceI.H
|
||||
SRFForce.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -281,9 +281,9 @@ public:
|
||||
|
||||
bool move(trackingData&, const scalar trackTime);
|
||||
|
||||
void transformProperties(const tensor& T);
|
||||
virtual void transformProperties(const tensor& T);
|
||||
|
||||
void transformProperties(const vector& separation);
|
||||
virtual void transformProperties(const vector& separation);
|
||||
|
||||
void setSitePositions(const constantProperties& constProps);
|
||||
|
||||
|
||||
@ -171,4 +171,10 @@ void Foam::solidParticle::transformProperties(const vector& separation)
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::solidParticle::wallImpactDistance(const vector&) const
|
||||
{
|
||||
return 0.5*d_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -174,10 +174,6 @@ public:
|
||||
//- Return velocity
|
||||
inline const vector& U() const;
|
||||
|
||||
//- The nearest distance to a wall that
|
||||
// the particle can be in the n direction
|
||||
inline scalar wallImpactDistance(const vector& n) const;
|
||||
|
||||
|
||||
// Tracking
|
||||
|
||||
@ -223,17 +219,15 @@ public:
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given transformation tensor
|
||||
void transformProperties
|
||||
(
|
||||
const tensor& T
|
||||
);
|
||||
virtual void transformProperties(const tensor& T);
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given separation vector
|
||||
void transformProperties
|
||||
(
|
||||
const vector& separation
|
||||
);
|
||||
virtual void transformProperties(const vector& separation);
|
||||
|
||||
//- The nearest distance to a wall that
|
||||
// the particle can be in the n direction
|
||||
virtual scalar wallImpactDistance(const vector& n) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
@ -28,14 +28,6 @@ License
|
||||
#include "volFields.H"
|
||||
#include "interpolationCellPoint.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
// defineParticleTypeNameAndDebug(solidParticle, 0);
|
||||
// defineTemplateTypeNameAndDebug(Cloud<solidParticle>, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidParticleCloud::solidParticleCloud
|
||||
@ -71,6 +63,12 @@ Foam::solidParticleCloud::solidParticleCloud
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::solidParticleCloud::hasWallImpactDistance() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidParticleCloud::move(const dimensionedVector& g)
|
||||
{
|
||||
const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,7 +94,7 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
inline bool hasWallImpactDistance() const;
|
||||
virtual bool hasWallImpactDistance() const;
|
||||
|
||||
inline const fvMesh& mesh() const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,12 +25,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::solidParticleCloud::hasWallImpactDistance() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::fvMesh& Foam::solidParticleCloud::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
|
||||
@ -93,12 +93,6 @@ inline Foam::scalar Foam::solidParticle::d() const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::solidParticle::wallImpactDistance(const vector&) const
|
||||
{
|
||||
return 0.5*d_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::vector& Foam::solidParticle::U() const
|
||||
{
|
||||
return U_;
|
||||
|
||||
80
src/postProcessing/functionObjects/systemCall/controlDict
Normal file
80
src/postProcessing/functionObjects/systemCall/controlDict
Normal file
@ -0,0 +1,80 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application icoFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.5;
|
||||
|
||||
deltaT 0.005;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 20;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
systemCall1
|
||||
{
|
||||
type systemCall;
|
||||
functionObjectLibs ("libsystemCall.so");
|
||||
enabled true;
|
||||
outputControl outputTime;
|
||||
|
||||
// called every time step
|
||||
executeCalls
|
||||
(
|
||||
"echo execute"
|
||||
);
|
||||
|
||||
// called at the end of the run
|
||||
endCalls
|
||||
(
|
||||
"echo \*\*\* writing .bashrc \*\*\*"
|
||||
"cat ~/.bashrc"
|
||||
"echo \*\*\* done \*\*\*"
|
||||
);
|
||||
|
||||
// called every ouput time
|
||||
writeCalls
|
||||
(
|
||||
"echo \*\*\* writing data \*\*\*"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -45,36 +45,5 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
systemCall1
|
||||
{
|
||||
type systemCall;
|
||||
functionObjectLibs ("libsystemCall.so");
|
||||
enabled true;
|
||||
outputControl outputTime;
|
||||
|
||||
// called every time step
|
||||
executeCalls
|
||||
(
|
||||
"echo execute"
|
||||
);
|
||||
|
||||
// called at the end of the run
|
||||
endCalls
|
||||
(
|
||||
"echo \*\*\* writing .bashrc \*\*\*"
|
||||
"cat ~/.bashrc"
|
||||
"echo \*\*\* done \*\*\*"
|
||||
);
|
||||
|
||||
// called every ouput time
|
||||
writeCalls
|
||||
(
|
||||
"echo \*\*\* writing data \*\*\*"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user