kinamax.integration.models¶
Time-integration problem definitions and reference models.
- class kinamax.integration.models.H46Problem[source]¶
Bases:
objectNamespace holding the H46 problem data layouts and static helpers.
- state_vector_labels: tuple[str, ...] = ('x', 'dotx', 'Eh')¶
- params_labels: tuple[str, ...] = ('xw', 'w0', 'Ad', 'Q', 'fd')¶
- class Params(xw=Array(0.0005, dtype=float32, weak_type=True), fd=Array(50., dtype=float32, weak_type=True), w0=Array(121., dtype=float32, weak_type=True), Q=Array(87., dtype=float32, weak_type=True), Ad=Array(2.5, dtype=float32, weak_type=True))[source]¶
Bases:
NamedTuplePhysical parameters of the driven H46 oscillator.
Examples
>>> import jax.numpy as jnp >>> problem = H46Problem.Params(fd=jnp.array(50.0), Ad=jnp.array(2.5)) >>> print(problem) H46Problem.Params ... │ xw ┆ scalar ┆ float32 ┆ 0.0005000000237487257... │ fd ┆ scalar ┆ float32 ┆ 50.0... │ w0 ┆ scalar ┆ float32 ┆ 121.0... │ Q ┆ scalar ┆ float32 ┆ 87.0... │ Ad ┆ scalar ┆ float32 ┆ 2.5... ...
- Parameters:
xw (Array)
fd (Array)
w0 (Array)
Q (Array)
Ad (Array)
- xw: Array¶
Alias for field number 0
- fd: Array¶
Alias for field number 1
- w0: Array¶
Alias for field number 2
- Q: Array¶
Alias for field number 3
- Ad: Array¶
Alias for field number 4
- static state_weights(problem)[source]¶
Return per-state scaling weights aligned with
[x, dotx, Eh].- Parameters:
problem (Params)
- Return type:
Array
- static rhs(problem, t, X, args=None)[source]¶
Evaluate the H46 oscillator right-hand side.
- Parameters:
problem (Params)
t (Array | ndarray | bool | number | bool | int | float | complex | TypedNdArray)
X (Array | ndarray | bool | number | bool | int | float | complex | TypedNdArray)
args (Any)
- Return type:
Array
- class kinamax.integration.models.H46_EM_Problem(xw=0.0005, fd=50.0, w0=121.0, Q=87.0, Ad=2.5, alpha=0.068, C0=1.05e-06, R=7830.0, L=0.025, M=0.0173)[source]¶
Bases:
ContainerH46 benchmark problem with electromechanical coupling.
Examples
>>> import jax.numpy as jnp >>> problem = H46_EM_Problem(fd=jnp.linspace(20.0, 50.0, 11), Ad=2.5) >>> problem.fd.shape (11,)
- Parameters:
xw (Array)
fd (Array)
w0 (Array)
Q (Array)
Ad (Array)
alpha (Array)
C0 (Array)
R (Array)
L (Array)
M (Array)
- xw: Array = 0.0005¶
- fd: Array = 50.0¶
- w0: Array = 121.0¶
- Q: Array = 87.0¶
- Ad: Array = 2.5¶
- alpha: Array = 0.068¶
- C0: Array = 1.05e-06¶
- R: Array = 7830.0¶
- L: Array = 0.025¶
- M: Array = 0.0173¶
- state_vector_labels: ClassVar[list[str]] = ['x', 'dotx', 'v', 'Ev', 'Eh']¶
- params_labels: ClassVar[list[str]] = ['xw', 'w0', 'Ad', 'Q', 'fd', 'alpha', 'C0', 'R', 'L', 'M']¶