mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Specify parcels per second as scalar instead of label
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,7 @@ Foam::label Foam::KinematicLookupTableInjection<CloudType>::parcelsToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
|
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -78,7 +78,7 @@ Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection
|
|||||||
InjectionModel<CloudType>(dict, owner, typeName),
|
InjectionModel<CloudType>(dict, owner, typeName),
|
||||||
inputFileName_(this->coeffDict().lookup("inputFile")),
|
inputFileName_(this->coeffDict().lookup("inputFile")),
|
||||||
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
||||||
nParcelsPerSecond_
|
parcelsPerSecond_
|
||||||
(
|
(
|
||||||
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
||||||
),
|
),
|
||||||
@ -132,7 +132,7 @@ Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection
|
|||||||
InjectionModel<CloudType>(im),
|
InjectionModel<CloudType>(im),
|
||||||
inputFileName_(im.inputFileName_),
|
inputFileName_(im.inputFileName_),
|
||||||
duration_(im.duration_),
|
duration_(im.duration_),
|
||||||
nParcelsPerSecond_(im.nParcelsPerSecond_),
|
parcelsPerSecond_(im.parcelsPerSecond_),
|
||||||
injectors_(im.injectors_),
|
injectors_(im.injectors_),
|
||||||
injectorCells_(im.injectorCells_),
|
injectorCells_(im.injectorCells_),
|
||||||
injectorTetFaces_(im.injectorTetFaces_),
|
injectorTetFaces_(im.injectorTetFaces_),
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class KinematicLookupTableInjection
|
|||||||
const scalar duration_;
|
const scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const label nParcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|
||||||
//- List of injectors
|
//- List of injectors
|
||||||
kinematicParcelInjectionDataIOList injectors_;
|
kinematicParcelInjectionDataIOList injectors_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,7 +36,7 @@ Foam::label Foam::ReactingLookupTableInjection<CloudType>::parcelsToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
|
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -77,7 +77,7 @@ Foam::ReactingLookupTableInjection<CloudType>::ReactingLookupTableInjection
|
|||||||
InjectionModel<CloudType>(dict, owner, typeName),
|
InjectionModel<CloudType>(dict, owner, typeName),
|
||||||
inputFileName_(this->coeffDict().lookup("inputFile")),
|
inputFileName_(this->coeffDict().lookup("inputFile")),
|
||||||
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
||||||
nParcelsPerSecond_
|
parcelsPerSecond_
|
||||||
(
|
(
|
||||||
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
||||||
),
|
),
|
||||||
@ -131,7 +131,7 @@ Foam::ReactingLookupTableInjection<CloudType>::ReactingLookupTableInjection
|
|||||||
InjectionModel<CloudType>(im),
|
InjectionModel<CloudType>(im),
|
||||||
inputFileName_(im.inputFileName_),
|
inputFileName_(im.inputFileName_),
|
||||||
duration_(im.duration_),
|
duration_(im.duration_),
|
||||||
nParcelsPerSecond_(im.nParcelsPerSecond_),
|
parcelsPerSecond_(im.parcelsPerSecond_),
|
||||||
injectors_(im.injectors_),
|
injectors_(im.injectors_),
|
||||||
injectorCells_(im.injectorCells_),
|
injectorCells_(im.injectorCells_),
|
||||||
injectorTetFaces_(im.injectorTetFaces_),
|
injectorTetFaces_(im.injectorTetFaces_),
|
||||||
|
|||||||
@ -79,7 +79,7 @@ class ReactingLookupTableInjection
|
|||||||
const scalar duration_;
|
const scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const label nParcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|
||||||
//- List of injectors
|
//- List of injectors
|
||||||
reactingParcelInjectionDataIOList injectors_;
|
reactingParcelInjectionDataIOList injectors_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,7 @@ Foam::ReactingMultiphaseLookupTableInjection<CloudType>::parcelsToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
|
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -80,7 +80,7 @@ ReactingMultiphaseLookupTableInjection
|
|||||||
InjectionModel<CloudType>(dict, owner, typeName),
|
InjectionModel<CloudType>(dict, owner, typeName),
|
||||||
inputFileName_(this->coeffDict().lookup("inputFile")),
|
inputFileName_(this->coeffDict().lookup("inputFile")),
|
||||||
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
||||||
nParcelsPerSecond_
|
parcelsPerSecond_
|
||||||
(
|
(
|
||||||
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
||||||
),
|
),
|
||||||
@ -135,7 +135,7 @@ ReactingMultiphaseLookupTableInjection
|
|||||||
InjectionModel<CloudType>(im),
|
InjectionModel<CloudType>(im),
|
||||||
inputFileName_(im.inputFileName_),
|
inputFileName_(im.inputFileName_),
|
||||||
duration_(im.duration_),
|
duration_(im.duration_),
|
||||||
nParcelsPerSecond_(im.nParcelsPerSecond_),
|
parcelsPerSecond_(im.parcelsPerSecond_),
|
||||||
injectors_(im.injectors_),
|
injectors_(im.injectors_),
|
||||||
injectorCells_(im.injectorCells_),
|
injectorCells_(im.injectorCells_),
|
||||||
injectorTetFaces_(im.injectorTetFaces_),
|
injectorTetFaces_(im.injectorTetFaces_),
|
||||||
|
|||||||
@ -82,7 +82,7 @@ class ReactingMultiphaseLookupTableInjection
|
|||||||
const scalar duration_;
|
const scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const label nParcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|
||||||
//- List of injectors
|
//- List of injectors
|
||||||
reactingMultiphaseParcelInjectionDataIOList injectors_;
|
reactingMultiphaseParcelInjectionDataIOList injectors_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,7 @@ Foam::label Foam::ThermoLookupTableInjection<CloudType>::parcelsToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_);
|
return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -78,7 +78,7 @@ Foam::ThermoLookupTableInjection<CloudType>::ThermoLookupTableInjection
|
|||||||
InjectionModel<CloudType>(dict, owner, typeName),
|
InjectionModel<CloudType>(dict, owner, typeName),
|
||||||
inputFileName_(this->coeffDict().lookup("inputFile")),
|
inputFileName_(this->coeffDict().lookup("inputFile")),
|
||||||
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
||||||
nParcelsPerSecond_
|
parcelsPerSecond_
|
||||||
(
|
(
|
||||||
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
readScalar(this->coeffDict().lookup("parcelsPerSecond"))
|
||||||
),
|
),
|
||||||
@ -132,7 +132,7 @@ Foam::ThermoLookupTableInjection<CloudType>::ThermoLookupTableInjection
|
|||||||
InjectionModel<CloudType>(im),
|
InjectionModel<CloudType>(im),
|
||||||
inputFileName_(im.inputFileName_),
|
inputFileName_(im.inputFileName_),
|
||||||
duration_(im.duration_),
|
duration_(im.duration_),
|
||||||
nParcelsPerSecond_(im.nParcelsPerSecond_),
|
parcelsPerSecond_(im.parcelsPerSecond_),
|
||||||
injectors_(im.injectors_),
|
injectors_(im.injectors_),
|
||||||
injectorCells_(im.injectorCells_),
|
injectorCells_(im.injectorCells_),
|
||||||
injectorTetFaces_(im.injectorTetFaces_),
|
injectorTetFaces_(im.injectorTetFaces_),
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class ThermoLookupTableInjection
|
|||||||
const scalar duration_;
|
const scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const label nParcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|
||||||
//- List of injectors
|
//- List of injectors
|
||||||
kinematicParcelInjectionDataIOList injectors_;
|
kinematicParcelInjectionDataIOList injectors_;
|
||||||
|
|||||||
Reference in New Issue
Block a user