mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Resolved conflict merging master into develop
This commit is contained in:
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ SourceFiles
|
||||
#include "CollisionRecordList.H"
|
||||
#include "labelFieldIOField.H"
|
||||
#include "vectorFieldIOField.H"
|
||||
#include "demandDrivenEntry.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,42 +694,39 @@ 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 (debug && fluid_)
|
||||
{
|
||||
if (fluid_)
|
||||
{
|
||||
scalar Qdm = gSum(dm);
|
||||
scalar QMass = gSum(mass_);
|
||||
scalar Qt = gSum(myKDelta_*(Tp - Tin)*magSf);
|
||||
scalar QtSolid = gSum(KDeltaNbr*(Tp - nbrIntFld)*magSf);
|
||||
scalar Qdm = gSum(dm);
|
||||
scalar QMass = gSum(mass_);
|
||||
scalar Qt = gSum(myKDelta_*(Tp - Tin)*magSf);
|
||||
scalar QtSolid = gSum(KDeltaNbr*(Tp - nbrIntFld)*magSf);
|
||||
|
||||
Info<< mesh.name() << ':'
|
||||
<< patch().name() << ':'
|
||||
<< internalField().name() << " <- "
|
||||
<< nbrMesh.name() << ':'
|
||||
<< nbrPatch.name() << ':'
|
||||
<< internalField().name() << " :" << nl
|
||||
<< " Total mass flux [Kg/s] : " << Qdm << nl
|
||||
<< " Total mass on the wall [Kg] : " << QMass << nl
|
||||
<< " Total heat (>0 leaving the wall to the fluid) [W] : "
|
||||
<< Qt << nl
|
||||
<< " Total heat (>0 leaving the wall to the solid) [W] : "
|
||||
<< QtSolid << nl
|
||||
<< " wall temperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this)
|
||||
<< endl;
|
||||
}
|
||||
Info<< mesh.name() << ':'
|
||||
<< patch().name() << ':'
|
||||
<< internalField().name() << " <- "
|
||||
<< nbrMesh.name() << ':'
|
||||
<< nbrPatch.name() << ':'
|
||||
<< internalField().name() << " :" << nl
|
||||
<< " Total mass flux [Kg/s] : " << Qdm << nl
|
||||
<< " Total mass on the wall [Kg] : " << QMass << nl
|
||||
<< " Total heat (>0 leaving the wall to the fluid) [W] : "
|
||||
<< Qt << nl
|
||||
<< " Total heat (>0 leaving the wall to the solid) [W] : "
|
||||
<< QtSolid << nl
|
||||
<< " wall temperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user