RK4¶
- class pathsim.solvers.rk4.RK4(*solver_args, **solver_kwargs)[source]¶
Bases:
ExplicitRungeKuttaClassical four-stage, 4th order explicit Runge-Kutta method.
The most well-known Runge-Kutta method. It provides a good balance between accuracy and computational cost for non-stiff problems. This is the standard textbook Runge-Kutta method, often simply called “RK4” or “the Runge-Kutta method.”
Characteristics¶
Order: 4
Stages: 4
Explicit
Fixed timestep only
Not SSP
Widely used, good general-purpose explicit solver
When to Use¶
General-purpose integration: Excellent default choice for smooth, non-stiff problems
Fixed timestep applications: When adaptive stepping is not required
Moderate accuracy needs: Good balance of accuracy and computational cost
Educational/reference: Standard method for comparison and teaching
Note
Not suitable for stiff problems. For adaptive timestepping, consider RKDP54 or RKF45. For problems requiring TVD/SSP properties, use SSPRK methods.
References