Jump to content

Recommended Posts

Posted

I have 3 variables: v, b and h.
I know how to calculate v’, b’ and h’.
Starting the simulation from an initial condition, I need to calculate v, b and h after a given time using a numerical integrator (say RK4).

If I use the simple Euler method, I write;
v= v + dt * v’
b= b + dt * b’
h= h + dt * h’

but when I switch to RK4, I don’t know what to write.

The simulation is explained here:
https://mintoc.de/index.php?title=Gravity_Turn_Maneuver

For example, h’= v * cos(b) doesn’t seem a differential equation; does it mean that h= h + dt * h’ is correct and that there is no reason to use RK4?

Also, the second RK4 step is:
k2 = f(x + dx / 2, y + k1 / 2)
and we have that m’ = constant, v’= f(v, m).
When I write the above k2 f(x, y) function, I suppose that I need to consider also m at time x + dx / 2, not only v, in other words f(x, y) is:
m = m_initial – m’ * x
v’ = f(m, v)
and not only v’ = f(v).

Posted

 To do a "Runge- Kutta" solver with more than function, do simultaneous R-K solvers on each function, at each step using all the function values that you have determined at h/2 and h.

Posted
On 26/8/2017 at 2:27 PM, HallsofIvy said:

 To do a "Runge- Kutta" solver with more than function, do simultaneous R-K solvers on each function, at each step using all the function values that you have determined at h/2 and h.

I still have a little doubt.

We have:

v0 = v

v' = f(t, v), v= RK(v')

b' = f(v, b)

When I wrote RK for b', should I first calculate the new v and use this new v as the input for b' or should I use v0, the v before the update v= RK(v')?

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.