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())
|
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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
@ -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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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,18 +694,16 @@ 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 Qdm = gSum(dm);
|
||||||
scalar QMass = gSum(mass_);
|
scalar QMass = gSum(mass_);
|
||||||
@ -726,7 +728,6 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
<< " avg:" << gAverage(*this)
|
<< " avg:" << gAverage(*this)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user