Cantera  2.1.2
StFlow.h
Go to the documentation of this file.
1 /**
2  * @file StFlow.h
3  */
4 // Copyright 2001 California Institute of Technology
5 
6 #ifndef CT_STFLOW_H
7 #define CT_STFLOW_H
8 
10 #include "Domain1D.h"
11 #include "cantera/base/Array.h"
14 #include "cantera/numerics/funcs.h"
15 
16 namespace Cantera
17 {
18 class MultiJac;
19 
20 //------------------------------------------
21 // constants
22 //------------------------------------------
23 
24 // Offsets of solution components in the solution array.
25 const size_t c_offset_U = 0; // axial velocity
26 const size_t c_offset_V = 1; // strain rate
27 const size_t c_offset_T = 2; // temperature
28 const size_t c_offset_L = 3; // (1/r)dP/dr
29 const size_t c_offset_Y = 4; // mass fractions
30 
31 // Transport option flags
32 const int c_Mixav_Transport = 0;
33 const int c_Multi_Transport = 1;
34 const int c_Soret = 2;
35 
36 /**
37  * This class represents 1D flow domains that satisfy the one-dimensional
38  * similarity solution for chemically-reacting, axisymmetric, flows.
39  * @ingroup onedim
40  */
41 class StFlow : public Domain1D
42 {
43 public:
44  //--------------------------------
45  // construction and destruction
46  //--------------------------------
47 
48  //! Create a new flow domain.
49  //! @param ph Object representing the gas phase. This object will be used
50  //! to evaluate all thermodynamic, kinetic, and transport properties.
51  //! @param nsp Number of species.
52  //! @param points Initial number of grid points
53  StFlow(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1);
54 
55  //! @name Problem Specification
56  //! @{
57 
58  virtual void setupGrid(size_t n, const doublereal* z);
59 
60  thermo_t& phase() {
61  return *m_thermo;
62  }
63  Kinetics& kinetics() {
64  return *m_kin;
65  }
66 
67  virtual void init() {
68  }
69 
70  /**
71  * Set the thermo manager. Note that the flow equations assume
72  * the ideal gas equation.
73  */
75  m_thermo = &th;
76  }
77 
78  //! Set the kinetics manager. The kinetics manager must
79  void setKinetics(Kinetics& kin) {
80  m_kin = &kin;
81  }
82 
83  //! set the transport manager
84  void setTransport(Transport& trans, bool withSoret = false);
85  void enableSoret(bool withSoret);
86  bool withSoret() const {
87  return m_do_soret;
88  }
89 
90  //! Set the pressure. Since the flow equations are for the limit of
91  //! small Mach number, the pressure is very nearly constant
92  //! throughout the flow.
93  void setPressure(doublereal p) {
94  m_press = p;
95  }
96 
97  //! The current pressure [Pa].
98  doublereal pressure() const {
99  return m_press;
100  }
101 
102  //! @deprecated unused
103  virtual void setState(size_t point, const doublereal* state,
104  doublereal* x) {
105  warn_deprecated("StFlow::setState");
106  setTemperature(point, state[2]);
107  for (size_t k = 0; k < m_nsp; k++) {
108  setMassFraction(point, k, state[4+k]);
109  }
110  }
111 
112  //! Write the initial solution estimate into array x.
113  virtual void _getInitialSoln(doublereal* x) {
114  for (size_t j = 0; j < m_points; j++) {
115  T(x,j) = m_thermo->temperature();
116  m_thermo->getMassFractions(&Y(x, 0, j));
117  }
118  }
119 
120  virtual void _finalize(const doublereal* x);
121 
122  //! Sometimes it is desired to carry out the simulation using a specified
123  //! temperature profile, rather than computing it by solving the energy
124  //! equation. This method specifies this profile.
125  void setFixedTempProfile(vector_fp& zfixed, vector_fp& tfixed) {
126  m_zfix = zfixed;
127  m_tfix = tfixed;
128  }
129 
130  /*!
131  * Set the temperature fixed point at grid point j, and disable the energy
132  * equation so that the solution will be held to this value.
133  */
134  void setTemperature(size_t j, doublereal t) {
135  m_fixedtemp[j] = t;
136  m_do_energy[j] = false;
137  }
138 
139  /*!
140  * Set the mass fraction fixed point for species k at grid point j, and
141  * disable the species equation so that the solution will be held to this
142  * value. Note: in practice, the species are hardly ever held fixed.
143  */
144  void setMassFraction(size_t j, size_t k, doublereal y) {
145  m_fixedy(k,j) = y;
146  m_do_species[k] = true; // false;
147  }
148 
149  //! The fixed temperature value at point j.
150  doublereal T_fixed(size_t j) const {
151  return m_fixedtemp[j];
152  }
153 
154  //! The fixed mass fraction value of species k at point j.
155  doublereal Y_fixed(size_t k, size_t j) const {
156  return m_fixedy(k,j);
157  }
158 
159  // @}
160 
161  virtual std::string componentName(size_t n) const;
162 
163  virtual size_t componentIndex(const std::string& name) const;
164 
165  //! Print the solution.
166  virtual void showSolution(const doublereal* x);
167 
168  //! Save the current solution for this domain into an XML_Node
169  /*!
170  * @param o XML_Node to save the solution to.
171  * @param sol Current value of the solution vector. The object will pick
172  * out which part of the solution vector pertains to this
173  * object.
174  */
175  virtual XML_Node& save(XML_Node& o, const doublereal* const sol);
176 
177  virtual void restore(const XML_Node& dom, doublereal* soln,
178  int loglevel);
179 
180  // overloaded in subclasses
181  virtual std::string flowType() {
182  return "<none>";
183  }
184 
185  void solveEnergyEqn(size_t j=npos) {
186  if (j == npos)
187  for (size_t i = 0; i < m_points; i++) {
188  m_do_energy[i] = true;
189  }
190  else {
191  m_do_energy[j] = true;
192  }
193  m_refiner->setActive(0, true);
194  m_refiner->setActive(1, true);
195  m_refiner->setActive(2, true);
196  needJacUpdate();
197  }
198 
199  void fixTemperature(size_t j=npos) {
200  if (j == npos)
201  for (size_t i = 0; i < m_points; i++) {
202  m_do_energy[i] = false;
203  }
204  else {
205  m_do_energy[j] = false;
206  }
207  m_refiner->setActive(0, false);
208  m_refiner->setActive(1, false);
209  m_refiner->setActive(2, false);
210  needJacUpdate();
211  }
212 
213  bool doSpecies(size_t k) {
214  return m_do_species[k];
215  }
216  bool doEnergy(size_t j) {
217  return m_do_energy[j];
218  }
219 
220  void solveSpecies(size_t k=npos) {
221  if (k == npos) {
222  for (size_t i = 0; i < m_nsp; i++) {
223  m_do_species[i] = true;
224  }
225  } else {
226  m_do_species[k] = true;
227  }
228  needJacUpdate();
229  }
230 
231  void fixSpecies(size_t k=npos) {
232  if (k == npos) {
233  for (size_t i = 0; i < m_nsp; i++) {
234  m_do_species[i] = false;
235  }
236  } else {
237  m_do_species[k] = false;
238  }
239  needJacUpdate();
240  }
241 
242  void integrateChem(doublereal* x,doublereal dt);
243 
244  //! Change the grid size. Called after grid refinement.
245  void resize(size_t components, size_t points);
246 
247  virtual void setFixedPoint(int j0, doublereal t0) {}
248 
249  void setJac(MultiJac* jac);
250 
251  //! Set the gas object state to be consistent with the solution at point j.
252  void setGas(const doublereal* x, size_t j);
253 
254  //! Set the gas state to be consistent with the solution at the midpoint
255  //! between j and j + 1.
256  void setGasAtMidpoint(const doublereal* x, size_t j);
257 
258  doublereal density(size_t j) const {
259  return m_rho[j];
260  }
261 
262  virtual bool fixed_mdot() {
263  return true;
264  }
265  void setViscosityFlag(bool dovisc) {
266  m_dovisc = dovisc;
267  }
268 
269  /*!
270  * Evaluate the residual function for axisymmetric stagnation flow. If
271  * jpt is less than zero, the residual function is evaluated at all grid
272  * points. If jpt >= 0, then the residual function is only evaluated at
273  * grid points jpt-1, jpt, and jpt+1. This option is used to efficiently
274  * evaluate the Jacobian numerically.
275  */
276  virtual void eval(size_t j, doublereal* x, doublereal* r,
277  integer* mask, doublereal rdt);
278 
279  //! Evaluate all residual components at the right boundary.
280  virtual void evalRightBoundary(doublereal* x, doublereal* res,
281  integer* diag, doublereal rdt) = 0;
282 
283  //! Evaluate the residual corresponding to the continuity equation at all
284  //! interior grid points.
285  virtual void evalContinuity(size_t j, doublereal* x, doublereal* r,
286  integer* diag, doublereal rdt) = 0;
287 
288 protected:
289  doublereal component(const doublereal* x, size_t i, size_t j) const {
290  return x[index(i,j)];
291  }
292 
293  doublereal conc(const doublereal* x, size_t k,size_t j) const {
294  return Y(x,k,j)*density(j)/m_wt[k];
295  }
296 
297  doublereal cbar(const doublereal* x, size_t k, size_t j) const {
298  return std::sqrt(8.0*GasConstant * T(x,j) / (Pi * m_wt[k]));
299  }
300 
301  doublereal wdot(size_t k, size_t j) const {
302  return m_wdot(k,j);
303  }
304 
305  //! Write the net production rates at point `j` into array `m_wdot`
306  void getWdot(doublereal* x, size_t j) {
307  setGas(x,j);
308  m_kin->getNetProductionRates(&m_wdot(0,j));
309  }
310 
311  /**
312  * Update the thermodynamic properties from point j0 to point j1
313  * (inclusive), based on solution x.
314  */
315  void updateThermo(const doublereal* x, size_t j0, size_t j1) {
316  for (size_t j = j0; j <= j1; j++) {
317  setGas(x,j);
318  m_rho[j] = m_thermo->density();
319  m_wtm[j] = m_thermo->meanMolecularWeight();
320  m_cp[j] = m_thermo->cp_mass();
321  }
322  }
323 
324  //--------------------------------
325  // central-differenced derivatives
326  //--------------------------------
327 
328  doublereal cdif2(const doublereal* x, size_t n, size_t j,
329  const doublereal* f) const {
330  doublereal c1 = (f[j] + f[j-1])*(x[index(n,j)] - x[index(n,j-1)]);
331  doublereal c2 = (f[j+1] + f[j])*(x[index(n,j+1)] - x[index(n,j)]);
332  return (c2/(z(j+1) - z(j)) - c1/(z(j) - z(j-1)))/(z(j+1) - z(j-1));
333  }
334 
335 
336  //! @name Solution components
337  //! @{
338 
339  doublereal T(const doublereal* x, size_t j) const {
340  return x[index(c_offset_T, j)];
341  }
342  doublereal& T(doublereal* x, size_t j) {
343  return x[index(c_offset_T, j)];
344  }
345  doublereal T_prev(size_t j) const {
346  return prevSoln(c_offset_T, j);
347  }
348 
349  doublereal rho_u(const doublereal* x, size_t j) const {
350  return m_rho[j]*x[index(c_offset_U, j)];
351  }
352 
353  doublereal u(const doublereal* x, size_t j) const {
354  return x[index(c_offset_U, j)];
355  }
356 
357  doublereal V(const doublereal* x, size_t j) const {
358  return x[index(c_offset_V, j)];
359  }
360  doublereal V_prev(size_t j) const {
361  return prevSoln(c_offset_V, j);
362  }
363 
364  doublereal lambda(const doublereal* x, size_t j) const {
365  return x[index(c_offset_L, j)];
366  }
367 
368  doublereal Y(const doublereal* x, size_t k, size_t j) const {
369  return x[index(c_offset_Y + k, j)];
370  }
371 
372  doublereal& Y(doublereal* x, size_t k, size_t j) {
373  return x[index(c_offset_Y + k, j)];
374  }
375 
376  doublereal Y_prev(size_t k, size_t j) const {
377  return prevSoln(c_offset_Y + k, j);
378  }
379 
380  doublereal X(const doublereal* x, size_t k, size_t j) const {
381  return m_wtm[j]*Y(x,k,j)/m_wt[k];
382  }
383 
384  doublereal flux(size_t k, size_t j) const {
385  return m_flux(k, j);
386  }
387  //! @}
388 
389  //! @name convective spatial derivatives.
390  //! These use upwind differencing, assuming u(z) is negative
391  //! @{
392  doublereal dVdz(const doublereal* x, size_t j) const {
393  size_t jloc = (u(x,j) > 0.0 ? j : j + 1);
394  return (V(x,jloc) - V(x,jloc-1))/m_dz[jloc-1];
395  }
396 
397  doublereal dYdz(const doublereal* x, size_t k, size_t j) const {
398  size_t jloc = (u(x,j) > 0.0 ? j : j + 1);
399  return (Y(x,k,jloc) - Y(x,k,jloc-1))/m_dz[jloc-1];
400  }
401 
402  doublereal dTdz(const doublereal* x, size_t j) const {
403  size_t jloc = (u(x,j) > 0.0 ? j : j + 1);
404  return (T(x,jloc) - T(x,jloc-1))/m_dz[jloc-1];
405  }
406  //! @}
407 
408  doublereal shear(const doublereal* x, size_t j) const {
409  doublereal c1 = m_visc[j-1]*(V(x,j) - V(x,j-1));
410  doublereal c2 = m_visc[j]*(V(x,j+1) - V(x,j));
411  return 2.0*(c2/(z(j+1) - z(j)) - c1/(z(j) - z(j-1)))/(z(j+1) - z(j-1));
412  }
413 
414  doublereal divHeatFlux(const doublereal* x, size_t j) const {
415  doublereal c1 = m_tcon[j-1]*(T(x,j) - T(x,j-1));
416  doublereal c2 = m_tcon[j]*(T(x,j+1) - T(x,j));
417  return -2.0*(c2/(z(j+1) - z(j)) - c1/(z(j) - z(j-1)))/(z(j+1) - z(j-1));
418  }
419 
420  size_t mindex(size_t k, size_t j, size_t m) {
421  return m*m_nsp*m_nsp + m_nsp*j + k;
422  }
423 
424  //! Update the diffusive mass fluxes.
425  void updateDiffFluxes(const doublereal* x, size_t j0, size_t j1);
426 
427  //---------------------------------------------------------
428  // member data
429  //---------------------------------------------------------
430 
431  // inlet
432  doublereal m_inlet_u;
433  doublereal m_inlet_V;
434  doublereal m_inlet_T;
435  doublereal m_rho_inlet;
436  vector_fp m_yin;
437 
438  // surface
439  doublereal m_surface_T;
440 
441  doublereal m_press; // pressure
442 
443  // grid parameters
444  vector_fp m_dz;
445  //vector_fp m_z;
446 
447  // mixture thermo properties
448  vector_fp m_rho;
449  vector_fp m_wtm;
450 
451  // species thermo properties
452  vector_fp m_wt;
453  vector_fp m_cp;
454  vector_fp m_enth;
455 
456  // transport properties
457  vector_fp m_visc;
458  vector_fp m_tcon;
459  vector_fp m_diff;
460  vector_fp m_multidiff;
461  Array2D m_dthermal;
462  Array2D m_flux;
463 
464  // production rates
465  Array2D m_wdot;
466  vector_fp m_surfdot;
467 
468  size_t m_nsp;
469 
470  IdealGasPhase* m_thermo;
471  Kinetics* m_kin;
472  Transport* m_trans;
473 
474  MultiJac* m_jac;
475 
476  bool m_ok;
477 
478  // flags
479  std::vector<bool> m_do_energy;
480  bool m_do_soret;
481  std::vector<bool> m_do_species;
482  int m_transport_option;
483 
484  // solution estimate
485  //vector_fp m_zest;
486  //Array2D m_yest;
487 
488  // fixed T and Y values
489  Array2D m_fixedy;
490  vector_fp m_fixedtemp;
491  vector_fp m_zfix;
492  vector_fp m_tfix;
493 
494  bool m_dovisc;
495 
496  //! Update the transport properties at grid points in the range from `j0`
497  //! to `j1`, based on solution `x`.
498  void updateTransport(doublereal* x, size_t j0, size_t j1);
499 
500 private:
501  vector_fp m_ybar;
502 };
503 
504 /**
505  * A class for axisymmetric stagnation flows.
506  * @ingroup onedim
507  */
508 class AxiStagnFlow : public StFlow
509 {
510 public:
511  AxiStagnFlow(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1) :
512  StFlow(ph, nsp, points) {
513  m_dovisc = true;
514  }
515 
516  virtual void evalRightBoundary(doublereal* x, doublereal* res,
517  integer* diag, doublereal rdt);
518  virtual void evalContinuity(size_t j, doublereal* x, doublereal* r,
519  integer* diag, doublereal rdt);
520 
521  virtual std::string flowType() {
522  return "Axisymmetric Stagnation";
523  }
524 };
525 
526 /**
527  * A class for freely-propagating premixed flames.
528  * @ingroup onedim
529  */
530 class FreeFlame : public StFlow
531 {
532 public:
533  FreeFlame(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1) :
534  StFlow(ph, nsp, points) {
535  m_dovisc = false;
536  setID("flame");
537  }
538 
539  virtual void evalRightBoundary(doublereal* x, doublereal* res,
540  integer* diag, doublereal rdt);
541  virtual void evalContinuity(size_t j, doublereal* x, doublereal* r,
542  integer* diag, doublereal rdt);
543 
544  virtual std::string flowType() {
545  return "Free Flame";
546  }
547  virtual bool fixed_mdot() {
548  return false;
549  }
550 };
551 
552 /**
553  * Import a previous solution to use as an initial estimate. The
554  * previous solution may have been computed using a different
555  * reaction mechanism. Species in the old and new mechanisms are
556  * matched by name, and any species in the new mechanism that were
557  * not in the old one are set to zero. The new solution is created
558  * with the same number of grid points as in the old solution.
559  * @deprecated Conversion is handled automatically when loading from XML
560  */
561 void importSolution(size_t points, doublereal* oldSoln, IdealGasPhase& oldmech,
562  size_t size_new, doublereal* newSoln, IdealGasPhase& newmech);
563 
564 }
565 
566 #endif
doublereal Y_fixed(size_t k, size_t j) const
The fixed mass fraction value of species k at point j.
Definition: StFlow.h:155
virtual doublereal density() const
Density (kg/m^3).
Definition: Phase.h:534
void setKinetics(Kinetics &kin)
Set the kinetics manager. The kinetics manager must.
Definition: StFlow.h:79
void updateThermo(const doublereal *x, size_t j0, size_t j1)
Update the thermodynamic properties from point j0 to point j1 (inclusive), based on solution x...
Definition: StFlow.h:315
virtual void evalRightBoundary(doublereal *x, doublereal *res, integer *diag, doublereal rdt)=0
Evaluate all residual components at the right boundary.
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
Definition: StFlow.h:41
void getMassFractions(doublereal *const y) const
Get the species mass fractions.
Definition: Phase.cpp:561
virtual void evalRightBoundary(doublereal *x, doublereal *res, integer *diag, doublereal rdt)
Evaluate all residual components at the right boundary.
Definition: StFlow.cpp:959
Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state...
const size_t npos
index returned by functions to indicate "no position"
Definition: ct_defs.h:173
virtual void getNetProductionRates(doublereal *wdot)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
Definition: Kinetics.h:600
A class for axisymmetric stagnation flows.
Definition: StFlow.h:508
virtual void _finalize(const doublereal *x)
In some cases, a domain may need to set parameters that depend on the initial solution estimate...
Definition: StFlow.cpp:258
virtual void evalContinuity(size_t j, doublereal *x, doublereal *r, integer *diag, doublereal rdt)
Evaluate the residual corresponding to the continuity equation at all interior grid points...
Definition: StFlow.cpp:937
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:100
Base class for transport property managers.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
Definition: global.cpp:76
void setPressure(doublereal p)
Set the pressure.
Definition: StFlow.h:93
const doublereal Pi
Pi.
Definition: ct_defs.h:51
virtual void evalContinuity(size_t j, doublereal *x, doublereal *r, integer *diag, doublereal rdt)=0
Evaluate the residual corresponding to the continuity equation at all interior grid points...
A class for freely-propagating premixed flames.
Definition: StFlow.h:530
virtual void restore(const XML_Node &dom, doublereal *soln, int loglevel)
Restore the solution for this domain from an XML_Node.
Definition: StFlow.cpp:670
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:101
Header file for class Cantera::Array2D.
Base class for one-dimensional domains.
Definition: Domain1D.h:37
virtual void init()
Definition: StFlow.h:67
doublereal T_fixed(size_t j) const
The fixed temperature value at point j.
Definition: StFlow.h:150
void setID(const std::string &s)
Specify an identifying tag for this domain.
Definition: Domain1D.h:517
ThermoPhase object for the ideal gas equation of state - workhorse for Cantera (see Thermodynamic Pro...
virtual void evalRightBoundary(doublereal *x, doublereal *res, integer *diag, doublereal rdt)
Evaluate all residual components at the right boundary.
Definition: StFlow.cpp:915
void setThermo(IdealGasPhase &th)
Set the thermo manager.
Definition: StFlow.h:74
void setFixedTempProfile(vector_fp &zfixed, vector_fp &tfixed)
Sometimes it is desired to carry out the simulation using a specified temperature profile...
Definition: StFlow.h:125
doublereal cp_mass() const
Specific heat at constant pressure.
Definition: ThermoPhase.h:961
Public interface for kinetics managers.
Definition: Kinetics.h:131
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
void setTemperature(size_t j, doublereal t)
Definition: StFlow.h:134
void getWdot(doublereal *x, size_t j)
Write the net production rates at point j into array m_wdot
Definition: StFlow.h:306
virtual std::string componentName(size_t n) const
Name of the nth component. May be overloaded.
Definition: StFlow.cpp:629
virtual void evalContinuity(size_t j, doublereal *x, doublereal *r, integer *diag, doublereal rdt)
Evaluate the residual corresponding to the continuity equation at all interior grid points...
Definition: StFlow.cpp:983
void setGas(const doublereal *x, size_t j)
Set the gas object state to be consistent with the solution at point j.
Definition: StFlow.cpp:238
virtual void showSolution(const doublereal *x)
Print the solution.
Definition: StFlow.cpp:536
doublereal temperature() const
Temperature (K).
Definition: Phase.h:528
void updateTransport(doublereal *x, size_t j0, size_t j1)
Update the transport properties at grid points in the range from j0 to j1, based on solution x...
Definition: StFlow.cpp:493
virtual void setupGrid(size_t n, const doublereal *z)
called to set up initial grid, and after grid refinement
Definition: StFlow.cpp:193
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:165
void setGasAtMidpoint(const doublereal *x, size_t j)
Set the gas state to be consistent with the solution at the midpoint between j and j + 1...
Definition: StFlow.cpp:246
void setTransport(Transport &trans, bool withSoret=false)
set the transport manager
Definition: StFlow.cpp:205
doublereal meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
Definition: Phase.h:588
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
Definition: ct_defs.h:66
void updateDiffFluxes(const doublereal *x, size_t j0, size_t j1)
Update the diffusive mass fluxes.
Definition: StFlow.cpp:587
void importSolution(size_t points, doublereal *oldSoln, IdealGasPhase &oldmech, size_t size_new, doublereal *newSoln, IdealGasPhase &newmech)
Import a previous solution to use as an initial estimate.
Definition: StFlow.cpp:21
virtual void _getInitialSoln(doublereal *x)
Write the initial solution estimate into array x.
Definition: StFlow.h:113
doublereal pressure() const
The current pressure [Pa].
Definition: StFlow.h:98
void needJacUpdate()
Definition: OneDim.cpp:323
void resize(size_t components, size_t points)
Change the grid size. Called after grid refinement.
Definition: StFlow.cpp:165
void setMassFraction(size_t j, size_t k, doublereal y)
Definition: StFlow.h:144
StFlow(IdealGasPhase *ph=0, size_t nsp=1, size_t points=1)
Create a new flow domain.
Definition: StFlow.cpp:78
double prevSoln(size_t n, size_t j) const
Value of component n at point j in the previous solution.
Definition: Domain1D.h:512
Header for a file containing miscellaneous numerical functions.
virtual void setState(size_t point, const doublereal *state, doublereal *x)
Definition: StFlow.h:103
virtual void eval(size_t j, doublereal *x, doublereal *r, integer *mask, doublereal rdt)
Definition: StFlow.cpp:305
virtual XML_Node & save(XML_Node &o, const doublereal *const sol)
Save the current solution for this domain into an XML_Node.
Definition: StFlow.cpp:845