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

This commit is contained in:
laurence
2012-04-20 10:05:39 +01:00
58 changed files with 207 additions and 165 deletions

View File

@ -23,7 +23,7 @@ fvMesh mesh
fvMesh::defaultRegion,
runTime.timeName(),
runTime,
IOobject::MUST_READ
IOobject::READ_IF_PRESENT
),
xferMove<Field<vector> >(points),
faces.xfer(),

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

@ -253,6 +253,12 @@ int main(int argc, char *argv[])
"file",
"specify an alternative to system/changeDictionaryDict"
);
argList::addOption
(
"instance",
"name",
"override instance setting (default is the time name)"
);
// Add explicit time option
timeSelector::addOptions();
@ -280,6 +286,7 @@ int main(int argc, char *argv[])
<< "No times selected." << exit(FatalError);
}
runTime.setTime(times[0], 0);
word instance = args.optionLookupOrDefault("instance", runTime.timeName());
#include "createNamedMesh.H"
@ -465,7 +472,7 @@ int main(int argc, char *argv[])
IOobject
(
fieldName,
runTime.timeName(),
instance,
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,

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

@ -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

@ -10,14 +10,14 @@ application=`getApplication`
runApplication blockMesh
transformPoints -scale '(1.6666 1 1)'
cp system/changeDictionaryDict.X system/changeDictionaryDict
runApplication changeDictionary -instance system
#cp system/changeDictionaryDict.X system/changeDictionaryDict
runApplication changeDictionary -instance system -dict system/changeDictionaryDict.X
runApplication mirrorMesh
rm log.mirrorMesh
rm log.changeDictionary
cp system/changeDictionaryDict.Y system/changeDictionaryDict
runApplication changeDictionary -instance system
#cp system/changeDictionaryDict.Y system/changeDictionaryDict
runApplication changeDictionary -instance system -dict system/changeDictionaryDict.Y
runApplication mirrorMesh
cp -rf 0/polyMesh constant/

View File

@ -15,37 +15,31 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5
4
(
left
{
type symmetryPlane;
nFaces 320;
startFace 99210;
}
outlet
{
type patch;
nFaces 320;
startFace 99530;
startFace 99370;
}
up
{
type symmetryPlane;
nFaces 380;
startFace 99850;
startFace 99690;
}
hole
{
type wall;
nFaces 560;
startFace 100230;
startFace 100070;
}
frontAndBack
{
type empty;
nFaces 100000;
startFace 100790;
startFace 100630;
}
)

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;
}