cuspaceflight / cuspaceflight/CamPyRoS

Overflow error

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
35
Forks
9
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When running a stats model every few (approx 1/10) models gives an error like:
```/home/jago/CamPyRoS/campyros/main.py:457: RuntimeWarning:overflow encountered in multiply```

This line calculates the parachute force:
https://github.com/cuspaceflight/CamPyRoS/blob/2ba4858500235b971f8920d444a8cffb70022067/campyros/main.py#L457

I have also seen 'invalid division' errors from this line too so suspect that the issue is occurring when `air_speed` is close to zero.

**To Reproduce**
So far I do not know what particular combination of rail angles, wind etc. result in this situation occurring but it should not be hard to investigate. Logging parachute forces and initial conditions would hopefully show a pattern.

**Expected behavior**
We should never have a situation where we have near 'infinite' parachute force. I suspect that the error is occurring in intermediate time steps which will be thrown away by the integrator (the integrator attempts to minimise the timesteps and in doing so calculates intermediaries which it then checks are not too different from the previous step, otherwise it throws them away). If this is the case then we don't really have a problem, otherwise we have a major one.

**Setup**
Stock install

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.