pyInclude.timeIntegration
Time-integration solvers for the point-level beta population arrays.
- class pyInclude.timeIntegration.TimeDerivative(betaCells, dndtPump, dndtAse, derivative, tau, phiAse=None, aseResult=None)
Bases:
objectDerivative evaluation produced during one time-integration stage.
Simulationbuilds this object from pump gain, ASE depletion, and fluorescence decay. Custom solvers receive it from theirrhscallback while trying candidatebetaCellsvalues.- Parameters:
betaCells (ndarray)
dndtPump (ndarray)
dndtAse (ndarray)
derivative (ndarray)
tau (float)
phiAse (ndarray | None)
aseResult (object | None)
- betaCells: ndarray
Point-level excited-state fraction used for this RHS evaluation.
- dndtPump: ndarray
Pump source contribution to
d beta / dtin1 / s.
- dndtAse: ndarray
ASE depletion contribution to
d beta / dtin1 / s.
- derivative: ndarray
Total
d beta / dtadvanced by the time solver.
- tau: float
Fluorescence lifetime used for spontaneous decay, in seconds.
- phiAse: ndarray | None = None
ASE flux \(\Phi_i\) from the derivative evaluation, if available.
- aseResult: object | None = None
Raw lower-level ASE result object, if available.
- class pyInclude.timeIntegration.TimeIntegrationResult(betaCells, evaluation)
Bases:
objectReturn object from
TimeIntegrationSolver.step(...).- Parameters:
betaCells (ndarray)
evaluation (TimeDerivative)
- betaCells: ndarray
Updated point-level beta array proposed by the solver.
- evaluation: TimeDerivative
Derivative evaluation to expose in the resulting
TimeStepState.
- class pyInclude.timeIntegration.TimeIntegrationSolver
Bases:
objectBase protocol for custom beta time-integration solvers.
Implement
step(rhs, betaCells, time, timeStep).rhsis a callable that accepts(betaCells, time)and returns aTimeDerivative. Higher order solvers may callrhsseveral times for one public simulation step.- step(rhs, betaCells, time, timeStep)
Return a
TimeIntegrationResultfor one physical time step.timeandtimeStepare in seconds.betaCellshas the same shape asGainMedium.get("betaCells").expectedShape.
- class pyInclude.timeIntegration.ExplicitEuler
Bases:
TimeIntegrationSolverFirst-order explicit Euler beta update using one RHS evaluation.
- step(rhs, betaCells, time, timeStep)
Return a
TimeIntegrationResultfor one physical time step.timeandtimeStepare in seconds.betaCellshas the same shape asGainMedium.get("betaCells").expectedShape.
- class pyInclude.timeIntegration.Heun
Bases:
TimeIntegrationSolverSecond-order predictor-corrector beta update using two RHS evaluations.
- step(rhs, betaCells, time, timeStep)
Return a
TimeIntegrationResultfor one physical time step.timeandtimeStepare in seconds.betaCellshas the same shape asGainMedium.get("betaCells").expectedShape.
- class pyInclude.timeIntegration.Midpoint
Bases:
TimeIntegrationSolverSecond-order midpoint beta update using a half-step RHS evaluation.
- step(rhs, betaCells, time, timeStep)
Return a
TimeIntegrationResultfor one physical time step.timeandtimeStepare in seconds.betaCellshas the same shape asGainMedium.get("betaCells").expectedShape.
- class pyInclude.timeIntegration.RungeKutta4
Bases:
TimeIntegrationSolverClassical fourth-order Runge-Kutta beta update using four RHS evaluations.
- step(rhs, betaCells, time, timeStep)
Return a
TimeIntegrationResultfor one physical time step.timeandtimeStepare in seconds.betaCellshas the same shape asGainMedium.get("betaCells").expectedShape.
- class pyInclude.timeIntegration.ImplicitEuler(iterations=8, tolerance=1e-10)
Bases:
TimeIntegrationSolverFixed-point implicit Euler beta update for stiff beta dynamics.
- step(rhs, betaCells, time, timeStep)
Return a
TimeIntegrationResultfor one physical time step.timeandtimeStepare in seconds.betaCellshas the same shape asGainMedium.get("betaCells").expectedShape.
- class pyInclude.timeIntegration.ExponentialEuler
Bases:
TimeIntegrationSolverEuler source update with analytical fluorescence decay over
timeStep.- step(rhs, betaCells, time, timeStep)
Return a
TimeIntegrationResultfor one physical time step.timeandtimeStepare in seconds.betaCellshas the same shape asGainMedium.get("betaCells").expectedShape.