1/5 Some #Electrophysiology models have singularities related to GHK equation ( https://en.wikipedia.org/wiki/Goldman%E2%80%93Hodgkin%E2%80%93Katz_flux_equation) in them. These have mathematically well-defined limits, but can cause computational problems when you get very close (like within 10^-7 mV).
2/5 It's quite easy to add "if (close to singularity) then (use limit or linear approx to it instead)" to either
1. #CellML files
or
2. Generated code

But these have pros and cons...
3/5 Pros to changing #CellML files on http://www.cellml.org 
* It fixes the problem for everyone
Cons
* It complicates the model definition
* People might want a different fix: introduce approximation for other bounds, or interpolate between solutions either side, etc.
4/5 Pros to dealing with it at code generation stage
* #CellML stays simple
* You can choose details of the fix
Cons:
* You only fix the problem for your use-case, other people will find solvers exploding later!
5/5 What do people think!? @agarny @andreshouse @michaelclerx @CEMRG_KCL @ABIaucklandacnz @EdmundCrampin @gepasi (please RT and comment below!)
You can follow @GaryMirams.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: