core.solvers¶
machwave.core.solvers
¶
Numerical methods for solving systems such as differential equations, optimization problems, and more.
rk4th_ode_solver(variables, equation, d_t, **kwargs)
¶
Solves a system of ordinary differential equations using the 4th order Runge-Kutta method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
dict[str, float]
|
A dictionary containing the variables to be solved. |
required |
equation
|
Callable
|
A function that returns the derivatives of the variables. |
required |
d_t
|
float
|
The time step. |
required |
**kwargs
|
Additional keyword arguments to be passed to the equation function. |
{}
|
Returns:
| Type | Description |
|---|---|
float
|
A tuple containing the new values of the variables. The length of the tuple is |
...
|
equal to the number of variables + 1. |