Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry
2011-04-05 14:54:21 +01:00
69 changed files with 286 additions and 86 deletions

View File

@ -62,7 +62,7 @@ foamInstall=$HOME/$WM_PROJECT
foamCompiler=system foamCompiler=system
#- Compiler: #- Compiler:
# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc) # WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc)
export WM_COMPILER=Gcc export WM_COMPILER=Gcc
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH

View File

@ -61,7 +61,7 @@ if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
set foamCompiler=system set foamCompiler=system
#- Compiler: #- Compiler:
# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc) # WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc)
setenv WM_COMPILER Gcc setenv WM_COMPILER Gcc
setenv WM_COMPILER_ARCH # defined but empty setenv WM_COMPILER_ARCH # defined but empty
unsetenv WM_COMPILER_LIB_ARCH unsetenv WM_COMPILER_LIB_ARCH

View File

@ -207,6 +207,13 @@ case ThirdParty:
set gmp_version=gmp-5.0.1 set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2 set mpfr_version=mpfr-2.4.2
breaksw breaksw
case Gcc46:
case Gcc46++0x:
set gcc_version=gcc-4.6.0
set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2
set mpc_version=mpc-0.8.1
breaksw
case Gcc45: case Gcc45:
case Gcc45++0x: case Gcc45++0x:
set gcc_version=gcc-4.5.2 set gcc_version=gcc-4.5.2

View File

@ -227,6 +227,12 @@ OpenFOAM | ThirdParty)
gmp_version=gmp-5.0.1 gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2 mpfr_version=mpfr-2.4.2
;; ;;
Gcc46 | Gcc46++0x)
gcc_version=gcc-4.6.0
gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2
mpc_version=mpc-0.8.1
;;
Gcc45 | Gcc45++0x) Gcc45 | Gcc45++0x)
gcc_version=gcc-4.5.2 gcc_version=gcc-4.5.2
gmp_version=gmp-5.0.1 gmp_version=gmp-5.0.1

View File

@ -126,7 +126,7 @@ Foam::treeDataCell::treeDataCell
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::pointField Foam::treeDataCell::points() const Foam::pointField Foam::treeDataCell::shapePoints() const
{ {
pointField cc(cellLabels_.size()); pointField cc(cellLabels_.size());

View File

@ -125,7 +125,7 @@ public:
//- Get representative point cloud for all shapes inside //- Get representative point cloud for all shapes inside
// (one point per shape) // (one point per shape)
pointField points() const; pointField shapePoints() const;
// Search // Search

View File

@ -168,6 +168,12 @@ void Foam::Time::readDict()
Pout.precision(IOstream::defaultPrecision()); Pout.precision(IOstream::defaultPrecision());
Perr.precision(IOstream::defaultPrecision()); Perr.precision(IOstream::defaultPrecision());
FatalError().precision(IOstream::defaultPrecision());
FatalIOError.error::operator()().precision
(
IOstream::defaultPrecision()
);
} }
if (controlDict_.found("writeCompression")) if (controlDict_.found("writeCompression"))

View File

@ -55,6 +55,10 @@ Foam::dlLibraryTable::~dlLibraryTable()
{ {
forAllConstIter(dlLibraryTable, *this, iter) forAllConstIter(dlLibraryTable, *this, iter)
{ {
// bug in dlclose - does not call static destructors of
// loaded library when actually unloading the library.
// See https://bugzilla.novell.com/show_bug.cgi?id=680125 and 657627.
// Seems related to using a non-system compiler!
dlClose(iter.key()); dlClose(iter.key());
} }
} }

View File

@ -34,6 +34,8 @@ License
#include "OSspecific.H" #include "OSspecific.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "polyMeshTetDecomposition.H" #include "polyMeshTetDecomposition.H"
#include "indexedOctree.H"
#include "treeDataCell.H"
#include "pointMesh.H" #include "pointMesh.H"

View File

@ -25,6 +25,8 @@ License
#include "primitiveMesh.H" #include "primitiveMesh.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "indexedOctree.H"
#include "treeDataCell.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -67,14 +67,16 @@ SourceFiles
#include "Map.H" #include "Map.H"
#include "EdgeMap.H" #include "EdgeMap.H"
#include "boundBox.H" #include "boundBox.H"
#include "indexedOctree.H"
#include "treeDataCell.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// Forward declaration of classes
class treeDataCell;
template<class Type> class indexedOctree;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class primitiveMesh Declaration Class primitiveMesh Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

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
@ -445,6 +445,13 @@ void Foam::porousZone::writeDict(Ostream& os, bool subDict) const
dictPtr->write(os); dictPtr->write(os);
} }
// thermalModel
if (const dictionary* dictPtr = dict_.subDictPtr("thermalModel"))
{
os << indent << "thermalModel";
dictPtr->write(os);
}
os << decrIndent << indent << token::END_BLOCK << endl; os << decrIndent << indent << token::END_BLOCK << endl;
} }

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) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -216,8 +216,8 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces)
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec; start -= smallVec;
end -= smallVec; end += smallVec;
} }
@ -327,8 +327,8 @@ void Foam::meshRefinement::checkData()
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec; start -= smallVec;
end -= smallVec; end += smallVec;
} }
@ -2266,8 +2266,8 @@ void Foam::meshRefinement::dumpIntersections(const fileName& prefix) const
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec; start -= smallVec;
end -= smallVec; end += smallVec;
} }

View File

@ -286,8 +286,8 @@ void Foam::meshRefinement::getBafflePatches
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec; start -= smallVec;
end -= smallVec; end += smallVec;
} }
@ -2457,8 +2457,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec; start -= smallVec;
end -= smallVec; end += smallVec;
} }

View File

