Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
commit
da6239c9a4
@ -3,6 +3,10 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake
|
||||
|
||||
wmake SRFSimpleFoam
|
||||
wmake MRFSimpleFoam
|
||||
wmake windSimpleFoam
|
||||
wmake porousSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
@ -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
|
||||
@ -22,19 +22,19 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
rhoPisoTwinParcelFoam
|
||||
MRFSimpleFoam
|
||||
|
||||
Description
|
||||
Transient solver for compressible, turbulent flow with two thermo-clouds.
|
||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||
fluids with MRF regions.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
|
||||
#include "basicThermoCloud.H"
|
||||
#include "basicKinematicCloud.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "MRFZones.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -44,54 +44,32 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createClouds.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
MRFZones mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
while (simple.loop())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
thermoCloud1.evolve();
|
||||
p.storePrevIter();
|
||||
|
||||
kinematicCloud1.evolve();
|
||||
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- PIMPLE loop
|
||||
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
|
||||
// --- Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
{
|
||||
#include "hsEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
@ -0,0 +1,3 @@
|
||||
MRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/MRFSimpleFoam
|
@ -1,4 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/transportModels \
|
@ -0,0 +1,12 @@
|
||||
// Momentum predictor
|
||||
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
);
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
solve(UEqn() == -fvc::grad(p));
|
@ -1,9 +1,12 @@
|
||||
{
|
||||
p.boundaryField().updateCoeffs();
|
||||
|
||||
volScalarField AU = UEqn().A();
|
||||
U = UEqn().H()/AU;
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
U = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
|
||||
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
|
||||
mrfZones.relativeFlux(phi);
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
@ -11,7 +14,7 @@
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(1.0/AU, p) == fvc::div(phi)
|
||||
fvm::laplacian(rAU, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
@ -29,5 +32,6 @@
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
U -= fvc::grad(p)/AU;
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
SRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/SRFSimpleFoam
|
@ -1,4 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
simpleSRFFoam
|
||||
SRFSimpleFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||
@ -34,6 +34,7 @@ Description
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "SRFModel.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -45,20 +46,19 @@ int main(int argc, char *argv[])
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
// --- Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UrelEqn.H"
|
||||
#include "pEqn.H"
|
||||
@ -87,8 +87,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
@ -1,4 +1,5 @@
|
||||
// Relative momentum predictor
|
||||
|
||||
tmp<fvVectorMatrix> UrelEqn
|
||||
(
|
||||
fvm::div(phi, Urel)
|
||||
@ -8,9 +9,4 @@
|
||||
|
||||
UrelEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UrelEqn() == -fvc::grad(p)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UrelEqn() == -fvc::grad(p));
|
@ -1,34 +1,37 @@
|
||||
{
|
||||
p.boundaryField().updateCoeffs();
|
||||
volScalarField AUrel = UrelEqn().A();
|
||||
Urel = UrelEqn().H()/AUrel;
|
||||
|
||||
volScalarField rAUrel(1.0/UrelEqn().A());
|
||||
Urel = rAUrel*UrelEqn().H();
|
||||
UrelEqn.clear();
|
||||
phi = fvc::interpolate(Urel) & mesh.Sf();
|
||||
|
||||
phi = fvc::interpolate(Urel, "interpolate(HbyA)") & mesh.Sf();
|
||||
adjustPhi(phi, Urel, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(1.0/AUrel, p) == fvc::div(phi)
|
||||
fvm::laplacian(rAUrel, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
Urel -= fvc::grad(p)/AUrel;
|
||||
Urel -= rAUrel*fvc::grad(p);
|
||||
Urel.correctBoundaryConditions();
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
// Solve the Momentum equation
|
||||
// Momentum predictor
|
||||
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
|
@ -1,9 +1,11 @@
|
||||
{
|
||||
p.boundaryField().updateCoeffs();
|
||||
|
||||
volScalarField AU(UEqn().A());
|
||||
U = UEqn().H()/AU;
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
U = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
|
||||
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
@ -11,7 +13,7 @@
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(1.0/AU, p) == fvc::div(phi)
|
||||
fvm::laplacian(rAU, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
@ -30,5 +32,6 @@
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
U -= fvc::grad(p)/AU;
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
// --- Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "pEqn.H"
|
||||
|
@ -0,0 +1,3 @@
|
||||
windSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/windSimpleFoam
|
@ -1,4 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/transportModels \
|
@ -46,6 +46,8 @@ int main(int argc, char *argv[])
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
IObasicSourceList actuationDisks(mesh);
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,3 @@
|
||||
datToFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/datToFoam
|
@ -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
|
||||
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
# include "createTime.H"
|
||||
#include "createTime.H"
|
||||
|
||||
std::ifstream plot3dFile(args.args()[1].c_str());
|
||||
|
@ -1,3 +1,6 @@
|
||||
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance());
|
||||
mkDir(path);
|
||||
|
||||
scalarField UMeanXvalues
|
||||
(
|
||||
channelIndexing.collapse(UMean.component(vector::X)())
|
||||
@ -42,19 +45,19 @@
|
||||
|
||||
const scalarField& y = channelIndexing.y();
|
||||
|
||||
makeGraph(y, UMeanXvalues, "Uf", UMean.path(), gFormat);
|
||||
makeGraph(y, urmsValues, "u", UMean.path(), gFormat);
|
||||
makeGraph(y, vrmsValues, "v", UMean.path(), gFormat);
|
||||
makeGraph(y, wrmsValues, "w", UMean.path(), gFormat);
|
||||
makeGraph(y, RxyValues, "uv", UMean.path(), gFormat);
|
||||
makeGraph(y, kValues, "k", UMean.path(), gFormat);
|
||||
makeGraph(y, UMeanXvalues, "Uf", path, gFormat);
|
||||
makeGraph(y, urmsValues, "u", path, gFormat);
|
||||
makeGraph(y, vrmsValues, "v", path, gFormat);
|
||||
makeGraph(y, wrmsValues, "w", path, gFormat);
|
||||
makeGraph(y, RxyValues, "uv", path, gFormat);
|
||||
makeGraph(y, kValues, "k", path, gFormat);
|
||||
|
||||
makeGraph(y, pPrime2MeanValues, "pPrime2Mean", UMean.path(), gFormat);
|
||||
makeGraph(y, pPrime2MeanValues, "pPrime2Mean", path, gFormat);
|
||||
|
||||
/*
|
||||
makeGraph(y, epsilonValues, "epsilon", UMean.path(), gFormat);
|
||||
makeGraph(y, nuMeanValues, "nu", UMean.path(), gFormat);
|
||||
makeGraph(y, nuPrimeValues, "nuPrime", UMean.path(), gFormat);
|
||||
makeGraph(y, gammaDotMeanValues, "gammaDot", UMean.path(), gFormat);
|
||||
makeGraph(y, gammaDotPrimeValues, "gammaDotPrime", UMean.path(), gFormat);
|
||||
makeGraph(y, epsilonValues, "epsilon", path, gFormat);
|
||||
makeGraph(y, nuMeanValues, "nu", path, gFormat);
|
||||
makeGraph(y, nuPrimeValues, "nuPrime", path, gFormat);
|
||||
makeGraph(y, gammaDotMeanValues, "gammaDot", path, gFormat);
|
||||
makeGraph(y, gammaDotPrimeValues, "gammaDotPrime", path, gFormat);
|
||||
*/
|
||||
|
@ -76,7 +76,10 @@ cleanCase()
|
||||
rm -rf processor* > /dev/null 2>&1
|
||||
rm -rf probes* > /dev/null 2>&1
|
||||
rm -rf forces* > /dev/null 2>&1
|
||||
rm -rf graphs* > /dev/null 2>&1
|
||||
rm -rf sets > /dev/null 2>&1
|
||||
rm -rf surfaceSampling > /dev/null 2>&1
|
||||
rm -rf cuttingPlane > /dev/null 2>&1
|
||||
rm -rf system/machines > /dev/null 2>&1
|
||||
|
||||
if [ -d constant/polyMesh ]
|
||||
|
@ -1,128 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::pimpleLoop
|
||||
|
||||
Description
|
||||
PIMPLE loop class to formalise the iteration and automate the handling
|
||||
of the "finalIteration" mesh data entry.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef pimpleLoop_H
|
||||
#define pimpleLoop_H
|
||||
|
||||
#include "fvMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class pimpleLoop Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class pimpleLoop
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Reference to the mesh
|
||||
fvMesh& mesh_;
|
||||
|
||||
//- Number of PIMPLE correctors
|
||||
const int nCorr_;
|
||||
|
||||
//- Current PIMPLE corrector
|
||||
int corr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
pimpleLoop(const pimpleLoop&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const pimpleLoop&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
pimpleLoop(fvMesh& mesh, const int nCorr)
|
||||
:
|
||||
mesh_(mesh),
|
||||
nCorr_(nCorr),
|
||||
corr_(0)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
~pimpleLoop()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
bool loop()
|
||||
{
|
||||
if (finalIter())
|
||||
{
|
||||
mesh_.data::add("finalIteration", true);
|
||||
}
|
||||
|
||||
return corr_ < nCorr_;
|
||||
}
|
||||
|
||||
bool finalIter() const
|
||||
{
|
||||
return corr_ == nCorr_-1;
|
||||
}
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
void operator++(int)
|
||||
{
|
||||
if (finalIter())
|
||||
{
|
||||
mesh_.data::remove("finalIteration");
|
||||
}
|
||||
|
||||
corr_++;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -518,7 +518,7 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::Re
|
||||
const scalar muc
|
||||
) const
|
||||
{
|
||||
return rhoc*mag(U - Uc_)*d/muc;
|
||||
return rhoc*mag(U - Uc_)*d/(muc + ROOTVSMALL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,7 +63,7 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::CpEff
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HEff
|
||||
Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HsEff
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar p,
|
||||
@ -74,9 +74,9 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HEff
|
||||
) const
|
||||
{
|
||||
return
|
||||
this->Y_[GAS]*td.cloud().composition().H(idG, YGas_, p, T)
|
||||
+ this->Y_[LIQ]*td.cloud().composition().H(idL, YLiquid_, p, T)
|
||||
+ this->Y_[SLD]*td.cloud().composition().H(idS, YSolid_, p, T);
|
||||
this->Y_[GAS]*td.cloud().composition().Hs(idG, YGas_, p, T)
|
||||
+ this->Y_[LIQ]*td.cloud().composition().Hs(idL, YLiquid_, p, T)
|
||||
+ this->Y_[SLD]*td.cloud().composition().Hs(idS, YSolid_, p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -326,7 +326,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
|
||||
|
||||
|
||||
|
||||
// Heat transfer
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
@ -383,25 +382,37 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
// Transfer mass lost from particle to carrier mass source
|
||||
forAll(YGas_, i)
|
||||
{
|
||||
scalar dm = np0*dMassGas[i];
|
||||
label gid = composition.localToGlobalCarrierId(GAS, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassGas[i];
|
||||
scalar hs = composition.carrier().Hs(gid, 0.5*(T0 + T1));
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm;
|
||||
td.cloud().hsTrans()[cellI] += dm*hs;
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
scalar dm = np0*dMassLiquid[i];
|
||||
label gid = composition.localToGlobalCarrierId(LIQ, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassLiquid[i];
|
||||
scalar hs = composition.carrier().Hs(gid, 0.5*(T0 + T1));
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm;
|
||||
td.cloud().hsTrans()[cellI] += dm*hs;
|
||||
}
|
||||
/*
|
||||
// No mapping between solid components and carrier phase
|
||||
forAll(YSolid_, i)
|
||||
{
|
||||
scalar dm = np0*dMassSolid[i];
|
||||
label gid = composition.localToGlobalCarrierId(SLD, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassSolid[i];
|
||||
scalar hs = composition.carrier().Hs(gid, 0.5*(T0 + T1));
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm;
|
||||
td.cloud().hsTrans()[cellI] += dm*hs;
|
||||
}
|
||||
*/
|
||||
forAll(dMassSRCarrier, i)
|
||||
{
|
||||
td.cloud().rhoTrans(i)[cellI] += np0*dMassSRCarrier[i];
|
||||
scalar dm = np0*dMassSRCarrier[i];
|
||||
scalar hs = composition.carrier().Hs(i, 0.5*(T0 + T1));
|
||||
td.cloud().rhoTrans(i)[cellI] += dm;
|
||||
td.cloud().hsTrans()[cellI] += dm*hs;
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
@ -421,36 +432,38 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
if (mass1 < td.cloud().constProps().minParticleMass())
|
||||
if (np0*mass1 < td.cloud().constProps().minParticleMass())
|
||||
{
|
||||
td.keepParticle = false;
|
||||
|
||||
if (td.cloud().solution().coupled())
|
||||
{
|
||||
scalar dm = np0*mass1;
|
||||
|
||||
// Absorb parcel into carrier phase
|
||||
forAll(YGas_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(GAS, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*mass1*YMix[GAS]*YGas_[i];
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[GAS]*YGas_[i];
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(LIQ, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] +=
|
||||
np0*mass1*YMix[LIQ]*YLiquid_[i];
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[LIQ]*YLiquid_[i];
|
||||
}
|
||||
/*
|
||||
// No mapping between solid components and carrier phase
|
||||
forAll(YSolid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(SLD, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] +=
|
||||
np0*mass1*YMix[SLD]*YSolid_[i];
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[SLD]*YSolid_[i];
|
||||
}
|
||||
*/
|
||||
td.cloud().UTrans()[cellI] += np0*mass1*U1;
|
||||
td.cloud().UTrans()[cellI] += dm*U1;
|
||||
|
||||
// enthalpy transfer accounted for via change in mass fractions
|
||||
td.cloud().hsTrans()[cellI] += dm*HsEff(td, pc, T1, idG, idL, idS);
|
||||
|
||||
td.cloud().addToMassPhaseChange(dm);
|
||||
}
|
||||
}
|
||||
|
||||
@ -531,28 +544,35 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
|
||||
Sh -= dMassTot*td.cloud().constProps().LDevol()/dt;
|
||||
|
||||
// Molar average molecular weight of carrier mix
|
||||
const scalar Wc = this->rhoc_*specie::RR*this->Tc_/this->pc_;
|
||||
|
||||
// Update molar emissions
|
||||
forAll(dMassDV, i)
|
||||
if (td.cloud().heatTransfer().BirdCorrection())
|
||||
{
|
||||
// Molar average molecular weight of carrier mix
|
||||
const scalar Wc =
|
||||
max(SMALL, this->rhoc_*specie::RR*this->Tc_/this->pc_);
|
||||
|
||||
// Note: hardcoded gaseous diffusivities for now
|
||||
// TODO: add to carrier thermo
|
||||
const scalar beta = sqr(cbrt(15.0) + cbrt(15.0));
|
||||
const label id = composition.localToGlobalCarrierId(GAS, i);
|
||||
const scalar Cp = composition.carrier().Cp(id, Ts);
|
||||
const scalar W = composition.carrier().W(id);
|
||||
const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
|
||||
|
||||
// Dab calc'd using API vapour mass diffusivity function
|
||||
const scalar Dab =
|
||||
3.6059e-3*(pow(1.8*Ts, 1.75))*sqrt(1.0/W + 1.0/Wc)/(this->pc_*beta);
|
||||
forAll(dMassDV, i)
|
||||
{
|
||||
const label id = composition.localToGlobalCarrierId(GAS, i);
|
||||
const scalar Cp = composition.carrier().Cp(id, Ts);
|
||||
const scalar W = composition.carrier().W(id);
|
||||
const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
|
||||
|
||||
N += Ni;
|
||||
NCpW += Ni*Cp*W;
|
||||
Cs[id] += Ni*d/(2.0*Dab);
|
||||
}
|
||||
// Dab calc'd using API vapour mass diffusivity function
|
||||
const scalar Dab =
|
||||
3.6059e-3*(pow(1.8*Ts, 1.75))
|
||||
*sqrt(1.0/W + 1.0/Wc)
|
||||
/(this->pc_*beta);
|
||||
|
||||
N += Ni;
|
||||
NCpW += Ni*Cp*W;
|
||||
Cs[id] += Ni*d/(2.0*Dab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -134,9 +134,9 @@ private:
|
||||
const label idS
|
||||
) const;
|
||||
|
||||
//- Return the mixture effective enthalpy
|
||||
//- Return the mixture effective sensible enthalpy
|
||||
template<class TrackData>
|
||||
scalar HEff
|
||||
scalar HsEff
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar p,
|
||||
|
@ -213,9 +213,17 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
sumYiCbrtW += Ys[i]*cbrtW;
|
||||
}
|
||||
|
||||
Cps = max(Cps, ROOTVSMALL);
|
||||
|
||||
rhos *= pc_/(specie::RR*T);
|
||||
rhos = max(rhos, ROOTVSMALL);
|
||||
|
||||
mus /= sumYiSqrtW;
|
||||
mus = max(mus, ROOTVSMALL);
|
||||
|
||||
kappas /= sumYiCbrtW;
|
||||
kappas = max(kappas, ROOTVSMALL);
|
||||
|
||||
Prs = Cps*mus/kappas;
|
||||
}
|
||||
|
||||
@ -335,7 +343,9 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
Res = this->Re(U0, d0, rhos, mus);
|
||||
|
||||
// Update particle component mass and mass fractions
|
||||
scalar mass1 = updateMassFraction(mass0, dMassPC, Y_);
|
||||
scalarField dMass(dMassPC);
|
||||
|
||||
scalar mass1 = updateMassFraction(mass0, dMass, Y_);
|
||||
|
||||
|
||||
// Heat transfer
|
||||
@ -390,11 +400,15 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if (td.cloud().solution().coupled())
|
||||
{
|
||||
// Transfer mass lost from particle to carrier mass source
|
||||
forAll(dMassPC, i)
|
||||
// Transfer mass lost to carrier mass and enthalpy sources
|
||||
forAll(dMass, i)
|
||||
{
|
||||
scalar dm = np0*dMass[i];
|
||||
label gid = composition.localToGlobalCarrierId(0, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassPC[i];
|
||||
scalar hs = composition.carrier().Hs(gid, 0.5*(T0 + T1));
|
||||
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm;
|
||||
td.cloud().hsTrans()[cellI] += dm*hs;
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
@ -413,21 +427,27 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if (mass1 < td.cloud().constProps().minParticleMass())
|
||||
if (np0*mass1 < td.cloud().constProps().minParticleMass())
|
||||
{
|
||||
td.keepParticle = false;
|
||||
|
||||
if (td.cloud().solution().coupled())
|
||||
{
|
||||
scalar dm = np0*mass1;
|
||||
|
||||
// Absorb parcel into carrier phase
|
||||
forAll(Y_, i)
|
||||
{
|
||||
scalar dmi = dm*Y_[i];
|
||||
label gid = composition.localToGlobalCarrierId(0, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*mass1*Y_[i];
|
||||
}
|
||||
td.cloud().UTrans()[cellI] += np0*mass1*U1;
|
||||
scalar hs = composition.carrier().Hs(gid, T1);
|
||||
|
||||
// enthalpy transfer accounted for via change in mass fractions
|
||||
td.cloud().rhoTrans(gid)[cellI] += dmi;
|
||||
td.cloud().hsTrans()[cellI] += dmi*hs;
|
||||
}
|
||||
td.cloud().UTrans()[cellI] += dm*U1;
|
||||
|
||||
td.cloud().addToMassPhaseChange(dm);
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,33 +534,44 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
// Add to cumulative phase change mass
|
||||
td.cloud().addToMassPhaseChange(this->nParticle_*dMassTot);
|
||||
|
||||
// Average molecular weight of carrier mix - assumes perfect gas
|
||||
const scalar Wc = this->rhoc_*specie::RR*this->Tc_/this->pc_;
|
||||
|
||||
forAll(YComponents, i)
|
||||
forAll(dMassPC, i)
|
||||
{
|
||||
const label idc = composition.localToGlobalCarrierId(idPhase, i);
|
||||
const label idl = composition.globalIds(idPhase)[i];
|
||||
|
||||
const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, T);
|
||||
Sh -= dMassPC[i]*dh/dt;
|
||||
}
|
||||
|
||||
// Update particle surface thermo properties
|
||||
const scalar Dab =
|
||||
composition.liquids().properties()[idl].D(pc_, Ts, Wc);
|
||||
|
||||
const scalar Cp = composition.carrier().Cp(idc, Ts);
|
||||
const scalar W = composition.carrier().W(idc);
|
||||
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
|
||||
// Update molar emissions
|
||||
if (td.cloud().heatTransfer().BirdCorrection())
|
||||
{
|
||||
// Average molecular weight of carrier mix - assumes perfect gas
|
||||
const scalar Wc = this->rhoc_*specie::RR*this->Tc_/this->pc_;
|
||||
|
||||
// Molar flux of species coming from the particle (kmol/m^2/s)
|
||||
N += Ni;
|
||||
|
||||
// Sum of Ni*Cpi*Wi of emission species
|
||||
NCpW += Ni*Cp*W;
|
||||
forAll(dMassPC, i)
|
||||
{
|
||||
const label idc = composition.localToGlobalCarrierId(idPhase, i);
|
||||
const label idl = composition.globalIds(idPhase)[i];
|
||||
|
||||
// Concentrations of emission species
|
||||
Cs[idc] += Ni*d/(2.0*Dab);
|
||||
const scalar Cp = composition.carrier().Cp(idc, Ts);
|
||||
const scalar W = composition.carrier().W(idc);
|
||||
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
|
||||
|
||||
const scalar Dab =
|
||||
composition.liquids().properties()[idl].D(pc_, Ts, Wc);
|
||||
|
||||
// Molar flux of species coming from the particle (kmol/m^2/s)
|
||||
N += Ni;
|
||||
|
||||
// Sum of Ni*Cpi*Wi of emission species
|
||||
NCpW += Ni*Cp*W;
|
||||
|
||||
// Concentrations of emission species
|
||||
Cs[idc] += Ni*d/(2.0*Dab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,10 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
||||
mus = td.muInterp().interpolate(this->position(), tetIs)/TRatio;
|
||||
|
||||
Pr = td.cloud().constProps().Pr();
|
||||
Pr = max(ROOTVSMALL, Pr);
|
||||
|
||||
kappas = Cpc_*mus/Pr;
|
||||
kappas = max(ROOTVSMALL, kappas);
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,7 +62,17 @@ void makeGraph
|
||||
const word& graphFormat
|
||||
)
|
||||
{
|
||||
makeGraph(x, vsf.internalField(), name, vsf.path(), graphFormat);
|
||||
fileName path(vsf.rootPath()/vsf.caseName()/"graphs"/vsf.instance());
|
||||
mkDir(path);
|
||||
|
||||
makeGraph
|
||||
(
|
||||
x,
|
||||
vsf.internalField(),
|
||||
name,
|
||||
path,
|
||||
graphFormat
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
datToFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/datToFoam
|
@ -1,127 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-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/>.
|
||||
|
||||
Application
|
||||
MRFSimpleFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||
fluids with MRF regions.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "MRFZones.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
// Momentum predictor
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
);
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
p.boundaryField().updateCoeffs();
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
U = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
|
||||
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
|
||||
mrfZones.relativeFlux(phi);
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAU, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,3 +0,0 @@
|
||||
MRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/MRFSimpleFoam
|
@ -1,46 +0,0 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> turbulence
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
|
||||
MRFZones mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
@ -47,6 +47,9 @@ FoamFile
|
||||
nFaces 1600;
|
||||
startFace 101720;
|
||||
neighbourPatch cyclic_half1;
|
||||
transform rotational;
|
||||
rotationAxis (0 0 1);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
cyclic_half1
|
||||
{
|
||||
@ -54,6 +57,9 @@ FoamFile
|
||||
nFaces 1600;
|
||||
startFace 103320;
|
||||
neighbourPatch cyclic_half0;
|
||||
transform rotational;
|
||||
rotationAxis (0 0 1);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
)
|
||||
|
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleSRFFoam;
|
||||
application SRFSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
@ -19,7 +19,7 @@ Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( 10 0 0 );
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [ 0 2 -1 0 0 0 0 ] 1e-3;
|
||||
nu nu [ 0 2 -1 0 0 0 0 ] 1e-8;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
format binary;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
|
@ -25,6 +25,8 @@ boundaryField
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.01;
|
||||
phi phi;
|
||||
k k;
|
||||
value uniform 1;
|
||||
}
|
||||
outlet1
|
||||
@ -45,7 +47,7 @@ boundaryField
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
value uniform 1;
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
|
@ -25,6 +25,8 @@ boundaryField
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.05;
|
||||
U U;
|
||||
phi phi;
|
||||
value uniform 1;
|
||||
}
|
||||
outlet1
|
||||
@ -42,7 +44,7 @@ boundaryField
|
||||
baffles
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0;
|
||||
value uniform 1;
|
||||
}
|
||||
fan_half0
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
format binary;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
|
@ -21,433 +21,433 @@ FoamFile
|
||||
{
|
||||
type patch;
|
||||
nFaces 320;
|
||||
startFace 1027872;
|
||||
startFace 1028059;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 64;
|
||||
startFace 1028192;
|
||||
startFace 1028379;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 64;
|
||||
startFace 1028256;
|
||||
startFace 1028443;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
nFaces 5330;
|
||||
startFace 1028320;
|
||||
startFace 1028507;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type patch;
|
||||
nFaces 160;
|
||||
startFace 1033650;
|
||||
startFace 1033837;
|
||||
}
|
||||
motorBike_frt-fairing:001%1
|
||||
{
|
||||
type wall;
|
||||
nFaces 5416;
|
||||
startFace 1033810;
|
||||
nFaces 5410;
|
||||
startFace 1033997;
|
||||
}
|
||||
motorBike_windshield:002%2
|
||||
{
|
||||
type wall;
|
||||
nFaces 50;
|
||||
startFace 1039226;
|
||||
startFace 1039407;
|
||||
}
|
||||
motorBike_rr-wh-rim:005%5
|
||||
{
|
||||
type wall;
|
||||
nFaces 137;
|
||||
startFace 1039276;
|
||||
nFaces 136;
|
||||
startFace 1039457;
|
||||
}
|
||||
motorBike_rr-wh-rim:010%10
|
||||
{
|
||||
type wall;
|
||||
nFaces 340;
|
||||
startFace 1039413;
|
||||
startFace 1039593;
|
||||
}
|
||||
motorBike_fr-wh-rim:011%11
|
||||
{
|
||||
type wall;
|
||||
nFaces 473;
|
||||
startFace 1039753;
|
||||
startFace 1039933;
|
||||
}
|
||||
motorBike_fr-wh-brake-disk:012%12
|
||||
{
|
||||
type wall;
|
||||
nFaces 54;
|
||||
startFace 1040226;
|
||||
startFace 1040406;
|
||||
}
|
||||
motorBike_frame:016-shadow%13
|
||||
{
|
||||
type wall;
|
||||
nFaces 98;
|
||||
startFace 1040280;
|
||||
startFace 1040460;
|
||||
}
|
||||
motorBike_rear-susp:014%14
|
||||
{
|
||||
type wall;
|
||||
nFaces 844;
|
||||
startFace 1040378;
|
||||
nFaces 847;
|
||||
startFace 1040558;
|
||||
}
|
||||
motorBike_rear-susp:014-shadow%15
|
||||
{
|
||||
type wall;
|
||||
nFaces 461;
|
||||
startFace 1041222;
|
||||
nFaces 462;
|
||||
startFace 1041405;
|
||||
}
|
||||
motorBike_frame:016%16
|
||||
{
|
||||
type wall;
|
||||
nFaces 67;
|
||||
startFace 1041683;
|
||||
nFaces 64;
|
||||
startFace 1041867;
|
||||
}
|
||||
motorBike_rr-wh-rim:005-shadow%17
|
||||
{
|
||||
type wall;
|
||||
nFaces 70;
|
||||
startFace 1041750;
|
||||
startFace 1041931;
|
||||
}
|
||||
motorBike_rr-wh-chain-hub:022%22
|
||||
{
|
||||
type wall;
|
||||
nFaces 141;
|
||||
startFace 1041820;
|
||||
startFace 1042001;
|
||||
}
|
||||
motorBike_rearseat%24
|
||||
{
|
||||
type wall;
|
||||
nFaces 430;
|
||||
startFace 1041961;
|
||||
startFace 1042142;
|
||||
}
|
||||
motorBike_frt-fairing%25
|
||||
{
|
||||
type wall;
|
||||
nFaces 626;
|
||||
startFace 1042391;
|
||||
startFace 1042572;
|
||||
}
|
||||
motorBike_windshield%26
|
||||
{
|
||||
type wall;
|
||||
nFaces 368;
|
||||
startFace 1043017;
|
||||
nFaces 379;
|
||||
startFace 1043198;
|
||||
}
|
||||
motorBike_headlights%27
|
||||
{
|
||||
type wall;
|
||||
nFaces 161;
|
||||
startFace 1043385;
|
||||
startFace 1043577;
|
||||
}
|
||||
motorBike_driversseat%28
|
||||
{
|
||||
type wall;
|
||||
nFaces 368;
|
||||
startFace 1043546;
|
||||
startFace 1043738;
|
||||
}
|
||||
motorBike_rear-body%29
|
||||
{
|
||||
type wall;
|
||||
nFaces 2077;
|
||||
startFace 1043914;
|
||||
startFace 1044106;
|
||||
}
|
||||
motorBike_fuel-tank%30
|
||||
{
|
||||
type wall;
|
||||
nFaces 912;
|
||||
startFace 1045991;
|
||||
startFace 1046183;
|
||||
}
|
||||
motorBike_exhaust%31
|
||||
{
|
||||
type wall;
|
||||
nFaces 2392;
|
||||
startFace 1046903;
|
||||
startFace 1047095;
|
||||
}
|
||||
motorBike_rr-wh-rim%32
|
||||
{
|
||||
type wall;
|
||||
nFaces 1430;
|
||||
startFace 1049295;
|
||||
startFace 1049487;
|
||||
}
|
||||
motorBike_fr-mud-guard%33
|
||||
{
|
||||
type wall;
|
||||
nFaces 624;
|
||||
startFace 1050725;
|
||||
nFaces 634;
|
||||
startFace 1050917;
|
||||
}
|
||||
motorBike_fr-wh-rim%34
|
||||
{
|
||||
type wall;
|
||||
nFaces 591;
|
||||
startFace 1051349;
|
||||
startFace 1051551;
|
||||
}
|
||||
motorBike_fr-wh-brake-disk%35
|
||||
{
|
||||
type wall;
|
||||
nFaces 427;
|
||||
startFace 1051940;
|
||||
nFaces 426;
|
||||
startFace 1052142;
|
||||
}
|
||||
motorBike_fr-brake-caliper%36
|
||||
{
|
||||
type wall;
|
||||
nFaces 164;
|
||||
startFace 1052367;
|
||||
startFace 1052568;
|
||||
}
|
||||
motorBike_fr-wh-tyre%37
|
||||
{
|
||||
type wall;
|
||||
nFaces 1116;
|
||||
startFace 1052531;
|
||||
startFace 1052732;
|
||||
}
|
||||
motorBike_hbars%38
|
||||
{
|
||||
type wall;
|
||||
nFaces 535;
|
||||
startFace 1053647;
|
||||
startFace 1053848;
|
||||
}
|
||||
motorBike_fr-forks%39
|
||||
{
|
||||
type wall;
|
||||
nFaces 1140;
|
||||
startFace 1054182;
|
||||
startFace 1054383;
|
||||
}
|
||||
motorBike_chain%40
|
||||
{
|
||||
type wall;
|
||||
nFaces 474;
|
||||
startFace 1055322;
|
||||
startFace 1055523;
|
||||
}
|
||||
motorBike_rr-wh-tyre%41
|
||||
{
|
||||
type wall;
|
||||
nFaces 1787;
|
||||
startFace 1055796;
|
||||
startFace 1055997;
|
||||
}
|
||||
motorBike_square-dial%42
|
||||
{
|
||||
type wall;
|
||||
nFaces 6;
|
||||
startFace 1057583;
|
||||
startFace 1057784;
|
||||
}
|
||||
motorBike_round-dial%43
|
||||
{
|
||||
type wall;
|
||||
nFaces 17;
|
||||
startFace 1057589;
|
||||
startFace 1057790;
|
||||
}
|
||||
motorBike_dial-holder%44
|
||||
{
|
||||
type wall;
|
||||
nFaces 87;
|
||||
startFace 1057606;
|
||||
startFace 1057807;
|
||||
}
|
||||
motorBike_rear-susp%45
|
||||
{
|
||||
type wall;
|
||||
nFaces 1786;
|
||||
startFace 1057693;
|
||||
startFace 1057894;
|
||||
}
|
||||
motorBike_rear-brake-lights%46
|
||||
{
|
||||
type wall;
|
||||
nFaces 53;
|
||||
startFace 1059479;
|
||||
startFace 1059680;
|
||||
}
|
||||
motorBike_rear-light-bracket%47
|
||||
{
|
||||
type wall;
|
||||
nFaces 163;
|
||||
startFace 1059532;
|
||||
startFace 1059733;
|
||||
}
|
||||
motorBike_frame%48
|
||||
{
|
||||
type wall;
|
||||
nFaces 2040;
|
||||
startFace 1059695;
|
||||
startFace 1059896;
|
||||
}
|
||||
motorBike_rear-mud-guard%49
|
||||
{
|
||||
type wall;
|
||||
nFaces 663;
|
||||
startFace 1061735;
|
||||
nFaces 660;
|
||||
startFace 1061936;
|
||||
}
|
||||
motorBike_rear-susp-spring-damp%50
|
||||
{
|
||||
type wall;
|
||||
nFaces 107;
|
||||
startFace 1062398;
|
||||
startFace 1062596;
|
||||
}
|
||||
motorBike_fairing-inner-plate%51
|
||||
{
|
||||
type wall;
|
||||
nFaces 445;
|
||||
startFace 1062505;
|
||||
startFace 1062703;
|
||||
}
|
||||
motorBike_clutch-housing%52
|
||||
{
|
||||
type wall;
|
||||
nFaces 970;
|
||||
startFace 1062950;
|
||||
startFace 1063148;
|
||||
}
|
||||
motorBike_radiator%53
|
||||
{
|
||||
type wall;
|
||||
nFaces 39;
|
||||
startFace 1063920;
|
||||
nFaces 40;
|
||||
startFace 1064118;
|
||||
}
|
||||
motorBike_water-pipe%54
|
||||
{
|
||||
type wall;
|
||||
nFaces 104;
|
||||
startFace 1063959;
|
||||
startFace 1064158;
|
||||
}
|
||||
motorBike_water-pump%55
|
||||
{
|
||||
type wall;
|
||||
nFaces 74;
|
||||
startFace 1064063;
|
||||
startFace 1064262;
|
||||
}
|
||||
motorBike_engine%56
|
||||
{
|
||||
type wall;
|
||||
nFaces 2389;
|
||||
startFace 1064137;
|
||||
startFace 1064336;
|
||||
}
|
||||
motorBike_rear-shock-link%57
|
||||
{
|
||||
type wall;
|
||||
nFaces 26;
|
||||
startFace 1066526;
|
||||
nFaces 25;
|
||||
startFace 1066725;
|
||||
}
|
||||
motorBike_rear-brake-fluid-pot-bracket%58
|
||||
{
|
||||
type wall;
|
||||
nFaces 44;
|
||||
startFace 1066552;
|
||||
nFaces 46;
|
||||
startFace 1066750;
|
||||
}
|
||||
motorBike_rear-brake-fluid-pot%59
|
||||
{
|
||||
type wall;
|
||||
nFaces 53;
|
||||
startFace 1066596;
|
||||
startFace 1066796;
|
||||
}
|
||||
motorBike_footpeg%60
|
||||
{
|
||||
type wall;
|
||||
nFaces 86;
|
||||
startFace 1066649;
|
||||
startFace 1066849;
|
||||
}
|
||||
motorBike_rr-wh-chain-hub%61
|
||||
{
|
||||
type wall;
|
||||
nFaces 122;
|
||||
startFace 1066735;
|
||||
startFace 1066935;
|
||||
}
|
||||
motorBike_rear-brake-caliper%62
|
||||
{
|
||||
type wall;
|
||||
nFaces 142;
|
||||
startFace 1066857;
|
||||
startFace 1067057;
|
||||
}
|
||||
motorBike_rider-helmet%65
|
||||
{
|
||||
type wall;
|
||||
nFaces 583;
|
||||
startFace 1066999;
|
||||
startFace 1067199;
|
||||
}
|
||||
motorBike_rider-visor%66
|
||||
{
|
||||
type wall;
|
||||
nFaces 95;
|
||||
startFace 1067582;
|
||||
startFace 1067782;
|
||||
}
|
||||
motorBike_rider-boots%67
|
||||
{
|
||||
type wall;
|
||||
nFaces 1025;
|
||||
startFace 1067677;
|
||||
startFace 1067877;
|
||||
}
|
||||
motorBike_rider-gloves%68
|
||||
{
|
||||
type wall;
|
||||
nFaces 319;
|
||||
startFace 1068702;
|
||||
startFace 1068902;
|
||||
}
|
||||
motorBike_rider-body%69
|
||||
{
|
||||
type wall;
|
||||
nFaces 4555;
|
||||
startFace 1069021;
|
||||
startFace 1069221;
|
||||
}
|
||||
motorBike_frame:0%70
|
||||
{
|
||||
type wall;
|
||||
nFaces 37;
|
||||
startFace 1073576;
|
||||
startFace 1073776;
|
||||
}
|
||||
motorBike_frt-fairing:001-shadow%74
|
||||
{
|
||||
type wall;
|
||||
nFaces 3317;
|
||||
startFace 1073613;
|
||||
nFaces 3329;
|
||||
startFace 1073813;
|
||||
}
|
||||
motorBike_windshield-shadow%75
|
||||
{
|
||||
type wall;
|
||||
nFaces 236;
|
||||
startFace 1076930;
|
||||
nFaces 237;
|
||||
startFace 1077142;
|
||||
}
|
||||
motorBike_fr-mud-guard-shadow%81
|
||||
{
|
||||
type wall;
|
||||
nFaces 350;
|
||||
startFace 1077166;
|
||||
nFaces 348;
|
||||
startFace 1077379;
|
||||
}
|
||||
motorBike_fr-wh-brake-disk-shadow%83
|
||||
{
|
||||
type wall;
|
||||
nFaces 186;
|
||||
startFace 1077516;
|
||||
nFaces 187;
|
||||
startFace 1077727;
|
||||
}
|
||||
motorBike_rear-mud-guard-shadow%84
|
||||
{
|
||||
type wall;
|
||||
nFaces 388;
|
||||
startFace 1077702;
|
||||
nFaces 394;
|
||||
startFace 1077914;
|
||||
}
|
||||
motorBike_rear-susp-spring-damp-shadow%85
|
||||
{
|
||||
type wall;
|
||||
nFaces 41;
|
||||
startFace 1078090;
|
||||
startFace 1078308;
|
||||
}
|
||||
motorBike_radiator-shadow%86
|
||||
{
|
||||
type wall;
|
||||
nFaces 22;
|
||||
startFace 1078131;
|
||||
nFaces 20;
|
||||
startFace 1078349;
|
||||
}
|
||||
motorBike_rear-shock-link-shadow%87
|
||||
{
|
||||
type wall;
|
||||
nFaces 9;
|
||||
startFace 1078153;
|
||||
nFaces 10;
|
||||
startFace 1078369;
|
||||
}
|
||||
motorBike_rear-brake-fluid-pot-bracket-shadow%88
|
||||
{
|
||||
type wall;
|
||||
nFaces 22;
|
||||
startFace 1078162;
|
||||
nFaces 20;
|
||||
startFace 1078379;
|
||||
}
|
||||
motorBike_rr-wh-chain-hub-shadow%89
|
||||
{
|
||||
type wall;
|
||||
nFaces 53;
|
||||
startFace 1078184;
|
||||
startFace 1078399;
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
simpleSRFFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/simpleSRFFoam
|
@ -1,9 +0,0 @@
|
||||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
@ -1,3 +0,0 @@
|
||||
simpleWindFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/simpleWindFoam
|
@ -1,6 +0,0 @@
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> turbulence
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
IObasicSourceList actuationDisks(mesh);
|
@ -50,7 +50,7 @@ FoamFile
|
||||
terrain_patch0
|
||||
{
|
||||
type wall;
|
||||
nFaces 18201;
|
||||
nFaces 16037;
|
||||
startFace 369404;
|
||||
}
|
||||
)
|
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleWindFoam;
|
||||
application windSimpleFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
@ -1,3 +0,0 @@
|
||||
rhoPisoTwinParcelFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/rhoPisoTwinParcelFoam
|
@ -1,34 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lthermophysicalFunctions \
|
||||
-lbasicThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lSLGThermo \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels
|
@ -1,17 +0,0 @@
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
thermoCloud1.SU(U)
|
||||
+ kinematicCloud1.SU(U)
|
||||
+ rho.dimensionedInternalField()*g
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
Info<< "Constructing thermoCloud1" << endl;
|
||||
basicThermoCloud thermoCloud1
|
||||
(
|
||||
"thermoCloud1",
|
||||
rho,
|
||||
U,
|
||||
g,
|
||||
slgThermo
|
||||
);
|
||||
|
||||
Info<< "Constructing kinematicCloud1" << endl;
|
||||
basicKinematicCloud kinematicCloud1
|
||||
(
|
||||
"kinematicCloud1",
|
||||
rho,
|
||||
U,
|
||||
thermo.mu(),
|
||||
g
|
||||
);
|
||||
|
@ -1,63 +0,0 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<basicPsiThermo> pThermo
|
||||
(
|
||||
basicPsiThermo::New(mesh)
|
||||
);
|
||||
basicPsiThermo& thermo = pThermo();
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
volScalarField& hs = thermo.hs();
|
||||
const volScalarField& psi = thermo.psi();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo.rho()
|
||||
);
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
# include "compressibleCreatePhi.H"
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||
);
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
fvScalarMatrix hsEqn
|
||||
(
|
||||
fvm::ddt(rho, hs)
|
||||
+ fvm::div(phi, hs)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
+ thermoCloud1.Sh(hs)
|
||||
);
|
||||
|
||||
hsEqn.relax();
|
||||
|
||||
hsEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
rho = thermo.rho();
|
||||
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
U = rAU*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
phi =
|
||||
fvc::interpolate(rho)
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phi)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- 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 volScalarField;
|
||||
object G;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 0 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type MarshakRadiation;
|
||||
T T;
|
||||
emissivity 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type MarshakRadiation;
|
||||
T T;
|
||||
emissivity 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type MarshakRadiation;
|
||||
T T;
|
||||
emissivity 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
symmetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,50 +0,0 @@
|
||||
/*--------------------------------*- 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 volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 400;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 400;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
symmetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- 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 volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
symmetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,50 +0,0 @@
|
||||
/*--------------------------------*- 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 volScalarField;
|
||||
location "0";
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
symmetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,50 +0,0 @@
|
||||
/*--------------------------------*- 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 volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 5390.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 5390.5;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 5390.5;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 5390.5;
|
||||
}
|
||||
symmetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user