You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are only required at connections between components
The protocol can define conversion functions for cases where you're not just scaling within one dimension. These specify the source dimension (actually, arbitrary source units within that dimension), target dimension, and a unary function converting a value from source to target units. This gets to the correct dimension; scaling may then be needed to get the exact required units.
The SI base units supported are: ampere, candela, kelvin, kilogram, meter, mole, second
Modellers can define new 'base units' to create novel dimensions, unrelated to any other units
There is an explicit 'dimensionless' unit for plain numbers
There are some name aliases: metre/meter, litre/liter
pycml adds special 'boolean' units for the results of relational operators and the MathML symbols true and false. There could be other ways of handling this :)
CellML does have an 'offset' field to support e.g. Celsius & Fahrenheit. But no models use this and the semantics are broken, so we'll say it's not allowed!
Handle typical 'quirks' in CellML models, e.g.
exp(V) where V is in volts, not dimensionless (occasionally also in volt^2, millimolar, ...)
tanh(V) where V is in volts, not dimensionless
Many models also have more serious errors, mostly dimensional mismatches in the operands to eq, geq, gt, minus, plus, piecewise. Currently we only warn about these when generating code, as otherwise we'd need to fix lots of CellML files!
Need to parse Component level units, stored separatelytrueandfalse. There could be other ways of handling this :)exp(V)whereVis in volts, not dimensionless (occasionally also in volt^2, millimolar, ...)tanh(V)whereVis in volts, not dimensionlesseq,geq,gt,minus,plus,piecewise. Currently we only warn about these when generating code, as otherwise we'd need to fix lots of CellML files!