Skip to content

Graph continues plotting after detonation #2

Open
acg14006 opened this issue Apr 6, 2020 · 0 comments
Open

Graph continues plotting after detonation #2

acg14006 opened this issue Apr 6, 2020 · 0 comments

Comments

@acg14006
Copy link

acg14006 commented Apr 6, 2020

I noticed on your last plot that that your Euler-step rocket line continues after the point of detonation, which is impossible. This could be fixed my modifying your last for loop to break when your num_sol5 becomes less than .05.
Your for loop that I am referring to is this:
for i in range(N-1): num_sol_5[i+1] = heun_step(num_sol_5[i], rocket, dt) print(num_sol_5[426])

Im suggesting that you make it more like this :
for i in range(N-1): if num_heun[i][2] < .05: end = i break num_heun[i+1] = heun_step2(num_heun[i],dmdt, rocket, dt)

I think num_heun in my code is equivalent to num_sol5 in your code

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant