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:
@ -19,15 +19,17 @@ FoamFile
|
|||||||
|
|
||||||
numberOfSubdomains 8;
|
numberOfSubdomains 8;
|
||||||
|
|
||||||
|
|
||||||
//- Keep owner and neighbour on same processor for faces in zones:
|
//- Keep owner and neighbour on same processor for faces in zones:
|
||||||
// preserveFaceZones (heater solid1 solid3);
|
// preserveFaceZones (heater solid1 solid3);
|
||||||
|
|
||||||
|
|
||||||
//- Keep owner and neighbour on same processor for faces in patches:
|
//- Keep owner and neighbour on same processor for faces in patches:
|
||||||
// (makes sense only for cyclic patches)
|
// (makes sense only for cyclic patches)
|
||||||
//preservePatches (cyclic_half0 cyclic_half1);
|
//preservePatches (cyclic_half0 cyclic_half1);
|
||||||
|
|
||||||
|
//- Use the volScalarField named here as a weight for each cell in the
|
||||||
|
// decomposition. For example, use a particle population field to decompose
|
||||||
|
// for a balanced number of particles in a lagrangian simulation.
|
||||||
|
// weightField dsmcRhoNMean;
|
||||||
|
|
||||||
method scotch;
|
method scotch;
|
||||||
// method hierarchical;
|
// method hierarchical;
|
||||||
@ -59,11 +61,8 @@ multiLevelCoeffs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Desired output
|
// Desired output
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
simpleCoeffs
|
simpleCoeffs
|
||||||
{
|
{
|
||||||
n (2 1 1);
|
n (2 1 1);
|
||||||
|
|||||||
@ -24,7 +24,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "domainDecomposition.H"
|
#include "domainDecomposition.H"
|
||||||
#include "Time.H"
|
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "labelIOList.H"
|
#include "labelIOList.H"
|
||||||
#include "processorPolyPatch.H"
|
#include "processorPolyPatch.H"
|
||||||
|
|||||||
@ -41,6 +41,9 @@ SourceFiles
|
|||||||
#include "SLList.H"
|
#include "SLList.H"
|
||||||
#include "PtrList.H"
|
#include "PtrList.H"
|
||||||
#include "point.H"
|
#include "point.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|||||||
@ -114,7 +114,35 @@ void Foam::domainDecomposition::distributeCells()
|
|||||||
|
|
||||||
if (sameProcFaces.empty())
|
if (sameProcFaces.empty())
|
||||||
{
|
{
|
||||||
cellToProc_ = decomposePtr().decompose(*this, cellCentres());
|
if (decompositionDict_.found("weightField"))
|
||||||
|
{
|
||||||
|
word weightName = decompositionDict_.lookup("weightField");
|
||||||
|
|
||||||
|
volScalarField weights
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
weightName,
|
||||||
|
time().timeName(),
|
||||||
|
*this,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
*this
|
||||||
|
);
|
||||||
|
|
||||||
|
cellToProc_ = decomposePtr().decompose
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
cellCentres(),
|
||||||
|
weights.internalField()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cellToProc_ = decomposePtr().decompose(*this, cellCentres());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -173,12 +201,49 @@ void Foam::domainDecomposition::distributeCells()
|
|||||||
|
|
||||||
// Do decomposition on agglomeration
|
// Do decomposition on agglomeration
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
cellToProc_ = decomposePtr().decompose
|
if (decompositionDict_.found("weightField"))
|
||||||
(
|
{
|
||||||
*this,
|
scalarField regionWeights(globalRegion.nRegions(), 0);
|
||||||
globalRegion,
|
|
||||||
regionCentres
|
word weightName = decompositionDict_.lookup("weightField");
|
||||||
);
|
|
||||||
|
volScalarField weights
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
weightName,
|
||||||
|
time().timeName(),
|
||||||
|
*this,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
*this
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(globalRegion, cellI)
|
||||||
|
{
|
||||||
|
label regionI = globalRegion[cellI];
|
||||||
|
|
||||||
|
regionWeights[regionI] += weights.internalField()[cellI];
|
||||||
|
}
|
||||||
|
|
||||||
|
cellToProc_ = decomposePtr().decompose
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
globalRegion,
|
||||||
|
regionCentres,
|
||||||
|
regionWeights
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cellToProc_ = decomposePtr().decompose
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
globalRegion,
|
||||||
|
regionCentres
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\nFinished decomposition in "
|
Info<< "\nFinished decomposition in "
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -42,47 +42,34 @@ void Foam::IDDESDelta::calcDelta()
|
|||||||
{
|
{
|
||||||
label nD = mesh().nGeometricD();
|
label nD = mesh().nGeometricD();
|
||||||
|
|
||||||
|
volScalarField delta
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"delta",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimLength, SMALL),
|
||||||
|
calculatedFvPatchScalarField::typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
delta.internalField() = pow(mesh_.V(), 1.0/3.0);
|
||||||
|
|
||||||
// initialise hwn as wall distance
|
// initialise hwn as wall distance
|
||||||
volScalarField hwn = wallDist(mesh()).y();
|
volScalarField hwn = wallDist(mesh()).y();
|
||||||
|
|
||||||
scalar deltamaxTmp = 0.;
|
|
||||||
|
|
||||||
const cellList& cells = mesh().cells();
|
|
||||||
|
|
||||||
forAll(cells,cellI)
|
|
||||||
{
|
|
||||||
scalar deltaminTmp = 1.e10;
|
|
||||||
const labelList& cFaces = mesh().cells()[cellI];
|
|
||||||
const point& centrevector = mesh().cellCentres()[cellI];
|
|
||||||
|
|
||||||
forAll(cFaces, cFaceI)
|
|
||||||
{
|
|
||||||
label faceI = cFaces[cFaceI];
|
|
||||||
const point& facevector = mesh().faceCentres()[faceI];
|
|
||||||
scalar tmp = mag(facevector - centrevector);
|
|
||||||
|
|
||||||
if (tmp > deltamaxTmp)
|
|
||||||
{
|
|
||||||
deltamaxTmp = tmp;
|
|
||||||
}
|
|
||||||
if (tmp < deltaminTmp)
|
|
||||||
{
|
|
||||||
deltaminTmp = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hwn[cellI] = 2.0*deltaminTmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
dimensionedScalar deltamax("deltamax",dimLength,2.0*deltamaxTmp);
|
|
||||||
|
|
||||||
if (nD == 3)
|
if (nD == 3)
|
||||||
{
|
{
|
||||||
delta_.internalField() =
|
delta_.internalField() =
|
||||||
deltaCoeff_
|
deltaCoeff_
|
||||||
*min
|
*min
|
||||||
(
|
(
|
||||||
max(max(cw_*wallDist(mesh()).y(), cw_*deltamax), hwn),
|
max(max(cw_*wallDist(mesh()).y(), cw_*delta), hwn),
|
||||||
deltamax
|
delta
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (nD == 2)
|
else if (nD == 2)
|
||||||
@ -95,8 +82,8 @@ void Foam::IDDESDelta::calcDelta()
|
|||||||
deltaCoeff_
|
deltaCoeff_
|
||||||
*min
|
*min
|
||||||
(
|
(
|
||||||
max(max(cw_*wallDist(mesh()).y(), cw_*deltamax), hwn),
|
max(max(cw_*wallDist(mesh()).y(), cw_*delta), hwn),
|
||||||
deltamax
|
delta
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -44,9 +44,26 @@ addToRunTimeSelectionTable(LESModel, SpalartAllmarasIDDES, dictionary);
|
|||||||
|
|
||||||
tmp<volScalarField> SpalartAllmarasIDDES::alpha() const
|
tmp<volScalarField> SpalartAllmarasIDDES::alpha() const
|
||||||
{
|
{
|
||||||
|
volScalarField delta
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"delta",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimLength, SMALL),
|
||||||
|
calculatedFvPatchScalarField::typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
delta.internalField() = pow(mesh_.V(), 1.0/3.0);
|
||||||
|
|
||||||
return max
|
return max
|
||||||
(
|
(
|
||||||
0.25 - y_/dimensionedScalar("hMax", dimLength, max(cmptMax(delta()))),
|
0.25 - y_/delta,
|
||||||
scalar(-5)
|
scalar(-5)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
c++WARN = -wd327,654,819,1125,1476,1505,1572
|
c++WARN = -wd327,654,819,1125,1476,1505,1572
|
||||||
|
|
||||||
CC = icpc
|
CC = icpc -std=c++0x
|
||||||
|
|
||||||
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
c++DBUG =
|
c++DBUG =
|
||||||
c++OPT = -xT -O3 -no-prec-div
|
c++OPT = -xSSE3 -O3 -no-prec-div
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
c++WARN = -wd327,654,819,1125,1476,1505,1572
|
c++WARN = -wd327,654,819,1125,1476,1505,1572
|
||||||
|
|
||||||
#CC = icpc -gcc-version=400
|
#CC = icpc -gcc-version=400
|
||||||
CC = icpc
|
CC = icpc -std=c++0x
|
||||||
|
|
||||||
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user