mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -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
|
||||
@ -445,6 +445,13 @@ void Foam::porousZone::writeDict(Ostream& os, bool subDict) const
|
||||
dictPtr->write(os);
|
||||
}
|
||||
|
||||
// thermalModel
|
||||
if (const dictionary* dictPtr = dict_.subDictPtr("thermalModel"))
|
||||
{
|
||||
os << indent << "thermalModel";
|
||||
dictPtr->write(os);
|
||||
}
|
||||
|
||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -114,6 +114,8 @@ void Foam::regionModels::regionModel1D::initialise()
|
||||
boundaryFaceCells_[localPyrolysisFaceI].transfer(cellIDs);
|
||||
|
||||
localPyrolysisFaceI++;
|
||||
|
||||
nLayers_ = nCells;
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,6 +268,7 @@ Foam::regionModels::regionModel1D::regionModel1D(const fvMesh& mesh)
|
||||
boundaryFaceFaces_(),
|
||||
boundaryFaceCells_(),
|
||||
boundaryFaceOppositeFace_(),
|
||||
nLayers_(0),
|
||||
nMagSfPtr_(NULL),
|
||||
moveMesh_(false)
|
||||
{}
|
||||
@ -283,6 +286,7 @@ Foam::regionModels::regionModel1D::regionModel1D
|
||||
boundaryFaceFaces_(regionMesh().nCells()),
|
||||
boundaryFaceCells_(regionMesh().nCells()),
|
||||
boundaryFaceOppositeFace_(regionMesh().nCells()),
|
||||
nLayers_(0),
|
||||
nMagSfPtr_(NULL),
|
||||
moveMesh_(true)
|
||||
{
|
||||
|
||||
@ -88,6 +88,9 @@ protected:
|
||||
//- Global boundary face IDs oppossite coupled patch
|
||||
labelList boundaryFaceOppositeFace_;
|
||||
|
||||
//- Number of layers in the region
|
||||
label nLayers_;
|
||||
|
||||
|
||||
// Geometry
|
||||
|
||||
@ -115,7 +118,7 @@ protected:
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionModel");
|
||||
TypeName("regionModel1D");
|
||||
|
||||
|
||||
// Constructors
|
||||
@ -152,6 +155,9 @@ public:
|
||||
//- Return the global boundary face IDs oppossite coupled patch
|
||||
inline const labelList& boundaryFaceOppositeFace() const;
|
||||
|
||||
//- Return the number of layers in the region
|
||||
inline label nLayers() const;
|
||||
|
||||
|
||||
// Geometry
|
||||
|
||||
|
||||
@ -49,6 +49,12 @@ Foam::regionModels::regionModel1D::boundaryFaceOppositeFace() const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::label Foam::regionModels::regionModel1D::nLayers() const
|
||||
{
|
||||
return nLayers_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::surfaceScalarField&
|
||||
Foam::regionModels::regionModel1D::nMagSf() const
|
||||
{
|
||||
|
||||
@ -197,7 +197,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
|
||||
1.0/constant::mathematical::pi*omega_
|
||||
*(
|
||||
k*blackBody_.bLambda(lambdaI)
|
||||
+ absorptionEmission_.ECont(lambdaI)
|
||||
+ absorptionEmission_.ECont(lambdaI)/4
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,8 +51,8 @@ namespace porousMedia
|
||||
|
||||
Foam::porousMedia::fixedTemperature::fixedTemperature(const porousZone& pZone)
|
||||
:
|
||||
thermalModel(pZone, typeName),
|
||||
T_(readScalar(coeffDict_.lookup("T")))
|
||||
thermalModel(pZone),
|
||||
T_(readScalar(thermalCoeffs_.lookup("T")))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,7 +33,6 @@ Description
|
||||
#define fixedTemperature_H
|
||||
|
||||
#include "thermalModel.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -81,7 +80,7 @@ public:
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnthalpySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,7 +33,6 @@ Description
|
||||
#define noThermalModel_H
|
||||
|
||||
#include "thermalModel.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -73,7 +72,7 @@ public:
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnthalpySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,18 +42,18 @@ namespace porousMedia
|
||||
Foam::porousMedia::thermalModel::thermalModel(const porousZone& pZone)
|
||||
:
|
||||
pZone_(pZone),
|
||||
coeffDict_(dictionary::null)
|
||||
thermalCoeffs_(pZone.dict().subDictPtr("thermalModel"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::porousMedia::thermalModel::thermalModel
|
||||
(
|
||||
const porousZone& pZone,
|
||||
const word& modelType
|
||||
const dictionary& thermalCoeffs
|
||||
)
|
||||
:
|
||||
pZone_(pZone),
|
||||
coeffDict_(pZone_.dict().subDict(modelType + "Coeffs"))
|
||||
thermalCoeffs_(thermalCoeffs)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,8 +63,8 @@ protected:
|
||||
//- Reference to the porous zone
|
||||
const porousZone& pZone_;
|
||||
|
||||
//- Sub-model coefficients dictionary
|
||||
const dictionary coeffDict_;
|
||||
//- Thermal model coefficients dictionary
|
||||
const dictionary thermalCoeffs_;
|
||||
|
||||
|
||||
public:
|
||||
@ -87,11 +87,11 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null from porous zone
|
||||
//- Construct from porous zone, coefficients from "thermalModel" entry
|
||||
thermalModel(const porousZone&);
|
||||
|
||||
//- Construct from porous zone and model type name
|
||||
thermalModel(const porousZone&, const word& modelType);
|
||||
//- Construct from porous zone and thermal model coefficients
|
||||
thermalModel(const porousZone&, const dictionary& thermalCoeffs);
|
||||
|
||||
|
||||
//- Destructor
|
||||
@ -107,7 +107,7 @@ public:
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnthalpySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const = 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,7 +33,13 @@ Foam::porousMedia::thermalModel::New
|
||||
const porousZone& pZone
|
||||
)
|
||||
{
|
||||
const word modelType(pZone.dict().lookup("thermalModel"));
|
||||
// a missing thermalModel is the same as type "none"
|
||||
word modelType("none");
|
||||
|
||||
if (const dictionary* dictPtr = pZone.dict().subDictPtr("thermalModel"))
|
||||
{
|
||||
dictPtr->lookup("type") >> modelType;
|
||||
}
|
||||
|
||||
Info<< "Selecting thermalModel " << modelType << endl;
|
||||
|
||||
|
||||
@ -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) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,7 +51,10 @@ void Foam::thermalPorousZone::addEnthalpySource
|
||||
fvScalarMatrix& hEqn
|
||||
) const
|
||||
{
|
||||
model_->addEnthalpySource(thermo, rho, hEqn);
|
||||
if (model_.valid())
|
||||
{
|
||||
model_->addEnthalpySource(thermo, rho, hEqn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -127,7 +127,7 @@ public:
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
void addEnthalpySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,7 +32,8 @@ Description
|
||||
thermalPorousZone.
|
||||
|
||||
The input file \c constant/thermalPorousZone is implemented as
|
||||
IOPtrList\<thermalPorousZone\> and contains the following type of data:
|
||||
IOPtrList\<thermalPorousZone\> (but written as a dictionary)
|
||||
and contains the following type of data:
|
||||
|
||||
\verbatim
|
||||
1
|
||||
@ -94,7 +95,7 @@ public:
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
void addEnthalpySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
|
||||
Reference in New Issue
Block a user