@ -629,8 +629,8 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec; start -= smallVec;
end -= smallVec; end += smallVec;
} }
@ -845,8 +845,8 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec; start -= smallVec;
end -= smallVec; end += smallVec;
} }

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
@ -95,7 +95,7 @@ Foam::treeDataEdge::treeDataEdge
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::pointField Foam::treeDataEdge::points() const Foam::pointField Foam::treeDataEdge::shapePoints() const
{ {
pointField eMids(edgeLabels_.size()); pointField eMids(edgeLabels_.size());

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
@ -128,7 +128,7 @@ public:
//- Get representative point cloud for all shapes inside //- Get representative point cloud for all shapes inside
// (one point per shape) // (one point per shape)
pointField points() const; pointField shapePoints() const;
// Search // Search

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
@ -144,7 +144,7 @@ Foam::treeDataFace::treeDataFace
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::pointField Foam::treeDataFace::points() const Foam::pointField Foam::treeDataFace::shapePoints() const
{ {
pointField cc(faceLabels_.size()); pointField cc(faceLabels_.size());

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
@ -140,7 +140,7 @@ public:
//- Get representative point cloud for all shapes inside //- Get representative point cloud for all shapes inside
// (one point per shape) // (one point per shape)
pointField points() const; pointField shapePoints() const;
// Search // Search

View File

@ -54,7 +54,7 @@ Foam::treeDataPoint::treeDataPoint
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::pointField Foam::treeDataPoint::points() const Foam::pointField Foam::treeDataPoint::shapePoints() const
{ {
if (pointLabels_.size()) if (pointLabels_.size())
{ {

View File

@ -86,7 +86,12 @@ public:
inline label size() const inline label size() const
{ {
return points_.size(); return
(
pointLabels_.size()
? pointLabels_.size()
: points_.size()
);
} }
inline const labelList& pointLabels() const inline const labelList& pointLabels() const
@ -94,9 +99,14 @@ public:
return pointLabels_; return pointLabels_;
} }
const pointField& points() const
{
return points_;
}
//- Get representative point cloud for all shapes inside //- Get representative point cloud for all shapes inside
// (one point per shape) // (one point per shape)
pointField points() const; pointField shapePoints() const;
// Search // Search

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
@ -128,7 +128,7 @@ template
> >
Foam::pointField Foam::pointField
Foam::treeDataPrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::treeDataPrimitivePatch<Face, FaceList, PointField, PointType>::
points() const shapePoints() const
{ {
pointField cc(patch_.size()); pointField cc(patch_.size());

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
@ -118,7 +118,7 @@ public:
//- Get representative point cloud for all shapes inside //- Get representative point cloud for all shapes inside
// (one point per shape) // (one point per shape)
pointField points() const; pointField shapePoints() const;
// Search // Search

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
@ -187,7 +187,7 @@ Foam::treeDataTriSurface::treeDataTriSurface(const triSurface& surface)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::pointField Foam::treeDataTriSurface::points() const Foam::pointField Foam::treeDataTriSurface::shapePoints() const
{ {
const pointField& points = surface_.points(); const pointField& points = surface_.points();

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
@ -103,7 +103,7 @@ public:
//- Get representative point cloud for all shapes inside //- Get representative point cloud for all shapes inside
// (one point per shape) // (one point per shape)
pointField points() const; pointField shapePoints() const;
// Search // Search

View File

@ -114,6 +114,8 @@ void Foam::regionModels::regionModel1D::initialise()
boundaryFaceCells_[localPyrolysisFaceI].transfer(cellIDs); boundaryFaceCells_[localPyrolysisFaceI].transfer(cellIDs);
localPyrolysisFaceI++; localPyrolysisFaceI++;
nLayers_ = nCells;
} }
} }
@ -266,6 +268,7 @@ Foam::regionModels::regionModel1D::regionModel1D(const fvMesh& mesh)
boundaryFaceFaces_(), boundaryFaceFaces_(),
boundaryFaceCells_(), boundaryFaceCells_(),
boundaryFaceOppositeFace_(), boundaryFaceOppositeFace_(),
nLayers_(0),
nMagSfPtr_(NULL), nMagSfPtr_(NULL),
moveMesh_(false) moveMesh_(false)
{} {}
@ -283,6 +286,7 @@ Foam::regionModels::regionModel1D::regionModel1D
boundaryFaceFaces_(regionMesh().nCells()), boundaryFaceFaces_(regionMesh().nCells()),
boundaryFaceCells_(regionMesh().nCells()), boundaryFaceCells_(regionMesh().nCells()),
boundaryFaceOppositeFace_(regionMesh().nCells()), boundaryFaceOppositeFace_(regionMesh().nCells()),
nLayers_(0),
nMagSfPtr_(NULL), nMagSfPtr_(NULL),
moveMesh_(true) moveMesh_(true)
{ {

View File

@ -88,6 +88,9 @@ protected:
//- Global boundary face IDs oppossite coupled patch //- Global boundary face IDs oppossite coupled patch
labelList boundaryFaceOppositeFace_; labelList boundaryFaceOppositeFace_;
//- Number of layers in the region
label nLayers_;
// Geometry // Geometry
@ -115,7 +118,7 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("regionModel"); TypeName("regionModel1D");
// Constructors // Constructors
@ -152,6 +155,9 @@ public:
//- Return the global boundary face IDs oppossite coupled patch //- Return the global boundary face IDs oppossite coupled patch
inline const labelList& boundaryFaceOppositeFace() const; inline const labelList& boundaryFaceOppositeFace() const;
//- Return the number of layers in the region
inline label nLayers() const;
// Geometry // Geometry

View File

@ -49,6 +49,12 @@ Foam::regionModels::regionModel1D::boundaryFaceOppositeFace() const
} }
inline Foam::label Foam::regionModels::regionModel1D::nLayers() const
{
return nLayers_;
}
inline const Foam::surfaceScalarField& inline const Foam::surfaceScalarField&
Foam::regionModels::regionModel1D::nMagSf() const Foam::regionModels::regionModel1D::nMagSf() const
{ {

View File

@ -197,7 +197,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
1.0/constant::mathematical::pi*omega_ 1.0/constant::mathematical::pi*omega_
*( *(
k*blackBody_.bLambda(lambdaI) k*blackBody_.bLambda(lambdaI)
+ absorptionEmission_.ECont(lambdaI) + absorptionEmission_.ECont(lambdaI)/4
) )
); );

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) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,8 +51,8 @@ namespace porousMedia
Foam::porousMedia::fixedTemperature::fixedTemperature(const porousZone& pZone) Foam::porousMedia::fixedTemperature::fixedTemperature(const porousZone& pZone)
: :
thermalModel(pZone, typeName), thermalModel(pZone),
T_(readScalar(coeffDict_.lookup("T"))) T_(readScalar(thermalCoeffs_.lookup("T")))
{} {}

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) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,7 +33,6 @@ Description
#define fixedTemperature_H #define fixedTemperature_H
#include "thermalModel.H" #include "thermalModel.H"
#include "autoPtr.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -81,7 +80,7 @@ public:
//- Add the thermal source to the enthalpy equation //- Add the thermal source to the enthalpy equation
virtual void addEnthalpySource virtual void addEnthalpySource
( (
const basicThermo& thermo, const basicThermo&,
const volScalarField& rho, const volScalarField& rho,
fvScalarMatrix& hEqn fvScalarMatrix& hEqn
) const; ) const;

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) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,7 +33,6 @@ Description
#define noThermalModel_H #define noThermalModel_H
#include "thermalModel.H" #include "thermalModel.H"
#include "autoPtr.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -73,7 +72,7 @@ public:
//- Add the thermal source to the enthalpy equation //- Add the thermal source to the enthalpy equation
virtual void addEnthalpySource virtual void addEnthalpySource
( (
const basicThermo& thermo, const basicThermo&,
const volScalarField& rho, const volScalarField& rho,
fvScalarMatrix& hEqn fvScalarMatrix& hEqn
) const; ) const;

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) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,18 +42,18 @@ namespace porousMedia
Foam::porousMedia::thermalModel::thermalModel(const porousZone& pZone) Foam::porousMedia::thermalModel::thermalModel(const porousZone& pZone)
: :
pZone_(pZone), pZone_(pZone),
coeffDict_(dictionary::null) thermalCoeffs_(pZone.dict().subDictPtr("thermalModel"))
{} {}
Foam::porousMedia::thermalModel::thermalModel Foam::porousMedia::thermalModel::thermalModel
( (
const porousZone& pZone, const porousZone& pZone,
const word& modelType const dictionary& thermalCoeffs
) )
: :
pZone_(pZone), pZone_(pZone),
coeffDict_(pZone_.dict().subDict(modelType + "Coeffs")) thermalCoeffs_(thermalCoeffs)
{} {}

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) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -63,8 +63,8 @@ protected:
//- Reference to the porous zone //- Reference to the porous zone
const porousZone& pZone_; const porousZone& pZone_;
//- Sub-model coefficients dictionary //- Thermal model coefficients dictionary
const dictionary coeffDict_; const dictionary thermalCoeffs_;
public: public:
@ -87,11 +87,11 @@ public:
// Constructors // Constructors
//- Construct null from porous zone //- Construct from porous zone, coefficients from "thermalModel" entry
thermalModel(const porousZone&); thermalModel(const porousZone&);
//- Construct from porous zone and model type name //- Construct from porous zone and thermal model coefficients
thermalModel(const porousZone&, const word& modelType); thermalModel(const porousZone&, const dictionary& thermalCoeffs);
//- Destructor //- Destructor
@ -107,7 +107,7 @@ public:
//- Add the thermal source to the enthalpy equation //- Add the thermal source to the enthalpy equation
virtual void addEnthalpySource virtual void addEnthalpySource
( (
const basicThermo& thermo, const basicThermo&,
const volScalarField& rho, const volScalarField& rho,
fvScalarMatrix& hEqn fvScalarMatrix& hEqn
) const = 0; ) const = 0;

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) 2010-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,7 +33,13 @@ Foam::porousMedia::thermalModel::New
const porousZone& pZone 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; Info<< "Selecting thermalModel " << modelType << endl;

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) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,7 +51,10 @@ void Foam::thermalPorousZone::addEnthalpySource
fvScalarMatrix& hEqn fvScalarMatrix& hEqn
) const ) const
{ {
model_->addEnthalpySource(thermo, rho, hEqn); if (model_.valid())
{
model_->addEnthalpySource(thermo, rho, hEqn);
}
} }

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) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -127,7 +127,7 @@ public:
//- Add the thermal source to the enthalpy equation //- Add the thermal source to the enthalpy equation
void addEnthalpySource void addEnthalpySource
( (
const basicThermo& thermo, const basicThermo&,
const volScalarField& rho, const volScalarField& rho,
fvScalarMatrix& hEqn fvScalarMatrix& hEqn
) const; ) const;

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) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

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-2011 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,7 +32,8 @@ Description
thermalPorousZone. thermalPorousZone.
The input file \c constant/thermalPorousZone is implemented as 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 \verbatim
1 1
@ -94,7 +95,7 @@ public:
//- Add the thermal source to the enthalpy equation //- Add the thermal source to the enthalpy equation
void addEnthalpySource void addEnthalpySource
( (
const basicThermo& thermo, const basicThermo&,
const volScalarField& rho, const volScalarField& rho,
fvScalarMatrix& hEqn fvScalarMatrix& hEqn
) const; ) const;

