1 #include "ThermoProperties.h"
2 #include "ThermoModelsReaction.h"
3 #include "Reactions/FrantzMarshall.h"
4 #include "Reactions/RyzhenkoBryzgalyn.h"
5 #include "Reactions/LogK_function_of_T.h"
6 #include "Reactions/DolejsManning2010.h"
7 
8 namespace ThermoFun {
9 
10 //=======================================================================================================
11 // Dolejs and Manning (2010)
12 //
13 // Added: DM 09.07.2019
14 //=======================================================================================================
15 struct ReactionDolejsManning10::Impl
16 {
17     /// the substance instance
18    Reaction reaction;
19 
ImplThermoFun::ReactionDolejsManning10::Impl20    Impl()
21    {}
22 
ImplThermoFun::ReactionDolejsManning10::Impl23    Impl(const Reaction& reaction)
24    : reaction(reaction)
25    {}
26 };
27 
ReactionDolejsManning10(const Reaction & reaction)28 ReactionDolejsManning10::ReactionDolejsManning10(const Reaction &reaction)
29 : pimpl(new Impl(reaction))
30 {}
31 
32 
thermoProperties(double T,double P,PropertiesSolvent wp)33 auto ReactionDolejsManning10::thermoProperties(double T, double P, PropertiesSolvent wp) -> ThermoPropertiesReaction
34 {
35     auto t = Reaktoro_::Temperature(T);
36     auto p = Reaktoro_::Pressure(P); p /= bar_to_Pa;
37 
38     return thermoPropertiesFrantzMarshall(t, p, pimpl->reaction, wp);
39 }
40 
41 //=======================================================================================================
42 //
43 //
44 // Added: DM 09.11.2016
45 //=======================================================================================================
46 struct ReactionFrantzMarshall::Impl
47 {
48     /// the substance instance
49    Reaction reaction;
50 
ImplThermoFun::ReactionFrantzMarshall::Impl51    Impl()
52    {}
53 
ImplThermoFun::ReactionFrantzMarshall::Impl54    Impl(const Reaction& reaction)
55    : reaction(reaction)
56    {}
57 };
58 
ReactionFrantzMarshall(const Reaction & reaction)59 ReactionFrantzMarshall::ReactionFrantzMarshall(const Reaction &reaction)
60 : pimpl(new Impl(reaction))
61 {}
62 
63 
thermoProperties(double T,double P,PropertiesSolvent wp)64 auto ReactionFrantzMarshall::thermoProperties(double T, double P, PropertiesSolvent wp) -> ThermoPropertiesReaction
65 {
66     auto t = Reaktoro_::Temperature(T);
67     auto p = Reaktoro_::Pressure(P); p /= bar_to_Pa;
68 
69     return thermoPropertiesFrantzMarshall(t, p, pimpl->reaction, wp);
70 }
71 
72 //=======================================================================================================
73 //
74 //
75 // Added: DM 09.11.2016
76 //=======================================================================================================
77 struct ReactionRyzhenkoBryzgalin::Impl
78 {
79     /// the substance instance
80    Reaction reaction;
81 
ImplThermoFun::ReactionRyzhenkoBryzgalin::Impl82    Impl()
83    {}
84 
ImplThermoFun::ReactionRyzhenkoBryzgalin::Impl85    Impl(const Reaction& reaction)
86    : reaction(reaction)
87    {}
88 };
89 
ReactionRyzhenkoBryzgalin(const Reaction & reaction)90 ReactionRyzhenkoBryzgalin::ReactionRyzhenkoBryzgalin(const Reaction &reaction)
91 : pimpl(new Impl(reaction))
92 {}
93 
94 
thermoProperties(double T,double P,PropertiesSolvent wp)95 auto ReactionRyzhenkoBryzgalin::thermoProperties(double T, double P, PropertiesSolvent wp) -> ThermoPropertiesReaction
96 {
97     auto t = Reaktoro_::Temperature(T);
98     auto p = Reaktoro_::Pressure(P); p /= bar_to_Pa;
99 
100     return thermoPropertiesRyzhenkoBryzgalin(t, p, pimpl->reaction, wp);
101 }
102 
103 //=======================================================================================================
104 //
105 //
106 // Added: DM 09.11.2016
107 //=======================================================================================================
108 struct Reaction_LogK_fT::Impl
109 {
110     /// the substance instance
111    Reaction reaction;
112 
ImplThermoFun::Reaction_LogK_fT::Impl113    Impl()
114    {}
115 
ImplThermoFun::Reaction_LogK_fT::Impl116    Impl(const Reaction& reaction)
117    : reaction(reaction)
118    {}
119 };
120 
Reaction_LogK_fT(const Reaction & reaction)121 Reaction_LogK_fT::Reaction_LogK_fT(const Reaction &reaction)
122 : pimpl(new Impl(reaction))
123 {}
124 
125 
thermoProperties(double T,double P,MethodCorrT_Thrift::type methodT)126 auto Reaction_LogK_fT::thermoProperties(double T, double P, MethodCorrT_Thrift::type methodT) -> ThermoPropertiesReaction
127 {
128     auto t = Reaktoro_::Temperature(T);
129     auto p = Reaktoro_::Pressure(P); p /= bar_to_Pa;
130 
131     return thermoPropertiesReaction_LogK_fT(t, p, pimpl->reaction, methodT);
132 }
133 
134 //=======================================================================================================
135 //
136 //
137 // Added: DM 09.11.2016
138 //=======================================================================================================
139 struct ReactionFromReactantsProperties::Impl
140 {
141     /// the substance instance
142    Reaction reaction;
143 
ImplThermoFun::ReactionFromReactantsProperties::Impl144    Impl()
145    {}
146 
ImplThermoFun::ReactionFromReactantsProperties::Impl147    Impl(const Reaction& reaction)
148    : reaction(reaction)
149    {}
150 };
151 
ReactionFromReactantsProperties(const Reaction & reaction)152 ReactionFromReactantsProperties::ReactionFromReactantsProperties(const Reaction &reaction)
153 : pimpl(new Impl(reaction))
154 {}
155 
156 
thermoProperties(double T,double P)157 auto ReactionFromReactantsProperties::thermoProperties(double T, double P) -> ThermoPropertiesReaction
158 {
159     auto t = Reaktoro_::Temperature(T);
160     auto p = Reaktoro_::Pressure(P); p /= bar_to_Pa;
161 
162     ThermoPropertiesReaction tpr;
163     return tpr;
164 
165 //    return thermoPropertiesFromReactantsProperties(t, p, pimpl->reaction);
166 }
167 
168 //=======================================================================================================
169 //
170 //
171 // Added: DM 09.11.2016
172 //=======================================================================================================
173 struct Reaction_Vol_fT::Impl
174 {
175     /// the substance instance
176    Reaction reaction;
177 
ImplThermoFun::Reaction_Vol_fT::Impl178    Impl()
179    {}
180 
ImplThermoFun::Reaction_Vol_fT::Impl181    Impl(const Reaction& reaction)
182    : reaction(reaction)
183    {}
184 };
185 
Reaction_Vol_fT(const Reaction & reaction)186 Reaction_Vol_fT::Reaction_Vol_fT(const Reaction &reaction)
187 : pimpl(new Impl(reaction))
188 {}
189 
190 
thermoProperties(double T,double P)191 auto Reaction_Vol_fT::thermoProperties(double T, double P) -> ThermoPropertiesReaction
192 {
193     auto t = Reaktoro_::Temperature(T);
194     auto p = Reaktoro_::Pressure(P); p /= bar_to_Pa;
195 
196     ThermoPropertiesReaction tpr;
197     return tpr;
198 
199 //    return thermoPropertiesReaction_Vol_fT(t, p, pimpl->reaction);
200 }
201 
202 
203 
204 } // namespace ThermoFuns
205