diff --git a/etc/thermoData/thermoData b/etc/thermoData/thermoData index 3048d293..057c9557 100644 --- a/etc/thermoData/thermoData +++ b/etc/thermoData/thermoData @@ -18621,7 +18621,7 @@ T_Tritium__(g) specie { nMoles 1; - molWeight 47.9; + molWeight 3.016; } thermodynamics { diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index 643e06a4..d7508c3d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,8 +61,8 @@ void Foam::polyPatch::movePoints(PstreamBuffers&, const pointField& p) void Foam::polyPatch::updateMesh(PstreamBuffers&) { + primitivePatch::clearGeom(); clearAddressing(); - primitivePatch::clearOut(); } @@ -348,6 +348,8 @@ const Foam::labelList& Foam::polyPatch::meshEdges() const void Foam::polyPatch::clearAddressing() { + primitivePatch::clearTopology(); + primitivePatch::clearPatchMeshAddr(); deleteDemandDrivenData(faceCellsPtr_); deleteDemandDrivenData(mePtr_); } diff --git a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C index d0d3b30b..7e68450a 100644 --- a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C +++ b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C @@ -150,7 +150,7 @@ Foam::vector Foam::eigenValues(const tensor& t) if (R2 < Q3) { scalar sqrtQ = sqrt(Q); - scalar theta = acos(R/(Q*sqrtQ)); + scalar theta = acos(min(1.0, max(-1.0, R/(Q*sqrtQ)))); scalar m2SqrtQ = -2*sqrtQ; scalar aBy3 = a/3; @@ -344,7 +344,7 @@ Foam::vector Foam::eigenValues(const symmTensor& t) if (R2 < Q3) { scalar sqrtQ = sqrt(Q); - scalar theta = acos(R/(Q*sqrtQ)); + scalar theta = acos(min(1.0, max(-1.0, R/(Q*sqrtQ)))); scalar m2SqrtQ = -2*sqrtQ; scalar aBy3 = a/3; diff --git a/src/Pstream/mpi/UPstream.C b/src/Pstream/mpi/UPstream.C index 72f1e4b0..610c6fa9 100644 --- a/src/Pstream/mpi/UPstream.C +++ b/src/Pstream/mpi/UPstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -286,7 +286,7 @@ void Foam::reduce Pout<< "UPstream::allocateRequest for non-blocking reduce" << " : request:" << requestID << endl; - + } #else // Non-blocking not yet implemented in mpi reduce(Value, bop, tag, communicator); diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C index ddc60991..f5ce1243 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.C @@ -46,15 +46,6 @@ wedgeFvPatch::wedgeFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm) {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::tmp Foam::wedgeFvPatch::delta() const -{ - const vectorField nHat(nf()); - return nHat*(nHat & (Cf() - Cn())); -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H index 16fab3e4..25be556b 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/wedge/wedgeFvPatch.H @@ -83,9 +83,6 @@ public: { return wedgePolyPatch_.cellT(); } - - //- Return cell-centre to face normal vector - virtual tmp delta() const; }; diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C index c55ad272..e7dd4120 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C @@ -140,7 +140,9 @@ const Foam::scalarField& Foam::fvPatch::magSf() const Foam::tmp Foam::fvPatch::delta() const { - return Cf() - Cn(); + // Use patch-normal delta for all non-coupled BCs + const vectorField nHat(nf()); + return nHat*(nHat & (Cf() - Cn())); } diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C b/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C index 61424852..a883c39d 100644 --- a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C +++ b/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C @@ -103,8 +103,12 @@ bool Foam::trackedParticle::move scalar tEnd = (1.0 - stepFraction())*trackTime; scalar dtMax = tEnd; - if (tEnd <= SMALL) + if (tEnd <= SMALL && onBoundary()) { + // This is a hack to handle particles reaching their endpoint + // on a processor boundary. If the endpoint is on a processor face + // it currently gets transferred backwards and forwards infinitely. + // Remove the particle td.keepParticle = false; } diff --git a/src/thermophysicalModels/specie/atomicWeights/atomicWeights.C b/src/thermophysicalModels/specie/atomicWeights/atomicWeights.C index d46ca188..c0e56979 100644 --- a/src/thermophysicalModels/specie/atomicWeights/atomicWeights.C +++ b/src/thermophysicalModels/specie/atomicWeights/atomicWeights.C @@ -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-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,7 +132,8 @@ Foam::atomicWeightTable::atomicWeights[atomicWeightTable::nElements] = {"Es", 254.00000}, {"Fm", 253.00000}, {"D", 2.01410}, - {"e", 5.45e-4} + {"e", 5.45e-4}, + {"T", 3.01604} }; diff --git a/src/thermophysicalModels/specie/atomicWeights/atomicWeights.H b/src/thermophysicalModels/specie/atomicWeights/atomicWeights.H index fd68aada..768ed3ea 100644 --- a/src/thermophysicalModels/specie/atomicWeights/atomicWeights.H +++ b/src/thermophysicalModels/specie/atomicWeights/atomicWeights.H @@ -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-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,7 +63,7 @@ public: scalar weight; }; - static const int nElements = 103; + static const int nElements = 104; //- Static table of the weights of all known elements static const atomicWeight atomicWeights[nElements];