View File

@ -31,11 +31,12 @@ FoamFile
f f [0 -1 0 0 0 0 0] (0 0 0); f f [0 -1 0 0 0 0 0] (0 0 0);
} }
thermalModel none; // fixedTemperature; thermalModel
fixedTemperatureCoeffs
{ {
T 350; type none; // fixedTemperature;
// fixedTemperature coefficients
T 350;
} }
} }
) )

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # run from this directory
runApplication blockMesh runApplication blockMesh
runApplication decomposePar runApplication decomposePar
runParallel dsmcInitialise 4 runParallel dsmcInitialise 4
runParallel dsmcFoam 4 runParallel `getApplication` 4
runApplication `getApplication` -noLagrangian runApplication reconstructPar -noLagrangian
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -292,6 +292,7 @@ addLayersControls
//- If points get not extruded do nGrow layers of connected faces that are //- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process // also not grown. This helps convergence of the layer addition process
// close to features. // close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0; nGrow 0;

View File

@ -282,9 +282,9 @@ addLayersControls
//- If points get not extruded do nGrow layers of connected faces that are //- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process // also not grown. This helps convergence of the layer addition process
// close to features. // close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0; nGrow 0;
// Advanced settings // Advanced settings
//- When not to extrude surface. 0 is flat surface, 90 is when two faces //- When not to extrude surface. 0 is flat surface, 90 is when two faces
@ -312,7 +312,8 @@ addLayersControls
maxThicknessToMedialRatio 0.3; maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points // Angle used to pick up medial axis points
minMedianAxisAngle 130; // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
minMedianAxisAngle 90;
// Create buffer region for new layer terminations // Create buffer region for new layer terminations
nBufferCellsNoExtrude 0; nBufferCellsNoExtrude 0;

