uw-comphys / opencmp

OpenCMP is a computational multiphysics software package based on the finite element method. It is primarily intended for physicochemical processes involving significant convective flow.
https://opencmp.io/
GNU Lesser General Public License v2.1
26 stars 15 forks source link

Need to bound nonlinear solver parameter ```alpha``` #51

Closed mptino closed 1 year ago

mptino commented 1 year ago

alpha is currently calculated as

alpha = 0.5 * max(1., x_prev.Norm()) / f.Norm()

but this can lead to over-estimations in the magnitude of alpha.

For example, one specific problem initialized alpha as alpha = 4.8, but the iterations experience severe error oscillation (low error $\longleftrightarrow$ high error) and fails to converge within reasonable number of iterations.

However, when choosing alpha ~ 1., we obtain rapid convergence (less than 20 iterations).

Need to investigate acceptable bounds for alpha although currently none exist in their implementations in scipy/optimize/_nonlin.py.

nasserma commented 1 year ago

Addressed with commit 1913c43.