Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

Conflicts:
	tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/polyMesh/boundary
This commit is contained in:
sergio
2012-04-20 12:41:42 +01:00
56 changed files with 240 additions and 148 deletions

View File

@ -7,6 +7,7 @@
surfaceScalarField phiHbyA
(
"phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phiAbs)
);

View File

@ -8,6 +8,7 @@
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho)
*(
(fvc::interpolate(HbyA) & mesh.Sf())

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,6 +37,7 @@ SourceFiles
#define ListOps_H
#include "labelList.H"
#include "ops.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -209,6 +210,18 @@ label findSortedIndex
);
//- Find last element < given value in sorted list and return index,
// return -1 if not found. Binary search.
template<class ListType, class BinaryOp>
label findLower
(
const ListType&,
typename ListType::const_reference,
const label stary,
const BinaryOp& bop
);
//- Find last element < given value in sorted list and return index,
// return -1 if not found. Binary search.
template<class ListType>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -592,12 +592,13 @@ Foam::label Foam::findSortedIndex
}
template<class ListType>
template<class ListType, class BinaryOp>
Foam::label Foam::findLower
(
const ListType& l,
typename ListType::const_reference t,
const label start
const label start,
const BinaryOp& bop
)
{
if (start >= l.size())
@ -612,7 +613,7 @@ Foam::label Foam::findLower
{
label mid = (low + high)/2;
if (l[mid] < t)
if (bop(l[mid], t))
{
low = mid;
}
@ -622,13 +623,13 @@ Foam::label Foam::findLower
}
}
if (l[high] < t)
if (bop(l[high], t))
{
return high;
}
else
{
if (l[low] < t)
if (bop(l[low], t))
{
return low;
}
@ -640,6 +641,18 @@ Foam::label Foam::findLower
}
template<class ListType>
Foam::label Foam::findLower
(
const ListType& l,
typename ListType::const_reference t,
const label start
)
{
return findLower(l, t, start, lessOp<typename ListType::value_type>());
}
template<class Container, class T, int nRows>
Foam::List<Container> Foam::initList(const T elems[nRows])
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -270,7 +270,7 @@ public:
) const;
//- Read a value from the named option if present.
// Return true if the named option was found.
// Return supplied default otherwise.
template<class T>
inline T optionLookupOrDefault
(

View File

@ -167,8 +167,11 @@ bool linearInterpolationWeights::integrationWeights
<< exit(FatalError);
}
// Currently no fancy logic on cached index
label i1 = findLower(samples_, t1);
// Currently no fancy logic on cached index like in value
//- Find lower or equal index
label i1 = findLower(samples_, t1, 0, lessEqOp<scalar>());
//- Find lower index
label i2 = findLower(samples_, t2);
// For now just fail if any outside table

View File

@ -32,12 +32,13 @@ Description
<entryName> csvFile;
csvFileCoeffs
{
hasHeaderLine true;
refColumn 0; // reference column index
componentColumns (1 2 3); // component column indices
separator ","; // optional (defaults to ",")
fileName "fileXYZ"; // name of csv data file
outOfBounds clamp; // optional out-of-bounds handling
hasHeaderLine true;
refColumn 0; // reference column index
componentColumns (1 2 3); // component column indices
separator ","; // optional (defaults to ",")
fileName "fileXYZ"; // name of csv data file
outOfBounds clamp; // optional out-of-bounds handling
interpolationScheme linear; // optional interpolation scheme
}
\endverbatim

View File

