mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: converted mass flow rate to DataEntry for steady cloud operation
This commit is contained in:
@ -284,6 +284,7 @@ Foam::InjectionModel<CloudType>::InjectionModel(CloudType& owner)
|
|||||||
SOI_(0.0),
|
SOI_(0.0),
|
||||||
volumeTotal_(0.0),
|
volumeTotal_(0.0),
|
||||||
massTotal_(0.0),
|
massTotal_(0.0),
|
||||||
|
massFlowRate_(owner.db().time(), "massFlowRate"),
|
||||||
massInjected_(this->template getModelProperty<scalar>("massInjected")),
|
massInjected_(this->template getModelProperty<scalar>("massInjected")),
|
||||||
nInjections_(this->template getModelProperty<label>("nInjections")),
|
nInjections_(this->template getModelProperty<label>("nInjections")),
|
||||||
parcelsAddedTotal_
|
parcelsAddedTotal_
|
||||||
@ -310,6 +311,7 @@ Foam::InjectionModel<CloudType>::InjectionModel
|
|||||||
SOI_(0.0),
|
SOI_(0.0),
|
||||||
volumeTotal_(0.0),
|
volumeTotal_(0.0),
|
||||||
massTotal_(0.0),
|
massTotal_(0.0),
|
||||||
|
massFlowRate_(owner.db().time(), "massFlowRate"),
|
||||||
massInjected_(this->template getModelProperty<scalar>("massInjected")),
|
massInjected_(this->template getModelProperty<scalar>("massInjected")),
|
||||||
nInjections_(this->template getModelProperty<scalar>("nInjections")),
|
nInjections_(this->template getModelProperty<scalar>("nInjections")),
|
||||||
parcelsAddedTotal_
|
parcelsAddedTotal_
|
||||||
@ -335,7 +337,8 @@ Foam::InjectionModel<CloudType>::InjectionModel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->coeffDict().lookup("massFlowRate") >> massTotal_;
|
massFlowRate_.reset(this->coeffDict());
|
||||||
|
massTotal_ = massFlowRate_.value(owner.db().time().value());
|
||||||
}
|
}
|
||||||
|
|
||||||
const word parcelBasisType = this->coeffDict().lookup("parcelBasisType");
|
const word parcelBasisType = this->coeffDict().lookup("parcelBasisType");
|
||||||
@ -384,6 +387,7 @@ Foam::InjectionModel<CloudType>::InjectionModel
|
|||||||
SOI_(im.SOI_),
|
SOI_(im.SOI_),
|
||||||
volumeTotal_(im.volumeTotal_),
|
volumeTotal_(im.volumeTotal_),
|
||||||
massTotal_(im.massTotal_),
|
massTotal_(im.massTotal_),
|
||||||
|
massFlowRate_(im.massFlowRate_),
|
||||||
massInjected_(im.massInjected_),
|
massInjected_(im.massInjected_),
|
||||||
nInjections_(im.nInjections_),
|
nInjections_(im.nInjections_),
|
||||||
parcelsAddedTotal_(im.parcelsAddedTotal_),
|
parcelsAddedTotal_(im.parcelsAddedTotal_),
|
||||||
@ -594,6 +598,8 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
|
|||||||
const polyMesh& mesh = this->owner().mesh();
|
const polyMesh& mesh = this->owner().mesh();
|
||||||
typename TrackData::cloudType& cloud = td.cloud();
|
typename TrackData::cloudType& cloud = td.cloud();
|
||||||
|
|
||||||
|
massTotal_ = massFlowRate_.value(mesh.time().value());
|
||||||
|
|
||||||
// Reset counters
|
// Reset counters
|
||||||
time0_ = 0.0;
|
time0_ = 0.0;
|
||||||
label parcelsAdded = 0;
|
label parcelsAdded = 0;
|
||||||
|
|||||||
@ -53,6 +53,7 @@ SourceFiles
|
|||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
#include "SubModelBase.H"
|
#include "SubModelBase.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
|
#include "TimeDataEntry.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -102,6 +103,9 @@ protected:
|
|||||||
//- Total mass to inject [kg]
|
//- Total mass to inject [kg]
|
||||||
scalar massTotal_;
|
scalar massTotal_;
|
||||||
|
|
||||||
|
//- Mass flow rate profile for steady calculations
|
||||||
|
TimeDataEntry<scalar> massFlowRate_;
|
||||||
|
|
||||||
//- Total mass injected to date [kg]
|
//- Total mass injected to date [kg]
|
||||||
scalar massInjected_;
|
scalar massInjected_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user