mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: lagrangian intermediate library - added logging controls
This commit is contained in:
committed by
Mark Olesen
parent
9c9088f191
commit
d8f33c626a
@ -208,7 +208,7 @@ void Foam::CollidingCloud<CloudType>::motion
|
||||
|
||||
if (nSubCycles > 1)
|
||||
{
|
||||
Info<< " " << nSubCycles << " move-collide subCycles" << endl;
|
||||
Log_<< " " << nSubCycles << " move-collide subCycles" << endl;
|
||||
|
||||
subCycleTime moveCollideSubCycle
|
||||
(
|
||||
@ -238,7 +238,7 @@ void Foam::CollidingCloud<CloudType>::info()
|
||||
scalar rotationalKineticEnergy = rotationalKineticEnergyOfSystem();
|
||||
reduce(rotationalKineticEnergy, sumOp<scalar>());
|
||||
|
||||
Info<< " Rotational kinetic energy = "
|
||||
Log_<< " Rotational kinetic energy = "
|
||||
<< rotationalKineticEnergy << nl;
|
||||
}
|
||||
|
||||
|
||||
@ -133,6 +133,8 @@ void Foam::KinematicCloud<CloudType>::solve
|
||||
{
|
||||
addProfiling(prof, "cloud::solve");
|
||||
|
||||
log = solution_.log();
|
||||
|
||||
if (solution_.steadyState())
|
||||
{
|
||||
cloud.storeState();
|
||||
@ -267,7 +269,7 @@ void Foam::KinematicCloud<CloudType>::postEvolve
|
||||
const typename parcelType::trackingData& td
|
||||
)
|
||||
{
|
||||
Info<< endl;
|
||||
Log_<< endl;
|
||||
|
||||
if (debug)
|
||||
{
|
||||
@ -457,7 +459,8 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass, Zero)
|
||||
)
|
||||
)
|
||||
),
|
||||
log(true)
|
||||
{
|
||||
if (solution_.active())
|
||||
{
|
||||
@ -545,7 +548,8 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
),
|
||||
c.UCoeff_()
|
||||
)
|
||||
)
|
||||
),
|
||||
log(c.log)
|
||||
{}
|
||||
|
||||
|
||||
@ -611,7 +615,8 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
|
||||
UIntegrator_(nullptr),
|
||||
UTrans_(nullptr),
|
||||
UCoeff_(nullptr)
|
||||
UCoeff_(nullptr),
|
||||
log(c.log)
|
||||
{}
|
||||
|
||||
|
||||
@ -743,7 +748,7 @@ void Foam::KinematicCloud<CloudType>::preEvolve
|
||||
// with topology change due to lazy evaluation of valid mesh dimensions
|
||||
label nGeometricD = mesh_.nGeometricD();
|
||||
|
||||
Info<< "\nSolving" << nGeometricD << "-D cloud " << this->name() << endl;
|
||||
Log_<< "\nSolving" << nGeometricD << "-D cloud " << this->name() << endl;
|
||||
|
||||
this->dispersion().cacheFields(true);
|
||||
forces_.cacheFields(true);
|
||||
@ -881,7 +886,7 @@ void Foam::KinematicCloud<CloudType>::info()
|
||||
: 0
|
||||
);
|
||||
|
||||
Info<< "Cloud: " << this->name() << nl
|
||||
Log_<< "Cloud: " << this->name() << nl
|
||||
<< " Current number of parcels = " << nTotParcel << nl
|
||||
<< " Current mass in system = "
|
||||
<< returnReduce(massInSystem(), sumOp<scalar>()) << nl
|
||||
@ -890,9 +895,10 @@ void Foam::KinematicCloud<CloudType>::info()
|
||||
<< " Linear kinetic energy = " << linearKineticEnergy << nl
|
||||
<< " Average particle per parcel = " << particlePerParcel << nl;
|
||||
|
||||
injectors_.info(Info);
|
||||
this->surfaceFilm().info(Info);
|
||||
this->patchInteraction().info(Info);
|
||||
|
||||
injectors_.info();
|
||||
this->surfaceFilm().info();
|
||||
this->patchInteraction().info();
|
||||
|
||||
if (this->packingModel().active())
|
||||
{
|
||||
@ -906,8 +912,8 @@ void Foam::KinematicCloud<CloudType>::info()
|
||||
const scalar alphaMin = gMin(alpha().primitiveField());
|
||||
const scalar alphaMax = gMax(alpha().primitiveField());
|
||||
|
||||
Info<< " Min cell volume fraction = " << alphaMin << endl;
|
||||
Info<< " Max cell volume fraction = " << alphaMax << endl;
|
||||
Log_<< " Min cell volume fraction = " << alphaMin << nl
|
||||
<< " Max cell volume fraction = " << alphaMax << endl;
|
||||
|
||||
if (alphaMax < SMALL)
|
||||
{
|
||||
@ -933,7 +939,7 @@ void Foam::KinematicCloud<CloudType>::info()
|
||||
|
||||
reduce(nMin, minOp<scalar>());
|
||||
|
||||
Info<< " Min dense number of parcels = " << nMin << endl;
|
||||
Log_<< " Min dense number of parcels = " << nMin << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -302,6 +302,12 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Public Data
|
||||
|
||||
//- Flag to write log into Info
|
||||
bool log;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
|
||||
@ -286,8 +286,8 @@ void Foam::MPPICCloud<CloudType>::info()
|
||||
const scalar alphaMin = gMin(alpha().primitiveField());
|
||||
const scalar alphaMax = gMax(alpha().primitiveField());
|
||||
|
||||
Info<< " Min cell volume fraction = " << alphaMin << endl;
|
||||
Info<< " Max cell volume fraction = " << alphaMax << endl;
|
||||
Log_ << " Min cell volume fraction = " << alphaMin << nl
|
||||
<< " Max cell volume fraction = " << alphaMax << endl;
|
||||
|
||||
if (alphaMax < SMALL)
|
||||
{
|
||||
@ -313,7 +313,7 @@ void Foam::MPPICCloud<CloudType>::info()
|
||||
|
||||
reduce(nMin, minOp<scalar>());
|
||||
|
||||
Info<< " Min dense number of parcels = " << nMin << endl;
|
||||
Log_<< " Min dense number of parcels = " << nMin << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -336,7 +336,7 @@ void Foam::ReactingCloud<CloudType>::info()
|
||||
{
|
||||
CloudType::info();
|
||||
|
||||
this->phaseChange().info(Info);
|
||||
this->phaseChange().info();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -247,7 +247,8 @@ template<class CloudType>
|
||||
void Foam::ReactingHeterogeneousCloud<CloudType>::info()
|
||||
{
|
||||
CloudType::info();
|
||||
heterogeneousReactionModel_->info(Info);
|
||||
|
||||
heterogeneousReactionModel_->info();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -287,8 +287,8 @@ void Foam::ReactingMultiphaseCloud<CloudType>::info()
|
||||
{
|
||||
CloudType::info();
|
||||
|
||||
this->devolatilisation().info(Info);
|
||||
this->surfaceReaction().info(Info);
|
||||
this->devolatilisation().info();
|
||||
this->surfaceReaction().info();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -484,7 +484,7 @@ void Foam::ThermoCloud<CloudType>::info()
|
||||
{
|
||||
CloudType::info();
|
||||
|
||||
Info<< " Temperature min/max = " << Tmin() << ", " << Tmax()
|
||||
Log_<< " Temperature min/max = " << Tmin() << ", " << Tmax()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
@ -226,13 +226,11 @@ template<class CloudType>
|
||||
inline Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::ThermoCloud<CloudType>::Sh(volScalarField& hs) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "hsTrans min/max = " << min(hsTrans()).value() << ", "
|
||||
<< max(hsTrans()).value() << nl
|
||||
<< "hsCoeff min/max = " << min(hsCoeff()).value() << ", "
|
||||
<< max(hsCoeff()).value() << endl;
|
||||
}
|
||||
DebugInfo
|
||||
<< "hsTrans min/max = " << min(hsTrans()).value() << ", "
|
||||
<< max(hsTrans()).value() << nl
|
||||
<< "hsCoeff min/max = " << min(hsCoeff()).value() << ", "
|
||||
<< max(hsCoeff()).value() << endl;
|
||||
|
||||
if (this->solution().coupled())
|
||||
{
|
||||
|
||||
@ -70,7 +70,7 @@ void Foam::FaceInteraction<CloudType>::write()
|
||||
const fvMesh& mesh = this->owner().mesh();
|
||||
const faceZoneMesh& fzm = mesh.faceZones();
|
||||
|
||||
Info<< type() << " output:" << nl;
|
||||
Log_<< type() << " output:" << nl;
|
||||
|
||||
// Retrieve any stored data
|
||||
const label nZones = faceZoneIDs_.size();
|
||||
@ -98,7 +98,7 @@ void Foam::FaceInteraction<CloudType>::write()
|
||||
forAll(faceZoneIDs_, i)
|
||||
{
|
||||
const label zonei = faceZoneIDs_[i];
|
||||
Info<< " Zone : " << fzm[zonei].name() << nl
|
||||
Log_<< " Zone : " << fzm[zonei].name() << nl
|
||||
<< " Escape : " << npe[i] << nl
|
||||
<< " Stick : " << nps[i] << nl
|
||||
<< " Rebound : " << npr[i] << nl;
|
||||
@ -116,7 +116,7 @@ void Foam::FaceInteraction<CloudType>::write()
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
Info<< endl;
|
||||
Log_<< endl;
|
||||
|
||||
// Set restart data
|
||||
this->setModelProperty("nEscape", npe);
|
||||
|
||||
@ -46,10 +46,7 @@ void Foam::FacePostProcessing<CloudType>::makeLogFile
|
||||
// Create the output file if not already created
|
||||
if (log_)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Creating output file." << endl;
|
||||
}
|
||||
DebugInfo << "Creating output file." << endl;
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
@ -102,7 +99,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
||||
|
||||
const label proci = Pstream::myProcNo();
|
||||
|
||||
Info<< type() << " output:" << nl;
|
||||
Log_<< type() << " output:" << nl;
|
||||
|
||||
List<scalarField> zoneMassTotal(mass_.size());
|
||||
List<scalarField> zoneMassFlowRate(massFlowRate_.size());
|
||||
@ -130,7 +127,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
||||
);
|
||||
const scalar sumMassFlowRate = sum(zoneMassFlowRate[zoneI]);
|
||||
|
||||
Info<< " " << zoneName
|
||||
Log_<< " " << zoneName
|
||||
<< ": total mass = " << sumMassTotal
|
||||
<< "; average mass flow rate = " << sumMassFlowRate
|
||||
<< nl;
|
||||
@ -143,7 +140,7 @@ void Foam::FacePostProcessing<CloudType>::write()
|
||||
}
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
Log_<< endl;
|
||||
|
||||
|
||||
if (surfaceFormat_ != "none")
|
||||
|
||||
@ -47,10 +47,7 @@ void Foam::ParticleCollector<CloudType>::makeLogFile
|
||||
// Create the output file if not already created
|
||||
if (log_)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Creating output file" << endl;
|
||||
}
|
||||
DebugInfo<< "Creating output file" << endl;
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
@ -419,7 +416,7 @@ void Foam::ParticleCollector<CloudType>::write()
|
||||
massTotal_[facei] += mass_[facei];
|
||||
}
|
||||
|
||||
Info<< type() << " output:" << nl;
|
||||
Log_<< type() << " output:" << nl;
|
||||
|
||||
Field<scalar> faceMassTotal(mass_.size(), Zero);
|
||||
this->getModelProperty("massTotal", faceMassTotal);
|
||||
@ -452,7 +449,7 @@ void Foam::ParticleCollector<CloudType>::write()
|
||||
}
|
||||
}
|
||||
|
||||
Info<< " sum(total mass) = " << sumTotalMass << nl
|
||||
Log_<< " sum(total mass) = " << sumTotalMass << nl
|
||||
<< " sum(average mass flow rate) = " << sumAverageMFR << nl
|
||||
<< endl;
|
||||
|
||||
|
||||
@ -287,7 +287,7 @@ void Foam::ParticleZoneInfo<CloudType>::postEvolve
|
||||
const typename parcelType::trackingData& td
|
||||
)
|
||||
{
|
||||
Info<< this->type() << ":" << nl
|
||||
Log_<< this->type() << ":" << nl
|
||||
<< " Cell zone = " << cellZoneName_ << nl
|
||||
<< " Contributions = "
|
||||
<< returnReduce(movedParticles_.size(), sumOp<label>())
|
||||
@ -295,7 +295,7 @@ void Foam::ParticleZoneInfo<CloudType>::postEvolve
|
||||
|
||||
if (!this->writeTime())
|
||||
{
|
||||
Info<< endl;
|
||||
Log_<< endl;
|
||||
}
|
||||
|
||||
for (const auto& p : movedParticles_)
|
||||
@ -412,7 +412,7 @@ void Foam::ParticleZoneInfo<CloudType>::write()
|
||||
}
|
||||
}
|
||||
|
||||
Info<< " Number of particles = " << nData << nl
|
||||
Log_<< " Number of particles = " << nData << nl
|
||||
<< " Written data to " << os.name() << endl;
|
||||
|
||||
this->setModelProperty("data", globalParticles);
|
||||
@ -437,14 +437,14 @@ void Foam::ParticleZoneInfo<CloudType>::write()
|
||||
os << p << nl;
|
||||
}
|
||||
|
||||
Info<< " Number of particles = " << data_.size() << nl
|
||||
Log_<< " Number of particles = " << data_.size() << nl
|
||||
<< " Written data to " << os.name() << endl;
|
||||
|
||||
this->setModelProperty("data", data_);
|
||||
this->setModelProperty("maxIDs", maxIDs_);
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
Log_<< endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ void Foam::RemoveParcels<CloudType>::postEvolve
|
||||
const typename parcelType::trackingData& td
|
||||
)
|
||||
{
|
||||
Info<< this->modelName() << " output:" << nl;
|
||||
Log_<< this->modelName() << " output:" << nl;
|
||||
|
||||
const fvMesh& mesh = this->owner().mesh();
|
||||
const faceZoneMesh& fzm = mesh.faceZones();
|
||||
@ -93,7 +93,7 @@ void Foam::RemoveParcels<CloudType>::postEvolve
|
||||
scalar zoneMass = returnReduce(mass_[i], sumOp<scalar>());
|
||||
label zoneNParcels = returnReduce(nParcels_[i], sumOp<label>());
|
||||
|
||||
Info<< " faceZone " << zoneName
|
||||
Log_<< " faceZone " << zoneName
|
||||
<< ": removed " << zoneNParcels
|
||||
<< " parcels with mass " << zoneMass
|
||||
<< nl;
|
||||
@ -127,7 +127,7 @@ void Foam::RemoveParcels<CloudType>::write()
|
||||
}
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
Log_<< endl;
|
||||
|
||||
if (resetOnWrite_)
|
||||
{
|
||||
|
||||
@ -87,12 +87,14 @@ Foam::label Foam::HeterogeneousReactingModel<CloudType>::nF() const
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::HeterogeneousReactingModel<CloudType>::info(Ostream& os)
|
||||
void Foam::HeterogeneousReactingModel<CloudType>::info()
|
||||
{
|
||||
CloudSubModelBase<CloudType>::info();
|
||||
|
||||
const scalar mass0 = this->template getBaseProperty<scalar>("mass");
|
||||
const scalar massTotal = mass0 + returnReduce(dMass_, sumOp<scalar>());
|
||||
|
||||
Info<< " Mass transfer surface reaction = " << massTotal << nl;
|
||||
Log_<< " Mass transfer surface reaction = " << massTotal << nl;
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
|
||||
@ -164,8 +164,8 @@ public:
|
||||
//- Number of progress variable
|
||||
virtual label nF() const;
|
||||
|
||||
//- Write injection info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write injection info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -501,9 +501,9 @@ bool Foam::InjectedParticleDistributionInjection<CloudType>::validInjection
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::InjectedParticleDistributionInjection<CloudType>::info(Ostream& os)
|
||||
void Foam::InjectedParticleDistributionInjection<CloudType>::info()
|
||||
{
|
||||
InjectionModel<CloudType>::info(os);
|
||||
InjectionModel<CloudType>::info();
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
|
||||
@ -243,8 +243,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write injection info to stream
|
||||
void info(Ostream& os);
|
||||
//- Write injection info
|
||||
void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -364,9 +364,9 @@ bool Foam::InjectedParticleInjection<CloudType>::validInjection
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::InjectedParticleInjection<CloudType>::info(Ostream& os)
|
||||
void Foam::InjectedParticleInjection<CloudType>::info()
|
||||
{
|
||||
InjectionModel<CloudType>::info(os);
|
||||
InjectionModel<CloudType>::info();
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
|
||||
@ -208,8 +208,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write injection info to stream
|
||||
void info(Ostream& os);
|
||||
//- Write injection info
|
||||
void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -237,7 +237,7 @@ void Foam::InjectionModel<CloudType>::postInjectCheck
|
||||
|
||||
if (allParcelsAdded > 0)
|
||||
{
|
||||
Info<< nl
|
||||
Log_<< nl
|
||||
<< "Cloud: " << this->owner().name()
|
||||
<< " injector: " << this->modelName() << nl
|
||||
<< " Added " << allParcelsAdded << " new parcels" << nl << endl;
|
||||
@ -666,9 +666,11 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::InjectionModel<CloudType>::info(Ostream& os)
|
||||
void Foam::InjectionModel<CloudType>::info()
|
||||
{
|
||||
os << " Injector " << this->modelName() << ":" << nl
|
||||
CloudSubModelBase<CloudType>::info();
|
||||
|
||||
Log_<< " Injector " << this->modelName() << ":" << nl
|
||||
<< " - parcels added = " << parcelsAddedTotal_ << nl
|
||||
<< " - mass introduced = " << massInjected_ << nl;
|
||||
|
||||
|
||||
@ -367,8 +367,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write injection info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write injection info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -105,22 +106,15 @@ Foam::InjectionModelList<CloudType>::InjectionModelList
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::InjectionModelList<CloudType>::~InjectionModelList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::InjectionModelList<CloudType>::timeStart() const
|
||||
{
|
||||
scalar minTime = GREAT;
|
||||
forAll(*this, i)
|
||||
for (const auto& model : *this)
|
||||
{
|
||||
minTime = min(minTime, this->operator[](i).timeStart());
|
||||
minTime = min(minTime, model.timeStart());
|
||||
}
|
||||
|
||||
return minTime;
|
||||
@ -131,9 +125,9 @@ template<class CloudType>
|
||||
Foam::scalar Foam::InjectionModelList<CloudType>::timeEnd() const
|
||||
{
|
||||
scalar maxTime = -GREAT;
|
||||
forAll(*this, i)
|
||||
for (const auto& model : *this)
|
||||
{
|
||||
maxTime = max(maxTime, this->operator[](i).timeEnd());
|
||||
maxTime = max(maxTime, model.timeEnd());
|
||||
}
|
||||
|
||||
return maxTime;
|
||||
@ -148,9 +142,9 @@ Foam::scalar Foam::InjectionModelList<CloudType>::volumeToInject
|
||||
)
|
||||
{
|
||||
scalar vol = 0.0;
|
||||
forAll(*this, i)
|
||||
for (auto& model : *this)
|
||||
{
|
||||
vol += this->operator[](i).volumeToInject(time0, time1);
|
||||
vol += model.volumeToInject(time0, time1);
|
||||
}
|
||||
|
||||
return vol;
|
||||
@ -162,10 +156,10 @@ Foam::scalar Foam::InjectionModelList<CloudType>::averageParcelMass()
|
||||
{
|
||||
scalar mass = 0.0;
|
||||
scalar massTotal = 0.0;
|
||||
forAll(*this, i)
|
||||
for (auto& model : *this)
|
||||
{
|
||||
scalar mt = this->operator[](i).massTotal();
|
||||
mass += mt*this->operator[](i).averageParcelMass();
|
||||
scalar mt = model.massTotal();
|
||||
mass += mt*model.averageParcelMass();
|
||||
massTotal += mt;
|
||||
}
|
||||
|
||||
@ -176,9 +170,9 @@ Foam::scalar Foam::InjectionModelList<CloudType>::averageParcelMass()
|
||||
template<class CloudType>
|
||||
void Foam::InjectionModelList<CloudType>::updateMesh()
|
||||
{
|
||||
forAll(*this, i)
|
||||
for (auto& model : *this)
|
||||
{
|
||||
this->operator[](i).updateMesh();
|
||||
model.updateMesh();
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,9 +185,9 @@ void Foam::InjectionModelList<CloudType>::inject
|
||||
typename CloudType::parcelType::trackingData& td
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
for (auto& model : *this)
|
||||
{
|
||||
this->operator[](i).inject(cloud, td);
|
||||
model.inject(cloud, td);
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,19 +201,19 @@ void Foam::InjectionModelList<CloudType>::injectSteadyState
|
||||
const scalar trackTime
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
for (auto& model : *this)
|
||||
{
|
||||
this->operator[](i).injectSteadyState(cloud, td, trackTime);
|
||||
model.injectSteadyState(cloud, td, trackTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::InjectionModelList<CloudType>::info(Ostream& os)
|
||||
void Foam::InjectionModelList<CloudType>::info()
|
||||
{
|
||||
forAll(*this, i)
|
||||
for (auto& model : *this)
|
||||
{
|
||||
this->operator[](i).info(os);
|
||||
model.info();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~InjectionModelList();
|
||||
virtual ~InjectionModelList() = default;
|
||||
|
||||
|
||||
|
||||
@ -127,8 +127,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write injection info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write injection info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -341,9 +341,9 @@ bool Foam::LocalInteraction<CloudType>::correct
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::LocalInteraction<CloudType>::info(Ostream& os)
|
||||
void Foam::LocalInteraction<CloudType>::info()
|
||||
{
|
||||
PatchInteractionModel<CloudType>::info(os);
|
||||
PatchInteractionModel<CloudType>::info();
|
||||
|
||||
// retrieve any stored data
|
||||
labelListList npe0(patchData_.size());
|
||||
@ -411,7 +411,7 @@ void Foam::LocalInteraction<CloudType>::info(Ostream& os)
|
||||
{
|
||||
const word& patchName = patchData_[patchi].patchName();
|
||||
|
||||
os << " Parcel fate: patch " << patchName
|
||||
Log_<< " Parcel fate: patch " << patchName
|
||||
<< " (number, mass)" << nl
|
||||
<< " - escape (injector " << indexToInjector[indexi]
|
||||
<< " ) = " << npe[patchi][indexi]
|
||||
@ -428,7 +428,7 @@ void Foam::LocalInteraction<CloudType>::info(Ostream& os)
|
||||
{
|
||||
const word& patchName = patchData_[patchi].patchName();
|
||||
|
||||
os << " Parcel fate: patch " << patchName
|
||||
Log_<< " Parcel fate: patch " << patchName
|
||||
<< " (number, mass)" << nl
|
||||
<< " - escape = "
|
||||
<< npe[patchi][0] << ", " << mpe[patchi][0] << nl
|
||||
|
||||
@ -145,8 +145,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
//- Write patch interaction info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write patch interaction info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -187,12 +187,14 @@ void Foam::MultiInteraction<CloudType>::postEvolve()
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::MultiInteraction<CloudType>::info(Ostream& os)
|
||||
void Foam::MultiInteraction<CloudType>::info()
|
||||
{
|
||||
PatchInteractionModel<CloudType>::info();
|
||||
|
||||
for (auto& m : models_)
|
||||
{
|
||||
Info<< "Patch interaction model " << m.type() << ':' << endl;
|
||||
m.info(os);
|
||||
Log_<< "Patch interaction model " << m.type() << ':' << endl;
|
||||
m.info();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -152,8 +152,8 @@ public:
|
||||
//- Post-evolve hook
|
||||
virtual void postEvolve();
|
||||
|
||||
//- Write patch interaction info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write patch interaction
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -214,8 +214,10 @@ void Foam::PatchInteractionModel<CloudType>::postEvolve()
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::PatchInteractionModel<CloudType>::info(Ostream& os)
|
||||
void Foam::PatchInteractionModel<CloudType>::info()
|
||||
{
|
||||
CloudSubModelBase<CloudType>::info();
|
||||
|
||||
const label escapedParcels0 =
|
||||
this->template getBaseProperty<label>("escapedParcels");
|
||||
const label escapedParcelsTotal =
|
||||
@ -226,7 +228,7 @@ void Foam::PatchInteractionModel<CloudType>::info(Ostream& os)
|
||||
const scalar escapedMassTotal =
|
||||
escapedMass0 + returnReduce(escapedMass_, sumOp<scalar>());
|
||||
|
||||
os << " Parcel fate: system (number, mass)" << nl
|
||||
Log_<< " Parcel fate: system (number, mass)" << nl
|
||||
<< " - escape = " << escapedParcelsTotal
|
||||
<< ", " << escapedMassTotal << endl;
|
||||
|
||||
|
||||
@ -191,8 +191,8 @@ public:
|
||||
//- Post-evolve hook
|
||||
virtual void postEvolve();
|
||||
|
||||
//- Write patch interaction info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write patch interaction info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -349,9 +349,9 @@ void Foam::RecycleInteraction<CloudType>::postEvolve()
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::RecycleInteraction<CloudType>::info(Ostream& os)
|
||||
void Foam::RecycleInteraction<CloudType>::info()
|
||||
{
|
||||
PatchInteractionModel<CloudType>::info(os);
|
||||
PatchInteractionModel<CloudType>::info();
|
||||
|
||||
labelListList npr0(nRemoved_.size());
|
||||
scalarListList mpr0(massRemoved_.size());
|
||||
@ -416,12 +416,12 @@ void Foam::RecycleInteraction<CloudType>::info(Ostream& os)
|
||||
{
|
||||
const word& outPatchName = recyclePatches_[i].first();
|
||||
|
||||
os << " Parcel fate: patch " << outPatchName
|
||||
Log_<< " Parcel fate: patch " << outPatchName
|
||||
<< " (number, mass)" << nl;
|
||||
|
||||
forAll(mpr[i], indexi)
|
||||
{
|
||||
os << " - removed (injector " << indexToInjector[indexi]
|
||||
Log_<< " - removed (injector " << indexToInjector[indexi]
|
||||
<< ") = " << npr[i][indexi]
|
||||
<< ", " << mpr[i][indexi] << nl;
|
||||
|
||||
@ -431,12 +431,12 @@ void Foam::RecycleInteraction<CloudType>::info(Ostream& os)
|
||||
|
||||
const word& inPatchName = recyclePatches_[i].second();
|
||||
|
||||
os << " Parcel fate: patch " << inPatchName
|
||||
Log_<< " Parcel fate: patch " << inPatchName
|
||||
<< " (number, mass)" << nl;
|
||||
|
||||
forAll(mpi[i], indexi)
|
||||
{
|
||||
os << " - injected (injector " << indexToInjector[indexi]
|
||||
Log_<< " - injected (injector " << indexToInjector[indexi]
|
||||
<< ") = " << npi[i][indexi]
|
||||
<< ", " << mpi[i][indexi] << nl;
|
||||
this->file()
|
||||
@ -452,7 +452,7 @@ void Foam::RecycleInteraction<CloudType>::info(Ostream& os)
|
||||
{
|
||||
const word& outPatchName = recyclePatches_[i].first();
|
||||
|
||||
os << " Parcel fate: patch " << outPatchName
|
||||
Log_<< " Parcel fate: patch " << outPatchName
|
||||
<< " (number, mass)" << nl
|
||||
<< " - removed = " << npr[i][0] << ", " << mpr[i][0]
|
||||
<< nl;
|
||||
@ -465,7 +465,7 @@ void Foam::RecycleInteraction<CloudType>::info(Ostream& os)
|
||||
{
|
||||
const word& inPatchName = recyclePatches_[i].second();
|
||||
|
||||
os << " Parcel fate: patch " << inPatchName
|
||||
Log_<< " Parcel fate: patch " << inPatchName
|
||||
<< " (number, mass)" << nl
|
||||
<< " - injected = " << npi[i][0] << ", " << mpi[i][0]
|
||||
<< nl;
|
||||
|
||||
@ -204,8 +204,8 @@ public:
|
||||
//- Post-evolve hook
|
||||
virtual void postEvolve();
|
||||
|
||||
//- Write patch interaction info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write patch interaction info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -257,9 +257,9 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
|
||||
void Foam::StandardWallInteraction<CloudType>::info()
|
||||
{
|
||||
PatchInteractionModel<CloudType>::info(os);
|
||||
PatchInteractionModel<CloudType>::info();
|
||||
|
||||
labelListList npe0(nEscape_.size());
|
||||
scalarListList mpe0(nEscape_.size());
|
||||
@ -326,7 +326,7 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
|
||||
{
|
||||
const word& patchName = mesh_.boundary()[patchi].name() ;
|
||||
|
||||
os << " Parcel fate: patch " << patchName
|
||||
Log_<< " Parcel fate: patch " << patchName
|
||||
<< " (number, mass)" << nl
|
||||
<< " - escape (injector " << indexToInjector[indexi]
|
||||
<< ") = " << npe[patchi][indexi]
|
||||
@ -349,7 +349,7 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
|
||||
{
|
||||
const word& patchName = mesh_.boundary()[patchi].name();
|
||||
|
||||
os << " Parcel fate: patch (number, mass) "
|
||||
Log_<< " Parcel fate: patch (number, mass) "
|
||||
<< patchName << nl
|
||||
<< " - escape = "
|
||||
<< npe[patchi][0] << ", " << mpe[patchi][0] << nl
|
||||
|
||||
@ -155,8 +155,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
//- Write patch interaction info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write patch interaction info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -184,10 +184,7 @@ void Foam::KinematicSurfaceFilm<CloudType>::absorbInteraction
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " absorbInteraction" << endl;
|
||||
}
|
||||
DebugInfo<< "Parcel " << p.origId() << " absorbInteraction" << endl;
|
||||
|
||||
// Patch face normal
|
||||
const vector& nf = pp.faceNormals()[facei];
|
||||
@ -231,10 +228,7 @@ void Foam::KinematicSurfaceFilm<CloudType>::bounceInteraction
|
||||
bool& keepParticle
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " bounceInteraction" << endl;
|
||||
}
|
||||
DebugInfo<< "Parcel " << p.origId() << " bounceInteraction" << endl;
|
||||
|
||||
// Patch face normal
|
||||
const vector& nf = pp.faceNormals()[facei];
|
||||
@ -265,10 +259,7 @@ void Foam::KinematicSurfaceFilm<CloudType>::drySplashInteraction
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " drySplashInteraction" << endl;
|
||||
}
|
||||
DebugInfo<< "Parcel " << p.origId() << " drySplashInteraction" << endl;
|
||||
|
||||
// Patch face velocity and normal
|
||||
const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
|
||||
@ -321,10 +312,7 @@ void Foam::KinematicSurfaceFilm<CloudType>::wetSplashInteraction
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " wetSplashInteraction" << endl;
|
||||
}
|
||||
DebugInfo<< "Parcel " << p.origId() << " wetSplashInteraction" << endl;
|
||||
|
||||
// Patch face velocity and normal
|
||||
const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
|
||||
@ -815,15 +803,15 @@ void Foam::KinematicSurfaceFilm<CloudType>::setParcelProperties
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::KinematicSurfaceFilm<CloudType>::info(Ostream& os)
|
||||
void Foam::KinematicSurfaceFilm<CloudType>::info()
|
||||
{
|
||||
SurfaceFilmModel<CloudType>::info(os);
|
||||
SurfaceFilmModel<CloudType>::info();
|
||||
|
||||
label nSplash0 = this->template getModelProperty<label>("nParcelsSplashed");
|
||||
label nSplashTotal =
|
||||
nSplash0 + returnReduce(nParcelsSplashed_, sumOp<label>());
|
||||
|
||||
os << " - new splash parcels = " << nSplashTotal << endl;
|
||||
Log_<< " - new splash parcels = " << nSplashTotal << endl;
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
|
||||
@ -342,8 +342,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write surface film info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write surface film info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -88,9 +88,4 @@ void Foam::NoSurfaceFilm<CloudType>::setParcelProperties
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::NoSurfaceFilm<CloudType>::info(Ostream&)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -114,12 +114,6 @@ public:
|
||||
parcelType& p,
|
||||
const label filmCelli
|
||||
) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write surface film info to stream
|
||||
virtual void info(Ostream& os);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -436,8 +436,10 @@ void Foam::SurfaceFilmModel<CloudType>::setParcelProperties
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::SurfaceFilmModel<CloudType>::info(Ostream& os)
|
||||
void Foam::SurfaceFilmModel<CloudType>::info()
|
||||
{
|
||||
CloudSubModelBase<CloudType>::info();
|
||||
|
||||
label nTrans0 =
|
||||
this->template getModelProperty<label>("nParcelsTransferred");
|
||||
|
||||
@ -457,7 +459,7 @@ void Foam::SurfaceFilmModel<CloudType>::info(Ostream& os)
|
||||
massTransferred0 + returnReduce(totalMassTransferred_, sumOp<scalar>());
|
||||
|
||||
|
||||
os << " Surface film:" << nl
|
||||
Log_<< " Surface film:" << nl
|
||||
<< " - parcels absorbed = " << nTransTotal << nl
|
||||
<< " - mass absorbed = " << massTransferredTotal << nl
|
||||
<< " - parcels ejected = " << nInjectTotal << endl;
|
||||
|
||||
@ -275,8 +275,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write surface film info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write surface film info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -152,12 +152,14 @@ void Foam::PhaseChangeModel<CloudType>::addToPhaseChangeMass(const scalar dMass)
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::PhaseChangeModel<CloudType>::info(Ostream& os)
|
||||
void Foam::PhaseChangeModel<CloudType>::info()
|
||||
{
|
||||
CloudSubModelBase<CloudType>::info();
|
||||
|
||||
const scalar mass0 = this->template getBaseProperty<scalar>("mass");
|
||||
const scalar massTotal = mass0 + returnReduce(dMass_, sumOp<scalar>());
|
||||
|
||||
Info<< " Mass transfer phase change = " << massTotal << nl;
|
||||
Log_<< " Mass transfer phase change = " << massTotal << nl;
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
|
||||
@ -199,8 +199,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write injection info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write injection info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -84,12 +84,14 @@ void Foam::DevolatilisationModel<CloudType>::addToDevolatilisationMass
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::DevolatilisationModel<CloudType>::info(Ostream& os)
|
||||
void Foam::DevolatilisationModel<CloudType>::info()
|
||||
{
|
||||
CloudSubModelBase<CloudType>::info();
|
||||
|
||||
const scalar mass0 = this->template getBaseProperty<scalar>("mass");
|
||||
const scalar massTotal = mass0 + returnReduce(dMass_, sumOp<scalar>());
|
||||
|
||||
Info<< " Mass transfer devolatilisation = " << massTotal << nl;
|
||||
Log_<< " Mass transfer devolatilisation = " << massTotal << nl;
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
|
||||
@ -142,8 +142,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write injection info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write injection info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -78,12 +78,14 @@ void Foam::SurfaceReactionModel<CloudType>::addToSurfaceReactionMass
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::SurfaceReactionModel<CloudType>::info(Ostream& os)
|
||||
void Foam::SurfaceReactionModel<CloudType>::info()
|
||||
{
|
||||
CloudSubModelBase<CloudType>::info();
|
||||
|
||||
const scalar mass0 = this->template getBaseProperty<scalar>("mass");
|
||||
const scalar massTotal = mass0 + returnReduce(dMass_, sumOp<scalar>());
|
||||
|
||||
Info<< " Mass transfer surface reaction = " << massTotal << nl;
|
||||
Log_<< " Mass transfer surface reaction = " << massTotal << nl;
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
|
||||
@ -155,8 +155,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write injection info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write injection info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -275,9 +275,9 @@ void Foam::ThermoSurfaceFilm<CloudType>::setParcelProperties
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ThermoSurfaceFilm<CloudType>::info(Ostream& os)
|
||||
void Foam::ThermoSurfaceFilm<CloudType>::info()
|
||||
{
|
||||
KinematicSurfaceFilm<CloudType>::info(os);
|
||||
KinematicSurfaceFilm<CloudType>::info();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -157,8 +157,8 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write surface film info to stream
|
||||
virtual void info(Ostream& os);
|
||||
//- Write surface film info
|
||||
virtual void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user