simulation.simulator¶
simulator ¶
Simulation engine with parameter sweeps and convergence analysis.
Supports: - One-parameter sweeps (delta_C, lambda_1, k, etc.) - Two-parameter sweeps (grid) - Convergence analysis as order increases - Monte Carlo spinor structure sampling
Simulator ¶
Simulator(delta_obs: float = 3.443)
Simulation engine for spinor correction parameter studies.
All parameters are fully customizable. Supports arbitrary parameter ranges and precision levels.
Source code in src/simulation/simulator.py
sweep_delta_C ¶
sweep_delta_C(delta_C_range: tuple[float, float] | None = None, n_points: int = 200, lambda_D2: float = 3.338, k: int = 22, c4: float = 0.125, c6: float = 0.5) -> dict
Sweep delta_C over a range and compute Choptyuk formula at each point.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
delta_C_range
|
tuple[float, float] | None
|
(min, max) for delta_C. Default (0.1, 1.0). |
None
|
n_points
|
int
|
Number of points in sweep. |
200
|
lambda_D2
|
float
|
Dirac eigenvalue (fixed). |
3.338
|
k
|
int
|
Structural constant. |
22
|
c4, c6
|
Higher-order coefficients. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Dict with arrays of delta_C values and computed results. |
Source code in src/simulation/simulator.py
sweep_lambda_1 ¶
sweep_lambda_1(lam_range: tuple[float, float] = (2.0, 6.0), n_points: int = 200, delta_C: float | None = None, R: float = -2.0, k: int = 22) -> dict
Sweep lambda_1 and observe its effect on the Choptyuk formula.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam_range
|
tuple[float, float]
|
(min, max) for lambda_1. |
(2.0, 6.0)
|
n_points
|
int
|
Number of points. |
200
|
delta_C
|
float | None
|
Spinor phase (default pi/7). |
None
|
R
|
float
|
Scalar curvature. |
-2.0
|
k
|
int
|
Structural constant. |
22
|
Returns:
| Type | Description |
|---|---|
dict
|
Dict with sweep results. |
Source code in src/simulation/simulator.py
convergence_analysis ¶
convergence_analysis(max_order: int = 10, delta_C: float | None = None, lambda_D2: float = 3.338) -> dict
Analyze convergence of the Choptyuk series at increasing orders.
The series is: Delta = lambda_D2 + sum_{n=1}^{max_order} c_n * delta_C^n where c_n are the correction coefficients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_order
|
int
|
Maximum order to compute. |
10
|
delta_C
|
float | None
|
Spinor phase (default pi/7). |
None
|
lambda_D2
|
float
|
Dirac eigenvalue. |
3.338
|
Returns:
| Type | Description |
|---|---|
dict
|
Dict with convergence data. |