tutorial solver and case updates

This commit is contained in:
andy
2009-06-23 18:31:36 +01:00
parent 8d70babf13
commit 784c4b8261
13 changed files with 142 additions and 109 deletions

View File

@ -4,9 +4,10 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-llagrangian \ -llagrangian \
@ -15,7 +16,7 @@ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lcombustionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-lradiation \ -lradiation \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -4,8 +4,8 @@
+ fvm::div(phi, U) + fvm::div(phi, U)
+ turbulence->divDevRhoReff(U) + turbulence->divDevRhoReff(U)
== ==
thermoCloud1.SU1() thermoCloud1.SU()
+ kinematicCloud1.SU1() + kinematicCloud1.SU()
+ rho.dimensionedInternalField()*g + rho.dimensionedInternalField()*g
); );

View File

@ -5,7 +5,7 @@
rho, rho,
U, U,
g, g,
thermo() thermo
); );
Info<< "Constructing kinematicCloud1" << endl; Info<< "Constructing kinematicCloud1" << endl;
@ -14,7 +14,7 @@
"kinematicCloud1", "kinematicCloud1",
rho, rho,
U, U,
thermo().mu(), thermo.mu(),
g g
); );

View File

@ -1,13 +1,14 @@
Info<< "Reading thermophysical properties\n" << endl; Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicThermo> thermo autoPtr<basicPsiThermo> pThermo
( (
basicThermo::New(mesh) basicPsiThermo::New(mesh)
); );
basicPsiThermo& thermo = pThermo();
volScalarField& p = thermo->p(); volScalarField& p = thermo.p();
volScalarField& h = thermo->h(); volScalarField& h = thermo.h();
const volScalarField& psi = thermo->psi(); const volScalarField& psi = thermo.psi();
volScalarField rho volScalarField rho
( (
@ -19,7 +20,7 @@
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
thermo->rho() thermo.rho()
); );
Info<< "\nReading field U\n" << endl; Info<< "\nReading field U\n" << endl;
@ -48,7 +49,7 @@
rho, rho,
U, U,
phi, phi,
thermo() thermo
) )
); );

View File

@ -6,12 +6,12 @@
- fvm::laplacian(turbulence->alphaEff(), h) - fvm::laplacian(turbulence->alphaEff(), h)
== ==
DpDt DpDt
+ thermoCloud1.Sh1() + thermoCloud1.Sh()
); );
hEqn.relax(); hEqn.relax();
hEqn.solve(); hEqn.solve();
thermo->correct(); thermo.correct();
} }

View File