View File

@ -206,9 +206,9 @@ addLayersControls
//- If points get not extruded do nGrow layers of connected faces that are //- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process // also not grown. This helps convergence of the layer addition process
// close to features. // close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0; nGrow 0;
// Advanced settings // Advanced settings
//- When not to extrude surface. 0 is flat surface, 90 is when two faces //- When not to extrude surface. 0 is flat surface, 90 is when two faces

View File

@ -219,9 +219,9 @@ addLayersControls
//- If points get not extruded do nGrow layers of connected faces that are //- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process // also not grown. This helps convergence of the layer addition process
// close to features. // close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0; nGrow 0;
// Advanced settings // Advanced settings
//- When not to extrude surface. 0 is flat surface, 90 is when two faces //- When not to extrude surface. 0 is flat surface, 90 is when two faces

View File

@ -290,7 +290,7 @@ addLayersControls
//- If points get not extruded do nGrow layers of connected faces that are //- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process // also not grown. This helps convergence of the layer addition process
// close to features. // close to features.
// Note: changed(corrected) w.r.t 16x! (didn't do anything in 16x) // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0; nGrow 0;

View File

@ -241,6 +241,7 @@ addLayersControls
//- If points get not extruded do nGrow layers of connected faces that are //- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process // also not grown. This helps convergence of the layer addition process
// close to features. // close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0; nGrow 0;
@ -271,6 +272,7 @@ addLayersControls
maxThicknessToMedialRatio 0.3; maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points // Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
minMedianAxisAngle 90; minMedianAxisAngle 90;
// Create buffer region for new layer terminations // Create buffer region for new layer terminations

View File

@ -224,7 +224,8 @@ addLayersControls
//- If points get not extruded do nGrow layers of connected faces that are //- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process // also not grown. This helps convergence of the layer addition process
// close to features. // close to features.
nGrow 1; // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0;
// Advanced settings // Advanced settings
@ -254,7 +255,8 @@ addLayersControls
maxThicknessToMedialRatio 0.3; maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points // Angle used to pick up medial axis points
minMedianAxisAngle 130; // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
minMedianAxisAngle 90;
// Create buffer region for new layer terminations // Create buffer region for new layer terminations
nBufferCellsNoExtrude 0; nBufferCellsNoExtrude 0;

View File

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc -m64
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -shared
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View File

@ -0,0 +1,21 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-100
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed

View File

@ -0,0 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View File

@ -0,0 +1,4 @@
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3

View File

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View File

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View File

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View File

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View File

@ -0,0 +1,8 @@
CPP = cpp -traditional-cpp
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
include $(RULES)/c
include $(RULES)/c++

View File

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi

16
wmake/rules/linuxGcc46/c Normal file
View File

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc -m32
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -shared
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View File

@ -0,0 +1,21 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
CC = g++ -m32
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-100
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed

View File

@ -0,0 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View File

@ -0,0 +1,2 @@
c++DBUG =
c++OPT = -O3

View File

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View File

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View File

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View File

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View File

@ -0,0 +1,9 @@
CPP = cpp -traditional-cpp
LD = ld -melf_i386
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
include $(RULES)/c
include $(RULES)/c++

View File

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi