Moved buoyantSimpleRadiationFoam from tutorials to applications/solvers/heatTransfer

This commit is contained in:
andy
2008-05-13 12:56:43 +01:00
parent 95528af671
commit d9b16477e1
9 changed files with 0 additions and 4 deletions

View File

@ -7,8 +7,6 @@ cases="hotRadiationRoom"
tutorialPath=`dirname $0`/..
. $tutorialPath/CleanFunctions
wclean $application
for case in $cases
do
cleanCase $case

View File

@ -7,8 +7,6 @@ cases="hotRadiationRoom"
tutorialPath=`dirname $0`/..
. $tutorialPath/RunFunctions
compileApplication $currDir $application
for case in $cases
do
runApplication blockMesh $case

View File

@ -1,4 +0,0 @@
buoyantSimpleRadiationFoam.C
EXE = $(FOAM_USER_APPBIN)/buoyantSimpleRadiationFoam

View File

@ -1,14 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/turbulenceModels
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lbasicThermophysicalModels \
-lspecie \
-lradiation \
-lcompressibleTurbulenceModels

View File

@ -1,12 +0,0 @@
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi), U)
+ turbulence->divDevRhoReff(U)
);
UEqn().relax();
solve(UEqn() == -fvc::grad(pd) - fvc::grad(rho)*gh);

View File

@ -1,89 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
buoyantSimpleRadiationFoam
Description
Steady-state solver for buoyant, turbulent flow of compressible fluids,
including radiation, for ventilation and heat-transfer.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "compressible/turbulenceModel/turbulenceModel.H"
#include "fixedGradientFvPatchFields.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "readEnvironmentalProperties.H"
# include "createFields.H"
# include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readSIMPLEControls.H"
pd.storePrevIter();
rho.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
# include "UEqn.H"
# include "hEqn.H"
# include "pEqn.H"
}
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,93 +0,0 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicThermo> thermo
(
basicThermo::New(mesh)
);
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
thermo->rho()
);
volScalarField& p = thermo->p();
volScalarField& h = thermo->h();
const volScalarField& T = thermo->T();
Info<< "Reading 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<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
dimensionedScalar pRef("pRef", p.dimensions(), 1.0e5);
Info<< "Creating field pd\n" << endl;
volScalarField pd
(
IOobject
(
"pd",
runTime.timeName(),
mesh
),
p - rho*gh - pRef,
p.boundaryField().types()
);
label pdRefCell = 0;
scalar pdRefValue = 0.0;
setRefCell
(
pd,
mesh.solutionDict().subDict("SIMPLE"),
pdRefCell,
pdRefValue
);
Info<< "Creating radiation model\n" << endl;
autoPtr<radiation::radiationModel> radiation
(
radiation::radiationModel::New(T)
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);

View File

@ -1,20 +0,0 @@
{
fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
- p*fvc::div(phi/fvc::interpolate(rho))
+ radiation->Sh(thermo())
);
hEqn.relax();
hEqn.solve();
thermo->correct();
radiation->correct();
}

View File

@ -1,47 +0,0 @@
pd.boundaryField() ==
p.boundaryField() - rho.boundaryField()*gh.boundaryField() - pRef.value();
volScalarField rUA = 1.0/UEqn().A();
U = rUA*UEqn().H();
UEqn.clear();
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p);
phi -= fvc::interpolate(rho*gh*rUA)*fvc::snGrad(rho)*mesh.magSf();
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pdEqn
(
fvm::laplacian(rho*rUA, pd) == fvc::div(phi)
);
pdEqn.setReference(pdRefCell, pdRefValue);
pdEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pdEqn.flux();
}
}
#include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector
pd.relax();
p = pd + rho*gh + pRef;
U -= rUA*(fvc::grad(pd) + fvc::grad(rho)*gh);
U.correctBoundaryConditions();
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
}
rho = thermo->rho();
rho.relax();
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;