Skip to content

Flawed upstream boundary condition in 1D IonFlow? #909

@ischoegl

Description

@ischoegl

Problem description

There appears to be an inadequate upstream boundary condition in IonFlow. For charged species, the upstream boundary condition uses a von Neumann (zero gradient!) assumption, where the following rationale is provided:

for (size_t j = jmin; j <= jmax; j++) {
if (j == 0) {
// enforcing the flux for charged species is difficult
// since charged species are also affected by electric
// force, so Neumann boundary condition is used.
for (size_t k : m_kCharge) {
rsd[index(c_offset_Y + k, 0)] = Y(x,k,0) - Y(x,k,1);
}

There are obvious concerns about the physicality of this boundary condition; mathematically, this appears to impose von Neumann conditions for both inlet and outlet, which is inherently ill defined. Finally, the short-cut does not accommodate a case where a user could specify a non-zero upstream concentration of a charged species (where a convective term added in Boundaries1D::eval would be quite problematic).

While upstream gradients may be sufficiently small for this ad-hoc assumption to work for a free flame (i.e. ion_free_flame.py), it appears that this assumption is inadequate for burner-stabilized flames. However, the assumption does not appear to be a root cause for poor convergence (see Additional Context).

System information

  • Cantera version: 2.5
  • OS: Ubuntu 18.04
  • Python/MATLAB/other software versions: 3.6

Additional context

The example ion_burner_flame.py exhibits extremely poor convergence with multiple errors thrown (recovered in auto solution mode)

***********************************************************************
CanteraError thrown by OneDim::timeStep:
Took maximum number of timesteps allowed (500) without reaching steady-state solution.
***********************************************************************

As this happens during stage 1 of the solution (i.e. using IonFlow::frozenIonMethod) where m_flux of charged species is set to zero (and the code section above is bypassed), the boundary condition is not a root cause. Commenting out the lines where the BC residual is set in IonFlow::evalResidual does indeed not change the behavior.

Poor convergence is also observed for Cantera 2.4, i.e. the version where the example was initially introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions