GIT: Resolved conflict merging master into develop

This commit is contained in:
Andrew Heather
2016-12-16 17:10:38 +00:00
6 changed files with 54 additions and 46 deletions

View File

@ -113,7 +113,7 @@ int main(int argc, char *argv[])
if ((correctPhi && mesh.changing()) || mesh.topoChanging())
{
// Calculate absolute flux from the mapped surface velocity
// SAF: temporary fix until mapped Uf is assessed
// Note: temporary fix until mapped Uf is assessed
Uf = fvc::interpolate(U);
// Calculate absolute flux from the mapped surface velocity

View File

@ -132,9 +132,12 @@ int main(int argc, char *argv[])
ghf = (g & mesh.Cf()) - ghRef;
}
if (mesh.changing() && correctPhi)
if ((mesh.changing() && correctPhi) || mesh.topoChanging())
{
// Calculate absolute flux from the mapped surface velocity
// SAF: temporary fix until mapped Uf is assessed
Uf = fvc::interpolate(U);
phi = mesh.Sf() & Uf;
#include "correctPhi.H"
@ -143,6 +146,8 @@ int main(int argc, char *argv[])
fvc::makeRelative(phi, U);
mixture.correct();
mesh.topoChanging(false);
}
if (mesh.changing() && checkMeshCourantNo)

View File

@ -128,30 +128,30 @@ Foam::porosityModel::porosityModel
const pointField& points = mesh_.points();
const cellList& cells = mesh_.cells();
const faceList& faces = mesh_.faces();
DynamicList<point> localPoints;
forAll(cellZoneIDs_, zoneI)
{
const cellZone& cZone = mesh_.cellZones()[cellZoneIDs_[zoneI]];
localPoints.setCapacity(10*cells.size());
point bbMin = point::max;
point bbMax = point::min;
forAll(cZone, i)
{
const label cellI = cZone[i];
const cell& c = mesh_.cells()[cellI];
const cell& c = cells[cellI];
const pointField cellPoints(c.points(faces, points));
forAll(cellPoints, pointI)
{
const point& pt = cellPoints[pointI];
localPoints.append(coordSys_.localPosition(pt));
const point pt = coordSys_.localPosition(cellPoints[pointI]);
bbMin = min(bbMin, pt);
bbMax = max(bbMax, pt);
}
}
boundBox bb(localPoints, true);
reduce(bbMin, minOp<point>());
reduce(bbMax, maxOp<point>());
Info<< " local bounds: " << bb << endl;
localPoints.clear();
Info<< " local bounds: " << (bbMax - bbMin) << nl << endl;
}
}

View File

@ -44,6 +44,7 @@ SourceFiles
#include "CollisionRecordList.H"
#include "labelFieldIOField.H"
#include "vectorFieldIOField.H"
#include "demandDrivenEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -43,6 +43,7 @@ SourceFiles
#include "dictionary.H"
#include "forceSuSp.H"
#include "fvMesh.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -64,7 +65,7 @@ class ParticleForce
//- Reference to the mesh database
const fvMesh& mesh_;
//- Force coefficients dictaionary
//- Force coefficients dictionary
const dictionary coeffs_;
@ -138,7 +139,7 @@ public:
//- Return const access to the cloud owner
inline const CloudType& owner() const;
//- Return refernce to the cloud owner
//- Return reference to the cloud owner
inline CloudType& owner();
//- Return the mesh database

View File

@ -192,7 +192,7 @@ humidityTemperatureCoupledMixedFvPatchScalarField
QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_),
specieName_(psf.specieName_),
liquid_(psf.liquid_),
liquid_(psf.liquid_, false),
liquidDict_(psf.liquidDict_),
mass_(psf.mass_, mapper),
Tvap_(psf.Tvap_),
@ -351,7 +351,7 @@ humidityTemperatureCoupledMixedFvPatchScalarField
QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_),
specieName_(psf.specieName_),
liquid_(psf.liquid_),
liquid_(psf.liquid_, false),
liquidDict_(psf.liquidDict_),
mass_(psf.mass_),
Tvap_(psf.Tvap_),
@ -449,7 +449,14 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
scalarField nbrIntFld(nbrField.patchInternalField());
mpp.distribute(nbrIntFld);
scalarField& Tp = *this;
const volScalarField& T =
static_cast<const volScalarField&>(internalField());
const scalarField TpOld(T.oldTime().boundaryField()[patch().index()]);
scalarField Tin(patchInternalField());
const scalarField K(this->kappa(*this));
@ -463,6 +470,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
mpp.distribute(nrbDeltaCoeffs);
scalarField KDeltaNbr(nbrK*nrbDeltaCoeffs);
mpp.distribute(KDeltaNbr);
myKDelta_ = K*patch().deltaCoeffs();
@ -655,15 +663,11 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
}
}
scalarField myKDeltaNbr(patch().size(), 0.0);
scalarField mpCpTpNbr(patch().size(), 0.0);
scalarField dmHfgNbr(patch().size(), 0.0);
if (!fluid_)
{
myKDeltaNbr = nbrField.myKDelta();
mpp.distribute(myKDeltaNbr);
mpCpTpNbr = nbrField.mpCpTp();
mpp.distribute(mpCpTpNbr);
@ -690,18 +694,16 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
const scalarField mpCpdt(mpCpTpNbr + mpCpTp_);
// Qr > 0 (heat up the wall)
scalarField alpha(KDeltaNbr + mpCpdt - (Qr + QrNbr + dmHfg)/Tp);
scalarField alpha(KDeltaNbr + mpCpdt - (Qr + QrNbr)/Tp);
valueFraction() = alpha/(alpha + myKDelta_);
refValue() = (KDeltaNbr*nbrIntFld + mpCpdt*Tp)/alpha;
refValue() = (KDeltaNbr*nbrIntFld + mpCpdt*TpOld + dmHfg)/alpha;
mixedFvPatchScalarField::updateCoeffs();
if (debug)
{
if (fluid_)
if (debug && fluid_)
{
scalar Qdm = gSum(dm);
scalar QMass = gSum(mass_);
@ -726,7 +728,6 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
<< " avg:" << gAverage(*this)
<< endl;
}
}
}