MCPcopy Create free account
hub / github.com/Cantera/cantera / updateConnected

Method updateConnected

src/zeroD/Reactor.cpp:188–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void Reactor::updateConnected(bool updatePressure) {
189 // save parameters needed by other connected reactors
190 m_enthalpy = m_thermo->enthalpy_mass();
191 if (updatePressure) {
192 m_pressure = m_thermo->pressure();
193 }
194 try {
195 m_intEnergy = m_thermo->intEnergy_mass();
196 } catch (NotImplementedError&) {
197 m_intEnergy = NAN;
198 }
199 m_thermo->saveState(m_state);
200
201 // Update the mass flow rate of connected flow devices
202 double time = 0.0;
203 if (m_net != nullptr) {
204 time = (timeIsIndependent()) ? m_net->time() : m_net->distance();
205 }
206 for (size_t i = 0; i < m_outlet.size(); i++) {
207 m_outlet[i]->setSimTime(time);
208 m_outlet[i]->updateMassFlowRate(time);
209 }
210 for (size_t i = 0; i < m_inlet.size(); i++) {
211 m_inlet[i]->setSimTime(time);
212 m_inlet[i]->updateMassFlowRate(time);
213 }
214 for (size_t i = 0; i < m_wall.size(); i++) {
215 m_wall[i]->setSimTime(time);
216 }
217}
218
219void Reactor::eval(double time, double* LHS, double* RHS)
220{

Callers

nothing calls this directly

Calls 9

saveStateMethod · 0.80
timeMethod · 0.80
distanceMethod · 0.80
enthalpy_massMethod · 0.45
pressureMethod · 0.45
intEnergy_massMethod · 0.45
sizeMethod · 0.45
setSimTimeMethod · 0.45
updateMassFlowRateMethod · 0.45

Tested by

no test coverage detected