Discretization of 1D Equations#
The governing equations outlined in the governing equations must be discretized in order to obtain solutions for 1D flame configurations. Various discretization methods are used for different terms in the equations, and their details are outlined here.
For this discussion, consider a discretized 1D domain. Cantera uses a non-uniform node spacing for the 1D domain.
The 1D solver sweeps over all points in a domain and computes a residual for each grid point and each equation. The solver attempts to find the combination of the variables that minimizes the residual vector.
The solution vector \(x\) is a vector of all the variables in the domain, at all grid points.
This residual vector has entries in a form like what is shown below.
This is a vector-value function of the solution vector.
For each governing equation, there is a default boundary condition applied at the left and right boundaries. During the sweep, the final evaluations are done for the domain boundary points, which allows for the default residual to be augmented or overwritten by a boundary condition that is different from the default boundary condition.
Continuity Equation#
The continuity equation is:
Discretization#
Because the continuity equation is first order and the boundary condition is applied at the right boundary in the 1D domain, the first derivative approximation uses a one-sided form which uses a stencil that pulls from points to right of a grid point. For consistency, the radial momentum term, (\(2\rho V\)), also uses the same points and averages the value between two nodes.
There are three 1D flame configurations: free flames, strained flames, and burner stabilized flames. The free flames have a constant mass flow rate that is set by the user. The burner stabilized flames solve for a mass flow rate that achieves a desired temperature at a point in the domain. The strained flames have a mass flow rate that is set by the user and varies with axial position.
Strained flames#
The discretized equation in residual form (all terms moved to one side) at the interior points in the domain for strained flames is given below.
Free flames#
The discretized equation in residual form at the interior points in domain for free flames is given below.
Where \(z_{\text{fixed}}\) is the axial position where the temperature is fixed. The value of \(T_{\text{fixed}}\) is the desired temperature at the fixed axial position.
Unstrained flames#
The discretized equation in residual form at the interior points in the domain for unstrained flames is given below.
This is a zero gradient condition for the mass flow i.e. the mass flow rate is constant.
Boundary Conditions#
The boundary conditions are expressed in a residual form in the Cantera solver. This allows for complex expressions to be used at the boundaries. The solver will attempt to find the solution such that the residual at the boundary goes to zero.
Right Boundary#
At the right boundary, there are a few default boundary conditions depending on the type of flow.
Strained Flames#
For strained flames, the default right boundary condition is a zero mass flow rate.
At the right boundary (\(j=N\)):
Unstrained Flames#
For unstrained flames, the default right boundary condition is a zero axial velocity gradient.
At the right boundary (\(j=N\)):
Left Boundary#
There is no imposed boundary condition at the left boundary because only one boundary condition can be enforced for a first-order differential equation. As such, the residual equation at the left boundary is the same as the interior points.
At the left boundary (\(j=0\)):
Radial Momentum Equation#
The radial momentum equation is:
Discretization#
The term \( \rho u \frac{\partial V}{\partial z} \) uses upwinding.
The second derivative term \( \frac{\partial}{\partial z} \left( \mu \frac{\partial V}{\partial z} \right) \) uses a central difference approximation.
The discretized equation in residual form (all terms moved to one side) at the interior points in the domain is given below.
Upwinding#
The upwinding formula for the radial velocity derivative term ( \( \rho u \frac{\partial V}{\partial z} \) ) is:
Where the value of \(\ell\) is determined by the sign of the axial velocity \(u\). If the
axial velocity is positive, the value of \(\ell\) is j
. If the axial velocity is negative,
the value of \(\ell\) is j+1
. A positive velocity means that the flow is moving
left-to-right.
Second Derivative Term#
For the second derivative term (the shear term in the momentum equation), a three-point central difference formula is used. The term being discretized is:
Let \( A = \mu \frac{dV}{dz} \) for simplicity. This will be called the
inner term. In this situation, the inner term is evaluated using a central difference
formula, but instead of using the j+1
and j-1
points, the derivative is estimated
using j+1/2
and j-1/2
(halfway between the grid points around point j).
The values of \(A\) at point j-1/2
and j+1/2
are estimating using a central
difference formula:
\( \mu_{j+1/2} \) is the viscosity, estimated at the midpoint between grid points.
The outer discretization uses a central difference between the j+1/2
and j-1/2
locations.
Where the values of \(z\) are:
and,
The difference between these two values is:
Substituting these values into the central difference formula gives:
This formula is used to discretize the second derivative term in the radial momentum
equation. It takes this form due to the construction of a conservative scheme, meaning
that point j
sees the same value of the flux ( \(\mu \frac{dV}{dz}\) ) on its right
side as the point j+1
sees on its left side. This is a conservative scheme because
the fluxes are balanced at each point.
Boundary Conditions#
At the right boundary, the default boundary condition is a zero radial velocity.
At the right boundary (\(j=N\)):
Expressing the boundary residual in this form will drive the Newton root finding algorithm to find the value of \( V_j \) that minimizes the residual, which in this case, the value of \( V_j \) that minimizes the relation above is \(V=0\) .
The same boundary condition is used at the left boundary.
At the left boundary (\(j=0\)):
Energy Equation#
The steady-state energy equation is described by:
Discretization#
The term \( \rho c_p u \frac{\partial T}{\partial z} \) uses upwinding.
The second derivative term \( \frac{\partial}{\partial z} \left( \lambda \frac{\partial T}{\partial z} \right) \) uses a central difference approximation.
These terms are discretized in the same way as was described above for the momentum equation for the upwinded term ( \(\rho c_p u \frac{\partial T}{\partial z}\) ) and the second derivative term (\(\frac{\partial}{\partial z} \left( \lambda \frac{\partial T}{\partial z} \right)\)). An additional term that needs to be discretized in this equation is the quantity that involves the species diffusive mass fluxes, \( j_k \) and the gradient of enthalpy, ( \( \sum_k j_k \frac{\partial h_k}{\partial z} \) ).
The discretized equation in residual form (all terms moved to one side) at the interior points in the domain is given below.
The enthalpy gradient term uses upwinding.
Boundary Conditions#
At the right boundary, the default boundary condition is a zero temperature. Keep in mind that this is just the default boundary condition that is applied by the interior domain, and will be modified by boundary objects. As discussed earlier for example, a boundary object that specifies a fixed temperature will augment this residual by subtracting the desired boundary temperature from this residual, which will make the solver drive the boundary temperature to the desired temperature value in the course of minimizing the residual \(T_j - T_{\text{boundary}}\).
At the right boundary (\(j=N\)):
Expressing the boundary residual in this form will drive the Newton root finding algorithm to find the value of \( T_j \) that minimizes the residual, which in this case, the value of \( T_j \) that minimizes the relation above is \(T=0\) .
The same boundary condition is used at the left boundary.
At the left boundary (\(j=0\)):
Species Equation#
The species equation is given by:
Discretization#
The term \( \rho u \frac{\partial Y_k}{\partial z} \) uses upwinding.
The diffusive mass flux term \( \frac{\partial j_k}{\partial z} \) uses a conservative central difference formula.
For the interior points in the domain, moving all terms to the right-hand-side, the discretized equation is:
This discretization can be seen in Kee et al. [2003] , equation 16.106.
Boundary Conditions#
At the right boundary, the default boundary condition is a zero species mass-flux. This is different from a zero species mass fraction condition, because species may diffuse towards the boundaries during the solution process.
At the right boundary (\(j=N\)):
The same boundary condition is used at the left boundary.
At the left boundary (\(j=0\)):