Commit c1a61968 authored by andy's avatar andy
Browse files

BUG: Specify parcels per second as scalar instead of label

parent 2ac00834
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -37,7 +37,7 @@ Foam::label Foam::KinematicLookupTableInjection<CloudType>::parcelsToInject
{
if ((time0 >= 0.0) && (time0 < duration_))
{
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
}
else
{
......@@ -78,7 +78,7 @@ Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection
InjectionModel<CloudType>(dict, owner, typeName),
inputFileName_(this->coeffDict().lookup("inputFile")),
duration_(readScalar(this->coeffDict().lookup("duration"))),
nParcelsPerSecond_
parcelsPerSecond_
(
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
),
......@@ -132,7 +132,7 @@ Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection
InjectionModel<CloudType>(im),
inputFileName_(im.inputFileName_),
duration_(im.duration_),
nParcelsPerSecond_(im.nParcelsPerSecond_),
parcelsPerSecond_(im.parcelsPerSecond_),
injectors_(im.injectors_),
injectorCells_(im.injectorCells_),
injectorTetFaces_(im.injectorTetFaces_),
......
......@@ -76,7 +76,7 @@ class KinematicLookupTableInjection
const scalar duration_;
//- Number of parcels per injector - common to all injection sources
const label nParcelsPerSecond_;
const scalar parcelsPerSecond_;
//- List of injectors
kinematicParcelInjectionDataIOList injectors_;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -36,7 +36,7 @@ Foam::label Foam::ReactingLookupTableInjection<CloudType>::parcelsToInject
{
if ((time0 >= 0.0) && (time0 < duration_))
{
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
}
else
{
......@@ -77,7 +77,7 @@ Foam::ReactingLookupTableInjection<CloudType>::ReactingLookupTableInjection
InjectionModel<CloudType>(dict, owner, typeName),
inputFileName_(this->coeffDict().lookup("inputFile")),
duration_(readScalar(this->coeffDict().lookup("duration"))),
nParcelsPerSecond_
parcelsPerSecond_
(
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
),
......@@ -131,7 +131,7 @@ Foam::ReactingLookupTableInjection<CloudType>::ReactingLookupTableInjection
InjectionModel<CloudType>(im),
inputFileName_(im.inputFileName_),
duration_(im.duration_),
nParcelsPerSecond_(im.nParcelsPerSecond_),
parcelsPerSecond_(im.parcelsPerSecond_),
injectors_(im.injectors_),
injectorCells_(im.injectorCells_),
injectorTetFaces_(im.injectorTetFaces_),
......
......@@ -79,7 +79,7 @@ class ReactingLookupTableInjection
const scalar duration_;
//- Number of parcels per injector - common to all injection sources
const label nParcelsPerSecond_;
const scalar parcelsPerSecond_;
//- List of injectors
reactingParcelInjectionDataIOList injectors_;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -37,7 +37,7 @@ Foam::ReactingMultiphaseLookupTableInjection<CloudType>::parcelsToInject
{
if ((time0 >= 0.0) && (time0 < duration_))
{
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
}
else
{
......@@ -80,7 +80,7 @@ ReactingMultiphaseLookupTableInjection
InjectionModel<CloudType>(dict, owner, typeName),
inputFileName_(this->coeffDict().lookup("inputFile")),
duration_(readScalar(this->coeffDict().lookup("duration"))),
nParcelsPerSecond_
parcelsPerSecond_
(
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
),
......@@ -135,7 +135,7 @@ ReactingMultiphaseLookupTableInjection
InjectionModel<CloudType>(im),
inputFileName_(im.inputFileName_),
duration_(im.duration_),
nParcelsPerSecond_(im.nParcelsPerSecond_),
parcelsPerSecond_(im.parcelsPerSecond_),
injectors_(im.injectors_),
injectorCells_(im.injectorCells_),
injectorTetFaces_(im.injectorTetFaces_),
......
......@@ -82,7 +82,7 @@ class ReactingMultiphaseLookupTableInjection
const scalar duration_;
//- Number of parcels per injector - common to all injection sources
const label nParcelsPerSecond_;
const scalar parcelsPerSecond_;
//- List of injectors
reactingMultiphaseParcelInjectionDataIOList injectors_;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -37,7 +37,7 @@ Foam::label Foam::ThermoLookupTableInjection<CloudType>::parcelsToInject
{
if ((time0 >= 0.0) && (time0 < duration_))
{
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
}
else
{
......@@ -78,7 +78,7 @@ Foam::ThermoLookupTableInjection<CloudType>::ThermoLookupTableInjection
InjectionModel<CloudType>(dict, owner, typeName),
inputFileName_(this->coeffDict().lookup("inputFile")),
duration_(readScalar(this->coeffDict().lookup("duration"))),
nParcelsPerSecond_
parcelsPerSecond_
(
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
),
......@@ -132,7 +132,7 @@ Foam::ThermoLookupTableInjection<CloudType>::ThermoLookupTableInjection
InjectionModel<CloudType>(im),
inputFileName_(im.inputFileName_),
duration_(im.duration_),
nParcelsPerSecond_(im.nParcelsPerSecond_),
parcelsPerSecond_(im.parcelsPerSecond_),
injectors_(im.injectors_),
injectorCells_(im.injectorCells_),
injectorTetFaces_(im.injectorTetFaces_),
......
......@@ -78,7 +78,7 @@ class ThermoLookupTableInjection
const scalar duration_;
//- Number of parcels per injector - common to all injection sources
const label nParcelsPerSecond_;
const scalar parcelsPerSecond_;
//- List of injectors
kinematicParcelInjectionDataIOList injectors_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment