Merge branch 'master' into cvm

This commit is contained in:
graham
2008-07-10 13:53:13 +01:00
54 changed files with 2323776 additions and 613 deletions

View File

@ -32,8 +32,8 @@
#------------------------------------------------------------------------------
export WM_PROJECT=OpenFOAM
#export WM_PROJECT_VERSION=dev
: ${WM_PROJECT_VERSION:=dev}; export WM_PROJECT_VERSION
export WM_PROJECT_VERSION=1.5
#: ${WM_PROJECT_VERSION:=dev}; export WM_PROJECT_VERSION
#!!User:

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -32,8 +32,8 @@
#------------------------------------------------------------------------------
setenv WM_PROJECT OpenFOAM
#setenv WM_PROJECT_VERSION dev
if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION dev
setenv WM_PROJECT_VERSION 1.5
#if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION dev
#!!User:
# either setenv FOAM_INST_DIR before sourcing this file or set

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Wrapper for stat() system call.
\*---------------------------------------------------------------------------*/
#include "fileStat.H"
@ -35,33 +32,15 @@ Description
#include <unistd.h>
#include <sys/sysmacros.h>
/*
#undef major
#undef minor
#undef makedev
# define major(dev) ((int)(((dev) >> 8) & 0xff))
# define minor(dev) ((int)((dev) & 0xff))
# define makedev(major, minor) ((((unsigned int) (major)) << 8) \
| ((unsigned int) (minor)))
*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null
fileStat::fileStat()
Foam::fileStat::fileStat()
:
isValid_(false)
{}
// Construct from components
fileStat::fileStat(const fileName& fName, const unsigned int maxTime)
Foam::fileStat::fileStat(const fileName& fName, const unsigned int maxTime)
{
// Work on volatile
volatile bool locIsValid = false;
@ -85,8 +64,7 @@ fileStat::fileStat(const fileName& fName, const unsigned int maxTime)
}
// Construct from Istream.
fileStat::fileStat(Istream& is)
Foam::fileStat::fileStat(Istream& is)
{
is >> *this;
}
@ -94,10 +72,9 @@ fileStat::fileStat(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// compare two fileStates for same device
bool fileStat::sameDevice(const fileStat& stat2) const
bool Foam::fileStat::sameDevice(const fileStat& stat2) const
{
return
return
isValid_
&& (
major(status_.st_dev) == major(stat2.status().st_dev)
@ -105,14 +82,14 @@ bool fileStat::sameDevice(const fileStat& stat2) const
);
}
// compare two fileStates for same Inode
bool fileStat::sameINode(const fileStat& stat2) const
bool Foam::fileStat::sameINode(const fileStat& stat2) const
{
return isValid_ && (status_.st_ino == stat2.status().st_ino);
}
// compare state against inode
bool fileStat::sameINode(const label iNode) const
bool Foam::fileStat::sameINode(const label iNode) const
{
return isValid_ && (status_.st_ino == ino_t(iNode));
}
@ -120,13 +97,12 @@ bool fileStat::sameINode(const label iNode) const
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// Input in list syntax
Istream& operator>>(Istream& is, fileStat& fStat)
Foam::Istream& Foam::operator>>(Istream& is, fileStat& fStat)
{
// Read beginning of machine info list
is.readBegin("fileStat");
label
label
devMaj, devMin,
ino, mode, uid, gid,
rdevMaj, rdevMin,
@ -172,11 +148,10 @@ Istream& operator>>(Istream& is, fileStat& fStat)
}
// Output in list syntax
Ostream& operator<<(Ostream& os, const fileStat& fStat)
Foam::Ostream& Foam::operator<<(Ostream& os, const fileStat& fStat)
{
//Set precision so 32bit unsigned int can be printed
// int oldPrecision = os.precision();
// Set precision so 32bit unsigned int can be printed
// int oldPrecision = os.precision();
int oldPrecision = 0;
os.precision(10);
@ -200,8 +175,4 @@ Ostream& operator<<(Ostream& os, const fileStat& fStat)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -28,16 +28,12 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// allow undef in results
bool Foam::ensightFile::allowUndef_ = false;
// value to represent undef in results
Foam::scalar Foam::ensightFile::undefValue_ = Foam::floatScalarVGREAT;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from pathname
Foam::ensightFile::ensightFile
(
const fileName& pathname,
@ -55,6 +51,7 @@ Foam::ensightFile::ensightFile
precision(5);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::ensightFile::~ensightFile()
@ -88,7 +85,6 @@ Foam::scalar Foam::ensightFile::undefValue(const scalar& value)
}
// binary write
Foam::Ostream& Foam::ensightFile::write
(
const char* buf,
@ -100,11 +96,7 @@ Foam::Ostream& Foam::ensightFile::write
}
// write string as "%80s" or as binary
Foam::Ostream& Foam::ensightFile::write
(
const string& value
)
Foam::Ostream& Foam::ensightFile::write(const string& value)
{
char buf[80];
@ -141,11 +133,7 @@ Foam::Ostream& Foam::ensightFile::write
}
// write integer as "%10d" or as binary
Foam::Ostream& Foam::ensightFile::write
(
const label& value
)
Foam::Ostream& Foam::ensightFile::write(const label& value)
{
if (format() == IOstream::BINARY)
{
@ -167,7 +155,6 @@ Foam::Ostream& Foam::ensightFile::write
}
// write integer with specified width or as binary
Foam::Ostream& Foam::ensightFile::write
(
const label& value,
@ -194,11 +181,7 @@ Foam::Ostream& Foam::ensightFile::write
}
// write float as "%12.5e" or as binary
Foam::Ostream& Foam::ensightFile::write
(
const scalar& value
)
Foam::Ostream& Foam::ensightFile::write(const scalar& value)
{
if (format() == IOstream::BINARY)
{
@ -220,7 +203,6 @@ Foam::Ostream& Foam::ensightFile::write
}
// Add carriage return to ascii stream
void Foam::ensightFile::newline()
{
if (format() == IOstream::ASCII)
@ -230,7 +212,6 @@ void Foam::ensightFile::newline()
}
// write undef value
Foam::Ostream& Foam::ensightFile::writeUndef()
{
write(undefValue_);
@ -238,11 +219,7 @@ Foam::Ostream& Foam::ensightFile::writeUndef()
}
// write element keyword with trailing newline, optionally with undef
Foam::Ostream& Foam::ensightFile::writeKeyword
(
const string& key
)
Foam::Ostream& Foam::ensightFile::writeKeyword(const string& key)
{
if (allowUndef_)
{
@ -260,7 +237,6 @@ Foam::Ostream& Foam::ensightFile::writeKeyword
}
// write "C Binary" for binary files
Foam::Ostream& Foam::ensightFile::writeBinaryHeader()
{
if (format() == IOstream::BINARY)
@ -274,8 +250,6 @@ Foam::Ostream& Foam::ensightFile::writeBinaryHeader()
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
// '*' mask appropriate for subDir
Foam::string Foam::ensightFile::mask()
{
char buf[16] = "********";
@ -283,7 +257,6 @@ Foam::string Foam::ensightFile::mask()
}
// consistent zero-padded numbers for subdirectories
Foam::string Foam::ensightFile::subDir(const label n)
{
char buf[16];
@ -293,6 +266,4 @@ Foam::string Foam::ensightFile::subDir(const label n)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -30,12 +30,15 @@ Description
Correctly handles binary write as well.
\*---------------------------------------------------------------------------*/
#ifndef ensightFile_H
#define ensightFile_H
#include "OFstream.H"
#include "IOstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
@ -47,19 +50,26 @@ class ensightFile
:
public OFstream
{
//- allow undef in results
static bool allowUndef_;
// Private data
//- value to represent undef in results
static scalar undefValue_;
//- allow undef in results
static bool allowUndef_;
//- Disallow default bitwise assignment
void operator=(const ensightFile&);
//- value to represent undef in results
static scalar undefValue_;
// Private member functions
//- Disallow default bitwise assignment
void operator=(const ensightFile&);
//- Disallow default copy constructor
ensightFile(const ensightFile&);
//- Disallow default copy constructor
ensightFile(const ensightFile&);
public:
// Constructors
//- Construct from pathname
@ -69,10 +79,13 @@ public:
IOstream::streamFormat format=IOstream::BINARY
);
// Destructor
~ensightFile();
~ensightFile();
// Access
//- Return setting for whether 'undef' values are allowed in results
static bool allowUndef();
@ -82,7 +95,9 @@ public:
//- consistent zero-padded numbers for subdirectories
static string subDir(const label);
// Edit
static bool allowUndef(bool);
//- Assign the value to represent undef in the results
@ -90,6 +105,7 @@ public:
// NB: do not use values larger than floatScalarVGREAT
static scalar undefValue(const scalar&);
// Output
//- binary write
@ -125,6 +141,8 @@ public:
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -28,8 +28,6 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from pathname
Foam::ensightGeoFile::ensightGeoFile
(
const fileName& pathname,
@ -53,11 +51,7 @@ Foam::ensightGeoFile::~ensightGeoFile()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// write keyword with trailing newline
Foam::Ostream& Foam::ensightGeoFile::writeKeyword
(
const string& key
)
Foam::Ostream& Foam::ensightGeoFile::writeKeyword(const string& key)
{
write(key);
newline();
@ -65,6 +59,5 @@ Foam::Ostream& Foam::ensightGeoFile::writeKeyword
return *this;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -29,28 +29,36 @@ Description
Specialized Ensight output with extra geometry file header
\*---------------------------------------------------------------------------*/
#ifndef ensightGeoFile_H
#define ensightGeoFile_H
#include "ensightFile.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class ensightGeoFile Declaration
\*---------------------------------------------------------------------------*/
class ensightGeoFile
:
public ensightFile
{
//- Disallow default bitwise assignment
void operator=(const ensightGeoFile&);
// Private member functions
//- Disallow default bitwise assignment
void operator=(const ensightGeoFile&);
//- Disallow default copy constructor
ensightGeoFile(const ensightGeoFile&);
//- Disallow default copy constructor
ensightGeoFile(const ensightGeoFile&);
public:
// Constructors
//- Construct from pathname
@ -60,21 +68,23 @@ public:
IOstream::streamFormat format=IOstream::BINARY
);
// Destructor
~ensightGeoFile();
//- Destructor
~ensightGeoFile();
// Output
//- write keyword with trailing newline
virtual Ostream& writeKeyword(const string& key);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -41,11 +41,7 @@ Foam::List<Foam::word> Foam::ensightPart::elemTypes_(0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
//- check for fully defined fields
bool Foam::ensightPart::isFieldDefined
(
const List<scalar>& field
) const
bool Foam::ensightPart::isFieldDefined(const List<scalar>& field) const
{
forAll(elemLists_, elemI)
{
@ -67,7 +63,6 @@ bool Foam::ensightPart::isFieldDefined
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Null constructor
Foam::ensightPart::ensightPart
()
:
@ -82,7 +77,6 @@ Foam::ensightPart::ensightPart
{}
// Construct empty part with number and description
Foam::ensightPart::ensightPart
(
label partNumber,
@ -100,7 +94,6 @@ Foam::ensightPart::ensightPart
{}
// Construct empty part with number and description
Foam::ensightPart::ensightPart
(
label partNumber,
@ -119,11 +112,7 @@ Foam::ensightPart::ensightPart
{}
// Construct as copy
Foam::ensightPart::ensightPart
(
const ensightPart& part
)
Foam::ensightPart::ensightPart(const ensightPart& part)
:
number_(part.number_),
name_(part.name_),
@ -138,7 +127,6 @@ Foam::ensightPart::ensightPart
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
// runtime selection
Foam::autoPtr<Foam::ensightPart> Foam::ensightPart::New(Istream& is)
{
word partType(is);
@ -161,6 +149,7 @@ Foam::autoPtr<Foam::ensightPart> Foam::ensightPart::New(Istream& is)
return autoPtr<ensightPart>(cstrIter()(is));
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::ensightPart::~ensightPart()
@ -169,7 +158,6 @@ Foam::ensightPart::~ensightPart()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// reconstruct from Istream
void Foam::ensightPart::reconstruct(Istream& is)
{
dictionary dict(is);
@ -198,7 +186,6 @@ void Foam::ensightPart::reconstruct(Istream& is)
}
// renumber elements
void Foam::ensightPart::renumber(labelList const& origId)
{
// transform to global values first
@ -226,6 +213,4 @@ void Foam::ensightPart::renumber(labelList const& origId)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -63,9 +63,9 @@ class ensightPart
// Static data members
static List<word> elemTypes_;
// Private Member Functions
protected:
// Protected data
//- part number
@ -92,6 +92,7 @@ protected:
//- mesh reference used
const polyMesh* meshPtr_;
// Protected Classes
//- track the points used by the part and map global to local indices
@ -155,12 +156,12 @@ protected:
) const
{}
public:
//- Runtime type information
TypeName("ensightPart");
// Public data
// Constructors
@ -206,9 +207,9 @@ public:
static autoPtr<ensightPart> New(Istream& is);
// Destructor
//- Destructor
virtual ~ensightPart();
virtual ~ensightPart();
// Static members
@ -217,6 +218,7 @@ public:
return elemTypes_;
}
// Access
//- number of elements in this part
@ -272,6 +274,7 @@ public:
return offset_;
}
// Edit
//- renumber elements
@ -332,7 +335,6 @@ public:
ensightGeoFile&,
const ensightPart&
);
};

View File

@ -40,7 +40,6 @@ namespace Foam
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream);
}
// names for addressable ensight element types
Foam::List<Foam::word> Foam::ensightPartCells::elemTypes_
(
IStringStream
@ -52,11 +51,7 @@ Foam::List<Foam::word> Foam::ensightPartCells::elemTypes_
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// classify the cell types, track the points used
void Foam::ensightPartCells::classify
(
const labelList& idList
)
void Foam::ensightPartCells::classify(const labelList& idList)
{
// References to cell shape models
const cellModel& tet = *(cellModeller::lookup("tet"));
@ -229,7 +224,6 @@ void Foam::ensightPartCells::classify
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct empty part with number and description
Foam::ensightPartCells::ensightPartCells
(
label partNumber,
@ -240,7 +234,6 @@ Foam::ensightPartCells::ensightPartCells
{}
// Construct from polyMesh without zones
Foam::ensightPartCells::ensightPartCells
(
label partNumber,
@ -253,7 +246,6 @@ Foam::ensightPartCells::ensightPartCells
}
// Construct from polyMesh and list of (non-zoned) cells
Foam::ensightPartCells::ensightPartCells
(
label partNumber,
@ -267,7 +259,6 @@ Foam::ensightPartCells::ensightPartCells
}
// Construct from polyMesh and cellZone
Foam::ensightPartCells::ensightPartCells
(
label partNumber,
@ -281,21 +272,13 @@ Foam::ensightPartCells::ensightPartCells
}
// Construct as copy
Foam::ensightPartCells::ensightPartCells
(
const ensightPartCells& part
)
Foam::ensightPartCells::ensightPartCells(const ensightPartCells& part)
:
ensightPart(part)
{}
// Construct from Istream
Foam::ensightPartCells::ensightPartCells
(
Istream& is
)
Foam::ensightPartCells::ensightPartCells(Istream& is)
:
ensightPart()
{
@ -305,15 +288,12 @@ Foam::ensightPartCells::ensightPartCells
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::ensightPartCells::~ensightPartCells()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// track the points used
Foam::ensightPart::localPoints Foam::ensightPartCells::calcLocalPoints() const
{
const polyMesh& mesh = *meshPtr_;
@ -362,7 +342,6 @@ Foam::ensightPart::localPoints Foam::ensightPartCells::calcLocalPoints() const
}
// write cell connectivities
void Foam::ensightPartCells::writeConnectivity
(
ensightGeoFile& os,
@ -449,6 +428,4 @@ void Foam::ensightPartCells::writeConnectivity
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -52,8 +52,6 @@ class ensightPartCells
:
public ensightPart
{
// Private data
// Private Member Functions
//- Disallow default bitwise assignment
@ -77,6 +75,7 @@ class ensightPartCells
const labelList& pointMap
) const;
protected:
//- addressable Ensight element types
@ -135,9 +134,8 @@ public:
}
// Destructor
virtual ~ensightPartCells();
//- Destructor
virtual ~ensightPartCells();
// Member Functions
@ -147,7 +145,6 @@ public:
{
return elemTypes_;
}
};

View File

@ -31,13 +31,14 @@ License
#include "dictionary.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(ensightPartFaces, 0);
addToRunTimeSelectionTable(ensightPart, ensightPartFaces, istream);
}
// names for addressable ensight element types
Foam::List<Foam::word> Foam::ensightPartFaces::elemTypes_
(
IStringStream
@ -46,9 +47,9 @@ Foam::List<Foam::word> Foam::ensightPartFaces::elemTypes_
)()
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct empty part with number and description
Foam::ensightPartFaces::ensightPartFaces
(
label partNumber,
@ -61,7 +62,6 @@ Foam::ensightPartFaces::ensightPartFaces
}
// Construct from polyMesh and polyPatch
Foam::ensightPartFaces::ensightPartFaces
(
label partNumber,
@ -137,22 +137,13 @@ Foam::ensightPartFaces::ensightPartFaces
}
// Construct as copy
Foam::ensightPartFaces::ensightPartFaces
(
const ensightPartFaces &part
)
Foam::ensightPartFaces::ensightPartFaces(const ensightPartFaces &part)
:
ensightPart(part)
{}
// Construct from Istream
Foam::ensightPartFaces::ensightPartFaces
(
Istream& is
)
Foam::ensightPartFaces::ensightPartFaces(Istream& is)
:
ensightPart()
{
@ -160,6 +151,7 @@ Foam::ensightPartFaces::ensightPartFaces
reconstruct(is);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::ensightPartFaces::~ensightPartFaces()
@ -168,7 +160,6 @@ Foam::ensightPartFaces::~ensightPartFaces()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// track the points used
Foam::ensightPart::localPoints Foam::ensightPartFaces::calcLocalPoints() const
{
const polyMesh& mesh = *meshPtr_;
@ -212,7 +203,6 @@ Foam::ensightPart::localPoints Foam::ensightPartFaces::calcLocalPoints() const
}
// write face connectivities
void Foam::ensightPartFaces::writeConnectivity
(
ensightGeoFile& os,
@ -258,6 +248,4 @@ void Foam::ensightPartFaces::writeConnectivity
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -51,8 +51,6 @@ class ensightPartFaces
:
public ensightPart
{
// Private data
// Private Member Functions
//- Disallow default bitwise assignment
@ -70,6 +68,7 @@ class ensightPartFaces
const labelList& pointMap
) const;
protected:
//- addressable ensight element types
@ -115,9 +114,8 @@ public:
}
// Destructor
virtual ~ensightPartFaces();
//- Destructor
virtual ~ensightPartFaces();
// Member Functions
@ -127,7 +125,6 @@ public:
{
return elemTypes_;
}
};

View File

@ -31,7 +31,6 @@ Description
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
// write generalized field components
template <class Type>
void Foam::ensightPart::writeField
(
@ -66,6 +65,4 @@ void Foam::ensightPart::writeField
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -33,7 +33,6 @@ Description
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// write the part header
void Foam::ensightPart::writeHeader
(
ensightFile& os,
@ -54,7 +53,6 @@ void Foam::ensightPart::writeHeader
}
// write scalar field for idList
void Foam::ensightPart::writeFieldList
(
ensightFile& os,
@ -80,12 +78,7 @@ void Foam::ensightPart::writeFieldList
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// write summary information about the object
bool Foam::ensightPart::writeSummary
(
Ostream& os
) const
bool Foam::ensightPart::writeSummary(Ostream& os) const
{
os << indent << type() << nl
<< indent << token::BEGIN_BLOCK << incrIndent << nl;
@ -102,11 +95,7 @@ bool Foam::ensightPart::writeSummary
}
// write reconstruction information for the object
bool Foam::ensightPart::writeData
(
Ostream& os
) const
bool Foam::ensightPart::writeData(Ostream& os) const
{
os << indent << type() << nl
<< indent << token::BEGIN_BLOCK << incrIndent << nl;
@ -130,12 +119,7 @@ bool Foam::ensightPart::writeData
}
// write geometry by components
void Foam::ensightPart::writeGeometry
(
ensightGeoFile& os
) const
void Foam::ensightPart::writeGeometry(ensightGeoFile& os) const
{
if (size() && meshPtr_)
{
@ -182,7 +166,6 @@ void Foam::ensightPart::writeGeometry
}
// write scalar field
void Foam::ensightPart::writeScalarField
(
ensightFile& os,
@ -207,7 +190,6 @@ void Foam::ensightPart::writeScalarField
}
// write vector field components
void Foam::ensightPart::writeVectorField
(
ensightFile& os,
@ -259,6 +241,5 @@ Foam::ensightGeoFile& Foam::operator<<
return os;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -28,11 +28,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from polyMesh
Foam::ensightParts::ensightParts
(
const polyMesh& pMesh
)
Foam::ensightParts::ensightParts(const polyMesh& pMesh)
:
partsList_()
{
@ -40,11 +36,7 @@ Foam::ensightParts::ensightParts
}
// Construct from IOobject
Foam::ensightParts::ensightParts
(
const IOobject& ioObj
)
Foam::ensightParts::ensightParts(const IOobject& ioObj)
:
partsList_()
{
@ -61,12 +53,7 @@ Foam::ensightParts::~ensightParts()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// clear old information and construct anew from polyMesh
void Foam::ensightParts::recalculate
(
const polyMesh& pMesh
)
void Foam::ensightParts::recalculate(const polyMesh& pMesh)
{
partsList_.clear();
@ -197,7 +184,6 @@ void Foam::ensightParts::recalculate
}
// renumber elements
void Foam::ensightParts::renumber
(
const labelList& origCellId,
@ -218,11 +204,7 @@ void Foam::ensightParts::renumber
}
// write the geometry
void Foam::ensightParts::writeGeometry
(
ensightGeoFile& os
) const
void Foam::ensightParts::writeGeometry( ensightGeoFile& os) const
{
// with some feedback
Info<< "write geometry part:" << nl << flush;
@ -235,11 +217,7 @@ void Foam::ensightParts::writeGeometry
}
// write summary information about the objects
bool Foam::ensightParts::writeSummary
(
Ostream& os
) const
bool Foam::ensightParts::writeSummary(Ostream& os) const
{
forAll(partsList_, partI)
{
@ -250,10 +228,7 @@ bool Foam::ensightParts::writeSummary
}
void Foam::ensightParts::writeData
(
Ostream& os
) const
void Foam::ensightParts::writeData(Ostream& os) const
{
// Write size of list
os << nl << partsList_.size();
@ -275,7 +250,6 @@ void Foam::ensightParts::writeData
}
// write scalar field
void Foam::ensightParts::writeScalarField
(
ensightFile& os,
@ -298,7 +272,6 @@ void Foam::ensightParts::writeScalarField
}
// write vector field components
void Foam::ensightParts::writeVectorField
(
ensightFile& os,
@ -322,8 +295,6 @@ void Foam::ensightParts::writeVectorField
}
}
// * * * * * * * * * * * * * * * Member operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
@ -337,6 +308,5 @@ Foam::ensightGeoFile& Foam::operator<<
return os;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -66,6 +66,7 @@ class ensightParts
//- Disallow default bitwise assignment
void operator=(const ensightParts&);
public:
// Constructors
@ -76,9 +77,12 @@ public:
//- Construct from IOobject
ensightParts(const IOobject&);
// Destructor
~ensightParts();
//- Destructor
~ensightParts();
// Member functions
//- clear old information and construct anew from polyMesh
void recalculate(const polyMesh&);
@ -132,6 +136,7 @@ public:
const GeometricField<Type, fvPatchField, volMesh>&
) const;
// Friend Operators
friend ensightGeoFile& operator<<
@ -139,7 +144,6 @@ public:
ensightGeoFile&,
const ensightParts&
);
};

View File

@ -26,11 +26,11 @@ Description
Template to write generalized field components
\*---------------------------------------------------------------------------*/
#include "ensightParts.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// write generalized field components
template <class Type>
void Foam::ensightParts::writeField
(
@ -72,6 +72,5 @@ void Foam::ensightParts::writeField
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -177,7 +177,5 @@ const Foam::labelListList& Foam::meshReader::pointCells() const
return *pointCellsPtr_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -42,7 +42,6 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// add in boundary face
void Foam::meshReader::addPolyBoundaryFace
(
const label cellId,
@ -86,7 +85,6 @@ void Foam::meshReader::addPolyBoundaryFace
}
// add in boundary face
void Foam::meshReader::addPolyBoundaryFace
(
const cellFaceIdentifier& identifier,
@ -96,6 +94,7 @@ void Foam::meshReader::addPolyBoundaryFace
addPolyBoundaryFace(identifier.cell, identifier.face, nCreatedFaces);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::meshReader::createPolyBoundary()
@ -370,6 +369,7 @@ void Foam::meshReader::createPolyBoundary()
<< "Number of interfaces: " << nInterfaces << endl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::List<Foam::polyPatch*>
@ -445,6 +445,5 @@ Foam::meshReader::polyBoundaryPatches(const polyMesh& mesh)
return p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -31,6 +31,7 @@ Description
- standard connectivity checks
- added baffle support
\*---------------------------------------------------------------------------*/
#include "meshReader.H"
@ -325,6 +326,5 @@ void Foam::meshReader::createPolyCells()
// added in createPolyBoundary()
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -34,7 +34,6 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// Pointers to cell shape models
const Foam::cellModel* Foam::meshReader::unknownModel = Foam::cellModeller::
lookup
(
@ -65,27 +64,17 @@ lookup
"hex"
);
// * * * * * * * * * * * * * * Static Functions * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// attach cellZones based on the cellTable Id
// - any other values can be extracted later from the cellTable dictionary
void Foam::meshReader::addCellZones
(
polyMesh& mesh
) const
void Foam::meshReader::addCellZones(polyMesh& mesh) const
{
cellTable_.addCellZones(mesh, cellTableId_);
warnDuplicates("cellZones", mesh.cellZones().names());
}
// attach faceZones based on the monitoring boundary conditions
void Foam::meshReader::addFaceZones
(
polyMesh& mesh
) const
void Foam::meshReader::addFaceZones(polyMesh& mesh) const
{
label nZone = monitoringSets_.size();
mesh.faceZones().setSize(nZone);
@ -128,7 +117,6 @@ void Foam::meshReader::addFaceZones
}
// create and access the polyMesh
Foam::autoPtr<Foam::polyMesh> Foam::meshReader::mesh
(
const objectRegistry& registry
@ -172,7 +160,6 @@ Foam::autoPtr<Foam::polyMesh> Foam::meshReader::mesh
}
//- write the polyMesh
void Foam::meshReader::writeMesh
(
const polyMesh& mesh,
@ -199,7 +186,6 @@ void Foam::meshReader::writeMesh
}
// Clear extra storage before creation of the mesh to reduce the memory usage
void Foam::meshReader::clearExtraStorage()
{
cellFaces_.clear();
@ -241,6 +227,7 @@ Foam::meshReader::meshReader
cellTable_()
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::meshReader::~meshReader()
@ -248,7 +235,5 @@ Foam::meshReader::~meshReader()
deleteDemandDrivenData(pointCellsPtr_);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -51,6 +51,7 @@ SourceFiles
createPolyCells.C
meshReader.C
meshReaderAux.C
\*---------------------------------------------------------------------------*/
#ifndef meshReader_H
@ -74,54 +75,69 @@ namespace Foam
class meshReader
{
protected:
//- identify cell faces in terms of cell Id and face Id
//- Identify cell faces in terms of cell Id and face Id
class cellFaceIdentifier
{
public:
//- cell Id
label cell;
// Public data
//- face Id
label face;
//- Cell Id
label cell;
//- Construct null
cellFaceIdentifier() : cell(-1), face(-1) {}
//- Face Id
label face;
// Constructors
//- Construct null
cellFaceIdentifier() : cell(-1), face(-1) {}
//- Construct from cell/face components
cellFaceIdentifier(label c, label f) : cell(c), face(f) {}
//- Construct from cell/face components
cellFaceIdentifier(label c, label f) : cell(c), face(f) {}
// Check
//- used if cell or face are non-negative
bool used() const
{
return (cell >= 0 && face >= 0);
}
//- Used if cell or face are non-negative
bool used() const
{
return (cell >= 0 && face >= 0);
}
//- Unused if cell or face are negative
bool unused() const
{
return (cell < 0 || face < 0);
}
//- unsed if cell or face are negative
bool unused() const
{
return (cell < 0 || face < 0);
}
// Member Operators
bool operator!=(const cellFaceIdentifier& cf) const
{
return (cell != cf.cell || face != cf.face);
}
bool operator==(const cellFaceIdentifier& cf) const
{
return (cell == cf.cell && face == cf.face);
}
bool operator!=(const cellFaceIdentifier& cf) const
{
return (cell != cf.cell || face != cf.face);
}
bool operator==(const cellFaceIdentifier& cf) const
{
return (cell == cf.cell && face == cf.face);
}
// IOstream Operators
friend Ostream& operator<<(Ostream& os, const cellFaceIdentifier& cf)
{
os << "(" << cf.cell << "/" << cf.face << ")";
return os;
}
};
friend Ostream& operator<<
(
Ostream& os,
const cellFaceIdentifier& cf
)
{
os << "(" << cf.cell << "/" << cf.face << ")";
return os;
}
};
private:
@ -154,6 +170,7 @@ private:
//- Face sets for monitoring
HashTable<List<label>, word, string::hash> monitoringSets_;
// Private Member Functions
//- Disallow default bitwise copy construct
@ -170,7 +187,7 @@ private:
//- Make polyhedral cells and global faces if the mesh is polyhedral
void createPolyCells();
//- add in boundary face
//- Add in boundary face
void addPolyBoundaryFace
(
const label cellId,
@ -178,17 +195,17 @@ private:
const label nCreatedFaces
);
//- add in boundary face
//- Add in boundary face
void addPolyBoundaryFace
(
const cellFaceIdentifier& identifier,
const label nCreatedFaces
);
//- add cellZones based on cellTable Id
//- Add cellZones based on cellTable Id
void addCellZones(polyMesh&) const;
//- add faceZones based on monitoring boundary conditions
//- Add faceZones based on monitoring boundary conditions
void addFaceZones(polyMesh&) const;
//- Make polyhedral boundary from shape boundary
@ -204,7 +221,7 @@ private:
void writeInterfaces(const objectRegistry&) const;
// write List<label> in constant/polyMesh
//- Write List<label> in constant/polyMesh
void writeMeshLabelList
(
const objectRegistry& registry,
@ -219,7 +236,9 @@ private:
return const_cast<faceListList&>(cellFaces_);
}
protected:
// Protected data
//- Pointers to cell shape models
@ -229,19 +248,19 @@ protected:
static const cellModel* prismModel;
static const cellModel* hexModel;
//- referenced filename
//- Referenced filename
fileName geometryFile_;
//- geometry scaling
//- Geometry scaling
scalar scaleFactor_;
//- Points supporting the mesh
pointField points_;
//- lookup original Cell number for a given cell
//- Lookup original Cell number for a given cell
labelList origCellId_;
//- identify boundary faces by cells and their faces
//- Identify boundary faces by cells and their faces
// for each patch
List<List<cellFaceIdentifier> > boundaryIds_;
@ -260,19 +279,17 @@ protected:
//- List of each baffle face
faceList baffleFaces_;
// cell table id for each cell
//- Cell table id for each cell
labelList cellTableId_;
// cell table persistent data saved as a dictionary
//- Cell table persistent data saved as a dictionary
cellTable cellTable_;
// Member Functions
//- subclasses are required to supply this information
virtual bool readGeometry
(
const scalar scaleFactor = 1.0
) = 0;
//- Subclasses are required to supply this information
virtual bool readGeometry(const scalar scaleFactor = 1.0) = 0;
//- Return mesh points
pointField& points() const
@ -280,23 +297,28 @@ protected:
return const_cast<pointField&>(points_);
}
public:
// Static Members
//- warn about repeated names
//- Warn about repeated names
static void warnDuplicates(const word& context, const wordList&);
// Constructors
//- Construct from fileName
meshReader(const fileName&, const scalar scaleFactor = 1.0);
// Destructor
virtual ~meshReader();
//- Destructor
virtual ~meshReader();
// Member Functions
//- create and return polyMesh
//- Create and return polyMesh
virtual autoPtr<polyMesh> mesh(const objectRegistry&);
//- Write auxiliary information
@ -310,6 +332,7 @@ public:
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -23,17 +23,14 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*----------------------------------------------------------------------------*/
#include "meshReader.H"
#include "IOMap.H"
#include "OFstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Static Functions * * * * * * * * * * * * * //
// warn about duplicate names
void Foam::meshReader::warnDuplicates
(
const word& context,
@ -76,8 +73,6 @@ void Foam::meshReader::warnDuplicates
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// write interface (baffle) mapping
void Foam::meshReader::writeInterfaces(const objectRegistry& registry) const
{
// write constant/polyMesh/interface
@ -103,14 +98,12 @@ void Foam::meshReader::writeInterfaces(const objectRegistry& registry) const
ioObj.writeHeader(os);
os << interfaces_
<< "// ************************************************************************* //"
<< "// *************************************"
<< "************************************ //"
<< endl;
}
// write List<label> in constant/polyMesh
// this is crucial for later conversion back to ccm/starcd
void Foam::meshReader::writeMeshLabelList
(
const objectRegistry& registry,
@ -151,6 +144,7 @@ void Foam::meshReader::writeMeshLabelList
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::meshReader::writeAux(const objectRegistry& registry) const
@ -179,10 +173,4 @@ void Foam::meshReader::writeAux(const objectRegistry& registry) const
}
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -34,21 +34,16 @@ License
#include "IFstream.H"
#include "IOMap.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// special boundary regions
const char* Foam::meshReaders::STARCD::defaultBoundaryName =
"Default_Boundary_Region";
const char* Foam::meshReaders::STARCD::defaultSolidBoundaryName =
"Default_Boundary_Solid";
// keep solids
bool Foam::meshReaders::STARCD::keepSolids = false;
// face addressing from pro-STAR faces -> foam faces
const int Foam::meshReaders::STARCD::starToFoamFaceAddr[4][6] =
{
{ 4, 5, 2, 3, 0, 1 }, // 11 = pro-STAR hex
@ -57,12 +52,9 @@ const int Foam::meshReaders::STARCD::starToFoamFaceAddr[4][6] =
{ 0, -1, 4, 2, 1, 3 } // 14 = pro-STAR pyramid
};
// * * * * * * * * * * * * * * Static Functions * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// read and discard to newline
void Foam::meshReaders::STARCD::readToNewline(IFstream& is)
{
char ch = '\n';
@ -73,14 +65,8 @@ void Foam::meshReaders::STARCD::readToNewline(IFstream& is)
while ((is) && ch != '\n');
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// read header
bool Foam::meshReaders::STARCD::readHeader
(
IFstream& is,
word fileSignature
)
bool Foam::meshReaders::STARCD::readHeader(IFstream& is, word fileSignature)
{
if (!is.good())
{
@ -108,19 +94,16 @@ bool Foam::meshReaders::STARCD::readHeader
return true;
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// read boundaryRegion names and the cellTable information from
// dictionaries that have been extracted from the .inp file
void Foam::meshReaders::STARCD::readAux
(
const objectRegistry& registry
)
void Foam::meshReaders::STARCD::readAux(const objectRegistry& registry)
{
boundaryRegion_.readDict(registry);
cellTable_.readDict(registry);
}
// read in the points from the .vrt file
//
/*---------------------------------------------------------------------------*\
@ -219,7 +202,6 @@ void Foam::meshReaders::STARCD::readPoints
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// read in the cells from the .cel file
//
@ -261,10 +243,7 @@ for each cell face.
Strictly speaking, we only need the cellModeller for adding boundaries.
\*---------------------------------------------------------------------------*/
void Foam::meshReaders::STARCD::readCells
(
const fileName& inputName
)
void Foam::meshReaders::STARCD::readCells(const fileName& inputName)
{
const word fileSignature = "PROSTAR_CELL";
label nFluids = 0, nSolids = 0, nBaffles = 0, nShells = 0;
@ -545,7 +524,8 @@ void Foam::meshReaders::STARCD::readCells
{
Info<< "star cell " << starCellId << " has "
<< (nFaces - faceI)
<< " empty faces - could cause boundary addressing problems"
<< " empty faces - could cause boundary "
<< "addressing problems"
<< endl;
nFaces = faceI;
@ -633,6 +613,7 @@ void Foam::meshReaders::STARCD::readCells
mapToFoamPointId_.clear();
}
// read in the boundaries from the .bnd file
//
/*---------------------------------------------------------------------------*\
@ -653,10 +634,7 @@ BAFFLE
etc,
\*---------------------------------------------------------------------------*/
void Foam::meshReaders::STARCD::readBoundary
(
const fileName& inputName
)
void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName)
{
const word fileSignature = "PROSTAR_BOUNDARY";
label nPatches = 0, nFaces = 0, nBafflePatches = 0, maxId = 0;
@ -1059,13 +1037,9 @@ void Foam::meshReaders::STARCD::cullPoints()
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
bool Foam::meshReaders::STARCD::readGeometry
(
const scalar scaleFactor
)
bool Foam::meshReaders::STARCD::readGeometry(const scalar scaleFactor)
{
// Info<< "called meshReaders::STARCD::readGeometry" << endl;
@ -1077,9 +1051,9 @@ bool Foam::meshReaders::STARCD::readGeometry
return true;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from reading a file
Foam::meshReaders::STARCD::STARCD
(
const fileName& prefix,
@ -1095,11 +1069,11 @@ Foam::meshReaders::STARCD::STARCD
readAux(registry);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::meshReaders::STARCD::~STARCD()
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -67,7 +67,8 @@ class STARCD
protected:
// Private Data
// Protected Data
static const char* defaultBoundaryName;
static const char* defaultSolidBoundaryName;
@ -83,10 +84,11 @@ protected:
//- Cell labels (imported Cell numbering not necessarily contiguous)
labelList mapToFoamCellId_;
//- boundary region data
//- Boundary region data
boundaryRegion boundaryRegion_;
// Private Member Functions
// Protected Member Functions
//- Disallow default bitwise copy construct
STARCD(const STARCD&);
@ -97,27 +99,28 @@ protected:
//- Read the mesh from the file(s)
virtual bool readGeometry(const scalar scaleFactor = 1.0);
//- read points from file
//- Read points from file
void readPoints(const fileName&, const scalar scaleFactor);
//- read cell connectivities from file
//- Read cell connectivities from file
virtual void readCells(const fileName&);
//- remove unused points
//- Remove unused points
void cullPoints();
//- read boundary (cell/face) definitions
//- Read boundary (cell/face) definitions
void readBoundary(const fileName&);
//- read auxiliary data from constant/{boundaryRegion,cellTable}
//- Read auxiliary data from constant/{boundaryRegion,cellTable}
void readAux(const objectRegistry&);
//- read and discard to newline
//- Read and discard to newline
static void readToNewline(IFstream&);
//- read header
//- Read header
static bool readHeader(IFstream&, word fileSignature);
protected:
enum cellType
@ -145,9 +148,12 @@ protected:
public:
//- keep solids (default false)
// Static data
//- Keep solids (default false)
static bool keepSolids;
// Constructors
//- Construct from case name
@ -158,19 +164,19 @@ public:
const scalar scaleFactor = 1.0
);
// Destructor
virtual ~STARCD();
// Member Functions
//- Destructor
virtual ~STARCD();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace meshReaders
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -36,7 +36,6 @@ Foam::boundaryRegion::boundaryRegion()
{}
// read constant/boundaryRegion (IOMap<dictionary>)
Foam::boundaryRegion::boundaryRegion
(
const objectRegistry& registry,
@ -55,6 +54,7 @@ Foam::boundaryRegion::boundaryRegion
Foam::boundaryRegion::~boundaryRegion()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::label Foam::boundaryRegion::append(const dictionary& dict)
@ -73,8 +73,7 @@ Foam::label Foam::boundaryRegion::append(const dictionary& dict)
}
Foam::Map<Foam::word>
Foam::boundaryRegion::names() const
Foam::Map<Foam::word> Foam::boundaryRegion::names() const
{
Map<word> lookup;
@ -90,8 +89,7 @@ Foam::boundaryRegion::names() const
}
Foam::Map<Foam::word>
Foam::boundaryRegion::boundaryTypes() const
Foam::Map<Foam::word> Foam::boundaryRegion::boundaryTypes() const
{
Map<word> lookup;
@ -139,7 +137,6 @@ Foam::word Foam::boundaryRegion::boundaryType(const word& name) const
}
// read constant/boundaryRegion (IOMap<dictionary>)
void Foam::boundaryRegion::readDict
(
const objectRegistry& registry,
@ -174,7 +171,6 @@ void Foam::boundaryRegion::readDict
}
// write constant/boundaryRegion for later reuse
void Foam::boundaryRegion::writeDict
(
const objectRegistry& registry,
@ -208,12 +204,12 @@ void Foam::boundaryRegion::writeDict
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
void Foam::boundaryRegion::operator=(const boundaryRegion& rhs)
{
Map<dictionary>::operator=(rhs);
}
void Foam::boundaryRegion::operator=(const Map<dictionary>& rhs)
{
Map<dictionary>::operator=(rhs);
@ -260,9 +256,5 @@ void Foam::boundaryRegion::rename(const dictionary& dict)
}
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -72,15 +72,13 @@ class boundaryRegion
:
public Map<dictionary>
{
// Private data
// Private Member Functions
//- Disallow default bitwise copy construct
boundaryRegion(const boundaryRegion&);
//- Disallow default bitwise copy construct
boundaryRegion(const boundaryRegion&);
public:
// Static Members
// Constructors
@ -96,8 +94,8 @@ public:
);
// Destructor
~boundaryRegion();
//- Destructor
~boundaryRegion();
// Member Functions
@ -126,7 +124,6 @@ public:
const fileName& instance = "constant"
);
//- Write constant/boundaryRegion for later reuse
void writeDict
(
@ -153,13 +150,14 @@ public:
// newPatchName originalName;
// @endverbatim
void rename(const dictionary&);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -37,7 +37,6 @@ const char* const Foam::cellTable::defaultMaterial_ = "fluid";
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
//- map from cellTable Id -> zone number (unmapped = -1)
Foam::labelList Foam::cellTable::zoneMap() const
{
label maxId = 0;
@ -78,7 +77,6 @@ Foam::wordList Foam::cellTable::namesList() const
}
// add required entries - MaterialType
void Foam::cellTable::addDefaults()
{
forAllIter(Map<dictionary>, *this, iter)
@ -115,14 +113,12 @@ void Foam::cellTable::setEntry
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::cellTable::cellTable()
:
Map<dictionary>()
{}
// read constant/cellTable (IOMap<dictionary>)
Foam::cellTable::cellTable
(
const objectRegistry& registry,
@ -136,13 +132,12 @@ Foam::cellTable::cellTable
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::cellTable::~cellTable()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::label Foam::cellTable::append(const dictionary& dict)
@ -161,8 +156,7 @@ Foam::label Foam::cellTable::append(const dictionary& dict)
}
Foam::Map<Foam::word>
Foam::cellTable::names() const
Foam::Map<Foam::word> Foam::cellTable::names() const
{
Map<word> lookup;
@ -211,8 +205,10 @@ Foam::label Foam::cellTable::findIndex(const word& name) const
}
Foam::Map<Foam::word>
Foam::cellTable::selectType(const word& materialType) const
Foam::Map<Foam::word> Foam::cellTable::selectType
(
const word& materialType
) const
{
Map<word> lookup;
@ -236,29 +232,25 @@ Foam::cellTable::selectType(const word& materialType) const
}
Foam::Map<Foam::word>
Foam::cellTable::fluids() const
Foam::Map<Foam::word> Foam::cellTable::fluids() const
{
return selectType("fluid");
}
Foam::Map<Foam::word>
Foam::cellTable::solids() const
Foam::Map<Foam::word> Foam::cellTable::solids() const
{
return selectType("solid");
}
Foam::Map<Foam::word>
Foam::cellTable::shells() const
Foam::Map<Foam::word> Foam::cellTable::shells() const
{
return selectType("shell");
}
Foam::Map<Foam::word>
Foam::cellTable::materialTypes() const
Foam::Map<Foam::word> Foam::cellTable::materialTypes() const
{
Map<word> lookup;
@ -275,7 +267,6 @@ Foam::cellTable::materialTypes() const
}
//- assign material Type
void Foam::cellTable::setMaterial(const label& id, const word& matlType)
{
setEntry(id, "MaterialType", matlType);
@ -299,7 +290,6 @@ void Foam::cellTable::setName(const label& id)
}
// read constant/cellTable (IOMap<dictionary>)
void Foam::cellTable::readDict
(
const objectRegistry& registry,
@ -335,7 +325,6 @@ void Foam::cellTable::readDict
}
// write constant/cellTable for later reuse
void Foam::cellTable::writeDict
(
const objectRegistry& registry,
@ -369,19 +358,20 @@ void Foam::cellTable::writeDict
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
void Foam::cellTable::operator=(const cellTable& rhs)
{
Map<dictionary>::operator=(rhs);
addDefaults();
}
void Foam::cellTable::operator=(const Map<dictionary>& rhs)
{
Map<dictionary>::operator=(rhs);
addDefaults();
}
void Foam::cellTable::operator=(const polyMesh& mesh)
{
Map<dictionary> zoneDict;
@ -430,9 +420,6 @@ void Foam::cellTable::operator=(const polyMesh& mesh)
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// attach cellZones based on the cellTable Id
// - any other values can be extracted later from the cellTable dictionary
void Foam::cellTable::addCellZones
(
polyMesh& mesh,
@ -580,8 +567,5 @@ void Foam::cellTable::combine(const dictionary& dict, labelList& tableIds)
}
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -80,7 +80,9 @@ class cellTable
public Map<dictionary>
{
// Private data
static const char* const defaultMaterial_;
static const char* const defaultMaterial_;
// Private Member Functions
@ -98,8 +100,8 @@ class cellTable
//- Disallow default bitwise copy construct
cellTable(const cellTable&);
public:
// Static Members
// Constructors
@ -115,8 +117,8 @@ public:
);
// Destructor
~cellTable();
//- Destructor
~cellTable();
// Member Functions
@ -175,6 +177,7 @@ public:
const fileName& instance = "constant"
) const;
// Member Operators
//- Assignment
@ -195,13 +198,14 @@ public:
//- Combine tableIds together
// each dictionary entry is a wordList
void combine(const dictionary&, labelList& tableIds);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -29,27 +29,34 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// Pointers to cell shape models
const Foam::cellModel* Foam::meshWriter::unknownModel = Foam::cellModeller::
lookup
(
"unknown"
);
const Foam::cellModel* Foam::meshWriter::tetModel = Foam::cellModeller::
lookup
(
"tet"
);
const Foam::cellModel* Foam::meshWriter::pyrModel = Foam::cellModeller::
lookup
(
"pyr"
);
const Foam::cellModel* Foam::meshWriter::prismModel = Foam::cellModeller::
lookup
(
"prism"
);
const Foam::cellModel* Foam::meshWriter::hexModel = Foam::cellModeller::
lookup
(
@ -61,15 +68,9 @@ Foam::string Foam::meshWriter::defaultMeshName = "meshExport";
Foam::string Foam::meshWriter::defaultSurfaceName = "surfExport";
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::meshWriter::meshWriter
(
const polyMesh& mesh,
const scalar scaleFactor
)
Foam::meshWriter::meshWriter(const polyMesh& mesh, const scalar scaleFactor)
:
mesh_(mesh),
scaleFactor_(scaleFactor),
@ -80,27 +81,10 @@ Foam::meshWriter::meshWriter
{}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::meshWriter::~meshWriter()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -90,8 +90,6 @@ namespace Foam
class meshWriter
{
// Private data
// Private Member Functions
//- Disallow default bitwise copy construct
@ -100,16 +98,18 @@ class meshWriter
//- Disallow default bitwise assignment
void operator=(const meshWriter&);
protected:
// Protected data
//- mesh reference
//- Mesh reference
const polyMesh& mesh_;
//- scaling factor for points (eg, [m] -> [mm])
//- Scaling factor for points (eg, [m] -> [mm])
scalar scaleFactor_;
//- write bnd file
//- Write bnd file
bool writeBoundary_;
//- boundaryRegion persistent data saved as a dictionary
@ -118,7 +118,7 @@ protected:
//- cellTable persistent data saved as a dictionary
cellTable cellTable_;
// cellTable IDs for each cell
//- cellTable IDs for each cell
labelList cellTableId_;
//- Pointers to cell shape models
@ -128,6 +128,7 @@ protected:
static const cellModel* prismModel;
static const cellModel* hexModel;
public:
// Static data members
@ -138,7 +139,7 @@ public:
// Constructors
//- create a writer obejct
//- Ccreate a writer obejct
meshWriter
(
const polyMesh&,
@ -146,60 +147,46 @@ public:
);
// Selectors
// Destructor
virtual ~meshWriter();
//- Destructor
virtual ~meshWriter();
// Member Functions
// Access
// Check
// Edit
//- set points scaling
void scaleFactor(const scalar scaling)
{
scaleFactor_ = scaling;
}
//- Set points scaling
void scaleFactor(const scalar scaling)
{
scaleFactor_ = scaling;
}
//- Suppress writing bnd file
void noBoundary()
{
writeBoundary_ = false;
}
//- suppress writing bnd file
void noBoundary()
{
writeBoundary_ = false;
}
// Write
//- write volume mesh
// subclass must to supply this method
virtual bool write
(
const fileName& timeName = fileName::null
) const = 0;
//- Write volume mesh
// subclass must to supply this method
virtual bool write
(
const fileName& timeName = fileName::null
) const = 0;
//- write surface mesh with optional triangulation
// subclass could supply this information
virtual bool writeSurface
(
const fileName& timeName = fileName::null,
const bool& triangulate = false
) const
{
return false;
}
// Member Operators
// Friend Functions
// Friend Operators
// IOstream Operators
//- Write surface mesh with optional triangulation
// subclass could supply this information
virtual bool writeSurface
(
const fileName& timeName = fileName::null,
const bool& triangulate = false
) const
{
return false;
}
};
@ -209,10 +196,6 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// #include "meshWriterI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -32,11 +32,9 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// special boundary regions
const char* Foam::meshWriters::STARCD::defaultBoundaryName =
"Default_Boundary_Region";
// face addressing from foam faces -> pro-STAR faces for primitive shapes
const Foam::label Foam::meshWriters::STARCD::foamToStarFaceAddr[4][6] =
{
{ 4, 5, 2, 3, 0, 1 }, // 11 = pro-STAR hex
@ -174,12 +172,7 @@ void Foam::meshWriters::STARCD::getCellTable()
}
// Prostar 4+ header format
void Foam::meshWriters::STARCD::writeHeader
(
Ostream& os,
const char* filetype
)
void Foam::meshWriters::STARCD::writeHeader(Ostream& os, const char* filetype)
{
os << "PROSTAR_" << filetype << nl
<< 4000
@ -194,10 +187,7 @@ void Foam::meshWriters::STARCD::writeHeader
}
void Foam::meshWriters::STARCD::writePoints
(
const fileName& prefix
) const
void Foam::meshWriters::STARCD::writePoints(const fileName& prefix) const
{
OFstream os(prefix + ".vrt");
writeHeader(os, "VERTEX");
@ -227,10 +217,7 @@ void Foam::meshWriters::STARCD::writePoints
}
void Foam::meshWriters::STARCD::writeCells
(
const fileName& prefix
) const
void Foam::meshWriters::STARCD::writeCells(const fileName& prefix) const
{
OFstream os(prefix + ".cel");
writeHeader(os, "CELL");
@ -372,10 +359,7 @@ void Foam::meshWriters::STARCD::writeCells
}
void Foam::meshWriters::STARCD::writeBoundary
(
const fileName& prefix
) const
void Foam::meshWriters::STARCD::writeBoundary(const fileName& prefix) const
{
OFstream os(prefix + ".bnd");
writeHeader(os, "BOUNDARY");
@ -495,9 +479,6 @@ Foam::meshWriters::STARCD::STARCD
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::meshWriters::STARCD::~STARCD()
@ -506,10 +487,7 @@ Foam::meshWriters::STARCD::~STARCD()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::meshWriters::STARCD::rmFiles
(
const fileName& baseName
) const
void Foam::meshWriters::STARCD::rmFiles(const fileName& baseName) const
{
rm(baseName + ".vrt");
rm(baseName + ".cel");
@ -518,10 +496,7 @@ void Foam::meshWriters::STARCD::rmFiles
}
bool Foam::meshWriters::STARCD::write
(
const fileName& meshName
) const
bool Foam::meshWriters::STARCD::write(const fileName& meshName) const
{
fileName baseName(meshName);
@ -748,10 +723,4 @@ bool Foam::meshWriters::STARCD::writeSurface
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -64,8 +64,10 @@ class STARCD
public meshWriter
{
// Private Data
static const char* defaultBoundaryName;
// Private Member Functions
//- Disallow default bitwise copy construct
@ -74,22 +76,23 @@ class STARCD
//- Disallow default bitwise assignment
void operator=(const STARCD&);
//- pro-STAR 4+ header format
//- Pro-STAR 4+ header format
static void writeHeader(Ostream&, const char* filetype);
//- write points
//- Write points
void writePoints(const fileName& baseName) const;
//- write cells
//- Write cells
void writeCells(const fileName& baseName) const;
//- write boundary
//- Write boundary
void writeBoundary(const fileName& baseName) const;
void getCellTable();
label findDefaultBoundary() const;
public:
// Static data members
@ -100,68 +103,50 @@ public:
// Constructors
//- open a file for writing
//- Open a file for writing
STARCD
(
const polyMesh&,
const scalar scaleFactor = 1.0
);
// Selectors
// Destructor
virtual ~STARCD();
//- Destructor
virtual ~STARCD();
// Member Functions
// Access
// Check
// Edit
//- Remove STAR-CD files for the baseName
void rmFiles(const fileName& baseName) const;
// Write
//- Write volume mesh
virtual bool write
(
const fileName& meshName = fileName::null
) const;
//- Remove STAR-CD files for the baseName
void rmFiles(const fileName& baseName) const;
//- write volume mesh
virtual bool write
(
const fileName& meshName = fileName::null
) const;
//- write surface mesh with optional triangulation
virtual bool writeSurface
(
const fileName& meshName = fileName::null,
const bool& triangulate = false
) const;
// Member Operators
// Friend Functions
// Friend Operators
// IOstream Operators
//- Write surface mesh with optional triangulation
virtual bool writeSurface
(
const fileName& meshName = fileName::null,
const bool& triangulate = false
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace meshWriters
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -474,7 +474,7 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const
forAll(typEdgeLenSqr, levelI)
{
if (typEdgeLenSqr[levelI] == GREAT2)
if (typEdgeLenSqr[levelI] == GREAT2 && maxEdgeLenSqr[levelI] >= 0)
{
typEdgeLenSqr[levelI] = maxEdgeLenSqr[levelI];
}
@ -496,13 +496,14 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const
if (lenSqr < GREAT2)
{
level0Size = Foam::sqrt(lenSqr)/(1<<levelI);
level0Size = Foam::sqrt(lenSqr)*(1<<levelI);
if (debug)
{
Pout<< "hexRef8::getLevel0EdgeLength() :"
<< " For level:" << levelI
<< " found edgeLen:" << level0Size
<< " have edgeLen:" << Foam::sqrt(lenSqr)
<< " with equivalent level0 len:" << level0Size
<< endl;
}
break;

View File

@ -0,0 +1,52 @@
// The FOAM Project // File: motionProperties
/*
-------------------------------------------------------------------------------
========= | dictionary
\\ / |
\\ / | Name: motionProperties
\\ / | Family: FoamX configuration file
\\/ |
F ield | FOAM version: 2.1
O peration | Product of Nabla Ltd.
A and |
M anipulation | Email: Enquiries@Nabla.co.uk
-------------------------------------------------------------------------------
*/
// FoamX Case Dictionary.
version 1.0;
format ascii;
root "/home/warhol/chris/foam/chris2.1/run/Test";
case "movingCone";
instance "constant";
local "";
class dictionary;
form dictionary;
object motionProperties;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//motionSolverLibs ("libfvMotionSolvers.so");
solver laplacian;
//solver componentLaplacian x;
twoDMotion no;
diffusivity uniform;
//motionPlaneNormal (0 0 1);
//
//movingSurface yes;
//
//twoFluids no;
//
//normalMotionDir no;
//
//motionURF 1.0;
//
//boundaryCorrection yes;
// ************************************************************************* //

View File

@ -0,0 +1,82 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-2.03 -2.0 0)
( 8.03 -2.0 0)
( 8.03 8.0 0)
(-2.03 8.0 0)
(-2.03 -2.0 5)
( 8.03 -2.0 5)
( 8.03 8.0 5)
(-2.03 8.0 5)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch maxY
(
(3 7 6 2)
)
patch minX
(
(0 4 7 3)
)
patch maxX
(
(2 6 5 1)
)
patch minY
(
(1 5 4 0)
)
patch minZ
(
(0 3 2 1)
)
patch maxZ
(
(4 5 6 7)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 0.01;
// ************************************************************************* //

View File

@ -0,0 +1,57 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 100;
deltaT 1;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
//writeFormat binary;
writeFormat ascii;
writePrecision 7;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
// ************************************************************************* //

View File

@ -0,0 +1,66 @@
// The FOAM Project // File: decomposeParDict
/*
-------------------------------------------------------------------------------
========= | dictionary
\\ / |
\\ / | Name: decomposeParDict
\\ / | Family: FoamX configuration file
\\/ |
F ield | FOAM version: 2.1
O peration | Product of Nabla Ltd.
A and |
M anipulation | Email: Enquiries@Nabla.co.uk
-------------------------------------------------------------------------------
*/
// FoamX Case Dictionary.
FoamFile
{
version 2.0;
format ascii;
root "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
case "cavity";
instance "system";
local "";
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
arguments "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam" "cavity";
numberOfSubdomains 6;
method hierarchical;
//method metis;
//method parMetis;
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (3 2 1);
delta 0.001;
order xyz;
}
manualCoeffs
{
dataFile "cellDecomposition";
}
metisCoeffs
{
//n (5 1 1);
//cellWeightsFile "constant/cellWeightsFile";
}
// ************************************************************************* //

View File

@ -0,0 +1,71 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
//snGradCorr(cellMotionU) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian(1|A(U),p) Gauss linear corrected;
laplacian(diffusivity,cellMotionU) Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
//p ICCG 1e-06 0;
p AMG 1e-06 0 10;
U BICCG 1e-05 0;
// Meshmotion
cellMotionU ICCG 1e-6 0.0;
cellMotionUx ICCG 1e-6 0.0;
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,338 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
case "cavity";
instance "system";
local "";
class dictionary;
object autoHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers true;
// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
fridgeA
{
type searchableBox;
min (2 2 0);
max (3 3 2);
}
fridgeB
{
type searchableBox;
min (3.5 3 0);
max (4.3 3.8 1.8);
}
igloo
{
type searchableSphere;
centre (3 3 0);
radius 4;
}
};
// Settings for the castellatedMesh generation.
castellatedMeshControls
{
// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
// While refining maximum number of cells per processor. This is basically
// the number of cells that fit on a processor. If you choose this too small
// it will do just more refinement iterations to obtain a similar mesh.
maxLocalCells 1000000;
// Overall cell limit (approximately). Refinement will stop immediately
// upon reaching this number so a refinement level might not complete.
// Note that this is the number of cells before removing the part which
// is not 'visible' from the keepPoint. The final number of cells might
// actually be a lot less.
maxGlobalCells 2000000;
// The surface refinement loop might spend lots of iterations refining just a
// few cells. This setting will cause refinement to stop if <= minimumRefine
// are selected for refinement. Note: it will at least do one iteration
// (unless the number of cells to refine is 0)
minRefinementCells 0;
// Number of buffer layers between different levels.
// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 1;
// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features
(
//{
// file "someLine.eMesh";
// level 2;
//}
);
// Surface based refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies two levels for every surface. The first is the minimum level,
// every cell intersecting a surface gets refined up to the minimum level.
// The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces
{
fridgeA
{
// Surface-wise min and max refinement level
level (2 2);
}
fridgeB
{
// Surface-wise min and max refinement level
level (2 2);
}
igloo
{
// Surface-wise min and max refinement level
level (1 1);
}
}
// Resolve sharp angles on fridges
resolveFeatureAngle 60;
// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~
// Specifies refinement level for cells in relation to a surface. One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified in
// descending order.
// - inside. 'levels' is only one entry and only the level is used. All
// cells inside the surface get refined up to the level. The surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.
refinementRegions
{
}
// Mesh selection
// ~~~~~~~~~~~~~~
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
locationInMesh (3 0.28 0.43);
}
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;
//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 4.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 30;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
}
// Settings for the layer addition.
addLayersControls
{
// Per final patch (so not geometry!) the layer information
layers
{
fridgeA_region0
{
nSurfaceLayers 1;
}
fridgeB_region0
{
nSurfaceLayers 1;
}
igloo_region0
{
nSurfaceLayers 1;
}
}
// Expansion factor for layer mesh
expansionRatio 1.0;
//- Wanted thickness of final added cell layer. If multiple layers
// is the
// thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
finalLayerRatio 0.5;
//- Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// Relative to undistorted size of cell outside layer.
minThickness 0.25;
//- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
nGrow 0;
// Advanced settings
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
// make straight angle.
featureAngle 60;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
minMedianAxisAngle 130;
// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;
}
// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 65;
//- Max skewness allowed. Set to <0 to disable.
maxBoundarySkewness 20;
maxInternalSkewness 4;
//- Max concaveness allowed. Is angle (in degrees) below which concavity
// is allowed. 0 is straight face, <0 would be convex face.
// Set to 180 to disable.
maxConcave 80;
//- Minimum projected area v.s. actual area. Set to -1 to disable.
minFlatness 0.5;
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
// Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;
//- Minimum face area. Set to <0 to disable.
minArea -1;
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
//- and face centre triangles normal
minTwist 0.05;
//- minimum normalised cell determinant
//- 1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;
//- minFaceWeight (0 -> 0.5)
minFaceWeight 0.05;
//- minVolRatio (0 -> 1)
minVolRatio 0.01;
//must be >0 for Fluent compatibility
minTriangleTwist -1;
// Advanced
//- Number of error distribution iterations
nSmoothScale 4;
//- amount to scale back displacement at error points
errorReduction 0.75;
}
// Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
// The FOAM Project // File: motionProperties
/*
-------------------------------------------------------------------------------
========= | dictionary
\\ / |
\\ / | Name: motionProperties
\\ / | Family: FoamX configuration file
\\/ |
F ield | FOAM version: 2.1
O peration | Product of Nabla Ltd.
A and |
M anipulation | Email: Enquiries@Nabla.co.uk
-------------------------------------------------------------------------------
*/
// FoamX Case Dictionary.
version 1.0;
format ascii;
root "/home/warhol/chris/foam/chris2.1/run/Test";
case "movingCone";
instance "constant";
local "";
class dictionary;
form dictionary;
object motionProperties;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//motionSolverLibs ("libfvMotionSolvers.so");
solver laplacian;
//solver componentLaplacian x;
twoDMotion no;
diffusivity uniform;
//motionPlaneNormal (0 0 1);
//
//movingSurface yes;
//
//twoFluids no;
//
//normalMotionDir no;
//
//motionURF 1.0;
//
//boundaryCorrection yes;
// ************************************************************************* //

View File

@ -0,0 +1,82 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-20.29 -10 -4.232e-05)
( 41.71 -10 -4.232e-05)
( 41.71 10 -4.232e-05)
(-20.29 10 -4.232e-05)
(-20.29 -10 20)
( 41.71 -10 20)
( 41.71 10 20)
(-20.29 10 20)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (60 20 20) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch maxY
(
(3 7 6 2)
)
patch minX
(
(0 4 7 3)
)
patch maxX
(
(2 6 5 1)
)
patch minY
(
(1 5 4 0)
)
patch minZ
(
(0 3 2 1)
)
patch maxZ
(
(4 5 6 7)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 0.01;
// ************************************************************************* //

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 100;
deltaT 1;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
//writeFormat binary;
writeFormat ascii;
writePrecision 7;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
// ************************************************************************* //

View File

@ -0,0 +1,66 @@
// The FOAM Project // File: decomposeParDict
/*
-------------------------------------------------------------------------------
========= | dictionary
\\ / |
\\ / | Name: decomposeParDict
\\ / | Family: FoamX configuration file
\\/ |
F ield | FOAM version: 2.1
O peration | Product of Nabla Ltd.
A and |
M anipulation | Email: Enquiries@Nabla.co.uk
-------------------------------------------------------------------------------
*/
// FoamX Case Dictionary.
FoamFile
{
version 2.0;
format ascii;
root "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
case "cavity";
instance "system";
local "";
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
arguments "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam" "cavity";
numberOfSubdomains 6;
method hierarchical;
//method metis;
//method parMetis;
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (3 2 1);
delta 0.001;
order xyz;
}
manualCoeffs
{
dataFile "cellDecomposition";
}
metisCoeffs
{
//n (5 1 1);
//cellWeightsFile "constant/cellWeightsFile";
}
// ************************************************************************* //

View File

@ -0,0 +1,71 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
//snGradCorr(cellMotionU) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian(1|A(U),p) Gauss linear corrected;
laplacian(diffusivity,cellMotionU) Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
//p ICCG 1e-06 0;
p AMG 1e-06 0 10;
U BICCG 1e-05 0;
// Meshmotion
cellMotionU ICCG 1e-6 0.0;
cellMotionUx ICCG 1e-6 0.0;
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,585 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
case "cavity";
instance "system";
local "";
class dictionary;
object autoHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers true;
// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
motorBike.stl
{
type triSurfaceMesh;
name motorBike;
}
refinementBox
{
type searchableBox;
min (-0.3 -0.4 -0.1);
max ( 3.0 0.4 1.4);
}
};
// Settings for the castellatedMesh generation.
castellatedMeshControls
{
// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
// While refining maximum number of cells per processor. This is basically
// the number of cells that fit on a processor. If you choose this too small
// it will do just more refinement iterations to obtain a similar mesh.
maxLocalCells 1000000;
// Overall cell limit (approximately). Refinement will stop immediately
// upon reaching this number so a refinement level might not complete.
// Note that this is the number of cells before removing the part which
// is not 'visible' from the keepPoint. The final number of cells might
// actually be a lot less.
maxGlobalCells 2000000;
// The surface refinement loop might spend lots of iterations refining just a
// few cells. This setting will cause refinement to stop if <= minimumRefine
// are selected for refinement. Note: it will at least do one iteration
// (unless the number of cells to refine is 0)
minRefinementCells 10;
// Number of buffer layers between different levels.
// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 2;
// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features
(
//{
// file "someLine.eMesh";
// level 2;
//}
);
// Surface based refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies two levels for every surface. The first is the minimum level,
// every cell intersecting a surface gets refined up to the minimum level.
// The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces
{
motorBike
{
// Surface-wise min and max refinement level
level (5 6);
}
}
// Resolve sharp angles
resolveFeatureAngle 30;
// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~
// Specifies refinement level for cells in relation to a surface. One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified in
// descending order.
// - inside. 'levels' is only one entry and only the level is used. All
// cells inside the surface get refined up to the level. The surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.
refinementRegions
{
refinementBox
{
mode inside;
levels ((1E15 4));
}
}
// Mesh selection
// ~~~~~~~~~~~~~~
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
locationInMesh (3 3 0.43);
}
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;
//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 4.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 30;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
}
// Settings for the layer addition.
addLayersControls
{
// Per final patch (so not geometry!) the layer information
layers
{
minZ
{
nSurfaceLayers 1;
}
motorBike_frt-fairing:001%1
{
nSurfaceLayers 1;
}
motorBike_windshield:002%2
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim:005%5
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim:010%10
{
nSurfaceLayers 1;
}
motorBike_fr-wh-rim:011%11
{
nSurfaceLayers 1;
}
motorBike_fr-wh-brake-disk:012%12
{
nSurfaceLayers 1;
}
motorBike_frame:016-shadow%13
{
nSurfaceLayers 1;
}
motorBike_rear-susp:014%14
{
nSurfaceLayers 1;
}
motorBike_rear-susp:014-shadow%15
{
nSurfaceLayers 1;
}
motorBike_frame:016%16
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim:005-shadow%17
{
nSurfaceLayers 1;
}
motorBike_rr-wh-chain-hub:022%22
{
nSurfaceLayers 1;
}
motorBike_rearseat%24
{
nSurfaceLayers 1;
}
motorBike_frt-fairing%25
{
nSurfaceLayers 1;
}
motorBike_windshield%26
{
nSurfaceLayers 1;
}
motorBike_headlights%27
{
nSurfaceLayers 1;
}
motorBike_driversseat%28
{
nSurfaceLayers 1;
}
motorBike_rear-body%29
{
nSurfaceLayers 1;
}
motorBike_fuel-tank%30
{
nSurfaceLayers 1;
}
motorBike_exhaust%31
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim%32
{
nSurfaceLayers 1;
}
motorBike_fr-mud-guard%33
{
nSurfaceLayers 1;
}
motorBike_fr-wh-rim%34
{
nSurfaceLayers 1;
}
motorBike_fr-wh-brake-disk%35
{
nSurfaceLayers 1;
}
motorBike_fr-brake-caliper%36
{
nSurfaceLayers 1;
}
motorBike_fr-wh-tyre%37
{
nSurfaceLayers 1;
}
motorBike_hbars%38
{
nSurfaceLayers 1;
}
motorBike_fr-forks%39
{
nSurfaceLayers 1;
}
motorBike_chain%40
{
nSurfaceLayers 1;
}
motorBike_rr-wh-tyre%41
{
nSurfaceLayers 1;
}
motorBike_square-dial%42
{
nSurfaceLayers 1;
}
motorBike_round-dial%43
{
nSurfaceLayers 1;
}
motorBike_dial-holder%44
{
nSurfaceLayers 1;
}
motorBike_rear-susp%45
{
nSurfaceLayers 1;
}
motorBike_rear-brake-lights%46
{
nSurfaceLayers 1;
}
motorBike_rear-light-bracket%47
{
nSurfaceLayers 1;
}
motorBike_frame%48
{
nSurfaceLayers 1;
}
motorBike_rear-mud-guard%49
{
nSurfaceLayers 1;
}
motorBike_rear-susp-spring-damp%50
{
nSurfaceLayers 1;
}
motorBike_fairing-inner-plate%51
{
nSurfaceLayers 1;
}
motorBike_clutch-housing%52
{
nSurfaceLayers 1;
}
motorBike_radiator%53
{
nSurfaceLayers 1;
}
motorBike_water-pipe%54
{
nSurfaceLayers 1;
}
motorBike_water-pump%55
{
nSurfaceLayers 1;
}
motorBike_engine%56
{
nSurfaceLayers 1;
}
motorBike_rear-shock-link%57
{
nSurfaceLayers 1;
}
motorBike_rear-brake-fluid-pot-bracket%58
{
nSurfaceLayers 1;
}
motorBike_rear-brake-fluid-pot%59
{
nSurfaceLayers 1;
}
motorBike_footpeg%60
{
nSurfaceLayers 1;
}
motorBike_rr-wh-chain-hub%61
{
nSurfaceLayers 1;
}
motorBike_rear-brake-caliper%62
{
nSurfaceLayers 1;
}
motorBike_rider-helmet%65
{
nSurfaceLayers 1;
}
motorBike_rider-visor%66
{
nSurfaceLayers 1;
}
motorBike_rider-boots%67
{
nSurfaceLayers 1;
}
motorBike_rider-gloves%68
{
nSurfaceLayers 1;
}
motorBike_rider-body%69
{
nSurfaceLayers 1;
}
motorBike_frame:0%70
{
nSurfaceLayers 1;
}
motorBike_frt-fairing:001-shadow%74
{
nSurfaceLayers 1;
}
motorBike_windshield-shadow%75
{
nSurfaceLayers 1;
}
motorBike_fr-mud-guard-shadow%81
{
nSurfaceLayers 1;
}
motorBike_fr-wh-brake-disk-shadow%83
{
nSurfaceLayers 1;
}
motorBike_rear-mud-guard-shadow%84
{
nSurfaceLayers 1;
}
motorBike_rear-susp-spring-damp-shadow%85
{
nSurfaceLayers 1;
}
motorBike_radiator-shadow%86
{
nSurfaceLayers 1;
}
motorBike_rear-shock-link-shadow%87
{
nSurfaceLayers 1;
}
motorBike_rear-brake-fluid-pot-bracket-shadow%88
{
nSurfaceLayers 1;
}
motorBike_rr-wh-chain-hub-shadow%89
{
nSurfaceLayers 1;
}
}
// Expansion factor for layer mesh
expansionRatio 1.0;
//- Wanted thickness of final added cell layer. If multiple layers
// is the
// thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
finalLayerRatio 0.3;
//- Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// Relative to undistorted size of cell outside layer.
minThickness 0.1;
//- If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
nGrow 1;
// Advanced settings
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
// make straight angle.
featureAngle 30;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 3;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
minMedianAxisAngle 130;
// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;
}
// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 65;
//- Max skewness allowed. Set to <0 to disable.
maxBoundarySkewness 20;
maxInternalSkewness 4;
//- Max concaveness allowed. Is angle (in degrees) below which concavity
// is allowed. 0 is straight face, <0 would be convex face.
// Set to 180 to disable.
maxConcave 80;
//- Minimum projected area v.s. actual area. Set to -1 to disable.
minFlatness 0.5;
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
// Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;
//- Minimum face area. Set to <0 to disable.
minArea -1;
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
//- and face centre triangles normal
minTwist 0.02;
//- minimum normalised cell determinant
//- 1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;
//- minFaceWeight (0 -> 0.5)
minFaceWeight 0.02;
//- minVolRatio (0 -> 1)
minVolRatio 0.01;
//must be >0 for Fluent compatibility
minTriangleTwist -1;
// Advanced
//- Number of error distribution iterations
nSmoothScale 4;
//- amount to scale back displacement at error points
errorReduction 0.75;
}
// Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;
// ************************************************************************* //