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

View File

@ -128,30 +128,30 @@ Foam::porosityModel::porosityModel
const pointField& points = mesh_.points(); const pointField& points = mesh_.points();
const cellList& cells = mesh_.cells(); const cellList& cells = mesh_.cells();
const faceList& faces = mesh_.faces(); const faceList& faces = mesh_.faces();
DynamicList<point> localPoints;
forAll(cellZoneIDs_, zoneI) forAll(cellZoneIDs_, zoneI)
{ {
const cellZone& cZone = mesh_.cellZones()[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) forAll(cZone, i)
{ {
const label cellI = 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)); const pointField cellPoints(c.points(faces, points));
forAll(cellPoints, pointI) forAll(cellPoints, pointI)
{ {
const point& pt = cellPoints[pointI]; const point pt = coordSys_.localPosition(cellPoints[pointI]);
localPoints.append(coordSys_.localPosition(pt)); 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; Info<< " local bounds: " << (bbMax - bbMin) << nl << endl;
localPoints.clear();
} }
} }

View File

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

View File

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

View File

@ -192,7 +192,7 @@ humidityTemperatureCoupledMixedFvPatchScalarField
QrNbrName_(psf.QrNbrName_), QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_), QrName_(psf.QrName_),
specieName_(psf.specieName_), specieName_(psf.specieName_),
liquid_(psf.liquid_), liquid_(psf.liquid_, false),
liquidDict_(psf.liquidDict_), liquidDict_(psf.liquidDict_),
mass_(psf.mass_, mapper), mass_(psf.mass_, mapper),
Tvap_(psf.Tvap_), Tvap_(psf.Tvap_),
@ -351,7 +351,7 @@ humidityTemperatureCoupledMixedFvPatchScalarField
QrNbrName_(psf.QrNbrName_), QrNbrName_(psf.QrNbrName_),
QrName_(psf.QrName_), QrName_(psf.QrName_),
specieName_(psf.specieName_), specieName_(psf.specieName_),
liquid_(psf.liquid_), liquid_(psf.liquid_, false),
liquidDict_(psf.liquidDict_), liquidDict_(psf.liquidDict_),
mass_(psf.mass_), mass_(psf.mass_),
Tvap_(psf.Tvap_), Tvap_(psf.Tvap_),
@ -449,7 +449,14 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
scalarField nbrIntFld(nbrField.patchInternalField()); scalarField nbrIntFld(nbrField.patchInternalField());
mpp.distribute(nbrIntFld); mpp.distribute(nbrIntFld);
scalarField& Tp = *this; scalarField& Tp = *this;
const volScalarField& T =
static_cast<const volScalarField&>(internalField());
const scalarField TpOld(T.oldTime().boundaryField()[patch().index()]);
scalarField Tin(patchInternalField()); scalarField Tin(patchInternalField());
const scalarField K(this->kappa(*this)); const scalarField K(this->kappa(*this));
@ -463,6 +470,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
mpp.distribute(nrbDeltaCoeffs); mpp.distribute(nrbDeltaCoeffs);
scalarField KDeltaNbr(nbrK*nrbDeltaCoeffs); scalarField KDeltaNbr(nbrK*nrbDeltaCoeffs);
mpp.distribute(KDeltaNbr);
myKDelta_ = K*patch().deltaCoeffs(); 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 mpCpTpNbr(patch().size(), 0.0);
scalarField dmHfgNbr(patch().size(), 0.0); scalarField dmHfgNbr(patch().size(), 0.0);
if (!fluid_) if (!fluid_)
{ {
myKDeltaNbr = nbrField.myKDelta();
mpp.distribute(myKDeltaNbr);
mpCpTpNbr = nbrField.mpCpTp(); mpCpTpNbr = nbrField.mpCpTp();
mpp.distribute(mpCpTpNbr); mpp.distribute(mpCpTpNbr);
@ -690,42 +694,39 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
const scalarField mpCpdt(mpCpTpNbr + mpCpTp_); const scalarField mpCpdt(mpCpTpNbr + mpCpTp_);
// Qr > 0 (heat up the wall) // 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_); valueFraction() = alpha/(alpha + myKDelta_);
refValue() = (KDeltaNbr*nbrIntFld + mpCpdt*Tp)/alpha; refValue() = (KDeltaNbr*nbrIntFld + mpCpdt*TpOld + dmHfg)/alpha;
mixedFvPatchScalarField::updateCoeffs(); mixedFvPatchScalarField::updateCoeffs();
if (debug) if (debug && fluid_)
{ {
if (fluid_) scalar Qdm = gSum(dm);
{ scalar QMass = gSum(mass_);
scalar Qdm = gSum(dm); scalar Qt = gSum(myKDelta_*(Tp - Tin)*magSf);
scalar QMass = gSum(mass_); scalar QtSolid = gSum(KDeltaNbr*(Tp - nbrIntFld)*magSf);
scalar Qt = gSum(myKDelta_*(Tp - Tin)*magSf);
scalar QtSolid = gSum(KDeltaNbr*(Tp - nbrIntFld)*magSf);
Info<< mesh.name() << ':' Info<< mesh.name() << ':'
<< patch().name() << ':' << patch().name() << ':'
<< internalField().name() << " <- " << internalField().name() << " <- "
<< nbrMesh.name() << ':' << nbrMesh.name() << ':'
<< nbrPatch.name() << ':' << nbrPatch.name() << ':'
<< internalField().name() << " :" << nl << internalField().name() << " :" << nl
<< " Total mass flux [Kg/s] : " << Qdm << nl << " Total mass flux [Kg/s] : " << Qdm << nl
<< " Total mass on the wall [Kg] : " << QMass << nl << " Total mass on the wall [Kg] : " << QMass << nl
<< " Total heat (>0 leaving the wall to the fluid) [W] : " << " Total heat (>0 leaving the wall to the fluid) [W] : "
<< Qt << nl << Qt << nl
<< " Total heat (>0 leaving the wall to the solid) [W] : " << " Total heat (>0 leaving the wall to the solid) [W] : "
<< QtSolid << nl << QtSolid << nl
<< " wall temperature " << " wall temperature "
<< " min:" << gMin(*this) << " min:" << gMin(*this)
<< " max:" << gMax(*this) << " max:" << gMax(*this)
<< " avg:" << gAverage(*this) << " avg:" << gAverage(*this)
<< endl; << endl;
}
} }
} }