ENH: Renamed volumeFlowRate to flowRateProfile in injection models

This commit is contained in:
andy
2010-04-01 12:37:17 +01:00
parent f99a145143
commit 5a6f5a83ca
8 changed files with 21 additions and 21 deletions

View File

@ -58,7 +58,7 @@ Foam::scalar Foam::ConeInjection<CloudType>::volumeToInject
{ {
if ((time0 >= 0.0) && (time0 < duration_)) if ((time0 >= 0.0) && (time0 < duration_))
{ {
return volumeFlowRate_().integrate(time0, time1); return flowRateProfile_().integrate(time0, time1);
} }
else else
{ {
@ -85,11 +85,11 @@ Foam::ConeInjection<CloudType>::ConeInjection
( (
readScalar(this->coeffDict().lookup("parcelsPerSecond")) readScalar(this->coeffDict().lookup("parcelsPerSecond"))
), ),
volumeFlowRate_ flowRateProfile_
( (
DataEntry<scalar>::New DataEntry<scalar>::New
( (
"volumeFlowRate", "flowRateProfile",
this->coeffDict() this->coeffDict()
) )
), ),
@ -147,7 +147,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
tanVec2_ = direction_^tanVec1_; tanVec2_ = direction_^tanVec1_;
// Set total volume to inject // Set total volume to inject
this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_); this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
// Set/cache the injector cell // Set/cache the injector cell
this->findCellAtPosition(injectorCell_, position_); this->findCellAtPosition(injectorCell_, position_);

View File

@ -83,8 +83,8 @@ class ConeInjection
//- Number of parcels to introduce per second [] //- Number of parcels to introduce per second []
const label parcelsPerSecond_; const label parcelsPerSecond_;
//- Volume flow rate of parcels to introduce relative to SOI [m^3] //- Flow rate profile relative to SOI []
const autoPtr<DataEntry<scalar> > volumeFlowRate_; const autoPtr<DataEntry<scalar> > flowRateProfile_;
//- Parcel velocity magnitude relative to SOI [m/s] //- Parcel velocity magnitude relative to SOI [m/s]
const autoPtr<DataEntry<scalar> > Umag_; const autoPtr<DataEntry<scalar> > Umag_;

View File

@ -40,7 +40,7 @@ Foam::label Foam::ConeInjectionMP<CloudType>::parcelsToInject
{ {
if ((time0 >= 0.0) && (time0 < duration_)) if ((time0 >= 0.0) && (time0 < duration_))
{ {
const scalar targetVolume = volumeFlowRate_().integrate(0, time1); const scalar targetVolume = flowRateProfile_().integrate(0, time1);
const label targetParcels = const label targetParcels =
parcelsPerInjector_*targetVolume/this->volumeTotal_; parcelsPerInjector_*targetVolume/this->volumeTotal_;
@ -67,7 +67,7 @@ Foam::scalar Foam::ConeInjectionMP<CloudType>::volumeToInject
{ {
if ((time0 >= 0.0) && (time0 < duration_)) if ((time0 >= 0.0) && (time0 < duration_))
{ {
return volumeFlowRate_().integrate(time0, time1); return flowRateProfile_().integrate(time0, time1);
} }
else else
{ {
@ -116,11 +116,11 @@ Foam::ConeInjectionMP<CloudType>::ConeInjectionMP
( (
readScalar(this->coeffDict().lookup("parcelsPerInjector")) readScalar(this->coeffDict().lookup("parcelsPerInjector"))
), ),
volumeFlowRate_ flowRateProfile_
( (
DataEntry<scalar>::New DataEntry<scalar>::New
( (
"volumeFlowRate", "flowRateProfile",
this->coeffDict() this->coeffDict()
) )
), ),
@ -182,7 +182,7 @@ Foam::ConeInjectionMP<CloudType>::ConeInjectionMP
} }
// Set total volume to inject // Set total volume to inject
this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_); this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
// Set/cache the injector cells // Set/cache the injector cells
forAll(positions_, i) forAll(positions_, i)

View File

@ -90,8 +90,8 @@ class ConeInjectionMP
//- Number of parcels to introduce per injector //- Number of parcels to introduce per injector
const label parcelsPerInjector_; const label parcelsPerInjector_;
//- Volume flow rate of parcels to introduce relative to SOI [m^3] //- Flow rate profile relative to SOI []
const autoPtr<DataEntry<scalar> > volumeFlowRate_; const autoPtr<DataEntry<scalar> > flowRateProfile_;
//- Parcel velocity magnitude relative to SOI [m/s] //- Parcel velocity magnitude relative to SOI [m/s]
const autoPtr<DataEntry<scalar> > Umag_; const autoPtr<DataEntry<scalar> > Umag_;

View File

@ -56,7 +56,7 @@ Foam::scalar Foam::PatchInjection<CloudType>::volumeToInject
{ {
if ((time0 >= 0.0) && (time0 < duration_)) if ((time0 >= 0.0) && (time0 < duration_))
{ {
return fraction_*volumeFlowRate_().integrate(time0, time1); return fraction_*flowRateProfile_().integrate(time0, time1);
} }
else else
{ {
@ -82,11 +82,11 @@ Foam::PatchInjection<CloudType>::PatchInjection
readScalar(this->coeffDict().lookup("parcelsPerSecond")) readScalar(this->coeffDict().lookup("parcelsPerSecond"))
), ),
U0_(this->coeffDict().lookup("U0")), U0_(this->coeffDict().lookup("U0")),
volumeFlowRate_ flowRateProfile_
( (
DataEntry<scalar>::New DataEntry<scalar>::New
( (
"volumeFlowRate", "flowRateProfile",
this->coeffDict() this->coeffDict()
) )
), ),
@ -127,7 +127,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
fraction_ = scalar(patchSize)/totalPatchSize; fraction_ = scalar(patchSize)/totalPatchSize;
// Set total volume/mass to inject // Set total volume/mass to inject
this->volumeTotal_ = fraction_*volumeFlowRate_().integrate(0.0, duration_); this->volumeTotal_ = fraction_*flowRateProfile_().integrate(0.0, duration_);
this->massTotal_ *= fraction_; this->massTotal_ *= fraction_;
} }

View File

@ -79,8 +79,8 @@ class PatchInjection
//- Initial parcel velocity [m/s] //- Initial parcel velocity [m/s]
const vector U0_; const vector U0_;
//- Volume flow rate of parcels to introduce relative to SOI [m^3/s] //- Flow rate profile relative to SOI []
const autoPtr<DataEntry<scalar> > volumeFlowRate_; const autoPtr<DataEntry<scalar> > flowRateProfile_;
//- Parcel size PDF model //- Parcel size PDF model
const autoPtr<pdfs::pdf> parcelPDF_; const autoPtr<pdfs::pdf> parcelPDF_;

View File

@ -98,7 +98,7 @@ PatchInjectionCoeffs
duration 10000; duration 10000;
parcelsPerSecond 1e5; parcelsPerSecond 1e5;
U0 (40 0 0); U0 (40 0 0);
volumeFlowRate constant 1; flowRateProfile constant 1;
parcelPDF parcelPDF
{ {
pdfType general; pdfType general;

View File

@ -86,7 +86,7 @@ ConeInjectionCoeffs
position ( 0.25 0.25 0.05 ); position ( 0.25 0.25 0.05 );
direction ( 0 -1 0 ); direction ( 0 -1 0 );
parcelsPerSecond 10000; parcelsPerSecond 10000;
volumeFlowRate Constant 0.01; flowRateProfile Constant 0.01;
Umag Constant 50; Umag Constant 50;
thetaInner Constant 0; thetaInner Constant 0;
thetaOuter Constant 30; thetaOuter Constant 30;