@ -73,6 +73,11 @@ void Foam::TableBase<Type>::writeEntries(Ostream& os) const
os.writeKeyword("outOfBounds") << boundsHandlingToWord(boundsHandling_)
<< token::END_STATEMENT << nl;
}
if (interpolationScheme_ != "linear")
{
os.writeKeyword("interpolationScheme") << interpolationScheme_
<< token::END_STATEMENT << nl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -142,6 +142,10 @@ Op(minMod, minMod(x, y))
Op(and, x && y)
Op(or, x || y)
Op(eqEq, x == y)
Op(less, x < y)
Op(lessEq, x <= y)
Op(greater, x > y)
Op(greaterEq, x >= y)
#undef Op

View File

@ -215,6 +215,39 @@ void Foam::meshTools::writeOBJ
}
void Foam::meshTools::writeOBJ
(
Ostream& os,
const point& p1,
const point& p2,
label& count
)
{
os << "v" << ' ' << p1.x() << ' ' << p1.y() << ' ' << p1.z() << endl;
os << "v" << ' ' << p2.x() << ' ' << p2.y() << ' ' << p2.z() << endl;
os << "l" << " " << (count + 1) << " " << (count + 2) << endl;
count += 2;
}
void Foam::meshTools::writeOBJ
(
Ostream& os,
const point& p1,
const point& p2
)
{
os << "v" << ' ' << p1.x() << ' ' << p1.y() << ' ' << p1.z() << endl;
os << "vn"
<< ' ' << p2.x() - p1.x()
<< ' ' << p2.y() - p1.y()
<< ' ' << p2.z() - p1.z() << endl;
}
void Foam::meshTools::writeOBJ
(
Ostream& os,

View File

@ -107,6 +107,24 @@ namespace meshTools
const point& pt
);
//- Write obj representation of a line connecting two points
// Need to keep track of points that have been added. count starts at 0
void writeOBJ
(
Ostream& os,
const point& p1,
const point& p2,
label& count
);
//- Write obj representation of a point p1 with a vector from p1 to p2
void writeOBJ
(
Ostream& os,
const point& p1,
const point& p2
);
//- Write obj representation of faces subset
void writeOBJ
(

View File

@ -23,7 +23,7 @@ boundaryField
{
ground
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
@ -35,7 +35,7 @@ boundaryField
burner
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
@ -53,7 +53,7 @@ boundaryField
"(region0_to.*)"
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
}

View File

@ -23,7 +23,7 @@ boundaryField
{
outlet
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
@ -41,13 +41,13 @@ boundaryField
base
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
inlet
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}

View File

@ -23,7 +23,7 @@ boundaryField
{
outlet
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
sides
@ -39,12 +39,12 @@ boundaryField
}
base
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
inlet
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
}

View File

@ -22,21 +22,21 @@ boundaryField
{
floor
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
ceiling
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
fixedWalls
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}

View File

@ -22,21 +22,21 @@ boundaryField
{
floor
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
ceiling
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
fixedWalls
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}

View File

@ -22,28 +22,28 @@ boundaryField
{
ground
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
igloo_region0
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
twoFridgeFreezers_seal_0
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
twoFridgeFreezers_herring_1
{
type buoyantPressure;
type fixedFluxPressure;
rho rhok;
value uniform 0;
}

View File

@ -22,19 +22,19 @@ boundaryField
{
floor
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
ceiling
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
fixedWalls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
}

View File

@ -23,25 +23,25 @@ boundaryField
{
frontAndBack
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
topAndBottom
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
hot
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
cold
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
}

View File

@ -23,22 +23,22 @@ boundaryField
{
floor
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
ceiling
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
inlet
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
outlet
{
type buoyantPressure;
type fixedFluxPressure;
value $internalField;
}
fixedWalls

View File

@ -22,19 +22,19 @@ boundaryField
{
floor
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
ceiling
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
fixedWalls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 1e5;
}
}

View File

@ -22,25 +22,25 @@ boundaryField
{
floor
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
ceiling
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
fixedWalls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
box
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
}

View File

@ -22,25 +22,25 @@ boundaryField
{
floor
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
ceiling
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
fixedWalls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
box
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
}

View File

@ -23,11 +23,11 @@ boundaryField
{
"(sides|frontAndBack)"
{
type buoyantPressure;
type fixedFluxPressure;
}
region0_to_wallFilmRegion_wallFilmFaces
{
type buoyantPressure;
type fixedFluxPressure;
}
}

View File

@ -23,12 +23,12 @@ boundaryField
{
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
wallFilm
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 100000;
}
}

View File

@ -23,19 +23,19 @@ boundaryField
{
inlet
{
type buoyantPressure;
type fixedFluxPressure;
}
outlet
{
type buoyantPressure;
type fixedFluxPressure;
}
sides
{
type buoyantPressure;
type fixedFluxPressure;
}
region0_to_wallFilmRegion_wallFilmFaces
{
type buoyantPressure;
type fixedFluxPressure;
}
}

View File

@ -23,11 +23,11 @@ boundaryField
{
sides
{
type buoyantPressure;
type fixedFluxPressure;
}
region0_to_wallFilmRegion_wallFilmFaces
{
type buoyantPressure;
type fixedFluxPressure;
}
}

View File

@ -22,7 +22,7 @@ boundaryField
{
inlet
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
@ -50,7 +50,7 @@ boundaryField
hull_wall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -22,7 +22,7 @@ boundaryField
{
inlet
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
outlet
@ -32,7 +32,7 @@ boundaryField
}
walls
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
}

View File

@ -22,13 +22,13 @@ boundaryField
{
rotor
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
stator
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}

View File

@ -22,13 +22,13 @@ boundaryField
{
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
obstacle
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,7 +22,7 @@ boundaryField
{
stationaryWalls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
atmosphere
@ -38,7 +38,7 @@ boundaryField
}
floatingObject
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -30,7 +30,7 @@ boundaryField
}
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -30,7 +30,7 @@ boundaryField
}
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -22,7 +22,7 @@ boundaryField
{
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -22,7 +22,7 @@ boundaryField
{
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -22,7 +22,7 @@ boundaryField
{
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -22,7 +22,7 @@ boundaryField
{
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
}

View File

@ -22,19 +22,19 @@ boundaryField
{
leftWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
rightWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
lowerWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,19 +22,19 @@ boundaryField
{
leftWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
rightWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
lowerWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -23,19 +23,19 @@ boundaryField
{
leftWall
{
type buoyantPressure;
type fixedFluxPressure;
gradient uniform 0;
value uniform 0;
}
rightWall
{
type buoyantPressure;
type fixedFluxPressure;
gradient uniform 0;
value uniform 0;
}
lowerWall
{
type buoyantPressure;
type fixedFluxPressure;
gradient uniform 0;
value uniform 0;
}

View File

@ -22,19 +22,19 @@ boundaryField
{
leftWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
rightWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
lowerWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -39,7 +39,7 @@ boundaryField
bullet
{
type buoyantPressure;
type fixedFluxPressure;
}
}

View File

@ -22,7 +22,7 @@ boundaryField
{
inlet
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}
outlet

View File

@ -22,19 +22,19 @@ boundaryField
{
leftWall
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}
rightWall
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}
lowerWall
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,19 +22,19 @@ boundaryField
{
leftWall
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}
rightWall
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}
lowerWall
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,13 +22,13 @@ boundaryField
{
rotor
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
stator
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}

View File

@ -22,19 +22,19 @@ boundaryField
{
leftWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
rightWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
lowerWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,19 +22,19 @@ boundaryField
{
leftWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
rightWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
lowerWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,7 +22,7 @@ boundaryField
{
inlet
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
@ -34,19 +34,19 @@ boundaryField
bottomWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
endWall
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
top
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,115 +22,115 @@ boundaryField
{
SYMP3
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
INLE1
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
OUTL9
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
OUTL10
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
OUTL11
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
OUTL12
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL6
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL8
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL61
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL62
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL63
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL64
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL65
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL66
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL67
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL68
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL69
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL7
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}
WALL70
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -23,19 +23,19 @@ boundaryField
{
left
{
type buoyantPressure;
type fixedFluxPressure;
}
right
{
type buoyantPressure;
type fixedFluxPressure;
}
bottom
{
type buoyantPressure;
type fixedFluxPressure;
}
top
{
type buoyantPressure;
type fixedFluxPressure;
}
frontBack
{

View File

@ -22,7 +22,7 @@ boundaryField
{
bottom
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
@ -34,7 +34,7 @@ boundaryField
walls
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}

View File

@ -22,7 +22,7 @@ boundaryField
{
walls
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
outlet
@ -32,7 +32,7 @@ boundaryField
}
inlet
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
frontAndBackPlanes

View File

@ -1901,7 +1901,7 @@ boundaryField
{
inlet
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}
@ -1913,7 +1913,7 @@ boundaryField
walls
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -22,13 +22,13 @@ boundaryField
{
rotor
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}
stator
{
type multiphaseFixedFluxPressure;
type fixedFluxPressure;
value $internalField;
}