@ -1,4 +1,4 @@
rho = thermo->rho(); rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A(); volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H(); U = rUA*UEqn.H();
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid surfaceScalarField phid
( (
"phid", "phid",
fvc::interpolate(thermo->psi()) fvc::interpolate(psi)
*( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi) + fvc::ddtPhiCorr(rUA, rho, U, phi)
@ -35,8 +35,8 @@ if (transonic)
else else
{ {
phi = phi =
fvc::interpolate(rho)* fvc::interpolate(rho)
( *(
(fvc::interpolate(U) & mesh.Sf()) (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi) + fvc::ddtPhiCorr(rUA, rho, U, phi)
); );

View File

@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "basicThermo.H" #include "basicPsiThermo.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "basicThermoCloud.H" #include "basicThermoCloud.H"
@ -41,62 +41,59 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H"
# include "setRootCase.H" #include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "createFields.H"
#include "createClouds.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
# include "createTime.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "createMesh.H"
# include "readEnvironmentalProperties.H"
# include "createFields.H"
# include "createClouds.H"
# include "readPISOControls.H"
# include "initContinuityErrs.H"
# include "readTimeControls.H"
# include "compressibleCourantNo.H"
# include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
while (runTime.run()) while (runTime.run())
{ {
# include "readTimeControls.H" #include "readTimeControls.H"
# include "readPISOControls.H" #include "readPISOControls.H"
# include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
# include "setDeltaT.H" #include "setDeltaT.H"
runTime++; runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
Info<< "Evolving thermoCloud1" << endl;
thermoCloud1.evolve(); thermoCloud1.evolve();
thermoCloud1.info(); thermoCloud1.info();
Info<< "Evolving kinematicCloud1" << endl;
kinematicCloud1.evolve(); kinematicCloud1.evolve();
kinematicCloud1.info(); kinematicCloud1.info();
# include "rhoEqn.H" #include "rhoEqn.H"
// --- PIMPLE loop // --- PIMPLE loop
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++) for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
{ {
# include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- PISO loop
for (int corr=1; corr<=nCorr; corr++) for (int corr=1; corr<=nCorr; corr++)
{ {
# include "hEqn.H" #include "hEqn.H"
# include "pEqn.H" #include "pEqn.H"
} }
} }
turbulence->correct(); turbulence->correct();
rho = thermo->rho(); rho = thermo.rho();
runTime.write(); runTime.write();

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,6 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object epsilon; object epsilon;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -22,28 +23,28 @@ boundaryField
{ {
top top
{ {
type zeroGradient; type compressible::epsilonWallFunction;
value uniform 5390.5;
} }
bottom bottom
{ {
type zeroGradient; type compressible::epsilonWallFunction;
value uniform 5390.5;
} }
walls walls
{ {
type zeroGradient; type compressible::epsilonWallFunction;
value uniform 5390.5;
} }
symmetry symmetry
{ {
type symmetryPlane; type symmetryPlane;
} }
frontAndBack frontAndBack
{ {
type empty; type empty;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,6 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object k; object k;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -22,28 +23,28 @@ boundaryField
{ {
top top
{ {
type zeroGradient; type compressible::kQRWallFunction;
value uniform 37.5;
} }
bottom bottom
{ {
type zeroGradient; type compressible::kQRWallFunction;
value uniform 37.5;
} }
walls walls
{ {
type zeroGradient; type compressible::kQRWallFunction;
value uniform 37.5;
} }
symmetry symmetry
{ {
type symmetryPlane; type symmetryPlane;
} }
frontAndBack frontAndBack
{ {
type empty; type empty;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -21,20 +21,27 @@ DragModel SphereDrag;
DispersionModel StochasticDispersionRAS; DispersionModel StochasticDispersionRAS;
WallInteractionModel StandardWallInteraction; PatchInteractionModel StandardWallInteraction;
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15; PostProcessingModel none;
rho0 rho0 [ 1 -3 0 0 0 ] 5000;
coupled true; coupled true;
cellValueSourceCorrection on;
parcelTypeId 2; parcelTypeId 2;
constantProperties
{
rhoMin rhoMin [ 1 -3 0 0 0 ] 1e-15;
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15;
rho0 rho0 [ 1 -3 0 0 0 ] 5000;
}
interpolationSchemes interpolationSchemes
{ {
rho cell; rho cell;
U cellPointFace; U cellPoint;
mu cell; mu cell;
} }
@ -43,12 +50,21 @@ integrationSchemes
U Euler; U Euler;
} }
particleForces
{
gravity on;
virtualMass off;
Cvm 0.5;
pressureGradient off;
gradU gradU;
}
ManualInjectionCoeffs ManualInjectionCoeffs
{ {
parcelBasisType mass;
massTotal massTotal [ 1 0 0 0 0 ] 0.0002; massTotal massTotal [ 1 0 0 0 0 ] 0.0002;
parcelBasisType mass;
SOI 0; SOI 0;
positionsFile kinematicCloud1Positions; positionsFile "kinematicCloud1Positions";
U0 ( 0 0 0 ); U0 ( 0 0 0 );
parcelPDF parcelPDF
{ {
@ -70,29 +86,10 @@ ConeInjectionCoeffs
position ( 0.25 0.25 0.05 ); position ( 0.25 0.25 0.05 );
direction ( 0 -1 0 ); direction ( 0 -1 0 );
parcelsPerSecond 10000; parcelsPerSecond 10000;
volumeFlowRate Constant; volumeFlowRate Constant 0.01;
volumeFlowRateCoeffs Umag Constant 50;
{ thetaInner Constant 0;
value 0.01; thetaOuter Constant 30;
}
Umag Constant;
UmagCoeffs
{
value 50;
}
thetaInner Constant;
thetaInnerCoeffs
{
value 0;
}
thetaOuter Constant;
thetaOuterCoeffs
{
value 30;
}
parcelPDF parcelPDF
{ {

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,6 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class polyBoundaryMesh; class polyBoundaryMesh;
location "constant/polyMesh";
object boundary; object boundary;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -21,33 +21,37 @@ DragModel SphereDrag;
DispersionModel StochasticDispersionRAS; DispersionModel StochasticDispersionRAS;
WallInteractionModel StandardWallInteraction; PatchInteractionModel StandardWallInteraction;
HeatTransferModel RanzMarshall; HeatTransferModel RanzMarshall;
PostProcessingModel none;
radiation off; radiation off;
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15;
rho0 rho0 [ 1 -3 0 0 0 ] 2500;
T0 T0 [ 0 0 0 1 0 ] 300;
cp0 cp0 [ 0 2 -2 -1 0 ] 900;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5;
coupled true; coupled true;
cellValueSourceCorrection on;
parcelTypeId 1; parcelTypeId 1;
constantProperties
{
rhoMin rhoMin [ 1 -3 0 0 0 ] 1e-15;
TMin TMin [ 0 0 0 1 0 ] 200;
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15;
rho0 rho0 [ 1 -3 0 0 0 ] 2500;
T0 T0 [ 0 0 0 1 0 ] 300;
cp0 cp0 [ 0 2 -2 -1 0 ] 900;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5;
}
interpolationSchemes interpolationSchemes
{ {
rho cell; rho cell;
U cellPointFace;
mu cell; mu cell;
U cellPoint;
T cell; T cell;
Cp cell; Cp cell;
} }
@ -58,12 +62,21 @@ integrationSchemes
T Analytical; T Analytical;
} }
particleForces
{
gravity on;
virtualMass off;
Cvm 0.5;
pressureGradient off;
gradU gradU;
}
ManualInjectionCoeffs ManualInjectionCoeffs
{ {
massTotal massTotal [ 1 0 0 0 0 ] 0.0001; massTotal massTotal [ 1 0 0 0 0 ] 0.0001;
parcelBasisType mass; parcelBasisType mass;
SOI 0; SOI 0;
positionsFile thermoCloud1Positions; positionsFile "thermoCloud1Positions";
U0 ( 0 0 0 ); U0 ( 0 0 0 );
parcelPDF parcelPDF
{ {

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RASModel;
// ************************************************************************* //