-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flawed upstream boundary condition in 1D IonFlow? #909
Comments
@BangShiuh Can you look into this? |
@ischoegl Thank you for the report. I agree that the boundary conditions need to be fixed. I think that poor convergence might be improved by implementing scharfetter-gummel scheme (a better scheme for a drift-diffusion problem). I will work on this when I have time. If anyone is interested in this I can also provide some guidance for implementing the scheme! |
@BangShiuh ... thank you for your comments. Regarding your thoughts about improved drift-diffusion solvers, I wanted to double-check about the implementation. The convergence issues occur for stage 1 of the solution, where ions are presumably immobilized and the poisson solver is disabled. Also, did you observe any convergence issues when you first put the burner flame example together? |
I believe that I didn't have the convergence issues when I made it for all stages. Stage one especially should not have convergence issues. |
@BangShiuh ... thanks for your response. In the meantime, I confirmed that the convergence issue is linked to the calculation of mass fluxes. If I disable the
there aren't any convergence issues. I looks like poor convergence is intrinsic to the implementation, as it already showed up in Cantera 2.4.
|
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:cantera/src/oneD/IonFlow.cpp
Lines 178 to 185 in ba13c65
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
Additional context
The example
ion_burner_flame.py
exhibits extremely poor convergence with multiple errors thrown (recovered inauto
solution mode)As this happens during stage 1 of the solution (i.e. using
IonFlow::frozenIonMethod
) wherem_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 inIonFlow::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.
The text was updated successfully, but these errors were encountered: