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
Basically, what's happening is that it's possible to reach that point without p having been defined when certain property sets are specified. Basically, when pairs not containing p are sent to _argparse, it can return None for p, which causes the division to fail.
The relevant pairs are:
Td, Tv, dh, vh, de, ve
These are all actually the same pair (T & d) because h and e are replaced by T early on.
One possible fix for this one is just calculating values for it, e.g. p = d * R * T on ig.py#L262ig2.py#L247
ds, vs
Similar, you might insert p = d * R * T in ig.py#L235 and ig2.py#L220
As a more general issue, the fact that _argparse can return nulls could lead to future similar bugs. I would possibly suggest that the appropriate algebraic form of the ideal gas law should be inserted into each case of _argparse generally to ensure that T, p, and d are fully populated. In this case though, the issue is just that f specifically relies on a completed value of p. The other places where it looks like this would be an issue right now are:
s+p could leave d blank
T+p could leave d blank
The text was updated successfully, but these errors were encountered:
Source:
ig.py - L1742
andig2.py - L1278
Basically, what's happening is that it's possible to reach that point without
p
having been defined when certain property sets are specified. Basically, when pairs not containing p are sent to _argparse, it can returnNone
forp
, which causes the division to fail.The relevant pairs are:
p = d * R * T
onig.py#L262
ig2.py#L247
p = d * R * T
inig.py#L235
andig2.py#L220
As a more general issue, the fact that _argparse can return nulls could lead to future similar bugs. I would possibly suggest that the appropriate algebraic form of the ideal gas law should be inserted into each case of _argparse generally to ensure that T, p, and d are fully populated. In this case though, the issue is just that
f
specifically relies on a completed value of p. The other places where it looks like this would be an issue right now are:The text was updated successfully, but these errors were encountered: