15 Commits

Author SHA1 Message Date
47517f2ebb zoltanRenumber: include required PstreamGlobals.H 2019-07-08 10:50:27 +01:00
fa12851880 blockMeshMerge: Increased merge tolerance
Resolves bug-report https://bugs.openfoam.org/view.php?id=3233
2019-05-30 16:34:07 +01:00
76a8284120 scotch: Upgraded to latest version
Avoids problems compiling with MPI-3.0
See https://bugs.openfoam.org/view.php?id=3216
2019-04-08 10:52:49 +01:00
eb0ce5d792 blockMeshMerge: Changed the mergeSqrDist slightly to compensate for the change SMALL -> small
Resolves bug-report https://bugs.openfoam.org/view.php?id=3203
2019-03-19 16:36:35 +00:00
fa2ea1098a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-6 2019-03-15 11:53:09 +00:00
a9f850781a Removed redundant file 2019-03-15 11:52:54 +00:00
fdfb5b1825 data: Reset solver data only when non-sub cycled time index changes
Resolves bug report https://bugs.openfoam.org/view.php?id=3189
2019-03-08 09:11:34 +00:00
f92a7e7854 swirlFlowRateInletVelocityFvPatchVectorField: Added reduction to patch size
Resolves bug-report https://bugs.openfoam.org/view.php?id=3185
2019-03-05 12:08:49 +00:00
e29811f5df convergenceControl: Store solve index per-field not per-entry
Resolves bug report https://bugs.openfoam.org/view.php?id=3173
2019-02-20 14:38:05 +00:00
d93375f714 freestream[Pressure|Velocity]FvPatchScalarField: Updated for clang 2019-02-15 15:46:38 +00:00
6b3f9c0b97 particle: Fixed ACMI transfers
The optimisation work done as commit 81947c80 introduced a failure mode
where an ACMI interaction could repeat indefinitely. This has now been
corrected.

Resolves bug report https://bugs.openfoam.org/view.php?id=3166
2019-02-12 15:53:43 +00:00
0d4d30aa29 freestreamVelocity/Pressure BC: stabilise in the limit of mag(Up) = 0 2019-02-04 20:58:06 +00:00
039d77aae4 tutorial simplifiedSiwek: Updated chemistry stability settings for the new Jacobian
Resolves bug-report https://bugs.openfoam.org/view.php?id=3155
2019-01-29 22:36:44 +00:00
bdc14dcd3d liquidProperties::N2: Corrected mu coefficient
Resolves bug-report https://bugs.openfoam.org/view.php?id=3136
2019-01-28 17:35:39 +00:00
96e04780bf vtkUnstructuredReader: Added support for VTK files with METADATA
Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3149
2019-01-16 11:21:59 +00:00
18 changed files with 163 additions and 117 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -37,7 +37,7 @@
#
#------------------------------------------------------------------------------
export SCOTCH_VERSION=scotch_6.0.3
export SCOTCH_VERSION=scotch_6.0.6
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$SCOTCH_VERSION
#------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ Foam::data::data(const objectRegistry& obr)
IOobject::NO_WRITE
)
),
prevTimeIndex_(0)
prevTimeIndex_(-1)
{
set("solverPerformance", dictionary());
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,10 +40,15 @@ void Foam::data::setSolverPerformance
List<SolverPerformance<Type>> perfs;
if (prevTimeIndex_ != this->time().timeIndex())
const label timeIndex =
this->time().subCycling()
? this->time().prevTimeState().timeIndex()
: this->time().timeIndex();
if (prevTimeIndex_ != timeIndex)
{
// Reset solver performance between iterations
prevTimeIndex_ = this->time().timeIndex();
prevTimeIndex_ = timeIndex;
dict.clear();
}
else

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,6 +29,7 @@ License
#include "stringIOList.H"
#include "cellModeller.H"
#include "vectorIOField.H"
#include "stringOps.H"
/* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */
@ -907,6 +908,19 @@ void Foam::vtkUnstructuredReader::read(ISstream& inFile)
}
}
}
else if (tag == "METADATA")
{
// Read rest of the line
string line;
inFile.getLine(line);
// Skip until an empty line is found
inFile.getLine(line);
while (!stringOps::trim(line).empty())
{
inFile.getLine(line);
}
}
else
{
FatalIOErrorInFunction(inFile)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,7 +60,6 @@ public:
wordRe name;
scalar absTol;
scalar relTol;
label solveIndex;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -96,7 +96,6 @@ bool Foam::singleRegionCorrectorConvergenceControl::readCorrResidualControls()
rd.name = fName.c_str();
rd.absTol = readScalar(fieldDict.lookup("tolerance"));
rd.relTol = readScalar(fieldDict.lookup("relTol"));
rd.solveIndex = 0;
data.append(rd);
}
else
@ -177,11 +176,11 @@ corrCriteriaSatisfied() const
const dictionary& solverDict = mesh_.solverPerformanceDict();
forAllConstIter(dictionary, solverDict, iter)
{
const word& variableName = iter().keyword();
const word& fieldName = iter().keyword();
const label fieldi =
convergenceControl::residualControlIndex
(
variableName,
fieldName,
corrResidualControl_
);
if (fieldi != -1)
@ -190,8 +189,8 @@ corrCriteriaSatisfied() const
convergenceControl::getInitialResiduals
(
mesh_,
variableName,
corrResidualControl_[fieldi].solveIndex,
fieldName,
solveIndex_.found(fieldName) ? solveIndex_[fieldName] : 0,
iter().stream(),
firstResidual,
residual
@ -209,7 +208,7 @@ corrCriteriaSatisfied() const
if (control_.debug)
{
Info<< control_.algorithmSpace() << " " << variableName
Info<< control_.algorithmSpace() << " " << fieldName
<< ": tolerance " << residual << " ("
<< corrResidualControl_[fieldi].absTol << ")"
<< ", relTol " << relativeResidual << " ("
@ -225,10 +224,7 @@ corrCriteriaSatisfied() const
void Foam::singleRegionCorrectorConvergenceControl::resetCorrSolveIndex()
{
forAll(corrResidualControl_, i)
{
corrResidualControl_[i].solveIndex = 0;
}
solveIndex_.clear();
}
@ -237,23 +233,14 @@ void Foam::singleRegionCorrectorConvergenceControl::updateCorrSolveIndex()
const dictionary& solverDict = mesh_.solverPerformanceDict();
forAllConstIter(dictionary, solverDict, iter)
{
const word& variableName = iter().keyword();
const label fieldi =
convergenceControl::residualControlIndex
(
variableName,
corrResidualControl_
);
if (fieldi != -1)
{
getNSolves
(
mesh_,
variableName,
iter().stream(),
corrResidualControl_[fieldi].solveIndex
);
}
const word& fieldName = iter().keyword();
getNSolves
(
mesh_,
fieldName,
iter().stream(),
solveIndex_(fieldName)
);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,6 +62,11 @@ protected:
//- List of residual data per field
List<corrResidualData> corrResidualControl_;
//- The index of the solution at the start of the corrector loop, for
// each field. If the field name is not in the table then the index is
// assumed to be zero; i.e, the first solution.
HashTable<label> solveIndex_;
public:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -131,13 +131,39 @@ void Foam::freestreamPressureFvPatchScalarField::updateCoeffs()
UName_
);
const Field<scalar> magUp(mag(Up));
const Field<vector>& nf = patch().nf();
Field<scalar>& vf = valueFraction();
if (supersonic_)
{
valueFraction() = 0.5 - 0.5*(Up & patch().nf())/mag(Up);
forAll(vf, i)
{
if (magUp[i] > vSmall)
{
vf[i] = 0.5 - 0.5*(Up[i] & nf[i])/magUp[i];
}
else
{
vf[i] = 0.5;
}
}
}
else
{
valueFraction() = 0.5 + 0.5*(Up & patch().nf())/mag(Up);
forAll(vf, i)
{
if (magUp[i] > vSmall)
{
vf[i] = 0.5 + 0.5*(Up[i] & nf[i])/magUp[i];
}
else
{
vf[i] = 0.5;
}
}
}
mixedFvPatchField<scalar>::updateCoeffs();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -107,8 +107,23 @@ void Foam::freestreamVelocityFvPatchVectorField::updateCoeffs()
}
const Field<vector>& Up = *this;
const Field<scalar> magUp(mag(Up));
valueFraction() = 0.5 - 0.5*(Up & patch().nf())/mag(Up);
const Field<vector>& nf = patch().nf();
Field<scalar>& vf = valueFraction();
forAll(vf, i)
{
if (magUp[i] > vSmall)
{
vf[i] = 0.5 - 0.5*(Up[i] & nf[i])/magUp[i];
}
else
{
vf[i] = 0.5;
}
}
mixedFvPatchField<vector>::updateCoeffs();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ swirlFlowRateInletVelocityFvPatchVectorField
dict.lookupOrDefault
(
"origin",
patch().size()
returnReduce(patch().size(), sumOp<label>())
? gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf())
: Zero
)
@ -75,7 +75,7 @@ swirlFlowRateInletVelocityFvPatchVectorField
dict.lookupOrDefault
(
"axis",
patch().size()
returnReduce(patch().size(), sumOp<label>())
? -gSum(patch().Sf())/gSum(patch().magSf())
: Zero
)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -564,6 +564,16 @@ public:
trackingData& td
);
//- As above, but does not change the master patch. Needed in order for
// ACMI to be able to delegate a hit to the non-overlap patch.
template<class TrackCloudType>
void hitFaceNoChangeToMasterPatch
(
const vector& displacement,
TrackCloudType& cloud,
trackingData& td
);
//- Convenience function. Cobines trackToFace and hitFace
template<class TrackCloudType>
void trackToAndHitFace

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,6 +108,33 @@ void Foam::particle::hitFace
trackingData& td
)
{
if (debug)
{
Info << "Particle " << origId() << nl << FUNCTION_NAME << nl << endl;
}
if (onBoundaryFace())
{
changeToMasterPatch();
}
hitFaceNoChangeToMasterPatch(direction, cloud, td);
}
template<class TrackCloudType>
void Foam::particle::hitFaceNoChangeToMasterPatch
(
const vector& direction,
TrackCloudType& cloud,
trackingData& td
)
{
if (debug)
{
Info << "Particle " << origId() << nl << FUNCTION_NAME << nl << endl;
}
typename TrackCloudType::particleType& p =
static_cast<typename TrackCloudType::particleType&>(*this);
typename TrackCloudType::particleType::trackingData& ttd =
@ -123,8 +150,6 @@ void Foam::particle::hitFace
}
else if (onBoundaryFace())
{
changeToMasterPatch();
if (!p.hitPatch(cloud, ttd))
{
const polyPatch& patch = mesh_.boundaryMesh()[p.patch()];
@ -392,7 +417,7 @@ void Foam::particle::hitCyclicACMIPatch
// Move to the face associated with the non-overlap patch and redo the
// face interaction.
tetFacei_ = facei_ = cpp.nonOverlapPatch().start() + localFacei;
hitFace(direction, cloud, td);
hitFaceNoChangeToMasterPatch(direction, cloud, td);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,9 +56,7 @@ void Foam::blockMesh::calcMergeInfo()
}
// set unused to -1
mergeList_.setSize(nPoints_);
mergeList_ = -1;
mergeList_.setSize(nPoints_, -1);
const pointField& blockPoints = topology().points();
const cellList& blockCells = topology().cells();
@ -113,8 +111,11 @@ void Foam::blockMesh::calcMergeInfo()
// Collated points detected by initially taking a constant factor of
// the size of the block.
boundBox bb(blockCells[blockPlabel].points(blockFaces, blockPoints));
const scalar mergeSqrDist = magSqr(10*small*bb.span());
const boundBox bb
(
blockCells[blockPlabel].points(blockFaces, blockPoints)
);
const scalar mergeSqrDist = magSqr(50*small*bb.span());
// This is an N^2 algorithm
@ -548,35 +549,29 @@ void Foam::blockMesh::calcMergeInfo()
}
// Sort merge list to return new point label (in new shorter list)
// given old point label
label newPointLabel = 0;
// Sort merge list and count number of unique points
label nUniqPoints = 0;
forAll(mergeList_, pointLabel)
forAll(mergeList_, pointi)
{
if (mergeList_[pointLabel] > pointLabel)
if (mergeList_[pointi] > pointi)
{
FatalErrorInFunction
<< "Merge list contains point index out of range"
<< exit(FatalError);
}
if
(
mergeList_[pointLabel] == -1
|| mergeList_[pointLabel] == pointLabel
)
if (mergeList_[pointi] == -1 || mergeList_[pointi] == pointi)
{
mergeList_[pointLabel] = newPointLabel;
newPointLabel++;
mergeList_[pointi] = nUniqPoints++;
}
else
{
mergeList_[pointLabel] = mergeList_[mergeList_[pointLabel]];
mergeList_[pointi] = mergeList_[mergeList_[pointi]];
}
}
nPoints_ = newPointLabel;
nPoints_ = nUniqPoints;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,6 +56,7 @@ SourceFiles
#include "globalMeshData.H"
#include "globalIndex.H"
#include "uint.H"
#include "PstreamGlobals.H"
#include "zoltan.h"
#include <mpi.h>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -83,7 +83,7 @@ Foam::N2::N2()
2873563218390.8,
-165274505604341.0
),
mu_(32.165, 496.9, 3.9069, -1.08e-21, 10.0),
mu_(-32.165, 496.9, 3.9069, -1.08e-21, 10.0),
mug_(7.632e-07, 0.58823, 67.75, 0.0),
kappa_(0.7259, -0.016728, 0.00016215, -5.7605e-07, 0.0, 0.0),
kappag_(0.000351, 0.7652, 25.767, 0.0),

View File

@ -33,7 +33,8 @@ EulerImplicitCoeffs
odeCoeffs
{
solver seulex;
eps 0.05;
absTol 1e-8;
relTol 1e-1;
}

View File

@ -17,6 +17,8 @@ reactions
A 7e+06;
beta 0;
Ta 10063.8;
Thigh 2500;
Tlow 300;
}
hydrogenReaction
{
@ -25,6 +27,7 @@ reactions
A 4.74342e+12;
beta 0;
Ta 10063.8;
Thigh 2500;
Tlow 300;
}
}

View File

@ -1,40 +0,0 @@
36
(
1069
1071
1074
1253
1256
1259
1262
1264
1266
1269
1271
1273
1276
1463
1466
1468
1471
1474
1477
1480
1482
1485
1487
1490
1492
1494
1497
1500
1503
1506
1508
1512
1514
1517
1519
1522
)