Linear interpolation formula seems funky for fvm - am I interpreting correctly? #2944
-
I would have thought we would try to estimate surface concentration by 'adding' our linear gradient step to the fN (concentration value at final cell interior node). Am I interpreting this correctly for 'right' boundary and 'linear' extrapolation ? Code here (formula in comment of line 914): https://github.com/pybamm-team/PyBaMM/blob/develop/pybamm/spatial_methods/finite_volume.py#L813 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
FWIW, I think it should be f(x*) = f_N + (dxN / dxNm1) (f_N - f_Nm1) instead of # f(x*) = f_N - (dxN / dxNm1) (f_N - f_Nm1). I think that is how it is implemented in the CSR matrix code. |
Beta Was this translation helpful? Give feedback.
This
is
f_N + (dxN/dxNm1) * (f_N-f_Nm1)