mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -109,8 +109,7 @@ namespace Foam
|
||||
|
||||
|
||||
|
||||
//! @cond internalClass
|
||||
//- Internal tracking via stat(3p) or inotify(7)
|
||||
//- Internal tracking via stat(3p) or inotify(7)
|
||||
class fileMonitorWatcher
|
||||
{
|
||||
public:
|
||||
@ -140,7 +139,7 @@ namespace Foam
|
||||
{
|
||||
if (useInotify_)
|
||||
{
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
inotifyFd_ = inotify_init();
|
||||
dirWatches_.setCapacity(sz);
|
||||
dirFiles_.setCapacity(sz);
|
||||
@ -167,13 +166,13 @@ namespace Foam
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
FatalErrorIn("fileMonitorWatcher(const bool, const label)")
|
||||
<< "You selected inotify but this file was compiled"
|
||||
<< " without FOAM_USE_INOTIFY"
|
||||
<< "Please select another fileModification test method"
|
||||
<< exit(FatalError);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -184,7 +183,7 @@ namespace Foam
|
||||
//- remove all watches
|
||||
inline ~fileMonitorWatcher()
|
||||
{
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
if (useInotify_ && inotifyFd_ >= 0)
|
||||
{
|
||||
forAll(dirWatches_, i)
|
||||
@ -200,7 +199,7 @@ namespace Foam
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool addWatch(const label watchFd, const fileName& fName)
|
||||
@ -212,7 +211,7 @@ namespace Foam
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
// Add/retrieve watch on directory containing file.
|
||||
// Note that fName might be non-existing in special situations
|
||||
// (master-only reading for IODictionaries)
|
||||
@ -250,7 +249,7 @@ namespace Foam
|
||||
|
||||
dirWatches_(watchFd) = dirWatchID;
|
||||
dirFiles_(watchFd) = fName.name();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -288,7 +287,6 @@ namespace Foam
|
||||
}
|
||||
|
||||
};
|
||||
//! @endcond
|
||||
}
|
||||
|
||||
|
||||
@ -298,7 +296,7 @@ void Foam::fileMonitor::checkFiles() const
|
||||
{
|
||||
if (useInotify_)
|
||||
{
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
#ifdef FOAM_USE_INOTIFY
|
||||
// Large buffer for lots of events
|
||||
char buffer[EVENT_BUF_LEN];
|
||||
|
||||
@ -392,7 +390,7 @@ void Foam::fileMonitor::checkFiles() const
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -21,7 +21,8 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@file Foam::addToGlobalFunctionSelectionTable
|
||||
Global
|
||||
Foam::addToGlobalFunctionSelectionTable
|
||||
|
||||
Description
|
||||
Macros for easy insertion into global function selection tables
|
||||
@ -33,20 +34,18 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// add to hash-table of functions with 'lookup' as the key
|
||||
#define addNamedToGlobalFunctionSelectionTable\
|
||||
(memberFunction,argNames,lookup,functionPtr) \
|
||||
\
|
||||
/* Add to the table, find by lookup name */ \
|
||||
add##memberFunction##argNames##GlobalMemberFunctionToTable \
|
||||
add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_\
|
||||
add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_ \
|
||||
(#lookup, functionPtr)
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -21,7 +21,8 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@file Foam::globalFunctionSelectionTables
|
||||
Global
|
||||
Foam::globalFunctionSelectionTables
|
||||
|
||||
Description
|
||||
Macros to enable the easy declaration of global function selection tables.
|
||||
@ -35,7 +36,6 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// declare a run-time selection:
|
||||
@ -138,7 +138,6 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -21,7 +21,8 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@file Foam::addToStaticMemberFunctionSelectionTable
|
||||
Global
|
||||
Foam::addToStaticMemberFunctionSelectionTable
|
||||
|
||||
Description
|
||||
Macros for easy insertion into member function selection tables
|
||||
@ -47,7 +48,6 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -21,7 +21,8 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@file Foam::staticMemberFunctionSelectionTables
|
||||
Global
|
||||
Foam::staticMemberFunctionSelectionTables
|
||||
|
||||
Description
|
||||
Macros to enable the easy declaration of member function selection tables.
|
||||
@ -35,7 +36,6 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// declare a run-time selection:
|
||||
@ -140,7 +140,6 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,7 +90,8 @@ fileName cwd();
|
||||
// else return false
|
||||
bool chDir(const fileName& dir);
|
||||
|
||||
//- Search for @em name in the following hierarchy:
|
||||
//- Search for @em name
|
||||
// in the following hierarchy:
|
||||
// -# personal settings:
|
||||
// - ~/.OpenFOAM/\<VERSION\>/
|
||||
// <em>for version-specific files</em>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::interpolationTable
|
||||
|
||||
Description
|
||||
An interpolation/look-up table of scalar vs <Type> values.
|
||||
An interpolation/look-up table of scalar vs \<Type\> values.
|
||||
The reference scalar values must be monotonically increasing.
|
||||
|
||||
The handling of out-of-bounds values depends on the current setting
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::DiagonalMatrix<Type>
|
||||
Foam::DiagonalMatrix
|
||||
|
||||
Description
|
||||
DiagonalMatrix<Type> is a 2D diagonal matrix of objects
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -122,6 +122,7 @@ public:
|
||||
inline linePointRef line(const pointField&) const;
|
||||
|
||||
//- compare edges
|
||||
// Returns:
|
||||
// - 0: different
|
||||
// - +1: identical
|
||||
// - -1: same edge, but different orientation
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -307,6 +307,7 @@ public:
|
||||
inline edge faceEdge(const label n) const;
|
||||
|
||||
//- Return the edge direction on the face
|
||||
// Returns:
|
||||
// - 0: edge not found on the face
|
||||
// - +1: forward (counter-clockwise) on the face
|
||||
// - -1: reverse (clockwise) on the face
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -201,12 +201,14 @@ public:
|
||||
inline edge faceEdge(const label n) const;
|
||||
|
||||
//- Return the edge direction on the face
|
||||
// Returns:
|
||||
// - +1: forward (counter-clockwise) on the face
|
||||
// - -1: reverse (clockwise) on the face
|
||||
// - 0: edge not found on the face
|
||||
inline int edgeDirection(const edge&) const;
|
||||
|
||||
//- compare triFaces
|
||||
// Returns:
|
||||
// - 0: different
|
||||
// - +1: identical
|
||||
// - -1: same face, but different orientation
|
||||
|
||||
@ -547,7 +547,8 @@ public:
|
||||
|
||||
// Other
|
||||
|
||||
//- Helper for merging mesh point data. Determines
|
||||
//- Helper for merging mesh point data.
|
||||
// Determines:
|
||||
// - my unique indices
|
||||
// - global numbering over all unique indices
|
||||
// - the global number for all local points (so this will
|
||||
@ -558,7 +559,8 @@ public:
|
||||
labelList& uniquePoints
|
||||
) const;
|
||||
|
||||
//- Helper for merging patch point data. Takes maps from
|
||||
//- Helper for merging patch point data.
|
||||
// Takes maps from:
|
||||
// local points to/from mesh. Determines
|
||||
// - my unique points. These are mesh points, not patch points
|
||||
// since the master might not be on the patch.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -415,6 +415,7 @@ public:
|
||||
// Check
|
||||
|
||||
//- Calculate surface type formed by patch.
|
||||
// Types:
|
||||
// - all edges have two neighbours (manifold)
|
||||
// - some edges have more than two neighbours (illegal)
|
||||
// - other (open)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -134,7 +134,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//- compare Pairs
|
||||
//- Compare Pairs
|
||||
// Returning:
|
||||
// - 0: different
|
||||
// - +1: identical
|
||||
// - -1: same pair, but reversed order
|
||||
|
||||
@ -27,7 +27,7 @@ Class
|
||||
Description
|
||||
Templated basic entry that holds a constant value.
|
||||
|
||||
Usage - for entry <entryName> having the value <value>:
|
||||
Usage - for entry \<entryName\> having the value <value>:
|
||||
@verbatim
|
||||
<entryName> constant <value>
|
||||
@endverbatim
|
||||
|
||||
@ -27,7 +27,7 @@ Class
|
||||
Description
|
||||
Templated table container data entry. Items are stored in a list of
|
||||
Tuple2's. First column is always stored as scalar entries. Data is read
|
||||
in the form, e.g. for an entry <entryName> that is (scalar, vector):
|
||||
in the form, e.g. for an entry \<entryName\> that is (scalar, vector):
|
||||
|
||||
@verbatim
|
||||
<entryName> table
|
||||
|
||||
@ -26,7 +26,7 @@ Class
|
||||
|
||||
Description
|
||||
Polynomial container data entry for scalars. Items are stored in a list of
|
||||
Tuple2's. Data is input in the form, e.g. for an entry <entryName> that
|
||||
Tuple2's. Data is input in the form, e.g. for an entry \<entryName\> that
|
||||
describes y = x^2 + 2x^3
|
||||
|
||||
@verbatim
|
||||
|
||||
@ -65,9 +65,10 @@ public:
|
||||
// Public classes
|
||||
|
||||
//- Less function class used in sorting encoded transforms and indices
|
||||
// - minimum processor
|
||||
// - minimum local index
|
||||
// - minimum transform
|
||||
// Minimum of:
|
||||
// - processor
|
||||
// - local index
|
||||
// - transform
|
||||
class less
|
||||
{
|
||||
public:
|
||||
|
||||
@ -49,21 +49,21 @@ namespace Foam
|
||||
|
||||
//- An optimized version of Hasher
|
||||
// @param[in] data - an array of uint32_t values
|
||||
// @param[in] len - the number of values (not bytes)
|
||||
// @param[in] length - the number of values (not bytes)
|
||||
// @param[in] seed - the previous hash, or an arbitrary value
|
||||
unsigned HasherInt(const uint32_t*, size_t length, unsigned seed = 0);
|
||||
unsigned HasherInt(const uint32_t* data, size_t length, unsigned seed = 0);
|
||||
|
||||
//- An optimized version of Hasher, returning dual hash values
|
||||
// @param[in] data - an array of uint32_t values
|
||||
// @param[in] len - the number of values (not bytes)
|
||||
// @param[in] length - the number of values (not bytes)
|
||||
// @param[in] hash1 - the previous hash, or an arbitrary value
|
||||
// on output, the primary hash value
|
||||
// @param[in] hash1 - the previous hash, or an arbitrary value
|
||||
// on output, the secondary hash value
|
||||
unsigned HasherDual
|
||||
(
|
||||
const uint32_t*,
|
||||
size_t len,
|
||||
const uint32_t* data,
|
||||
size_t length,
|
||||
unsigned& hash1,
|
||||
unsigned& hash2
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -281,7 +281,8 @@ public:
|
||||
|
||||
// Point merging
|
||||
|
||||
//- Find topologically&geometrically shared points.
|
||||
//- Find topologically and geometrically shared points.
|
||||
//
|
||||
// - should only be called for parallel correct mesh
|
||||
// (since uses mesh.globalData)
|
||||
// - returns Map from point to master point (all in mesh point
|
||||
@ -293,6 +294,7 @@ public:
|
||||
);
|
||||
|
||||
//- Helper: Merge points.
|
||||
//
|
||||
// - Gets map from point to destination point
|
||||
// - Removes all points that don't map to themselves
|
||||
// - Modifies all faces that use the points to be removed.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -382,6 +382,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Like consistentRefinement but slower:
|
||||
//
|
||||
// - specify number of cells between consecutive refinement levels
|
||||
// (consistentRefinement equivalent to 1)
|
||||
// - specify max level difference between point-connected cells.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,14 +36,11 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(removeCells, 0);
|
||||
|
||||
defineTypeNameAndDebug(removeCells, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
// Remove count of elements of f.
|
||||
void Foam::removeCells::uncount
|
||||
(
|
||||
const labelList& f,
|
||||
@ -59,7 +56,6 @@ void Foam::removeCells::uncount
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from mesh
|
||||
Foam::removeCells::removeCells
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -73,10 +69,6 @@ Foam::removeCells::removeCells
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
//- Get labels of exposed faces. These are
|
||||
// - internal faces that become boundary faces
|
||||
// - coupled faces that become uncoupled (since on of the sides
|
||||
// gets deleted)
|
||||
Foam::labelList Foam::removeCells::getExposedFaces
|
||||
(
|
||||
const labelList& cellLabels
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,7 +94,8 @@ public:
|
||||
|
||||
// Topology changes
|
||||
|
||||
//- Get labels of exposed faces. These are
|
||||
//- Get labels of exposed faces.
|
||||
// These are
|
||||
// - internal faces that become boundary faces
|
||||
// - coupled faces that become uncoupled (since one of the sides
|
||||
// gets deleted)
|
||||
@ -114,7 +115,6 @@ public:
|
||||
//- Force recalculation of locally stored data on topological change
|
||||
void updateMesh(const mapPolyMesh&)
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -178,7 +178,8 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Given set of faces to pierce calculates:
|
||||
//- Find faces including those with cells which have the same mastercell
|
||||
// Given set of faces to pierce calculates:
|
||||
// - region for connected cells
|
||||
// - mastercell for each region. This is the lowest numbered cell
|
||||
// of all cells that get merged.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::PorousZones<ZoneType>
|
||||
Foam::PorousZones
|
||||
|
||||
Description
|
||||
A centralized ZoneType collection.
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open So
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,6 +42,16 @@ SourceFiles
|
||||
fvMesh.C
|
||||
fvMeshGeometry.C
|
||||
|
||||
See Also
|
||||
hmm
|
||||
|
||||
Usage
|
||||
oeuoeuoeu
|
||||
|
||||
ToDo
|
||||
oeuoeuoeu
|
||||
oeueouoeu
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fvMesh_H
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -156,14 +156,14 @@ namespace fvc
|
||||
);
|
||||
|
||||
|
||||
//- Interpolate tmp field onto faces using 'interpolate(<name>)'
|
||||
//- Interpolate tmp field onto faces using 'interpolate(\<name\>)'
|
||||
template<class Type>
|
||||
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
|
||||
);
|
||||
|
||||
//- Interpolate tmp field onto faces using 'interpolate(<name>)'
|
||||
//- Interpolate tmp field onto faces using 'interpolate(\<name\>)'
|
||||
template<class Type>
|
||||
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
|
||||
(
|
||||
|
||||
@ -381,7 +381,7 @@ public:
|
||||
IOstream::compressionType cmp
|
||||
) const;
|
||||
|
||||
//- Write positions to <cloudName>_positions.obj file
|
||||
//- Write positions to \<cloudName\>_positions.obj file
|
||||
void writePositions() const;
|
||||
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@ protected:
|
||||
typename ParcelType::constantProperties constProps_;
|
||||
|
||||
//- Sub-models dictionary
|
||||
const dictionary& subModelProperties_;
|
||||
const dictionary subModelProperties_;
|
||||
|
||||
//- Random number generator - used by some injection routines
|
||||
cachedRandom rndGen_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,7 +31,6 @@ License
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
#include "ConeInjectionMP.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "InflationInjection.H"
|
||||
#include "KinematicLookupTableInjection.H"
|
||||
@ -53,12 +52,6 @@ License
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ConeInjectionMP, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
FieldActivatedInjection, \
|
||||
KinematicCloud, \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,7 +32,6 @@ License
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
#include "ConeInjectionMP.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "NoInjection.H"
|
||||
@ -52,12 +51,6 @@ License
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ConeInjectionMP, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
FieldActivatedInjection, \
|
||||
KinematicCloud, \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,7 +31,6 @@ License
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
#include "ConeInjectionMP.H"
|
||||
#include "FieldActivatedInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "NoInjection.H"
|
||||
@ -51,12 +50,6 @@ License
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
ConeInjectionMP, \
|
||||
KinematicCloud, \
|
||||
ParcelType \
|
||||
); \
|
||||
makeInjectionModelType \
|
||||
( \
|
||||
FieldActivatedInjection, \
|
||||
KinematicCloud, \
|
||||
|
||||
@ -70,7 +70,7 @@ class particleForces
|
||||
const fvMesh& mesh_;
|
||||
|
||||
//- The particleForces dictionary
|
||||
const dictionary& dict_;
|
||||
const dictionary dict_;
|
||||
|
||||
//- Gravity
|
||||
const vector g_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,7 +41,16 @@ Foam::label Foam::ConeInjection<CloudType>::parcelsToInject
|
||||
{
|
||||
if ((time0 >= 0.0) && (time0 < duration_))
|
||||
{
|
||||
return round((time1 - time0)*parcelsPerSecond_);
|
||||
const scalar targetVolume = flowRateProfile_().integrate(0, time1);
|
||||
|
||||
const label targetParcels =
|
||||
parcelsPerInjector_*targetVolume/this->volumeTotal_;
|
||||
|
||||
const label nToInject = targetParcels - nInjected_;
|
||||
|
||||
nInjected_ += nToInject;
|
||||
|
||||
return positionAxis_.size()*nToInject;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -78,15 +87,14 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
||||
)
|
||||
:
|
||||
InjectionModel<CloudType>(dict, owner, typeName),
|
||||
positionAxis_(this->coeffDict().lookup("positionAxis")),
|
||||
injectorCells_(positionAxis_.size()),
|
||||
injectorTetFaces_(positionAxis_.size()),
|
||||
injectorTetPts_(positionAxis_.size()),
|
||||
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
||||
position_(this->coeffDict().lookup("position")),
|
||||
injectorCell_(-1),
|
||||
injectorTetFace_(-1),
|
||||
injectorTetPt_(-1),
|
||||
direction_(this->coeffDict().lookup("direction")),
|
||||
parcelsPerSecond_
|
||||
parcelsPerInjector_
|
||||
(
|
||||
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
||||
readScalar(this->coeffDict().lookup("parcelsPerInjector"))
|
||||
),
|
||||
flowRateProfile_
|
||||
(
|
||||
@ -102,39 +110,48 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
||||
this->coeffDict().subDict("sizeDistribution"), owner.rndGen()
|
||||
)
|
||||
),
|
||||
tanVec1_(vector::zero),
|
||||
tanVec2_(vector::zero)
|
||||
nInjected_(this->parcelsAddedTotal()),
|
||||
tanVec1_(positionAxis_.size()),
|
||||
tanVec2_(positionAxis_.size())
|
||||
{
|
||||
// Normalise direction vector
|
||||
direction_ /= mag(direction_);
|
||||
|
||||
// Determine direction vectors tangential to direction
|
||||
vector tangent = vector::zero;
|
||||
scalar magTangent = 0.0;
|
||||
|
||||
cachedRandom& rnd = this->owner().rndGen();
|
||||
while (magTangent < SMALL)
|
||||
// Normalise direction vector and determine direction vectors
|
||||
// tangential to injector axis direction
|
||||
forAll(positionAxis_, i)
|
||||
{
|
||||
vector v = rnd.sample01<vector>();
|
||||
vector& axis = positionAxis_[i].second();
|
||||
|
||||
tangent = v - (v & direction_)*direction_;
|
||||
magTangent = mag(tangent);
|
||||
axis /= mag(axis);
|
||||
|
||||
vector tangent = vector::zero;
|
||||
scalar magTangent = 0.0;
|
||||
|
||||
cachedRandom& rnd = this->owner().rndGen();
|
||||
while (magTangent < SMALL)
|
||||
{
|
||||
vector v = rnd.sample01<vector>();
|
||||
|
||||
tangent = v - (v & axis)*axis;
|
||||
magTangent = mag(tangent);
|
||||
}
|
||||
|
||||
tanVec1_[i] = tangent/magTangent;
|
||||
tanVec2_[i] = axis^tanVec1_[i];
|
||||
}
|
||||
|
||||
tanVec1_ = tangent/magTangent;
|
||||
tanVec2_ = direction_^tanVec1_;
|
||||
|
||||
// Set total volume to inject
|
||||
this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
|
||||
|
||||
// Set/cache the injector cell
|
||||
this->findCellAtPosition
|
||||
(
|
||||
injectorCell_,
|
||||
injectorTetFace_,
|
||||
injectorTetPt_,
|
||||
position_
|
||||
);
|
||||
// Set/cache the injector cells
|
||||
forAll(positionAxis_, i)
|
||||
{
|
||||
this->findCellAtPosition
|
||||
(
|
||||
injectorCells_[i],
|
||||
injectorTetFaces_[i],
|
||||
injectorTetPts_[i],
|
||||
positionAxis_[i].first()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -145,18 +162,18 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
||||
)
|
||||
:
|
||||
InjectionModel<CloudType>(im),
|
||||
positionAxis_(im.positionAxis_),
|
||||
injectorCells_(im.injectorCells_),
|
||||
injectorTetFaces_(im.injectorTetFaces_),
|
||||
injectorTetPts_(im.injectorTetPts_),
|
||||
duration_(im.duration_),
|
||||
position_(im.position_),
|
||||
injectorCell_(im.injectorCell_),
|
||||
injectorTetFace_(im.injectorTetFace_),
|
||||
injectorTetPt_(im.injectorTetPt_),
|
||||
direction_(im.direction_),
|
||||
parcelsPerSecond_(im.parcelsPerSecond_),
|
||||
parcelsPerInjector_(im.parcelsPerInjector_),
|
||||
flowRateProfile_(im.flowRateProfile_().clone().ptr()),
|
||||
Umag_(im.Umag_().clone().ptr()),
|
||||
thetaInner_(im.thetaInner_().clone().ptr()),
|
||||
thetaOuter_(im.thetaOuter_().clone().ptr()),
|
||||
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
||||
nInjected_(im.nInjected_),
|
||||
tanVec1_(im.tanVec1_),
|
||||
tanVec2_(im.tanVec2_)
|
||||
{}
|
||||
@ -181,7 +198,7 @@ Foam::scalar Foam::ConeInjection<CloudType>::timeEnd() const
|
||||
template<class CloudType>
|
||||
void Foam::ConeInjection<CloudType>::setPositionAndCell
|
||||
(
|
||||
const label,
|
||||
const label parcelI,
|
||||
const label,
|
||||
const scalar,
|
||||
vector& position,
|
||||
@ -190,17 +207,19 @@ void Foam::ConeInjection<CloudType>::setPositionAndCell
|
||||
label& tetPtI
|
||||
)
|
||||
{
|
||||
position = position_;
|
||||
cellOwner = injectorCell_;
|
||||
tetFaceI = injectorTetFace_;
|
||||
tetPtI = injectorTetPt_;
|
||||
const label i = parcelI % positionAxis_.size();
|
||||
|
||||
position = positionAxis_[i].first();
|
||||
cellOwner = injectorCells_[i];
|
||||
tetFaceI = injectorTetFaces_[i];
|
||||
tetPtI = injectorTetPts_[i];
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ConeInjection<CloudType>::setProperties
|
||||
(
|
||||
const label,
|
||||
const label parcelI,
|
||||
const label,
|
||||
const scalar time,
|
||||
typename CloudType::parcelType& parcel
|
||||
@ -208,6 +227,9 @@ void Foam::ConeInjection<CloudType>::setProperties
|
||||
{
|
||||
cachedRandom& rnd = this->owner().rndGen();
|
||||
|
||||
// set particle velocity
|
||||
const label i = parcelI % positionAxis_.size();
|
||||
|
||||
scalar t = time - this->SOI_;
|
||||
scalar ti = thetaInner_().value(t);
|
||||
scalar to = thetaOuter_().value(t);
|
||||
@ -217,8 +239,8 @@ void Foam::ConeInjection<CloudType>::setProperties
|
||||
scalar dcorr = cos(coneAngle);
|
||||
scalar beta = twoPi*rnd.sample01<scalar>();
|
||||
|
||||
vector normal = alpha*(tanVec1_*cos(beta) + tanVec2_*sin(beta));
|
||||
vector dirVec = dcorr*direction_;
|
||||
vector normal = alpha*(tanVec1_[i]*cos(beta) + tanVec2_[i]*sin(beta));
|
||||
vector dirVec = dcorr*positionAxis_[i].second();
|
||||
dirVec += normal;
|
||||
dirVec /= mag(dirVec);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,14 +25,12 @@ Class
|
||||
Foam::ConeInjection
|
||||
|
||||
Description
|
||||
Cone injection
|
||||
|
||||
Multi-point cone injection model
|
||||
- User specifies
|
||||
- time of start of injection
|
||||
- injector position
|
||||
- direction (along injection axis)
|
||||
- parcel flow rate
|
||||
- parcel velocity
|
||||
- list of injector positions and directions (along injection axes)
|
||||
- number of parcels to inject per injector
|
||||
- parcel velocities
|
||||
- inner and outer cone angles
|
||||
- Parcel diameters obtained by distribution model model
|
||||
|
||||
@ -46,6 +44,7 @@ SourceFiles
|
||||
|
||||
#include "InjectionModel.H"
|
||||
#include "distributionModel.H"
|
||||
#include "vectorList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -68,26 +67,23 @@ class ConeInjection
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- List of position and axis for each injector
|
||||
List<Tuple2<vector, vector> > positionAxis_;
|
||||
|
||||
//- List of cell labels corresponding to injector positions
|
||||
labelList injectorCells_;
|
||||
|
||||
//- List of tetFace labels corresponding to injector positions
|
||||
labelList injectorTetFaces_;
|
||||
|
||||
//- List of tetPt labels corresponding to injector positions
|
||||
labelList injectorTetPts_;
|
||||
|
||||
//- Injection duration [s]
|
||||
const scalar duration_;
|
||||
|
||||
//- Injector position [m]
|
||||
vector position_;
|
||||
|
||||
//- Cell containing injector position []
|
||||
label injectorCell_;
|
||||
|
||||
//- tetFace of tet containing injector position []
|
||||
label injectorTetFace_;
|
||||
|
||||
//- tetPt of tet containing injector position []
|
||||
label injectorTetPt_;
|
||||
|
||||
//- Injector direction []
|
||||
vector direction_;
|
||||
|
||||
//- Number of parcels to introduce per second []
|
||||
const label parcelsPerSecond_;
|
||||
//- Number of parcels to introduce per injector
|
||||
const label parcelsPerInjector_;
|
||||
|
||||
//- Flow rate profile relative to SOI []
|
||||
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
||||
@ -104,14 +100,17 @@ class ConeInjection
|
||||
//- Parcel size distribution model model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
|
||||
//- Number of parcels per injector already injected
|
||||
mutable label nInjected_;
|
||||
|
||||
|
||||
// Tangential vectors to the direction vector
|
||||
|
||||
//- First tangential vector
|
||||
vector tanVec1_;
|
||||
vectorList tanVec1_;
|
||||
|
||||
//- Second tangential vector
|
||||
vector tanVec2_;
|
||||
vectorList tanVec2_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@ -1,292 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ConeInjectionMP.H"
|
||||
#include "DataEntry.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
using namespace Foam::constant::mathematical;
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::label Foam::ConeInjectionMP<CloudType>::parcelsToInject
|
||||
(
|
||||
const scalar time0,
|
||||
const scalar time1
|
||||
)
|
||||
{
|
||||
if ((time0 >= 0.0) && (time0 < duration_))
|
||||
{
|
||||
const scalar targetVolume = flowRateProfile_().integrate(0, time1);
|
||||
|
||||
const label targetParcels =
|
||||
parcelsPerInjector_*targetVolume/this->volumeTotal_;
|
||||
|
||||
const label nToInject = targetParcels - nInjected_;
|
||||
|
||||
nInjected_ += nToInject;
|
||||
|
||||
return positions_.size()*nToInject;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::ConeInjectionMP<CloudType>::volumeToInject
|
||||
(
|
||||
const scalar time0,
|
||||
const scalar time1
|
||||
)
|
||||
{
|
||||
if ((time0 >= 0.0) && (time0 < duration_))
|
||||
{
|
||||
return flowRateProfile_().integrate(time0, time1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::ConeInjectionMP<CloudType>::ConeInjectionMP
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
InjectionModel<CloudType>(dict, owner, typeName),
|
||||
positionsFile_(this->coeffDict().lookup("positionsFile")),
|
||||
positions_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
positionsFile_,
|
||||
owner.db().time().constant(),
|
||||
owner.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
injectorCells_(positions_.size()),
|
||||
injectorTetFaces_(positions_.size()),
|
||||
injectorTetPts_(positions_.size()),
|
||||
axesFile_(this->coeffDict().lookup("axesFile")),
|
||||
axes_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
axesFile_,
|
||||
owner.db().time().constant(),
|
||||
owner.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
||||
parcelsPerInjector_
|
||||
(
|
||||
readScalar(this->coeffDict().lookup("parcelsPerInjector"))
|
||||
),
|
||||
flowRateProfile_
|
||||
(
|
||||
DataEntry<scalar>::New("flowRateProfile", this->coeffDict())
|
||||
),
|
||||
Umag_(DataEntry<scalar>::New("Umag", this->coeffDict())),
|
||||
thetaInner_(DataEntry<scalar>::New("thetaInner", this->coeffDict())),
|
||||
thetaOuter_(DataEntry<scalar>::New("thetaOuter", this->coeffDict())),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"), owner.rndGen()
|
||||
)
|
||||
),
|
||||
nInjected_(this->parcelsAddedTotal()),
|
||||
tanVec1_(positions_.size()),
|
||||
tanVec2_(positions_.size())
|
||||
{
|
||||
// Normalise direction vector and determine direction vectors
|
||||
// tangential to direction
|
||||
forAll(axes_, i)
|
||||
{
|
||||
axes_[i] /= mag(axes_[i]);
|
||||
|
||||
vector tangent = vector::zero;
|
||||
scalar magTangent = 0.0;
|
||||
|
||||
cachedRandom& rnd = this->owner().rndGen();
|
||||
while (magTangent < SMALL)
|
||||
{
|
||||
vector v = rnd.sample01<vector>();
|
||||
|
||||
tangent = v - (v & axes_[i])*axes_[i];
|
||||
magTangent = mag(tangent);
|
||||
}
|
||||
|
||||
tanVec1_[i] = tangent/magTangent;
|
||||
tanVec2_[i] = axes_[i]^tanVec1_[i];
|
||||
}
|
||||
|
||||
// Set total volume to inject
|
||||
this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
|
||||
|
||||
// Set/cache the injector cells
|
||||
forAll(positions_, i)
|
||||
{
|
||||
this->findCellAtPosition
|
||||
(
|
||||
injectorCells_[i],
|
||||
injectorTetFaces_[i],
|
||||
injectorTetPts_[i],
|
||||
positions_[i]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::ConeInjectionMP<CloudType>::ConeInjectionMP
|
||||
(
|
||||
const ConeInjectionMP<CloudType>& im
|
||||
)
|
||||
:
|
||||
InjectionModel<CloudType>(im),
|
||||
positionsFile_(im.positionsFile_),
|
||||
positions_(im.positions_),
|
||||
injectorCells_(im.injectorCells_),
|
||||
injectorTetFaces_(im.injectorTetFaces_),
|
||||
injectorTetPts_(im.injectorTetPts_),
|
||||
axesFile_(im.axesFile_),
|
||||
axes_(im.axes_),
|
||||
duration_(im.duration_),
|
||||
parcelsPerInjector_(im.parcelsPerInjector_),
|
||||
flowRateProfile_(im.flowRateProfile_().clone().ptr()),
|
||||
Umag_(im.Umag_().clone().ptr()),
|
||||
thetaInner_(im.thetaInner_().clone().ptr()),
|
||||
thetaOuter_(im.thetaOuter_().clone().ptr()),
|
||||
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
||||
nInjected_(im.nInjected_),
|
||||
tanVec1_(im.tanVec1_),
|
||||
tanVec2_(im.tanVec2_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::ConeInjectionMP<CloudType>::~ConeInjectionMP()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::ConeInjectionMP<CloudType>::timeEnd() const
|
||||
{
|
||||
return this->SOI_ + duration_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ConeInjectionMP<CloudType>::setPositionAndCell
|
||||
(
|
||||
const label parcelI,
|
||||
const label,
|
||||
const scalar,
|
||||
vector& position,
|
||||
label& cellOwner,
|
||||
label& tetFaceI,
|
||||
label& tetPtI
|
||||
)
|
||||
{
|
||||
const label i = parcelI % positions_.size();
|
||||
|
||||
position = positions_[i];
|
||||
cellOwner = injectorCells_[i];
|
||||
tetFaceI = injectorTetFaces_[i];
|
||||
tetPtI = injectorTetPts_[i];
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ConeInjectionMP<CloudType>::setProperties
|
||||
(
|
||||
const label parcelI,
|
||||
const label,
|
||||
const scalar time,
|
||||
typename CloudType::parcelType& parcel
|
||||
)
|
||||
{
|
||||
cachedRandom& rnd = this->owner().rndGen();
|
||||
|
||||
// set particle velocity
|
||||
const label i = parcelI%positions_.size();
|
||||
|
||||
scalar t = time - this->SOI_;
|
||||
scalar ti = thetaInner_().value(t);
|
||||
scalar to = thetaOuter_().value(t);
|
||||
scalar coneAngle = degToRad(rnd.position<scalar>(ti, to));
|
||||
|
||||
scalar alpha = sin(coneAngle);
|
||||
scalar dcorr = cos(coneAngle);
|
||||
scalar beta = twoPi*rnd.sample01<scalar>();
|
||||
|
||||
vector normal = alpha*(tanVec1_[i]*cos(beta) + tanVec2_[i]*sin(beta));
|
||||
vector dirVec = dcorr*axes_[i];
|
||||
dirVec += normal;
|
||||
dirVec /= mag(dirVec);
|
||||
|
||||
parcel.U() = Umag_().value(t)*dirVec;
|
||||
|
||||
// set particle diameter
|
||||
parcel.d() = sizeDistribution_().sample();
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::ConeInjectionMP<CloudType>::fullyDescribed() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::ConeInjectionMP<CloudType>::validInjection(const label)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,218 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::ConeInjectionMP
|
||||
|
||||
Description
|
||||
Cone injection multi-point
|
||||
|
||||
- User specifies
|
||||
- time of start of injection
|
||||
- injector positions
|
||||
- directions (along injection axes)
|
||||
- parcel flow rate
|
||||
- parcel velocities
|
||||
- inner and outer cone angles
|
||||
- Parcel diameters obtained by distribution model model
|
||||
|
||||
SourceFiles
|
||||
ConeInjectionMP.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ConeInjectionMP_H
|
||||
#define ConeInjectionMP_H
|
||||
|
||||
#include "InjectionModel.H"
|
||||
#include "distributionModel.H"
|
||||
#include "vectorList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
|
||||
template<class Type>
|
||||
class DataEntry;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ConeInjectionMP Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class ConeInjectionMP
|
||||
:
|
||||
public InjectionModel<CloudType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of file containing positions data
|
||||
const word positionsFile_;
|
||||
|
||||
//- Field of injector positions
|
||||
vectorIOField positions_;
|
||||
|
||||
//- List of cell labels corresponding to injector positions
|
||||
labelList injectorCells_;
|
||||
|
||||
//- List of tetFace labels corresponding to injector positions
|
||||
labelList injectorTetFaces_;
|
||||
|
||||
//- List of tetPt labels corresponding to injector positions
|
||||
labelList injectorTetPts_;
|
||||
|
||||
//- Name of file containing axes data
|
||||
const word axesFile_;
|
||||
|
||||
//- Field of injector positions
|
||||
vectorIOField axes_;
|
||||
|
||||
//- Injection duration [s]
|
||||
const scalar duration_;
|
||||
|
||||
//- Number of parcels to introduce per injector
|
||||
const label parcelsPerInjector_;
|
||||
|
||||
//- Flow rate profile relative to SOI []
|
||||
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
||||
|
||||
//- Parcel velocity magnitude relative to SOI [m/s]
|
||||
const autoPtr<DataEntry<scalar> > Umag_;
|
||||
|
||||
//- Inner cone angle relative to SOI [deg]
|
||||
const autoPtr<DataEntry<scalar> > thetaInner_;
|
||||
|
||||
//- Outer cone angle relative to SOI [deg]
|
||||
const autoPtr<DataEntry<scalar> > thetaOuter_;
|
||||
|
||||
//- Parcel size distribution model model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
|
||||
//- Number of parcels per injector already injected
|
||||
mutable label nInjected_;
|
||||
|
||||
|
||||
// Tangential vectors to the direction vector
|
||||
|
||||
//- First tangential vector
|
||||
vectorList tanVec1_;
|
||||
|
||||
//- Second tangential vector
|
||||
vectorList tanVec2_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Number of parcels to introduce over the time step relative to SOI
|
||||
virtual label parcelsToInject(const scalar time0, const scalar time1);
|
||||
|
||||
//- Volume of parcels to introduce over the time step relative to SOI
|
||||
virtual scalar volumeToInject(const scalar time0, const scalar time1);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("ConeInjectionMP");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
ConeInjectionMP(const dictionary& dict, CloudType& owner);
|
||||
|
||||
//- Construct copy
|
||||
ConeInjectionMP(const ConeInjectionMP<CloudType>& im);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<InjectionModel<CloudType> > clone() const
|
||||
{
|
||||
return autoPtr<InjectionModel<CloudType> >
|
||||
(
|
||||
new ConeInjectionMP<CloudType>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~ConeInjectionMP();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the end-of-injection time
|
||||
scalar timeEnd() const;
|
||||
|
||||
|
||||
// Injection geometry
|
||||
|
||||
//- Set the injection position and owner cell, tetFace and tetPt
|
||||
virtual void setPositionAndCell
|
||||
(
|
||||
const label parcelI,
|
||||
const label nParcels,
|
||||
const scalar time,
|
||||
vector& position,
|
||||
label& cellOwner,
|
||||
label& tetFaceI,
|
||||
label& tetPtI
|
||||
);
|
||||
|
||||
//- Set the parcel properties
|
||||
virtual void setProperties
|
||||
(
|
||||
const label parcelI,
|
||||
const label nParcels,
|
||||
const scalar time,
|
||||
typename CloudType::parcelType& parcel
|
||||
);
|
||||
|
||||
//- Flag to identify whether model fully describes the parcel
|
||||
virtual bool fullyDescribed() const;
|
||||
|
||||
//- Return flag to identify whether or not injection of parcelI is
|
||||
// permitted
|
||||
virtual bool validInjection(const label parcelI);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "ConeInjectionMP.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -26,7 +26,6 @@ Class
|
||||
|
||||
Description
|
||||
Manual injection
|
||||
|
||||
- User specifies
|
||||
- Total mass to inject
|
||||
- Parcel positions in file @c positionsFile
|
||||
|
||||
@ -26,7 +26,6 @@ Class
|
||||
|
||||
Description
|
||||
Patch injection
|
||||
|
||||
- User specifies
|
||||
- Total mass to inject
|
||||
- Name of patch
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -130,18 +130,21 @@ public:
|
||||
inline label end() const;
|
||||
|
||||
//- Compare the given start and end points with this curve
|
||||
// Return:
|
||||
// - 0: different
|
||||
// - +1: identical
|
||||
// - -1: same edge, but different orientation
|
||||
inline int compare(const curvedEdge&) const;
|
||||
|
||||
//- Compare the given start and end points with this curve
|
||||
// Return:
|
||||
// - 0: different
|
||||
// - +1: identical
|
||||
// - -1: same edge, but different orientation
|
||||
inline int compare(const edge&) const;
|
||||
|
||||
//- Compare the given start and end points with this curve
|
||||
// Return:
|
||||
// - 0: different
|
||||
// - +1: identical
|
||||
// - -1: same edge, but different orientation
|
||||
@ -159,6 +162,7 @@ public:
|
||||
|
||||
void operator=(const curvedEdge&);
|
||||
|
||||
|
||||
// Ostream operator
|
||||
|
||||
friend Ostream& operator<<(Ostream&, const curvedEdge&);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,6 +107,7 @@ public:
|
||||
|
||||
|
||||
//- Helper class for finding nearest
|
||||
// Nearest:
|
||||
// - point+local index
|
||||
// - sqr(distance)
|
||||
// - processor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -511,7 +511,8 @@ public:
|
||||
|
||||
// Queries
|
||||
|
||||
//- Calculate nearest point on nearest shape. Returns
|
||||
//- Calculate nearest point on nearest shape.
|
||||
// Returns
|
||||
// - bool : any point found nearer than nearestDistSqr
|
||||
// - label: index in shapes
|
||||
// - point: actual nearest point found
|
||||
@ -532,7 +533,8 @@ public:
|
||||
point& nearestPoint
|
||||
) const;
|
||||
|
||||
//- Find nearest to line. Returns
|
||||
//- Find nearest to line.
|
||||
// Returns
|
||||
// - bool : any point found?
|
||||
// - label: index in shapes
|
||||
// - point: actual nearest point found
|
||||
@ -621,10 +623,10 @@ public:
|
||||
|
||||
bool write(Ostream& os) const;
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Ostream& operator<< <Type>(Ostream&, const indexedOctree<Type>&);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -195,10 +195,11 @@ public:
|
||||
bool pointInCell(const point& p, const label celli) const;
|
||||
|
||||
//- Find nearest cell in terms of cell centre.
|
||||
// - use octree
|
||||
// - use linear search
|
||||
// - if seed is provided walk. (uses findNearestCellWalk;
|
||||
// does not handle holes in domain)
|
||||
// Options:
|
||||
// - use octree
|
||||
// - use linear search
|
||||
// - if seed is provided walk. (uses findNearestCellWalk;
|
||||
// does not handle holes in domain)
|
||||
label findNearestCell
|
||||
(
|
||||
const point& location,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -131,7 +131,8 @@ public:
|
||||
|
||||
// Single point queries.
|
||||
|
||||
//- Calculate nearest point on surface. Returns
|
||||
//- Calculate nearest point on surface.
|
||||
// Returns
|
||||
// - bool : any point found nearer than nearestDistSqr
|
||||
// - label: relevant index in surface (=face 0..5)
|
||||
// - point: actual nearest point found
|
||||
@ -141,7 +142,8 @@ public:
|
||||
const scalar nearestDistSqr
|
||||
) const;
|
||||
|
||||
//- Calculate nearest point on edge. Returns
|
||||
//- Calculate nearest point on edge.
|
||||
// Returns
|
||||
// - bool : any point found nearer than nearestDistSqr
|
||||
// - label: relevant index in surface(=?)
|
||||
// - point: actual nearest point found
|
||||
@ -151,7 +153,8 @@ public:
|
||||
const scalar nearestDistSqr
|
||||
) const;
|
||||
|
||||
//- Find nearest to segment. Returns
|
||||
//- Find nearest to segment.
|
||||
// Returns
|
||||
// - bool : any point found?
|
||||
// - label: relevant index in shapes (=face 0..5)
|
||||
// - point: actual nearest point found
|
||||
@ -241,7 +244,6 @@ public:
|
||||
notImplemented("searchableBox::writeData(Ostream&) const");
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,7 +26,6 @@ Class
|
||||
|
||||
Description
|
||||
Contains information about location on a triSurface:
|
||||
|
||||
- pointIndexHit:
|
||||
- location
|
||||
- bool: hit/miss
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -518,8 +518,7 @@ public:
|
||||
|
||||
// Tracking
|
||||
|
||||
//- Test point on plane of triangle to see if on edge or point
|
||||
// or inside.
|
||||
//- Test point on plane of triangle to see if on edge or point or inside
|
||||
static surfaceLocation classify
|
||||
(
|
||||
const triSurface&,
|
||||
@ -527,7 +526,8 @@ public:
|
||||
const point& trianglePoint
|
||||
);
|
||||
|
||||
//- Track on surface to get closer to point. Possible situations:
|
||||
//- Track on surface to get closer to point.
|
||||
// Possible situations:
|
||||
// - 1. reached endpoint
|
||||
// - 2. reached edge (normal situation)
|
||||
// - 3. reached end of surface (edge on single face)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,10 +28,10 @@ Description
|
||||
adds/subtracts a field or value to/from a base field.
|
||||
|
||||
New field name specified by -resultName option, or automatically as:
|
||||
<baseFieldName>_add_<addSubtractFieldName>
|
||||
<baseFieldName>_add_value
|
||||
<baseFieldName>_subtract_<addSubtractFieldName>
|
||||
<baseFieldName>_subtract_value
|
||||
\<baseFieldName\>_add_<addSubtractFieldName>
|
||||
\<baseFieldName\>_add_value
|
||||
\<baseFieldName\>_subtract_<addSubtractFieldName>
|
||||
\<baseFieldName\>_subtract_value
|
||||
|
||||
Example usage:
|
||||
addSubtract p add -value 100000 -resultName pAbs
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -72,32 +72,32 @@ Type Foam::fieldValues::cellSource::processValues
|
||||
{
|
||||
case opSum:
|
||||
{
|
||||
result = sum(values);
|
||||
result = gSum(values);
|
||||
break;
|
||||
}
|
||||
case opVolAverage:
|
||||
{
|
||||
result = sum(values*V)/sum(V);
|
||||
result = gSum(values*V)/gSum(V);
|
||||
break;
|
||||
}
|
||||
case opVolIntegrate:
|
||||
{
|
||||
result = sum(values*V);
|
||||
result = gSum(values*V);
|
||||
break;
|
||||
}
|
||||
case opWeightedAverage:
|
||||
{
|
||||
result = sum(values*weightField)/sum(weightField);
|
||||
result = gSum(values*weightField)/gSum(weightField);
|
||||
break;
|
||||
}
|
||||
case opMin:
|
||||
{
|
||||
result = min(values);
|
||||
result = gMin(values);
|
||||
break;
|
||||
}
|
||||
case opMax:
|
||||
{
|
||||
result = max(values);
|
||||
result = gMax(values);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -128,10 +128,10 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
|
||||
combineFields(setFieldValues<scalar>(weightFieldName_))
|
||||
);
|
||||
|
||||
Type result = processValues(values, V, weightField);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Type result = processValues(values, V, weightField);
|
||||
|
||||
if (valueOutput_)
|
||||
{
|
||||
IOField<Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -91,32 +91,32 @@ Type Foam::fieldValues::faceSource::processValues
|
||||
{
|
||||
case opSum:
|
||||
{
|
||||
result = sum(values);
|
||||
result = gSum(values);
|
||||
break;
|
||||
}
|
||||
case opAreaAverage:
|
||||
{
|
||||
result = sum(values*magSf)/sum(magSf);
|
||||
result = gSum(values*magSf)/gSum(magSf);
|
||||
break;
|
||||
}
|
||||
case opAreaIntegrate:
|
||||
{
|
||||
result = sum(values*magSf);
|
||||
result = gSum(values*magSf);
|
||||
break;
|
||||
}
|
||||
case opWeightedAverage:
|
||||
{
|
||||
result = sum(values*weightField)/sum(weightField);
|
||||
result = gSum(values*weightField)/gSum(weightField);
|
||||
break;
|
||||
}
|
||||
case opMin:
|
||||
{
|
||||
result = min(values);
|
||||
result = gMin(values);
|
||||
break;
|
||||
}
|
||||
case opMax:
|
||||
{
|
||||
result = max(values);
|
||||
result = gMax(values);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -158,11 +158,10 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName)
|
||||
magSf = combineFields(magSf);
|
||||
weightField = combineFields(weightField);
|
||||
|
||||
Type result = processValues(values, magSf, weightField);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Type result = processValues(values, magSf, weightField);
|
||||
|
||||
if (valueOutput_)
|
||||
{
|
||||
IOField<Type>
|
||||
|
||||
@ -56,6 +56,7 @@ namespace Foam
|
||||
|
||||
|
||||
//- Private class for finding nearest
|
||||
// Comprising:
|
||||
// - global index
|
||||
// - sqr(distance)
|
||||
typedef Tuple2<scalar, label> nearInfo;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::compressible::RASModels::mutRoughWallFunctionFvPatchScalarField
|
||||
Foam::compressible::RASModels::mutkRoughWallFunctionFvPatchScalarField
|
||||
|
||||
Description
|
||||
Boundary condition for turbulent (kinematic) viscosity when using wall
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::LESmodels::SpalartAllmaras
|
||||
Foam::incompressible::LESModels::SpalartAllmaras
|
||||
|
||||
Description
|
||||
SpalartAllmaras DES (SA + LES) turbulence model for incompressible flows
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::LESmodels::SpalartAllmarasDDES
|
||||
Foam::incompressible::LESModels::SpalartAllmarasDDES
|
||||
|
||||
Description
|
||||
SpalartAllmaras DDES LES turbulence model for incompressible flows
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::LESmodels::SpalartAllmarasIDDES
|
||||
Foam::incompressible::LESModels::SpalartAllmarasIDDES
|
||||
|
||||
Description
|
||||
SpalartAllmarasIDDES LES turbulence model for incompressible flows
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::LESmodels::kOmegaSSTSAS
|
||||
Foam::incompressible::LESModels::kOmegaSSTSAS
|
||||
|
||||
Description
|
||||
kOmegaSSTSAS LES turbulence model for incompressible flows
|
||||
|
||||
Reference in New Issue
Block a user