multicomponentLagrangianThermoI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
27 
28 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29 
31 (
32  const word& specieName
33 ) const
34 {
35  return species().found(specieName);
36 }
37 
38 
41 {
42  return Y()[speciei];
43 }
44 
45 
48 {
49  return Y()[speciei];
50 }
51 
52 
55 {
56  return Y()[species()[specieName]];
57 }
58 
59 
62 {
63  return Y()[species()[specieName]];
64 }
65 
66 
68 (
70 ) const
71 {
72  return species()[Yi.member()];
73 }
74 
75 
78 {
80 }
81 
82 
83 inline Foam::scalarFieldListSlice
85 (
87  const label i
88 ) const
89 {
90  return Yslicer.slice(i);
91 }
92 
93 
94 inline
97 (
98  const LagrangianInjection& injection,
99  const LagrangianSubMesh& subMesh
100 ) const
101 {
103 
104  forAll(Y_, i)
105  {
106  result.set
107  (
108  i,
109  Y_[i]
110  .sources()[injection.name()]
111  .value(injection, subMesh)
112  .ptr()
113  );
114  }
115 
116  return result;
117 }
118 
119 
120 inline Foam::scalarFieldListSlice
123 (
125  const label subi
126 ) const
127 {
128  return Yslicer.slice(subi);
129 }
130 
131 
132 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:449
Class to provide list slices to different parts of a dimensioned field.
FieldListSlice< Type > slice(const label elementi) const
Return a slice for an internal element.
Generic GeometricField class.
static word member(const word &name)
Return member (name without the extension)
Definition: IOobject.C:146
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
const word & name() const
The source name.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
bool set(const label) const
Is element set.
Definition: PtrListI.H:62
bool found(const word &) const
Does the list contain the specified name.
DimensionedFieldListSlicer< scalar > Yslicer() const
Get the slicer.
scalarFieldListSlice elementComposition(const DimensionedFieldListSlicer< scalar > &Yslicer, const label i) const
Get the composition of an element.
scalarFieldListSlice injectionElementComposition(const DimensionedFieldListAndSlicer< scalar, LagrangianSubMesh > &, const label subi) const
Get the composition of an element in an injection.
virtual const speciesTable & species() const =0
Return the table of species.
virtual PtrList< LagrangianScalarDynamicField > & Y()=0
Access the mass-fraction fields.
bool containsSpecie(const word &specieName) const
Does the mixture include this specie?
label specieIndex(const LagrangianScalarDynamicField &) const
Access the specie index of the given mass-fraction field.
A class for handling words, derived from string.
Definition: word.H:63
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
PtrList< volScalarField > & Y