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

This commit is contained in:
mattijs
2011-04-20 10:04:28 +01:00
117 changed files with 345 additions and 4521 deletions

View File

@ -3,6 +3,10 @@ cd ${0%/*} || exit 1 # run from this directory
set -x set -x
wmake wmake
wmake SRFSimpleFoam
wmake MRFSimpleFoam
wmake windSimpleFoam
wmake porousSimpleFoam wmake porousSimpleFoam
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,19 +22,19 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
rhoPisoTwinParcelFoam MRFSimpleFoam
Description 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 "fvCFD.H"
#include "basicPsiThermo.H" #include "singlePhaseTransportModel.H"
#include "turbulenceModel.H" #include "RASModel.H"
#include "MRFZones.H"
#include "basicThermoCloud.H" #include "simpleControl.H"
#include "basicKinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -44,54 +44,32 @@ int main(int argc, char *argv[])
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createClouds.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H" MRFZones mrfZones(mesh);
#include "setInitialDeltaT.H" mrfZones.correctBoundaryVelocity(U);
simpleControl simple(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; 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; Info<< "Time = " << runTime.timeName() << nl << endl;
thermoCloud1.evolve(); p.storePrevIter();
kinematicCloud1.evolve(); // --- Pressure-velocity SIMPLE corrector
#include "rhoEqn.H"
// --- PIMPLE loop
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
{ {
#include "UEqn.H" #include "UEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
{
#include "hsEqn.H"
#include "pEqn.H" #include "pEqn.H"
} }
}
turbulence->correct(); turbulence->correct();
rho = thermo.rho();
runTime.write(); runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"

View File

@ -0,0 +1,3 @@
MRFSimpleFoam.C
EXE = $(FOAM_APPBIN)/MRFSimpleFoam

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I.. \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \

View File

@ -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));

View File

@ -1,9 +1,12 @@
{
p.boundaryField().updateCoeffs(); p.boundaryField().updateCoeffs();
volScalarField AU = UEqn().A(); volScalarField rAU(1.0/UEqn().A());
U = UEqn().H()/AU; U = rAU*UEqn().H();
UEqn.clear(); UEqn.clear();
phi = fvc::interpolate(U) & mesh.Sf();
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
mrfZones.relativeFlux(phi);
adjustPhi(phi, U, p); adjustPhi(phi, U, p);
// Non-orthogonal pressure corrector loop // Non-orthogonal pressure corrector loop
@ -11,7 +14,7 @@
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::laplacian(1.0/AU, p) == fvc::div(phi) fvm::laplacian(rAU, p) == fvc::div(phi)
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
@ -29,5 +32,6 @@
p.relax(); p.relax();
// Momentum corrector // Momentum corrector
U -= fvc::grad(p)/AU; U -= rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
}

View File

@ -0,0 +1,3 @@
SRFSimpleFoam.C
EXE = $(FOAM_APPBIN)/SRFSimpleFoam

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I.. \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
simpleSRFFoam SRFSimpleFoam
Description Description
Steady-state solver for incompressible, turbulent flow of non-Newtonian Steady-state solver for incompressible, turbulent flow of non-Newtonian
@ -34,6 +34,7 @@ Description
#include "singlePhaseTransportModel.H" #include "singlePhaseTransportModel.H"
#include "RASModel.H" #include "RASModel.H"
#include "SRFModel.H" #include "SRFModel.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -45,20 +46,19 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
simpleControl simple(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
while (runTime.loop()) while (simple.loop())
{ {
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readSIMPLEControls.H"
#include "initConvergenceCheck.H"
p.storePrevIter(); p.storePrevIter();
// Pressure-velocity SIMPLE corrector // --- Pressure-velocity SIMPLE corrector
{ {
#include "UrelEqn.H" #include "UrelEqn.H"
#include "pEqn.H" #include "pEqn.H"
@ -87,8 +87,6 @@ int main(int argc, char *argv[])
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl; << nl << endl;
#include "convergenceCheck.H"
} }
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -1,4 +1,5 @@
// Relative momentum predictor // Relative momentum predictor
tmp<fvVectorMatrix> UrelEqn tmp<fvVectorMatrix> UrelEqn
( (
fvm::div(phi, Urel) fvm::div(phi, Urel)
@ -8,9 +9,4 @@
UrelEqn().relax(); UrelEqn().relax();
eqnResidual = solve solve(UrelEqn() == -fvc::grad(p));
(
UrelEqn() == -fvc::grad(p)
).initialResidual();
maxResidual = max(eqnResidual, maxResidual);

View File

@ -1,34 +1,37 @@
{ {
p.boundaryField().updateCoeffs(); p.boundaryField().updateCoeffs();
volScalarField AUrel = UrelEqn().A();
Urel = UrelEqn().H()/AUrel; volScalarField rAUrel(1.0/UrelEqn().A());
Urel = rAUrel*UrelEqn().H();
UrelEqn.clear(); UrelEqn.clear();
phi = fvc::interpolate(Urel) & mesh.Sf();
phi = fvc::interpolate(Urel, "interpolate(HbyA)") & mesh.Sf();
adjustPhi(phi, Urel, p); adjustPhi(phi, Urel, p);
// Non-orthogonal pressure corrector loop // Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::laplacian(1.0/AUrel, p) == fvc::div(phi) fvm::laplacian(rAUrel, p) == fvc::div(phi)
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(); pEqn.solve();
if (nonOrth == nNonOrthCorr) if (nonOrth == simple.nNonOrthCorr())
{ {
phi -= pEqn.flux(); phi -= pEqn.flux();
} }
} }
# include "continuityErrs.H" #include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p.relax(); p.relax();
// Momentum corrector // Momentum corrector
Urel -= fvc::grad(p)/AUrel; Urel -= rAUrel*fvc::grad(p);
Urel.correctBoundaryConditions(); Urel.correctBoundaryConditions();
} }

View File

@ -1,4 +1,4 @@
// Solve the Momentum equation // Momentum predictor
tmp<fvVectorMatrix> UEqn tmp<fvVectorMatrix> UEqn
( (

View File

@ -1,9 +1,11 @@
{
p.boundaryField().updateCoeffs(); p.boundaryField().updateCoeffs();
volScalarField AU(UEqn().A()); volScalarField rAU(1.0/UEqn().A());
U = UEqn().H()/AU; U = rAU*UEqn().H();
UEqn.clear(); UEqn.clear();
phi = fvc::interpolate(U) & mesh.Sf();
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
adjustPhi(phi, U, p); adjustPhi(phi, U, p);
// Non-orthogonal pressure corrector loop // Non-orthogonal pressure corrector loop
@ -11,7 +13,7 @@
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvm::laplacian(1.0/AU, p) == fvc::div(phi) fvm::laplacian(rAU, p) == fvc::div(phi)
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
@ -30,5 +32,6 @@
p.relax(); p.relax();
// Momentum corrector // Momentum corrector
U -= fvc::grad(p)/AU; U -= rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
}

View File

@ -56,7 +56,7 @@ int main(int argc, char *argv[])
p.storePrevIter(); p.storePrevIter();
// Pressure-velocity SIMPLE corrector // --- Pressure-velocity SIMPLE corrector
{ {
#include "UEqn.H" #include "UEqn.H"
#include "pEqn.H" #include "pEqn.H"

View File

@ -0,0 +1,3 @@
windSimpleFoam.C
EXE = $(FOAM_APPBIN)/windSimpleFoam

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I.. \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \

View File

@ -46,6 +46,8 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
IObasicSourceList actuationDisks(mesh);
simpleControl simple(mesh); simpleControl simple(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,3 @@
datToFoam.C
EXE = $(FOAM_APPBIN)/datToFoam

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
FatalError.exit(); FatalError.exit();
} }
# include "createTime.H" #include "createTime.H"
std::ifstream plot3dFile(args.args()[1].c_str()); std::ifstream plot3dFile(args.args()[1].c_str());

View File

@ -1,3 +1,6 @@
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance());
mkDir(path);
scalarField UMeanXvalues scalarField UMeanXvalues
( (
channelIndexing.collapse(UMean.component(vector::X)()) channelIndexing.collapse(UMean.component(vector::X)())
@ -42,19 +45,19 @@
const scalarField& y = channelIndexing.y(); const scalarField& y = channelIndexing.y();
makeGraph(y, UMeanXvalues, "Uf", UMean.path(), gFormat); makeGraph(y, UMeanXvalues, "Uf", path, gFormat);
makeGraph(y, urmsValues, "u", UMean.path(), gFormat); makeGraph(y, urmsValues, "u", path, gFormat);
makeGraph(y, vrmsValues, "v", UMean.path(), gFormat); makeGraph(y, vrmsValues, "v", path, gFormat);
makeGraph(y, wrmsValues, "w", UMean.path(), gFormat); makeGraph(y, wrmsValues, "w", path, gFormat);
makeGraph(y, RxyValues, "uv", UMean.path(), gFormat); makeGraph(y, RxyValues, "uv", path, gFormat);
makeGraph(y, kValues, "k", UMean.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, epsilonValues, "epsilon", path, gFormat);
makeGraph(y, nuMeanValues, "nu", UMean.path(), gFormat); makeGraph(y, nuMeanValues, "nu", path, gFormat);
makeGraph(y, nuPrimeValues, "nuPrime", UMean.path(), gFormat); makeGraph(y, nuPrimeValues, "nuPrime", path, gFormat);
makeGraph(y, gammaDotMeanValues, "gammaDot", UMean.path(), gFormat); makeGraph(y, gammaDotMeanValues, "gammaDot", path, gFormat);
makeGraph(y, gammaDotPrimeValues, "gammaDotPrime", UMean.path(), gFormat); makeGraph(y, gammaDotPrimeValues, "gammaDotPrime", path, gFormat);
*/ */

View File

@ -76,7 +76,10 @@ cleanCase()
rm -rf processor* > /dev/null 2>&1 rm -rf processor* > /dev/null 2>&1
rm -rf probes* > /dev/null 2>&1 rm -rf probes* > /dev/null 2>&1
rm -rf forces* > /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 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 rm -rf system/machines > /dev/null 2>&1
if [ -d constant/polyMesh ] if [ -d constant/polyMesh ]

View File

@ -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
// ************************************************************************* //

View File

@ -518,7 +518,7 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::Re
const scalar muc const scalar muc
) const ) const
{ {
return rhoc*mag(U - Uc_)*d/muc; return rhoc*mag(U - Uc_)*d/(muc + ROOTVSMALL);
} }

View File

@ -63,7 +63,7 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::CpEff
template<class ParcelType> template<class ParcelType>
template<class TrackData> template<class TrackData>
Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HEff Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HsEff
( (
TrackData& td, TrackData& td,
const scalar p, const scalar p,
@ -74,9 +74,9 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HEff
) const ) const
{ {
return return
this->Y_[GAS]*td.cloud().composition().H(idG, YGas_, p, T) this->Y_[GAS]*td.cloud().composition().Hs(idG, YGas_, p, T)
+ this->Y_[LIQ]*td.cloud().composition().H(idL, YLiquid_, p, T) + this->Y_[LIQ]*td.cloud().composition().Hs(idL, YLiquid_, p, T)
+ this->Y_[SLD]*td.cloud().composition().H(idS, YSolid_, 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); updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
// Heat transfer // Heat transfer
// ~~~~~~~~~~~~~ // ~~~~~~~~~~~~~
@ -383,25 +382,37 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
// Transfer mass lost from particle to carrier mass source // Transfer mass lost from particle to carrier mass source
forAll(YGas_, i) forAll(YGas_, i)
{ {
scalar dm = np0*dMassGas[i];
label gid = composition.localToGlobalCarrierId(GAS, 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) forAll(YLiquid_, i)
{ {
scalar dm = np0*dMassLiquid[i];
label gid = composition.localToGlobalCarrierId(LIQ, 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 // No mapping between solid components and carrier phase
forAll(YSolid_, i) forAll(YSolid_, i)
{ {
scalar dm = np0*dMassSolid[i];
label gid = composition.localToGlobalCarrierId(SLD, 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) 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 // Update momentum transfer
@ -421,36 +432,38 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
// Remove the particle when mass falls below minimum threshold // 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; td.keepParticle = false;
if (td.cloud().solution().coupled()) if (td.cloud().solution().coupled())
{ {
scalar dm = np0*mass1;
// Absorb parcel into carrier phase // Absorb parcel into carrier phase
forAll(YGas_, i) forAll(YGas_, i)
{ {
label gid = composition.localToGlobalCarrierId(GAS, 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) forAll(YLiquid_, i)
{ {
label gid = composition.localToGlobalCarrierId(LIQ, i); label gid = composition.localToGlobalCarrierId(LIQ, i);
td.cloud().rhoTrans(gid)[cellI] += td.cloud().rhoTrans(gid)[cellI] += dm*YMix[LIQ]*YLiquid_[i];
np0*mass1*YMix[LIQ]*YLiquid_[i];
} }
/* /*
// No mapping between solid components and carrier phase // No mapping between solid components and carrier phase
forAll(YSolid_, i) forAll(YSolid_, i)
{ {
label gid = composition.localToGlobalCarrierId(SLD, i); label gid = composition.localToGlobalCarrierId(SLD, i);
td.cloud().rhoTrans(gid)[cellI] += td.cloud().rhoTrans(gid)[cellI] += dm*YMix[SLD]*YSolid_[i];
np0*mass1*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,15 +544,19 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
Sh -= dMassTot*td.cloud().constProps().LDevol()/dt; 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 // 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 // Note: hardcoded gaseous diffusivities for now
// TODO: add to carrier thermo // TODO: add to carrier thermo
const scalar beta = sqr(cbrt(15.0) + cbrt(15.0)); const scalar beta = sqr(cbrt(15.0) + cbrt(15.0));
forAll(dMassDV, i)
{
const label id = composition.localToGlobalCarrierId(GAS, i); const label id = composition.localToGlobalCarrierId(GAS, i);
const scalar Cp = composition.carrier().Cp(id, Ts); const scalar Cp = composition.carrier().Cp(id, Ts);
const scalar W = composition.carrier().W(id); const scalar W = composition.carrier().W(id);
@ -547,12 +564,15 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
// Dab calc'd using API vapour mass diffusivity function // Dab calc'd using API vapour mass diffusivity function
const scalar Dab = const scalar Dab =
3.6059e-3*(pow(1.8*Ts, 1.75))*sqrt(1.0/W + 1.0/Wc)/(this->pc_*beta); 3.6059e-3*(pow(1.8*Ts, 1.75))
*sqrt(1.0/W + 1.0/Wc)
/(this->pc_*beta);
N += Ni; N += Ni;
NCpW += Ni*Cp*W; NCpW += Ni*Cp*W;
Cs[id] += Ni*d/(2.0*Dab); Cs[id] += Ni*d/(2.0*Dab);
} }
}
} }

View File

@ -134,9 +134,9 @@ private:
const label idS const label idS
) const; ) const;
//- Return the mixture effective enthalpy //- Return the mixture effective sensible enthalpy
template<class TrackData> template<class TrackData>
scalar HEff scalar HsEff
( (
TrackData& td, TrackData& td,
const scalar p, const scalar p,

View File

@ -213,9 +213,17 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
sumYiCbrtW += Ys[i]*cbrtW; sumYiCbrtW += Ys[i]*cbrtW;
} }
Cps = max(Cps, ROOTVSMALL);
rhos *= pc_/(specie::RR*T); rhos *= pc_/(specie::RR*T);
rhos = max(rhos, ROOTVSMALL);
mus /= sumYiSqrtW; mus /= sumYiSqrtW;
mus = max(mus, ROOTVSMALL);
kappas /= sumYiCbrtW; kappas /= sumYiCbrtW;
kappas = max(kappas, ROOTVSMALL);
Prs = Cps*mus/kappas; Prs = Cps*mus/kappas;
} }
@ -335,7 +343,9 @@ void Foam::ReactingParcel<ParcelType>::calc
Res = this->Re(U0, d0, rhos, mus); Res = this->Re(U0, d0, rhos, mus);
// Update particle component mass and mass fractions // Update particle component mass and mass fractions
scalar mass1 = updateMassFraction(mass0, dMassPC, Y_); scalarField dMass(dMassPC);
scalar mass1 = updateMassFraction(mass0, dMass, Y_);
// Heat transfer // Heat transfer
@ -390,11 +400,15 @@ void Foam::ReactingParcel<ParcelType>::calc
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (td.cloud().solution().coupled()) if (td.cloud().solution().coupled())
{ {
// Transfer mass lost from particle to carrier mass source // Transfer mass lost to carrier mass and enthalpy sources
forAll(dMassPC, i) forAll(dMass, i)
{ {
scalar dm = np0*dMass[i];
label gid = composition.localToGlobalCarrierId(0, 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 // Update momentum transfer
@ -413,21 +427,27 @@ void Foam::ReactingParcel<ParcelType>::calc
// Remove the particle when mass falls below minimum threshold // 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; td.keepParticle = false;
if (td.cloud().solution().coupled()) if (td.cloud().solution().coupled())
{ {
scalar dm = np0*mass1;
// Absorb parcel into carrier phase // Absorb parcel into carrier phase
forAll(Y_, i) forAll(Y_, i)
{ {
scalar dmi = dm*Y_[i];
label gid = composition.localToGlobalCarrierId(0, i); label gid = composition.localToGlobalCarrierId(0, i);
td.cloud().rhoTrans(gid)[cellI] += np0*mass1*Y_[i]; scalar hs = composition.carrier().Hs(gid, T1);
}
td.cloud().UTrans()[cellI] += np0*mass1*U1;
// 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,25 +534,35 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
// Add to cumulative phase change mass // Add to cumulative phase change mass
td.cloud().addToMassPhaseChange(this->nParticle_*dMassTot); td.cloud().addToMassPhaseChange(this->nParticle_*dMassTot);
// Average molecular weight of carrier mix - assumes perfect gas forAll(dMassPC, i)
const scalar Wc = this->rhoc_*specie::RR*this->Tc_/this->pc_;
forAll(YComponents, i)
{ {
const label idc = composition.localToGlobalCarrierId(idPhase, i); const label idc = composition.localToGlobalCarrierId(idPhase, i);
const label idl = composition.globalIds(idPhase)[i]; const label idl = composition.globalIds(idPhase)[i];
const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, T); const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, T);
Sh -= dMassPC[i]*dh/dt; Sh -= dMassPC[i]*dh/dt;
}
// Update particle surface thermo properties
const scalar Dab = // Update molar emissions
composition.liquids().properties()[idl].D(pc_, Ts, Wc); 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_;
forAll(dMassPC, i)
{
const label idc = composition.localToGlobalCarrierId(idPhase, i);
const label idl = composition.globalIds(idPhase)[i];
const scalar Cp = composition.carrier().Cp(idc, Ts); const scalar Cp = composition.carrier().Cp(idc, Ts);
const scalar W = composition.carrier().W(idc); const scalar W = composition.carrier().W(idc);
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W); 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) // Molar flux of species coming from the particle (kmol/m^2/s)
N += Ni; N += Ni;
@ -542,6 +572,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
// Concentrations of emission species // Concentrations of emission species
Cs[idc] += Ni*d/(2.0*Dab); Cs[idc] += Ni*d/(2.0*Dab);
} }
}
} }

View File

@ -153,7 +153,10 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
mus = td.muInterp().interpolate(this->position(), tetIs)/TRatio; mus = td.muInterp().interpolate(this->position(), tetIs)/TRatio;
Pr = td.cloud().constProps().Pr(); Pr = td.cloud().constProps().Pr();
Pr = max(ROOTVSMALL, Pr);
kappas = Cpc_*mus/Pr; kappas = Cpc_*mus/Pr;
kappas = max(ROOTVSMALL, kappas);
} }

View File

@ -62,7 +62,17 @@ void makeGraph
const word& graphFormat 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
);
} }

View File

@ -1,3 +0,0 @@
datToFoam.C
EXE = $(FOAM_USER_APPBIN)/datToFoam

View File

@ -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;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
MRFSimpleFoam.C
EXE = $(FOAM_USER_APPBIN)/MRFSimpleFoam

View File

@ -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);

View File

@ -47,6 +47,9 @@ FoamFile
nFaces 1600; nFaces 1600;
startFace 101720; startFace 101720;
neighbourPatch cyclic_half1; neighbourPatch cyclic_half1;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
} }
cyclic_half1 cyclic_half1
{ {
@ -54,6 +57,9 @@ FoamFile
nFaces 1600; nFaces 1600;
startFace 103320; startFace 103320;
neighbourPatch cyclic_half0; neighbourPatch cyclic_half0;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
} }
) )

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleSRFFoam; application SRFSimpleFoam;
startFrom startTime; startFrom startTime;

View File

@ -19,7 +19,7 @@ Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( 10 0 0 );
transportModel Newtonian; transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-3; nu nu [ 0 2 -1 0 0 0 0 ] 1e-8;
// ************************************************************************* // // ************************************************************************* //

View File

@ -8,7 +8,7 @@
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format binary;
class polyBoundaryMesh; class polyBoundaryMesh;
location "constant/polyMesh"; location "constant/polyMesh";
object boundary; object boundary;

View File

@ -25,6 +25,8 @@ boundaryField
{ {
type turbulentMixingLengthDissipationRateInlet; type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.01; mixingLength 0.01;
phi phi;
k k;
value uniform 1; value uniform 1;
} }
outlet1 outlet1
@ -45,7 +47,7 @@ boundaryField
Cmu 0.09; Cmu 0.09;
kappa 0.41; kappa 0.41;
E 9.8; E 9.8;
value uniform 0; value uniform 1;
} }
fan_half0 fan_half0
{ {

View File

@ -25,6 +25,8 @@ boundaryField
{ {
type turbulentIntensityKineticEnergyInlet; type turbulentIntensityKineticEnergyInlet;
intensity 0.05; intensity 0.05;
U U;
phi phi;
value uniform 1; value uniform 1;
} }
outlet1 outlet1
@ -42,7 +44,7 @@ boundaryField
baffles baffles
{ {
type kqRWallFunction; type kqRWallFunction;
value uniform 0; value uniform 1;
} }
fan_half0 fan_half0
{ {

View File

@ -8,7 +8,7 @@
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format binary;
class polyBoundaryMesh; class polyBoundaryMesh;
location "constant/polyMesh"; location "constant/polyMesh";
object boundary; object boundary;

View File

@ -21,433 +21,433 @@ FoamFile
{ {
type patch; type patch;
nFaces 320; nFaces 320;
startFace 1027872; startFace 1028059;
} }
inlet inlet
{ {
type patch; type patch;
nFaces 64; nFaces 64;
startFace 1028192; startFace 1028379;
} }
outlet outlet
{ {
type patch; type patch;
nFaces 64; nFaces 64;
startFace 1028256; startFace 1028443;
} }
lowerWall lowerWall
{ {
type wall; type wall;
nFaces 5330; nFaces 5330;
startFace 1028320; startFace 1028507;
} }
upperWall upperWall
{ {
type patch; type patch;
nFaces 160; nFaces 160;
startFace 1033650; startFace 1033837;
} }
motorBike_frt-fairing:001%1 motorBike_frt-fairing:001%1
{ {
type wall; type wall;
nFaces 5416; nFaces 5410;
startFace 1033810; startFace 1033997;
} }
motorBike_windshield:002%2 motorBike_windshield:002%2
{ {
type wall; type wall;
nFaces 50; nFaces 50;
startFace 1039226; startFace 1039407;
} }
motorBike_rr-wh-rim:005%5 motorBike_rr-wh-rim:005%5
{ {
type wall; type wall;
nFaces 137; nFaces 136;
startFace 1039276; startFace 1039457;
} }
motorBike_rr-wh-rim:010%10 motorBike_rr-wh-rim:010%10
{ {
type wall; type wall;
nFaces 340; nFaces 340;
startFace 1039413; startFace 1039593;
} }
motorBike_fr-wh-rim:011%11 motorBike_fr-wh-rim:011%11
{ {
type wall; type wall;
nFaces 473; nFaces 473;
startFace 1039753; startFace 1039933;
} }
motorBike_fr-wh-brake-disk:012%12 motorBike_fr-wh-brake-disk:012%12
{ {
type wall; type wall;
nFaces 54; nFaces 54;
startFace 1040226; startFace 1040406;
} }
motorBike_frame:016-shadow%13 motorBike_frame:016-shadow%13
{ {
type wall; type wall;
nFaces 98; nFaces 98;
startFace 1040280; startFace 1040460;
} }
motorBike_rear-susp:014%14 motorBike_rear-susp:014%14
{ {
type wall; type wall;
nFaces 844; nFaces 847;
startFace 1040378; startFace 1040558;
} }
motorBike_rear-susp:014-shadow%15 motorBike_rear-susp:014-shadow%15
{ {
type wall; type wall;
nFaces 461; nFaces 462;
startFace 1041222; startFace 1041405;
} }
motorBike_frame:016%16 motorBike_frame:016%16
{ {
type wall; type wall;
nFaces 67; nFaces 64;
startFace 1041683; startFace 1041867;
} }
motorBike_rr-wh-rim:005-shadow%17 motorBike_rr-wh-rim:005-shadow%17
{ {
type wall; type wall;
nFaces 70; nFaces 70;
startFace 1041750; startFace 1041931;
} }
motorBike_rr-wh-chain-hub:022%22 motorBike_rr-wh-chain-hub:022%22
{ {
type wall; type wall;
nFaces 141; nFaces 141;
startFace 1041820; startFace 1042001;
} }
motorBike_rearseat%24 motorBike_rearseat%24
{ {
type wall; type wall;
nFaces 430; nFaces 430;
startFace 1041961; startFace 1042142;
} }
motorBike_frt-fairing%25 motorBike_frt-fairing%25
{ {
type wall; type wall;
nFaces 626; nFaces 626;
startFace 1042391; startFace 1042572;
} }
motorBike_windshield%26 motorBike_windshield%26
{ {
type wall; type wall;
nFaces 368; nFaces 379;
startFace 1043017; startFace 1043198;
} }
motorBike_headlights%27 motorBike_headlights%27
{ {
type wall; type wall;
nFaces 161; nFaces 161;
startFace 1043385; startFace 1043577;
} }
motorBike_driversseat%28 motorBike_driversseat%28
{ {
type wall; type wall;
nFaces 368; nFaces 368;
startFace 1043546; startFace 1043738;
} }
motorBike_rear-body%29 motorBike_rear-body%29
{ {
type wall; type wall;
nFaces 2077; nFaces 2077;
startFace 1043914; startFace 1044106;
} }
motorBike_fuel-tank%30 motorBike_fuel-tank%30
{ {
type wall; type wall;
nFaces 912; nFaces 912;
startFace 1045991; startFace 1046183;
} }
motorBike_exhaust%31 motorBike_exhaust%31
{ {
type wall; type wall;
nFaces 2392; nFaces 2392;
startFace 1046903; startFace 1047095;
} }
motorBike_rr-wh-rim%32 motorBike_rr-wh-rim%32
{ {
type wall; type wall;
nFaces 1430; nFaces 1430;
startFace 1049295; startFace 1049487;
} }
motorBike_fr-mud-guard%33 motorBike_fr-mud-guard%33
{ {
type wall; type wall;
nFaces 624; nFaces 634;
startFace 1050725; startFace 1050917;
} }
motorBike_fr-wh-rim%34 motorBike_fr-wh-rim%34
{ {
type wall; type wall;
nFaces 591; nFaces 591;
startFace 1051349; startFace 1051551;
} }
motorBike_fr-wh-brake-disk%35 motorBike_fr-wh-brake-disk%35
{ {
type wall; type wall;
nFaces 427; nFaces 426;
startFace 1051940; startFace 1052142;
} }
motorBike_fr-brake-caliper%36 motorBike_fr-brake-caliper%36
{ {
type wall; type wall;
nFaces 164; nFaces 164;
startFace 1052367; startFace 1052568;
} }
motorBike_fr-wh-tyre%37 motorBike_fr-wh-tyre%37
{ {
type wall; type wall;
nFaces 1116; nFaces 1116;
startFace 1052531; startFace 1052732;
} }
motorBike_hbars%38 motorBike_hbars%38
{ {
type wall; type wall;
nFaces 535; nFaces 535;
startFace 1053647; startFace 1053848;
} }
motorBike_fr-forks%39 motorBike_fr-forks%39
{ {
type wall; type wall;
nFaces 1140; nFaces 1140;
startFace 1054182; startFace 1054383;
} }
motorBike_chain%40 motorBike_chain%40
{ {
type wall; type wall;
nFaces 474; nFaces 474;
startFace 1055322; startFace 1055523;
} }
motorBike_rr-wh-tyre%41 motorBike_rr-wh-tyre%41
{ {
type wall; type wall;
nFaces 1787; nFaces 1787;
startFace 1055796; startFace 1055997;
} }
motorBike_square-dial%42 motorBike_square-dial%42
{ {
type wall; type wall;
nFaces 6; nFaces 6;
startFace 1057583; startFace 1057784;
} }
motorBike_round-dial%43 motorBike_round-dial%43
{ {
type wall; type wall;
nFaces 17; nFaces 17;
startFace 1057589; startFace 1057790;
} }
motorBike_dial-holder%44 motorBike_dial-holder%44
{ {
type wall; type wall;
nFaces 87; nFaces 87;
startFace 1057606; startFace 1057807;
} }
motorBike_rear-susp%45 motorBike_rear-susp%45
{ {
type wall; type wall;
nFaces 1786; nFaces 1786;
startFace 1057693; startFace 1057894;
} }
motorBike_rear-brake-lights%46 motorBike_rear-brake-lights%46
{ {
type wall; type wall;
nFaces 53; nFaces 53;
startFace 1059479; startFace 1059680;
} }
motorBike_rear-light-bracket%47 motorBike_rear-light-bracket%47
{ {
type wall; type wall;
nFaces 163; nFaces 163;
startFace 1059532; startFace 1059733;
} }
motorBike_frame%48 motorBike_frame%48
{ {
type wall; type wall;
nFaces 2040; nFaces 2040;
startFace 1059695; startFace 1059896;
} }
motorBike_rear-mud-guard%49 motorBike_rear-mud-guard%49
{ {
type wall; type wall;
nFaces 663; nFaces 660;
startFace 1061735; startFace 1061936;
} }
motorBike_rear-susp-spring-damp%50 motorBike_rear-susp-spring-damp%50
{ {
type wall; type wall;
nFaces 107; nFaces 107;
startFace 1062398; startFace 1062596;
} }
motorBike_fairing-inner-plate%51 motorBike_fairing-inner-plate%51
{ {
type wall; type wall;
nFaces 445; nFaces 445;
startFace 1062505; startFace 1062703;
} }
motorBike_clutch-housing%52 motorBike_clutch-housing%52
{ {
type wall; type wall;
nFaces 970; nFaces 970;
startFace 1062950; startFace 1063148;
} }
motorBike_radiator%53 motorBike_radiator%53
{ {
type wall; type wall;
nFaces 39; nFaces 40;
startFace 1063920; startFace 1064118;
} }
motorBike_water-pipe%54 motorBike_water-pipe%54
{ {
type wall; type wall;
nFaces 104; nFaces 104;
startFace 1063959; startFace 1064158;
} }
motorBike_water-pump%55 motorBike_water-pump%55
{ {
type wall; type wall;
nFaces 74; nFaces 74;
startFace 1064063; startFace 1064262;
} }
motorBike_engine%56 motorBike_engine%56
{ {
type wall; type wall;
nFaces 2389; nFaces 2389;
startFace 1064137; startFace 1064336;
} }
motorBike_rear-shock-link%57 motorBike_rear-shock-link%57
{ {
type wall; type wall;
nFaces 26; nFaces 25;
startFace 1066526; startFace 1066725;
} }
motorBike_rear-brake-fluid-pot-bracket%58 motorBike_rear-brake-fluid-pot-bracket%58
{ {
type wall; type wall;
nFaces 44; nFaces 46;
startFace 1066552; startFace 1066750;
} }
motorBike_rear-brake-fluid-pot%59 motorBike_rear-brake-fluid-pot%59
{ {
type wall; type wall;
nFaces 53; nFaces 53;
startFace 1066596; startFace 1066796;
} }
motorBike_footpeg%60 motorBike_footpeg%60
{ {
type wall; type wall;
nFaces 86; nFaces 86;
startFace 1066649; startFace 1066849;
} }
motorBike_rr-wh-chain-hub%61 motorBike_rr-wh-chain-hub%61
{ {
type wall; type wall;
nFaces 122; nFaces 122;
startFace 1066735; startFace 1066935;
} }
motorBike_rear-brake-caliper%62 motorBike_rear-brake-caliper%62
{ {
type wall; type wall;
nFaces 142; nFaces 142;
startFace 1066857; startFace 1067057;
} }
motorBike_rider-helmet%65 motorBike_rider-helmet%65
{ {
type wall; type wall;
nFaces 583; nFaces 583;
startFace 1066999; startFace 1067199;
} }
motorBike_rider-visor%66 motorBike_rider-visor%66
{ {
type wall; type wall;
nFaces 95; nFaces 95;
startFace 1067582; startFace 1067782;
} }
motorBike_rider-boots%67 motorBike_rider-boots%67
{ {
type wall; type wall;
nFaces 1025; nFaces 1025;
startFace 1067677; startFace 1067877;
} }
motorBike_rider-gloves%68 motorBike_rider-gloves%68
{ {
type wall; type wall;
nFaces 319; nFaces 319;
startFace 1068702; startFace 1068902;
} }
motorBike_rider-body%69 motorBike_rider-body%69
{ {
type wall; type wall;
nFaces 4555; nFaces 4555;
startFace 1069021; startFace 1069221;
} }
motorBike_frame:0%70 motorBike_frame:0%70
{ {
type wall; type wall;
nFaces 37; nFaces 37;
startFace 1073576; startFace 1073776;
} }
motorBike_frt-fairing:001-shadow%74 motorBike_frt-fairing:001-shadow%74
{ {
type wall; type wall;
nFaces 3317; nFaces 3329;
startFace 1073613; startFace 1073813;
} }
motorBike_windshield-shadow%75 motorBike_windshield-shadow%75
{ {
type wall; type wall;
nFaces 236; nFaces 237;
startFace 1076930; startFace 1077142;
} }
motorBike_fr-mud-guard-shadow%81 motorBike_fr-mud-guard-shadow%81
{ {
type wall; type wall;
nFaces 350; nFaces 348;
startFace 1077166; startFace 1077379;
} }
motorBike_fr-wh-brake-disk-shadow%83 motorBike_fr-wh-brake-disk-shadow%83
{ {
type wall; type wall;
nFaces 186; nFaces 187;
startFace 1077516; startFace 1077727;
} }
motorBike_rear-mud-guard-shadow%84 motorBike_rear-mud-guard-shadow%84
{ {
type wall; type wall;
nFaces 388; nFaces 394;
startFace 1077702; startFace 1077914;
} }
motorBike_rear-susp-spring-damp-shadow%85 motorBike_rear-susp-spring-damp-shadow%85
{ {
type wall; type wall;
nFaces 41; nFaces 41;
startFace 1078090; startFace 1078308;
} }
motorBike_radiator-shadow%86 motorBike_radiator-shadow%86
{ {
type wall; type wall;
nFaces 22; nFaces 20;
startFace 1078131; startFace 1078349;
} }
motorBike_rear-shock-link-shadow%87 motorBike_rear-shock-link-shadow%87
{ {
type wall; type wall;
nFaces 9; nFaces 10;
startFace 1078153; startFace 1078369;
} }
motorBike_rear-brake-fluid-pot-bracket-shadow%88 motorBike_rear-brake-fluid-pot-bracket-shadow%88
{ {
type wall; type wall;
nFaces 22; nFaces 20;
startFace 1078162; startFace 1078379;
} }
motorBike_rr-wh-chain-hub-shadow%89 motorBike_rr-wh-chain-hub-shadow%89
{ {
type wall; type wall;
nFaces 53; nFaces 53;
startFace 1078184; startFace 1078399;
} }
) )

View File

@ -1,3 +0,0 @@
simpleSRFFoam.C
EXE = $(FOAM_USER_APPBIN)/simpleSRFFoam

View File

@ -1,9 +0,0 @@
// check convergence
if (maxResidual < convergenceCriterion)
{
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
runTime.writeAndEnd();
Info<< "latestTime = " << runTime.timeName() << endl;
}

View File

@ -1,7 +0,0 @@
// initialize values for convergence checks
scalar eqnResidual = 1, maxResidual = 0;
scalar convergenceCriterion = 0;
simple.readIfPresent("convergence", convergenceCriterion);

View File

@ -1,3 +0,0 @@
simpleWindFoam.C
EXE = $(FOAM_APPBIN)/simpleWindFoam

View File

@ -1,6 +0,0 @@
if (maxResidual < convergenceCriterion)
{
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
runTime.writeAndEnd();
Info<< "latestTime = " << runTime.timeName() << endl;
}

View File

@ -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);

View File

@ -50,7 +50,7 @@ FoamFile
terrain_patch0 terrain_patch0
{ {
type wall; type wall;
nFaces 18201; nFaces 16037;
startFace 369404; startFace 369404;
} }
) )

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleWindFoam; application windSimpleFoam;
startFrom latestTime; startFrom latestTime;

View File

@ -1,3 +0,0 @@
rhoPisoTwinParcelFoam.C
EXE = $(FOAM_USER_APPBIN)/rhoPisoTwinParcelFoam

View File

@ -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

View File

@ -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));
}

View File

@ -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
);

View File

@ -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)
);

View File

@ -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();
}

View File

@ -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);

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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