Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
38ada7f5
Commit
38ada7f5
authored
May 15, 2008
by
Andrew Heather
Browse files
updating injection mechanism + added coneInjection model
parent
238b126c
Changes
22
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/Make/files
View file @
38ada7f5
...
...
@@ -48,4 +48,8 @@ submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C
IntegrationScheme/makeIntegrationSchemes.C
/* Data entries */
submodels/IO/DataEntry/makeDataEntries.C
LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate
src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
View file @
38ada7f5
...
...
@@ -437,7 +437,13 @@ void Foam::KinematicCloud<ParcelType>::inject
);
// Velocity of parcels
vector
pU
=
this
->
injection
().
velocity
(
iParcel
,
timeInj
);
vector
pU
=
this
->
injection
().
velocity
(
iParcel
,
timeInj
,
this
->
meshInfo
(),
rndGen_
);
// Determine the injection cell
label
pCell
=
-
1
;
...
...
@@ -496,8 +502,9 @@ void Foam::KinematicCloud<ParcelType>::postInjectCheck()
{
if
(
nParcelsAdded_
)
{
Pout
<<
"
\n
--> Cloud: "
<<
this
->
name
()
<<
nl
<<
" Added "
<<
nParcelsAdded_
<<
" new parcels"
<<
nl
<<
endl
;
Pout
<<
"
\n
--> Cloud: "
<<
this
->
name
()
<<
nl
<<
" Added "
<<
nParcelsAdded_
<<
" new parcels"
<<
nl
<<
endl
;
}
// Reset parcel counters
...
...
src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C
View file @
38ada7f5
...
...
@@ -277,7 +277,12 @@ void Foam::ReactingCloud<ParcelType>::inject
);
// Velocity of parcels
vector
pU
=
this
->
injection
().
velocity
(
iParcel
,
timeInj
);
vector
pU
=
this
->
injection
().
velocity
(
iParcel
,
timeInj
,
this
->
meshInfo
()
);
// Determine the injection cell
label
pCell
=
-
1
;
...
...
src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C
View file @
38ada7f5
...
...
@@ -26,8 +26,9 @@ License
#include "basicKinematicParcel.H"
#include "KinematicCloud.H"
#include "ManualInjection.H"
#include "NoInjection.H"
#include "ManualInjection.H"
#include "ConeInjection.H"
namespace
Foam
{
...
...
@@ -35,6 +36,12 @@ namespace Foam
// Add instances of injection model to the table
makeInjectionModelType
(
NoInjection
,
KinematicCloud
,
basicKinematicParcel
);
makeInjectionModelType
(
ManualInjection
,
KinematicCloud
,
...
...
@@ -42,7 +49,7 @@ namespace Foam
);
makeInjectionModelType
(
No
Injection
,
Cone
Injection
,
KinematicCloud
,
basicKinematicParcel
);
...
...
src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C
0 → 100644
View file @
38ada7f5
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "Constant.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
<
class
Type
>
Foam
::
Constant
<
Type
>::
Constant
(
const
word
&
entryName
,
const
dictionary
&
dict
)
:
DataEntry
<
Type
>
(
typeName
,
entryName
,
dict
),
value_
(
this
->
dict_
.
lookup
(
"value"
))
{}
template
<>
Foam
::
Constant
<
Foam
::
label
>::
Constant
(
const
word
&
entryName
,
const
dictionary
&
dict
)
:
DataEntry
<
label
>
(
typeName
,
entryName
,
dict
),
value_
(
readLabel
(
this
->
dict_
.
lookup
(
"value"
)))
{}
template
<>
Foam
::
Constant
<
Foam
::
scalar
>::
Constant
(
const
word
&
entryName
,
const
dictionary
&
dict
)
:
DataEntry
<
scalar
>
(
typeName
,
entryName
,
dict
),
value_
(
readScalar
(
this
->
dict_
.
lookup
(
"value"
)))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
<
class
Type
>
Foam
::
Constant
<
Type
>::~
Constant
()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class
Type
>
Type
Foam
::
Constant
<
Type
>::
value
(
const
scalar
x
)
const
{
return
value_
;
}
template
<
class
Type
>
Type
Foam
::
Constant
<
Type
>::
integrate
(
const
scalar
x1
,
const
scalar
x2
)
const
{
return
(
x2
-
x1
)
*
value_
;
}
// ************************************************************************* //
src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H
0 → 100644
View file @
38ada7f5
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::Constant
Description
Templated basic entry that holds a constant value.
@verbatim
entry Constant
entryCoeffs
{
value 100.0; // Constant value
}
@endverbatim
SourceFiles
Constant.C
\*---------------------------------------------------------------------------*/
#ifndef Constant_H
#define Constant_H
#include "DataEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class Constant Declaration
\*---------------------------------------------------------------------------*/
template
<
class
Type
>
class
Constant
:
public
DataEntry
<
Type
>
{
// Private data
Type
value_
;
// Private Member Functions
//- Disallow default bitwise copy construct
Constant
(
const
Constant
<
Type
>&
);
//- Disallow default bitwise assignment
void
operator
=
(
const
Constant
<
Type
>&
);
public:
// Runtime type information
TypeName
(
"Constant"
);
// Constructors
//- Construct from dictionary
Constant
(
const
word
&
entryName
,
const
dictionary
&
dict
);
//- Destructor
~
Constant
();
// Member Functions
//- Return constant value
Type
value
(
const
scalar
)
const
;
//- Integrate between two values
Type
integrate
(
const
scalar
x1
,
const
scalar
x2
)
const
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template
<
>
Constant
<
label
>::
Constant
(
const
word
&
entryName
,
const
dictionary
&
dict
);
template
<
>
Constant
<
scalar
>::
Constant
(
const
word
&
entryName
,
const
dictionary
&
dict
);
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "Constant.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C
0 → 100644
View file @
38ada7f5
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "DataEntry.H"
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template
<
class
Type
>
Foam
::
DataEntry
<
Type
>::
DataEntry
(
const
word
&
typeName
,
const
word
&
entryName
,
const
dictionary
&
dict
)
:
dict_
(
dict
.
subDict
(
entryName
+
"Coeffs"
)),
entry_
(
entryName
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
<
class
Type
>
Foam
::
DataEntry
<
Type
>::~
DataEntry
()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class
Type
>
const
Foam
::
dictionary
&
Foam
::
DataEntry
<
Type
>::
dict
()
const
{
return
dict_
;
}
// ************************************************************************* //
src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H
0 → 100644
View file @
38ada7f5
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::DataEntry
Description
SourceFiles
DataEntry.C
NewDataEntry.C
\*---------------------------------------------------------------------------*/
#ifndef DataEntry_H
#define DataEntry_H
#include "dictionary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class DataEntry Declaration
\*---------------------------------------------------------------------------*/
template
<
class
Type
>
class
DataEntry
{
// Private Member Functions
//- Disallow default bitwise copy construct
DataEntry
(
const
DataEntry
<
Type
>&
);
//- Disallow default bitwise assignment
void
operator
=
(
const
DataEntry
<
Type
>&
);
protected:
// Protected data
//- Coefficients dictionary
const
dictionary
dict_
;
//- Name of entry
const
word
entry_
;
public:
//- Runtime type information
TypeName
(
"DataEntry"
)
//- Declare runtime constructor selection table
declareRunTimeSelectionTable
(
autoPtr
,
DataEntry
,
dictionary
,
(
const
word
&
entryName
,
const
dictionary
&
dict
),
(
entryName
,
dict
)
);
// Constructor
//- Construct from type name and dictionary
DataEntry
(
const
word
&
TypeName
,
const
word
&
entryName
,
const
dictionary
&
dict
);
//- Selector
static
autoPtr
<
DataEntry
<
Type
>
>
New
(
const
word
&
entryName
,
const
dictionary
&
dict
);
//- Destructor
virtual
~
DataEntry
();
// Member Functions
// Access
//- Return the dictionary
const
dictionary
&
dict
()
const
;
//- Return value as a function of (scalar) independent variable
virtual
Type
value
(
const
scalar
x
)
const
=
0
;
//- Integrate between two (scalar) values
virtual
Type
integrate
(
const
scalar
x1
,
const
scalar
x2
)
const
=
0
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeDataEntry(Type) \
\
defineNamedTemplateTypeNameAndDebug(DataEntry<Type>, 0); \
\
defineTemplateRunTimeSelectionTable \
( \
DataEntry<Type>, \
dictionary \
);
#define makeDataEntryType(SS, Type) \
\
defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
\
DataEntry<Type>::adddictionaryConstructorToTable<SS<Type> > \
add##SS##Type##ConstructorToTable_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "DataEntry.C"
# include "NewDataEntry.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C
0 → 100644
View file @
38ada7f5
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "DataEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template
<
class
Type
>
Foam
::
autoPtr
<
Foam
::
DataEntry
<
Type
>
>
Foam
::
DataEntry
<
Type
>::
New
(
const
word
&
entryName
,
const
dictionary
&
dict
)
{
word
DataEntryType
(
dict
.
lookup
(
entryName
));
// Info<< "Selecting DataEntry " << DataEntryType << endl;
typename
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
DataEntryType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalErrorIn
(
"DataEntry<Type>::New(const dictionary&"
)
<<
"Unknown DataEntry type "
<<
DataEntryType
<<
" for "
<<
entryName
<<
", constructor not in hash table"
<<
nl
<<
nl
<<
" Valid DataEntry types are :"
<<
nl
<<
dictionaryConstructorTablePtr_
->
toc
()
<<
nl
<<
exit
(
FatalError
);
}
return
autoPtr
<
DataEntry
<
Type
>
>
(
cstrIter
()(
entryName
,
dict
));
}
// ************************************************************************* //
src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C
0 → 100644
View file @
38ada7f5
/*---------------------------------------------------------------------------*\