forked from Aalto-CFD/DLBFoam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdlbfoam.patch
91 lines (81 loc) · 3.61 KB
/
dlbfoam.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
diff --git a/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.H b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.H
index 703d1e2919..e887b12e35 100644
--- a/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.H
+++ b/src/thermophysicalModels/chemistryModel/basicChemistryModel/basicChemistryModel.H
@@ -178,7 +178,18 @@ public:
//- Return the heat release rate [kg/m/s^3]
virtual tmp<volScalarField> Qdot() const = 0;
-
+ // Functions to be derived in derived classes
+ //- Return const access to chemical source terms [kg/m^3/s]
+ virtual const volScalarField::Internal& RR
+ (
+ const label i
+ ) const = 0;
+
+ //- Return write access to chemical source terms [kg/m^3/s]
+ virtual volScalarField::Internal& RR
+ (
+ const label i
+ ) = 0;
// Member Operators
//- Disallow default bitwise assignment
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H
index 0094ebd27c..51541a2eff 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel.H
@@ -221,6 +221,8 @@ public:
//- Thermodynamic data of the species
inline const PtrList<ThermoType>& specieThermos() const;
+ //- Return a reference to tabulation
+ inline chemistryTabulationMethod& tabulation() const;
// Overrides to basicChemistryModel functions
@@ -230,6 +232,17 @@ public:
//- Return reaction rates of the species [kg/m^3/s]
virtual inline const PtrList<volScalarField::Internal>& RR() const;
+ //- Return const access to the chemical source terms for specie, i
+ inline const volScalarField::Internal& RR
+ (
+ const label i
+ ) const;
+
+ //- Return non const access to chemical source terms [kg/m^3/s]
+ virtual volScalarField::Internal& RR
+ (
+ const label i
+ );
//- Return reaction rates of the species in reactioni [kg/m^3/s]
virtual PtrList<volScalarField::Internal> reactionRR
(
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H
index ff4cc4dc2c..e98bbbe38f 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModelI.H
@@ -48,6 +48,12 @@ Foam::chemistryModel<ThermoType>::specieThermos() const
return specieThermos_;
}
+template<class ThermoType>
+inline Foam::chemistryTabulationMethod&
+Foam::chemistryModel<ThermoType>::tabulation() const
+{
+ return tabulation_;
+}
template<class ThermoType>
inline Foam::label Foam::chemistryModel<ThermoType>::nReaction() const
@@ -63,5 +69,18 @@ Foam::chemistryModel<ThermoType>::RR() const
return RR_;
}
+template<class ThermoType>
+inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
+Foam::chemistryModel<ThermoType>::RR(const label i) const
+{
+ return RR_[i];
+}
+
+template<class ThermoType>
+Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
+Foam::chemistryModel<ThermoType>::RR(const label i)
+{
+ return RR_[i];
+}
// ************************************************************************* //