mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG/ENH: Added use of engine time to cloud injection models - mantis #407
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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -139,17 +139,28 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return Table value
|
// Manipulation
|
||||||
virtual Type value(const scalar x) const
|
|
||||||
{
|
|
||||||
return TableBase<Type>::value(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Integrate between two (scalar) values
|
//- Convert time
|
||||||
virtual Type integrate(const scalar x1, const scalar x2) const
|
virtual void convertTimeBase(const Time& t)
|
||||||
{
|
{
|
||||||
return TableBase<Type>::integrate(x1, x2);
|
TableBase<Type>::convertTimeBase(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation
|
||||||
|
|
||||||
|
//- Return Table value
|
||||||
|
virtual Type value(const scalar x) const
|
||||||
|
{
|
||||||
|
return TableBase<Type>::value(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Integrate between two (scalar) values
|
||||||
|
virtual Type integrate(const scalar x1, const scalar x2) const
|
||||||
|
{
|
||||||
|
return TableBase<Type>::integrate(x1, x2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// I/O
|
// I/O
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,6 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "DataEntry.H"
|
#include "DataEntry.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -59,6 +60,13 @@ const Foam::word& Foam::DataEntry<Type>::name() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::DataEntry<Type>::convertTimeBase(const Time&)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Type Foam::DataEntry<Type>::value(const scalar x) const
|
Type Foam::DataEntry<Type>::value(const scalar x) const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,6 +45,7 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
class Time;
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class DataEntry;
|
class DataEntry;
|
||||||
@ -133,6 +134,12 @@ public:
|
|||||||
const word& name() const;
|
const word& name() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Manipulation
|
||||||
|
|
||||||
|
//- Convert time
|
||||||
|
virtual void convertTimeBase(const Time& t);
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|
||||||
//- Return value as a function of (scalar) independent variable
|
//- Return value as a function of (scalar) independent variable
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -106,17 +106,28 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return Table value
|
// Manipulation
|
||||||
virtual Type value(const scalar x) const
|
|
||||||
{
|
|
||||||
return TableBase<Type>::value(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Integrate between two (scalar) values
|
//- Convert time
|
||||||
virtual Type integrate(const scalar x1, const scalar x2) const
|
virtual void convertTimeBase(const Time& t)
|
||||||
{
|
{
|
||||||
return TableBase<Type>::integrate(x1, x2);
|
TableBase<Type>::convertTimeBase(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation
|
||||||
|
|
||||||
|
//- Return Table value
|
||||||
|
virtual Type value(const scalar x) const
|
||||||
|
{
|
||||||
|
return TableBase<Type>::value(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Integrate between two (scalar) values
|
||||||
|
virtual Type integrate(const scalar x1, const scalar x2) const
|
||||||
|
{
|
||||||
|
return TableBase<Type>::integrate(x1, x2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// I/O
|
// I/O
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,6 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "TableBase.H"
|
#include "TableBase.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -296,6 +297,17 @@ bool Foam::TableBase<Type>::checkMaxBounds
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::TableBase<Type>::convertTimeBase(const Time& t)
|
||||||
|
{
|
||||||
|
forAll(table_, i)
|
||||||
|
{
|
||||||
|
scalar value = table_[i].first();
|
||||||
|
table_[i].first() = t.userTimeToTime(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Type Foam::TableBase<Type>::value(const scalar x) const
|
Type Foam::TableBase<Type>::value(const scalar x) const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -129,6 +129,9 @@ public:
|
|||||||
//- Check maximum table bounds
|
//- Check maximum table bounds
|
||||||
bool checkMaxBounds(const scalar x, scalar& xDash) const;
|
bool checkMaxBounds(const scalar x, scalar& xDash) const;
|
||||||
|
|
||||||
|
//- Convert time
|
||||||
|
virtual void convertTimeBase(const Time& t);
|
||||||
|
|
||||||
//- Return Table value
|
//- Return Table value
|
||||||
virtual Type value(const scalar x) const;
|
virtual Type value(const scalar x) const;
|
||||||
|
|
||||||
|
|||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,17 +122,28 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return TableFile value
|
// Manipulation
|
||||||
virtual Type value(const scalar x) const
|
|
||||||
{
|
|
||||||
return TableBase<Type>::value(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Integrate between two (scalar) values
|
//- Convert time
|
||||||
virtual Type integrate(const scalar x1, const scalar x2) const
|
virtual void convertTimeBase(const Time& t)
|
||||||
{
|
{
|
||||||
return TableBase<Type>::integrate(x1, x2);
|
TableBase<Type>::convertTimeBase(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation
|
||||||
|
|
||||||
|
//- Return TableFile value
|
||||||
|
virtual Type value(const scalar x) const
|
||||||
|
{
|
||||||
|
return TableBase<Type>::value(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Integrate between two (scalar) values
|
||||||
|
virtual Type integrate(const scalar x1, const scalar x2) const
|
||||||
|
{
|
||||||
|
return TableBase<Type>::integrate(x1, x2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// I/O
|
// I/O
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,6 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "polynomial.H"
|
#include "polynomial.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -89,6 +90,16 @@ Foam::polynomial::~polynomial()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::polynomial::convertTimeBase(const Time& t)
|
||||||
|
{
|
||||||
|
forAll(coeffs_, i)
|
||||||
|
{
|
||||||
|
scalar value = coeffs_[i].first();
|
||||||
|
coeffs_[i].first() = t.userTimeToTime(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::scalar Foam::polynomial::value(const scalar x) const
|
Foam::scalar Foam::polynomial::value(const scalar x) const
|
||||||
{
|
{
|
||||||
scalar y = 0.0;
|
scalar y = 0.0;
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -112,11 +112,19 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return polynomial value
|
// Manipulation
|
||||||
scalar value(const scalar x) const;
|
|
||||||
|
|
||||||
//- Integrate between two (scalar) values
|
//- Convert time
|
||||||
scalar integrate(const scalar x1, const scalar x2) const;
|
virtual void convertTimeBase(const Time& t);
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation
|
||||||
|
|
||||||
|
//- Return polynomial value
|
||||||
|
scalar value(const scalar x) const;
|
||||||
|
|
||||||
|
//- Integrate between two (scalar) values
|
||||||
|
scalar integrate(const scalar x1, const scalar x2) const;
|
||||||
|
|
||||||
|
|
||||||
// I/O
|
// I/O
|
||||||
|
|||||||
@ -0,0 +1,137 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "TimeDataEntry.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::TimeDataEntry<Type>::TimeDataEntry
|
||||||
|
(
|
||||||
|
const Time& t,
|
||||||
|
const word& name,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
time_(t),
|
||||||
|
name_(name),
|
||||||
|
entry_(DataEntry<Type>::New(name, dict))
|
||||||
|
{
|
||||||
|
entry_->convertTimeBase(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::TimeDataEntry<Type>::TimeDataEntry(const Time& t, const word& name)
|
||||||
|
:
|
||||||
|
time_(t),
|
||||||
|
name_(name),
|
||||||
|
entry_(NULL)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::TimeDataEntry<Type>::TimeDataEntry
|
||||||
|
(
|
||||||
|
const TimeDataEntry<Type>& tde
|
||||||
|
)
|
||||||
|
:
|
||||||
|
time_(tde.time_),
|
||||||
|
name_(tde.name_),
|
||||||
|
entry_(tde.entry_->clone().ptr())
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::TimeDataEntry<Type>::~TimeDataEntry()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::TimeDataEntry<Type>::reset(const dictionary& dict)
|
||||||
|
{
|
||||||
|
entry_.reset
|
||||||
|
(
|
||||||
|
DataEntry<Type>::New
|
||||||
|
(
|
||||||
|
name_,
|
||||||
|
dict
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
entry_->convertTimeBase(time_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
const Foam::word& Foam::TimeDataEntry<Type>::name() const
|
||||||
|
{
|
||||||
|
return entry_->name();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Type Foam::TimeDataEntry<Type>::value(const scalar x) const
|
||||||
|
{
|
||||||
|
return entry_->value(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Type Foam::TimeDataEntry<Type>::integrate
|
||||||
|
(
|
||||||
|
const scalar x1,
|
||||||
|
const scalar x2
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return entry_->integrate(x1, x2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const TimeDataEntry<Type>& de
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return de.entry_->operator<<(os, de);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::TimeDataEntry<Type>::writeData(Ostream& os) const
|
||||||
|
{
|
||||||
|
entry_->writeData(os);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,153 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::TimeDataEntry
|
||||||
|
|
||||||
|
Description
|
||||||
|
Light wrapper around DataEntry to provide a mechanism to update time-based
|
||||||
|
entries.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
TimeDataEntry.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef TimeDataEntry_H
|
||||||
|
#define TimeDataEntry_H
|
||||||
|
|
||||||
|
#include "DataEntry.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
template<class Type>
|
||||||
|
class TimeDataEntry;
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Ostream& operator<<
|
||||||
|
(
|
||||||
|
Ostream&,
|
||||||
|
const TimeDataEntry<Type>&
|
||||||
|
);
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class TimeDataEntry Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class TimeDataEntry
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
//- Reference to the time database
|
||||||
|
const Time& time_;
|
||||||
|
|
||||||
|
//- Name of the data entry
|
||||||
|
const word name_;
|
||||||
|
|
||||||
|
//- The underlying DataEntry
|
||||||
|
autoPtr<DataEntry<Type> > entry_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
|
||||||
|
//- Construct from entry name
|
||||||
|
TimeDataEntry
|
||||||
|
(
|
||||||
|
const Time& t,
|
||||||
|
const word& name,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct null from entry name
|
||||||
|
TimeDataEntry
|
||||||
|
(
|
||||||
|
const Time& t,
|
||||||
|
const word& entryName
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Copy constructor
|
||||||
|
TimeDataEntry(const TimeDataEntry<Type>& tde);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~TimeDataEntry();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Reset entry by re-reading from dictionary
|
||||||
|
void reset(const dictionary& dict);
|
||||||
|
|
||||||
|
//- Return the name of the entry
|
||||||
|
const word& name() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation
|
||||||
|
|
||||||
|
//- Return value as a function of (scalar) independent variable
|
||||||
|
virtual Type value(const scalar x) const;
|
||||||
|
|
||||||
|
//- Integrate between two (scalar) values
|
||||||
|
virtual Type integrate(const scalar x1, const scalar x2) const;
|
||||||
|
|
||||||
|
|
||||||
|
// I/O
|
||||||
|
|
||||||
|
//- Ostream Operator
|
||||||
|
friend Ostream& operator<< <Type>
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const TimeDataEntry<Type>& de
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Write in dictionary format
|
||||||
|
virtual void writeData(Ostream& os) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "TimeDataEntry.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "ConeInjection.H"
|
#include "ConeInjection.H"
|
||||||
#include "DataEntry.H"
|
#include "TimeDataEntry.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathematicalConstants.H"
|
||||||
#include "unitConversion.H"
|
#include "unitConversion.H"
|
||||||
|
|
||||||
@ -51,11 +51,40 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
),
|
),
|
||||||
flowRateProfile_
|
flowRateProfile_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New("flowRateProfile", this->coeffDict())
|
TimeDataEntry<scalar>
|
||||||
|
(
|
||||||
|
owner.db().time(),
|
||||||
|
"flowRateProfile",
|
||||||
|
this->coeffDict()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Umag_
|
||||||
|
(
|
||||||
|
TimeDataEntry<scalar>
|
||||||
|
(
|
||||||
|
owner.db().time(),
|
||||||
|
"Umag",
|
||||||
|
this->coeffDict()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
thetaInner_
|
||||||
|
(
|
||||||
|
TimeDataEntry<scalar>
|
||||||
|
(
|
||||||
|
owner.db().time(),
|
||||||
|
"thetaInner",
|
||||||
|
this->coeffDict()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
thetaOuter_
|
||||||
|
(
|
||||||
|
TimeDataEntry<scalar>
|
||||||
|
(
|
||||||
|
owner.db().time(),
|
||||||
|
"thetaOuter",
|
||||||
|
this->coeffDict()
|
||||||
|
)
|
||||||
),
|
),
|
||||||
Umag_(DataEntry<scalar>::New("Umag", this->coeffDict())),
|
|
||||||
thetaInner_(DataEntry<scalar>::New("thetaInner", this->coeffDict())),
|
|
||||||
thetaOuter_(DataEntry<scalar>::New("thetaOuter", this->coeffDict())),
|
|
||||||
sizeDistribution_
|
sizeDistribution_
|
||||||
(
|
(
|
||||||
distributionModels::distributionModel::New
|
distributionModels::distributionModel::New
|
||||||
@ -67,6 +96,8 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
tanVec1_(positionAxis_.size()),
|
tanVec1_(positionAxis_.size()),
|
||||||
tanVec2_(positionAxis_.size())
|
tanVec2_(positionAxis_.size())
|
||||||
{
|
{
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
// Normalise direction vector and determine direction vectors
|
// Normalise direction vector and determine direction vectors
|
||||||
// tangential to injector axis direction
|
// tangential to injector axis direction
|
||||||
forAll(positionAxis_, i)
|
forAll(positionAxis_, i)
|
||||||
@ -92,7 +123,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set total volume to inject
|
// Set total volume to inject
|
||||||
this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
|
this->volumeTotal_ = flowRateProfile_.integrate(0.0, duration_);
|
||||||
|
|
||||||
// Set/cache the injector cells
|
// Set/cache the injector cells
|
||||||
forAll(positionAxis_, i)
|
forAll(positionAxis_, i)
|
||||||
@ -121,10 +152,10 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
|||||||
injectorTetPts_(im.injectorTetPts_),
|
injectorTetPts_(im.injectorTetPts_),
|
||||||
duration_(im.duration_),
|
duration_(im.duration_),
|
||||||
parcelsPerInjector_(im.parcelsPerInjector_),
|
parcelsPerInjector_(im.parcelsPerInjector_),
|
||||||
flowRateProfile_(im.flowRateProfile_().clone().ptr()),
|
flowRateProfile_(im.flowRateProfile_),
|
||||||
Umag_(im.Umag_().clone().ptr()),
|
Umag_(im.Umag_),
|
||||||
thetaInner_(im.thetaInner_().clone().ptr()),
|
thetaInner_(im.thetaInner_),
|
||||||
thetaOuter_(im.thetaOuter_().clone().ptr()),
|
thetaOuter_(im.thetaOuter_),
|
||||||
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
||||||
nInjected_(im.nInjected_),
|
nInjected_(im.nInjected_),
|
||||||
tanVec1_(im.tanVec1_),
|
tanVec1_(im.tanVec1_),
|
||||||
@ -157,7 +188,7 @@ Foam::label Foam::ConeInjection<CloudType>::parcelsToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
const scalar targetVolume = flowRateProfile_().integrate(0, time1);
|
const scalar targetVolume = flowRateProfile_.integrate(0, time1);
|
||||||
|
|
||||||
const label targetParcels =
|
const label targetParcels =
|
||||||
parcelsPerInjector_*targetVolume/this->volumeTotal_;
|
parcelsPerInjector_*targetVolume/this->volumeTotal_;
|
||||||
@ -184,7 +215,7 @@ Foam::scalar Foam::ConeInjection<CloudType>::volumeToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return flowRateProfile_().integrate(time0, time1);
|
return flowRateProfile_.integrate(time0, time1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -229,8 +260,8 @@ void Foam::ConeInjection<CloudType>::setProperties
|
|||||||
const label i = parcelI % positionAxis_.size();
|
const label i = parcelI % positionAxis_.size();
|
||||||
|
|
||||||
scalar t = time - this->SOI_;
|
scalar t = time - this->SOI_;
|
||||||
scalar ti = thetaInner_().value(t);
|
scalar ti = thetaInner_.value(t);
|
||||||
scalar to = thetaOuter_().value(t);
|
scalar to = thetaOuter_.value(t);
|
||||||
scalar coneAngle = degToRad(rnd.position<scalar>(ti, to));
|
scalar coneAngle = degToRad(rnd.position<scalar>(ti, to));
|
||||||
|
|
||||||
scalar alpha = sin(coneAngle);
|
scalar alpha = sin(coneAngle);
|
||||||
@ -242,7 +273,7 @@ void Foam::ConeInjection<CloudType>::setProperties
|
|||||||
dirVec += normal;
|
dirVec += normal;
|
||||||
dirVec /= mag(dirVec);
|
dirVec /= mag(dirVec);
|
||||||
|
|
||||||
parcel.U() = Umag_().value(t)*dirVec;
|
parcel.U() = Umag_.value(t)*dirVec;
|
||||||
|
|
||||||
// set particle diameter
|
// set particle diameter
|
||||||
parcel.d() = sizeDistribution_().sample();
|
parcel.d() = sizeDistribution_().sample();
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,17 +45,13 @@ SourceFiles
|
|||||||
#include "InjectionModel.H"
|
#include "InjectionModel.H"
|
||||||
#include "distributionModel.H"
|
#include "distributionModel.H"
|
||||||
#include "vectorList.H"
|
#include "vectorList.H"
|
||||||
|
#include "TimeDataEntry.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
class DataEntry;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class ConeInjection Declaration
|
Class ConeInjection Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -80,22 +76,22 @@ class ConeInjection
|
|||||||
labelList injectorTetPts_;
|
labelList injectorTetPts_;
|
||||||
|
|
||||||
//- Injection duration [s]
|
//- Injection duration [s]
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels to introduce per injector
|
//- Number of parcels to introduce per injector
|
||||||
const label parcelsPerInjector_;
|
const label parcelsPerInjector_;
|
||||||
|
|
||||||
//- Flow rate profile relative to SOI []
|
//- Flow rate profile relative to SOI []
|
||||||
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
const TimeDataEntry<scalar> flowRateProfile_;
|
||||||
|
|
||||||
//- Parcel velocity magnitude relative to SOI [m/s]
|
//- Parcel velocity magnitude relative to SOI [m/s]
|
||||||
const autoPtr<DataEntry<scalar> > Umag_;
|
const TimeDataEntry<scalar> Umag_;
|
||||||
|
|
||||||
//- Inner cone angle relative to SOI [deg]
|
//- Inner cone angle relative to SOI [deg]
|
||||||
const autoPtr<DataEntry<scalar> > thetaInner_;
|
const TimeDataEntry<scalar> thetaInner_;
|
||||||
|
|
||||||
//- Outer cone angle relative to SOI [deg]
|
//- Outer cone angle relative to SOI [deg]
|
||||||
const autoPtr<DataEntry<scalar> > thetaOuter_;
|
const TimeDataEntry<scalar> thetaOuter_;
|
||||||
|
|
||||||
//- Parcel size distribution model
|
//- Parcel size distribution model
|
||||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "ConeNozzleInjection.H"
|
#include "ConeNozzleInjection.H"
|
||||||
#include "DataEntry.H"
|
#include "TimeDataEntry.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathematicalConstants.H"
|
||||||
#include "distributionModel.H"
|
#include "distributionModel.H"
|
||||||
|
|
||||||
@ -74,26 +74,12 @@ void Foam::ConeNozzleInjection<CloudType>::setFlowType()
|
|||||||
}
|
}
|
||||||
else if (flowType == "pressureDrivenVelocity")
|
else if (flowType == "pressureDrivenVelocity")
|
||||||
{
|
{
|
||||||
Pinj_.reset
|
Pinj_.reset(this->coeffDict());
|
||||||
(
|
|
||||||
DataEntry<scalar>::New
|
|
||||||
(
|
|
||||||
"Pinj",
|
|
||||||
this->coeffDict()
|
|
||||||
).ptr()
|
|
||||||
);
|
|
||||||
flowType_ = ftPressureDrivenVelocity;
|
flowType_ = ftPressureDrivenVelocity;
|
||||||
}
|
}
|
||||||
else if (flowType == "flowRateAndDischarge")
|
else if (flowType == "flowRateAndDischarge")
|
||||||
{
|
{
|
||||||
Cd_.reset
|
Cd_.reset(this->coeffDict());
|
||||||
(
|
|
||||||
DataEntry<scalar>::New
|
|
||||||
(
|
|
||||||
"Cd",
|
|
||||||
this->coeffDict()
|
|
||||||
).ptr()
|
|
||||||
);
|
|
||||||
flowType_ = ftFlowRateAndDischarge;
|
flowType_ = ftFlowRateAndDischarge;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -132,24 +118,27 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
),
|
),
|
||||||
flowRateProfile_
|
flowRateProfile_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
TimeDataEntry<scalar>
|
||||||
(
|
(
|
||||||
|
owner.db().time(),
|
||||||
"flowRateProfile",
|
"flowRateProfile",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thetaInner_
|
thetaInner_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
TimeDataEntry<scalar>
|
||||||
(
|
(
|
||||||
|
owner.db().time(),
|
||||||
"thetaInner",
|
"thetaInner",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thetaOuter_
|
thetaOuter_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
TimeDataEntry<scalar>
|
||||||
(
|
(
|
||||||
|
owner.db().time(),
|
||||||
"thetaOuter",
|
"thetaOuter",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
@ -167,8 +156,8 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
normal_(vector::zero),
|
normal_(vector::zero),
|
||||||
|
|
||||||
UMag_(0.0),
|
UMag_(0.0),
|
||||||
Cd_(NULL),
|
Cd_(owner.db().time(), "Cd"),
|
||||||
Pinj_(NULL)
|
Pinj_(owner.db().time(), "Pinj")
|
||||||
{
|
{
|
||||||
if (innerDiameter_ >= outerDiameter_)
|
if (innerDiameter_ >= outerDiameter_)
|
||||||
{
|
{
|
||||||
@ -183,6 +172,8 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
setInjectionMethod();
|
setInjectionMethod();
|
||||||
|
|
||||||
setFlowType();
|
setFlowType();
|
||||||
@ -208,7 +199,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
tanVec2_ = direction_^tanVec1_;
|
tanVec2_ = direction_^tanVec1_;
|
||||||
|
|
||||||
// Set total volume to inject
|
// Set total volume to inject
|
||||||
this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_);
|
this->volumeTotal_ = flowRateProfile_.integrate(0.0, duration_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -230,26 +221,17 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
|||||||
tetPtI_(im.tetPtI_),
|
tetPtI_(im.tetPtI_),
|
||||||
direction_(im.direction_),
|
direction_(im.direction_),
|
||||||
parcelsPerSecond_(im.parcelsPerSecond_),
|
parcelsPerSecond_(im.parcelsPerSecond_),
|
||||||
flowRateProfile_(im.flowRateProfile_().clone().ptr()),
|
flowRateProfile_(im.flowRateProfile_),
|
||||||
thetaInner_(im.thetaInner_().clone().ptr()),
|
thetaInner_(im.thetaInner_),
|
||||||
thetaOuter_(im.thetaOuter_().clone().ptr()),
|
thetaOuter_(im.thetaOuter_),
|
||||||
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
||||||
tanVec1_(im.tanVec1_),
|
tanVec1_(im.tanVec1_),
|
||||||
tanVec2_(im.tanVec1_),
|
tanVec2_(im.tanVec1_),
|
||||||
normal_(im.normal_),
|
normal_(im.normal_),
|
||||||
UMag_(im.UMag_),
|
UMag_(im.UMag_),
|
||||||
Cd_(NULL),
|
Cd_(im.Cd_),
|
||||||
Pinj_(NULL)
|
Pinj_(im.Pinj_)
|
||||||
{
|
{}
|
||||||
if (im.Cd_.valid())
|
|
||||||
{
|
|
||||||
Cd_.reset(im.Cd_().clone().ptr());
|
|
||||||
}
|
|
||||||
if (im.Pinj_.valid())
|
|
||||||
{
|
|
||||||
Pinj_.reset(im.Pinj_().clone().ptr());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
@ -295,7 +277,7 @@ Foam::scalar Foam::ConeNozzleInjection<CloudType>::volumeToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return flowRateProfile_().integrate(time0, time1);
|
return flowRateProfile_.integrate(time0, time1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -383,8 +365,8 @@ void Foam::ConeNozzleInjection<CloudType>::setProperties
|
|||||||
const scalar deg2Rad = mathematical::pi/180.0;
|
const scalar deg2Rad = mathematical::pi/180.0;
|
||||||
|
|
||||||
scalar t = time - this->SOI_;
|
scalar t = time - this->SOI_;
|
||||||
scalar ti = thetaInner_().value(t);
|
scalar ti = thetaInner_.value(t);
|
||||||
scalar to = thetaOuter_().value(t);
|
scalar to = thetaOuter_.value(t);
|
||||||
scalar coneAngle = rndGen.sample01<scalar>()*(to - ti) + ti;
|
scalar coneAngle = rndGen.sample01<scalar>()*(to - ti) + ti;
|
||||||
|
|
||||||
coneAngle *= deg2Rad;
|
coneAngle *= deg2Rad;
|
||||||
@ -407,7 +389,7 @@ void Foam::ConeNozzleInjection<CloudType>::setProperties
|
|||||||
{
|
{
|
||||||
scalar pAmbient = this->owner().pAmbient();
|
scalar pAmbient = this->owner().pAmbient();
|
||||||
scalar rho = parcel.rho();
|
scalar rho = parcel.rho();
|
||||||
scalar UMag = ::sqrt(2.0*(Pinj_().value(t) - pAmbient)/rho);
|
scalar UMag = ::sqrt(2.0*(Pinj_.value(t) - pAmbient)/rho);
|
||||||
parcel.U() = UMag*dirVec;
|
parcel.U() = UMag*dirVec;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -417,10 +399,10 @@ void Foam::ConeNozzleInjection<CloudType>::setProperties
|
|||||||
scalar Ai = 0.25*mathematical::pi*innerDiameter_*innerDiameter_;
|
scalar Ai = 0.25*mathematical::pi*innerDiameter_*innerDiameter_;
|
||||||
scalar massFlowRate =
|
scalar massFlowRate =
|
||||||
this->massTotal()
|
this->massTotal()
|
||||||
*flowRateProfile_().value(t)
|
*flowRateProfile_.value(t)
|
||||||
/this->volumeTotal();
|
/this->volumeTotal();
|
||||||
|
|
||||||
scalar Umag = massFlowRate/(parcel.rho()*Cd_().value(t)*(Ao - Ai));
|
scalar Umag = massFlowRate/(parcel.rho()*Cd_.value(t)*(Ao - Ai));
|
||||||
parcel.U() = Umag*dirVec;
|
parcel.U() = Umag*dirVec;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -63,7 +63,7 @@ namespace Foam
|
|||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class DataEntry;
|
class TimeDataEntry;
|
||||||
|
|
||||||
class distributionModel;
|
class distributionModel;
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ private:
|
|||||||
const scalar innerDiameter_;
|
const scalar innerDiameter_;
|
||||||
|
|
||||||
//- Injection duration [s]
|
//- Injection duration [s]
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Injector position [m]
|
//- Injector position [m]
|
||||||
vector position_;
|
vector position_;
|
||||||
@ -132,13 +132,13 @@ private:
|
|||||||
const label parcelsPerSecond_;
|
const label parcelsPerSecond_;
|
||||||
|
|
||||||
//- Flow rate profile relative to SOI []
|
//- Flow rate profile relative to SOI []
|
||||||
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
const TimeDataEntry<scalar> flowRateProfile_;
|
||||||
|
|
||||||
//- Inner cone angle relative to SOI [deg]
|
//- Inner cone angle relative to SOI [deg]
|
||||||
const autoPtr<DataEntry<scalar> > thetaInner_;
|
const TimeDataEntry<scalar> thetaInner_;
|
||||||
|
|
||||||
//- Outer cone angle relative to SOI [deg]
|
//- Outer cone angle relative to SOI [deg]
|
||||||
const autoPtr<DataEntry<scalar> > thetaOuter_;
|
const TimeDataEntry<scalar> thetaOuter_;
|
||||||
|
|
||||||
//- Parcel size PDF model
|
//- Parcel size PDF model
|
||||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||||
@ -162,10 +162,10 @@ private:
|
|||||||
scalar UMag_;
|
scalar UMag_;
|
||||||
|
|
||||||
//- Discharge coefficient, relative to SOI [m/s]
|
//- Discharge coefficient, relative to SOI [m/s]
|
||||||
autoPtr<DataEntry<scalar> > Cd_;
|
TimeDataEntry<scalar> Cd_;
|
||||||
|
|
||||||
//- Injection pressure [Pa]
|
//- Injection pressure [Pa]
|
||||||
autoPtr<DataEntry<scalar> > Pinj_;
|
TimeDataEntry<scalar> Pinj_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,16 +48,18 @@ Foam::InflationInjection<CloudType>::InflationInjection
|
|||||||
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
duration_(readScalar(this->coeffDict().lookup("duration"))),
|
||||||
flowRateProfile_
|
flowRateProfile_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
TimeDataEntry<scalar>
|
||||||
(
|
(
|
||||||
|
owner.db().time(),
|
||||||
"flowRateProfile",
|
"flowRateProfile",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
growthRate_
|
growthRate_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New
|
TimeDataEntry<scalar>
|
||||||
(
|
(
|
||||||
|
owner.db().time(),
|
||||||
"growthRate",
|
"growthRate",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
@ -76,6 +78,8 @@ Foam::InflationInjection<CloudType>::InflationInjection
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
if (selfSeed_)
|
if (selfSeed_)
|
||||||
{
|
{
|
||||||
dSeed_ = readScalar(this->coeffDict().lookup("dSeed"));
|
dSeed_ = readScalar(this->coeffDict().lookup("dSeed"));
|
||||||
@ -111,7 +115,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set total volume/mass to inject
|
// Set total volume/mass to inject
|
||||||
this->volumeTotal_ = fraction_*flowRateProfile_().integrate(0.0, duration_);
|
this->volumeTotal_ = fraction_*flowRateProfile_.integrate(0.0, duration_);
|
||||||
this->massTotal_ *= fraction_;
|
this->massTotal_ *= fraction_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,8 +132,8 @@ Foam::InflationInjection<CloudType>::InflationInjection
|
|||||||
generationCells_(im.generationCells_),
|
generationCells_(im.generationCells_),
|
||||||
inflationCells_(im.inflationCells_),
|
inflationCells_(im.inflationCells_),
|
||||||
duration_(im.duration_),
|
duration_(im.duration_),
|
||||||
flowRateProfile_(im.flowRateProfile_().clone().ptr()),
|
flowRateProfile_(im.flowRateProfile_),
|
||||||
growthRate_(im.growthRate_().clone().ptr()),
|
growthRate_(im.growthRate_),
|
||||||
newParticles_(im.newParticles_),
|
newParticles_(im.newParticles_),
|
||||||
volumeAccumulator_(im.volumeAccumulator_),
|
volumeAccumulator_(im.volumeAccumulator_),
|
||||||
fraction_(im.fraction_),
|
fraction_(im.fraction_),
|
||||||
@ -167,7 +171,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject
|
|||||||
List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
|
List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
|
||||||
this->owner().cellOccupancy();
|
this->owner().cellOccupancy();
|
||||||
|
|
||||||
scalar gR = growthRate_().value(time1);
|
scalar gR = growthRate_.value(time1);
|
||||||
|
|
||||||
scalar dT = time1 - time0;
|
scalar dT = time1 - time0;
|
||||||
|
|
||||||
@ -202,7 +206,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject
|
|||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
volumeAccumulator_ +=
|
volumeAccumulator_ +=
|
||||||
fraction_*flowRateProfile_().integrate(time0, time1);
|
fraction_*flowRateProfile_.integrate(time0, time1);
|
||||||
}
|
}
|
||||||
|
|
||||||
labelHashSet cellCentresUsed;
|
labelHashSet cellCentresUsed;
|
||||||
@ -424,7 +428,7 @@ Foam::scalar Foam::InflationInjection<CloudType>::volumeToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return fraction_*flowRateProfile_().integrate(time0, time1);
|
return fraction_*flowRateProfile_.integrate(time0, time1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -81,13 +81,13 @@ class InflationInjection
|
|||||||
labelList inflationCells_;
|
labelList inflationCells_;
|
||||||
|
|
||||||
//- Injection duration [s]
|
//- Injection duration [s]
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Flow rate profile relative to SOI [m3/s]
|
//- Flow rate profile relative to SOI [m3/s]
|
||||||
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
TimeDataEntry<scalar> flowRateProfile_;
|
||||||
|
|
||||||
//- Growth rate of particle diameters towards target [m/s]
|
//- Growth rate of particle diameters towards target [m/s]
|
||||||
const autoPtr<DataEntry<scalar> > growthRate_;
|
TimeDataEntry<scalar> growthRate_;
|
||||||
|
|
||||||
//- Positions, velocities, diameters and target diameters of
|
//- Positions, velocities, diameters and target diameters of
|
||||||
// new particles after splitting
|
// new particles after splitting
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -316,6 +316,7 @@ Foam::InjectionModel<CloudType>::InjectionModel
|
|||||||
{
|
{
|
||||||
this->coeffDict().lookup("massTotal") >> massTotal_;
|
this->coeffDict().lookup("massTotal") >> massTotal_;
|
||||||
this->coeffDict().lookup("SOI") >> SOI_;
|
this->coeffDict().lookup("SOI") >> SOI_;
|
||||||
|
SOI_ = owner.db().time().userTimeToTime(SOI_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,6 +57,8 @@ Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection
|
|||||||
injectorTetFaces_(0),
|
injectorTetFaces_(0),
|
||||||
injectorTetPts_(0)
|
injectorTetPts_(0)
|
||||||
{
|
{
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
// Set/cache the injector cells
|
// Set/cache the injector cells
|
||||||
injectorCells_.setSize(injectors_.size());
|
injectorCells_.setSize(injectors_.size());
|
||||||
injectorTetFaces_.setSize(injectors_.size());
|
injectorTetFaces_.setSize(injectors_.size());
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,7 +73,7 @@ class KinematicLookupTableInjection
|
|||||||
const word inputFileName_;
|
const word inputFileName_;
|
||||||
|
|
||||||
//- Injection duration - common to all injection sources
|
//- Injection duration - common to all injection sources
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const scalar parcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "PatchInjection.H"
|
#include "PatchInjection.H"
|
||||||
#include "DataEntry.H"
|
#include "TimeDataEntry.H"
|
||||||
#include "distributionModel.H"
|
#include "distributionModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -47,7 +47,12 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
|||||||
U0_(this->coeffDict().lookup("U0")),
|
U0_(this->coeffDict().lookup("U0")),
|
||||||
flowRateProfile_
|
flowRateProfile_
|
||||||
(
|
(
|
||||||
DataEntry<scalar>::New("flowRateProfile", this->coeffDict())
|
TimeDataEntry<scalar>
|
||||||
|
(
|
||||||
|
owner.db().time(),
|
||||||
|
"flowRateProfile",
|
||||||
|
this->coeffDict()
|
||||||
|
)
|
||||||
),
|
),
|
||||||
sizeDistribution_
|
sizeDistribution_
|
||||||
(
|
(
|
||||||
@ -76,6 +81,8 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
|||||||
|
|
||||||
const polyPatch& patch = owner.mesh().boundaryMesh()[patchId_];
|
const polyPatch& patch = owner.mesh().boundaryMesh()[patchId_];
|
||||||
|
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
cellOwners_ = patch.faceCells();
|
cellOwners_ = patch.faceCells();
|
||||||
|
|
||||||
label patchSize = cellOwners_.size();
|
label patchSize = cellOwners_.size();
|
||||||
@ -84,7 +91,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_*flowRateProfile_().integrate(0.0, duration_);
|
this->volumeTotal_ = fraction_*flowRateProfile_.integrate(0.0, duration_);
|
||||||
this->massTotal_ *= fraction_;
|
this->massTotal_ *= fraction_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +108,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
|||||||
duration_(im.duration_),
|
duration_(im.duration_),
|
||||||
parcelsPerSecond_(im.parcelsPerSecond_),
|
parcelsPerSecond_(im.parcelsPerSecond_),
|
||||||
U0_(im.U0_),
|
U0_(im.U0_),
|
||||||
flowRateProfile_(im.flowRateProfile_().clone().ptr()),
|
flowRateProfile_(im.flowRateProfile_),
|
||||||
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
sizeDistribution_(im.sizeDistribution_().clone().ptr()),
|
||||||
cellOwners_(im.cellOwners_),
|
cellOwners_(im.cellOwners_),
|
||||||
fraction_(im.fraction_)
|
fraction_(im.fraction_)
|
||||||
@ -171,7 +178,7 @@ Foam::scalar Foam::PatchInjection<CloudType>::volumeToInject
|
|||||||
{
|
{
|
||||||
if ((time0 >= 0.0) && (time0 < duration_))
|
if ((time0 >= 0.0) && (time0 < duration_))
|
||||||
{
|
{
|
||||||
return fraction_*flowRateProfile_().integrate(time0, time1);
|
return fraction_*flowRateProfile_.integrate(time0, time1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class DataEntry;
|
class TimeDataEntry;
|
||||||
|
|
||||||
class distributionModel;
|
class distributionModel;
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class PatchInjection
|
|||||||
const label patchId_;
|
const label patchId_;
|
||||||
|
|
||||||
//- Injection duration [s]
|
//- Injection duration [s]
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels to introduce per second []
|
//- Number of parcels to introduce per second []
|
||||||
const label parcelsPerSecond_;
|
const label parcelsPerSecond_;
|
||||||
@ -82,7 +82,7 @@ class PatchInjection
|
|||||||
const vector U0_;
|
const vector U0_;
|
||||||
|
|
||||||
//- Flow rate profile relative to SOI []
|
//- Flow rate profile relative to SOI []
|
||||||
const autoPtr<DataEntry<scalar> > flowRateProfile_;
|
const TimeDataEntry<scalar> flowRateProfile_;
|
||||||
|
|
||||||
//- Parcel size distribution model
|
//- Parcel size distribution model
|
||||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,6 +56,8 @@ Foam::ReactingLookupTableInjection<CloudType>::ReactingLookupTableInjection
|
|||||||
injectorTetFaces_(0),
|
injectorTetFaces_(0),
|
||||||
injectorTetPts_(0)
|
injectorTetPts_(0)
|
||||||
{
|
{
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
// Set/cache the injector cells
|
// Set/cache the injector cells
|
||||||
injectorCells_.setSize(injectors_.size());
|
injectorCells_.setSize(injectors_.size());
|
||||||
injectorTetFaces_.setSize(injectors_.size());
|
injectorTetFaces_.setSize(injectors_.size());
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -76,7 +76,7 @@ class ReactingLookupTableInjection
|
|||||||
const word inputFileName_;
|
const word inputFileName_;
|
||||||
|
|
||||||
//- Injection duration - common to all injection sources
|
//- Injection duration - common to all injection sources
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const scalar parcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,6 +57,8 @@ ReactingMultiphaseLookupTableInjection
|
|||||||
injectorTetFaces_(0),
|
injectorTetFaces_(0),
|
||||||
injectorTetPts_(0)
|
injectorTetPts_(0)
|
||||||
{
|
{
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
// Set/cache the injector cells
|
// Set/cache the injector cells
|
||||||
injectorCells_.setSize(injectors_.size());
|
injectorCells_.setSize(injectors_.size());
|
||||||
injectorTetFaces_.setSize(injectors_.size());
|
injectorTetFaces_.setSize(injectors_.size());
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,7 +79,7 @@ class ReactingMultiphaseLookupTableInjection
|
|||||||
const word inputFileName_;
|
const word inputFileName_;
|
||||||
|
|
||||||
//- Injection duration - common to all injection sources
|
//- Injection duration - common to all injection sources
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const scalar parcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,6 +57,8 @@ Foam::ThermoLookupTableInjection<CloudType>::ThermoLookupTableInjection
|
|||||||
injectorTetFaces_(0),
|
injectorTetFaces_(0),
|
||||||
injectorTetPts_(0)
|
injectorTetPts_(0)
|
||||||
{
|
{
|
||||||
|
duration_ = owner.db().time().userTimeToTime(duration_);
|
||||||
|
|
||||||
// Set/cache the injector cells
|
// Set/cache the injector cells
|
||||||
injectorCells_.setSize(injectors_.size());
|
injectorCells_.setSize(injectors_.size());
|
||||||
injectorTetFaces_.setSize(injectors_.size());
|
injectorTetFaces_.setSize(injectors_.size());
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,7 +75,7 @@ class ThermoLookupTableInjection
|
|||||||
const word inputFileName_;
|
const word inputFileName_;
|
||||||
|
|
||||||
//- Injection duration - common to all injection sources
|
//- Injection duration - common to all injection sources
|
||||||
const scalar duration_;
|
scalar duration_;
|
||||||
|
|
||||||
//- Number of parcels per injector - common to all injection sources
|
//- Number of parcels per injector - common to all injection sources
|
||||||
const scalar parcelsPerSecond_;
|
const scalar parcelsPerSecond_;
|
||||||
|
|||||||
Reference in New Issue
Block a user