Cantera  3.1.0
Loading...
Searching...
No Matches
StFlow.h
Go to the documentation of this file.
1//! @file StFlow.h
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
6#ifndef CT_STFLOW_H
7#define CT_STFLOW_H
8
9#include "Flow1D.h"
10
11namespace Cantera
12{
13
14/**
15 * This class represents 1D flow domains that satisfy the one-dimensional
16 * similarity solution for chemically-reacting, axisymmetric flows.
17 *
18 * @deprecated To be removed after %Cantera 3.1; replaced by Flow1D.
19 * @ingroup flowGroup
20 */
21class StFlow : public Flow1D
22{
23public:
24 //! Create a new flow domain.
25 //! @param ph Object representing the gas phase. This object will be used
26 //! to evaluate all thermodynamic, kinetic, and transport properties.
27 //! @param nsp Number of species.
28 //! @param points Initial number of grid points
29 StFlow(ThermoPhase* ph = 0, size_t nsp = 1, size_t points = 1);
30
31 //! Delegating constructor
32 StFlow(shared_ptr<ThermoPhase> th, size_t nsp = 1, size_t points = 1);
33
34 //! Create a new flow domain.
35 //! @param sol Solution object used to evaluate all thermodynamic, kinetic, and
36 //! transport properties
37 //! @param id name of flow domain
38 //! @param points initial number of grid points
39 StFlow(shared_ptr<Solution> sol, const string& id="", size_t points=1);
40
41 void eval(size_t j, double* x, double* r, integer* mask, double rdt) override;
42
43 //! Evaluate all residual components at the right boundary.
44 virtual void evalRightBoundary(double* x, double* res, int* diag, double rdt);
45
46 void evalContinuity(size_t j, double* x, double* r, int* diag, double rdt) override;
47
48protected:
49 double wdot(size_t k, size_t j) const {
50 return m_wdot(k,j);
51 }
52
53 //! Write the net production rates at point `j` into array `m_wdot`
54 void getWdot(double* x, size_t j) {
55 setGas(x,j);
57 }
58
59 //! Evaluate the residual function. This function is called in eval
60 //! after updateProperties is called.
61 virtual void evalResidual(double* x, double* rsd, int* diag,
62 double rdt, size_t jmin, size_t jmax);
63};
64
65}
66
67#endif
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
Definition Flow1D.h:46
Kinetics * m_kin
Kinetics object used for calculating species production rates.
Definition Flow1D.h:898
void setGas(const double *x, size_t j)
Set the gas object state to be consistent with the solution at point j.
Definition Flow1D.cpp:238
Array2D m_wdot
Array of size m_nsp by m_points for saving species production rates.
Definition Flow1D.h:890
virtual void getNetProductionRates(double *wdot)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
Definition Kinetics.cpp:413
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
Definition StFlow.h:22
virtual void evalResidual(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the residual function.
Definition StFlow.cpp:63
virtual void evalRightBoundary(double *x, double *res, int *diag, double rdt)
Evaluate all residual components at the right boundary.
Definition StFlow.cpp:247
void evalContinuity(size_t j, double *x, double *r, int *diag, double rdt) override
Alternate version of evalContinuity with legacy signature.
Definition StFlow.cpp:277
void eval(size_t j, double *x, double *r, integer *mask, double rdt) override
Evaluate the residual functions for axisymmetric stagnation flow.
Definition StFlow.cpp:35
void getWdot(double *x, size_t j)
Write the net production rates at point j into array m_wdot
Definition StFlow.h:54
Base class for a phase with thermodynamic properties.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595