pycanha_core.solvers — Solver Classes#
The solvers submodule exposes the steady-state and transient solver classes.
- class Solver#
Bases:
objectAbstract base class for thermal solvers.
Lifecycle: initialize() -> solve() -> deinitialize().
- property MAX_ITERS#
Maximum number of solver iterations per step.
- __init__(*args, **kwargs)#
- property abstol_enrgy#
Absolute energy convergence tolerance [W].
- property abstol_temp#
Absolute temperature convergence tolerance [K].
- property eps_capacity#
Minimum thermal capacity threshold [J/K].
- property eps_coupling#
Minimum coupling value threshold.
- property eps_time#
Time step epsilon [s].
- property pardiso_iparm_3#
MKL PARDISO iparm[3] parameter (preconditioner control).
- property solver_converged#
Whether the solver has converged.
- property solver_initialized#
Whether initialize() has been called.
- property solver_iter#
Current solver iteration count.
- property solver_name#
Name of the solver.
- class SteadyStateSolver#
Bases:
SolverBase class for steady-state (time-independent) solvers.
- __init__(*args, **kwargs)#
- class TransientSolver#
Bases:
SolverBase class for transient (time-dependent) solvers.
- __init__(*args, **kwargs)#
- property output_config#
Reference to the output configuration.
- property output_model_name#
Name of the DataModel where output is stored.
- set_simulation_time#
Configure the transient simulation time window and output interval.
- property time#
Current simulation time [s].
- property time_iter#
Current time iteration index.
- class TSCN#
Bases:
TransientSolverBase class for Crank-Nicolson transient solvers.
- __init__(*args, **kwargs)#
- class TSCNRL#
Bases:
TSCNTransient Crank-Nicolson solver with radiation linearization.
- __init__(*args, **kwargs)#
- class SSLU(*args, **kwargs)#
Bases:
SteadyStateSolverSteady-state solver using sparse LU decomposition.
Solves the non-linear steady-state thermal equation iteratively using Eigen SparseLU factorization.
- __init__#
Create a solver bound to a ThermalMathematicalModel.
- deinitialize#
Release solver resources.
- initialize#
Allocate solver resources and prepare matrices.
- solve#
Run the steady-state solve to convergence.
- class TSCNRLDS(*args, **kwargs)#
Bases:
TSCNRLTransient Crank-Nicolson solver with radiation linearization and direct sparse factorization.
Uses MKL PARDISO when available, otherwise Eigen SparseLU.
- __init__#
Create a solver bound to a ThermalMathematicalModel.
- deinitialize#
Release solver resources.
- initialize#
Allocate solver resources and prepare matrices.
- solve#
Run the transient simulation over the configured time window.
- class TSCNRLDS_JACOBIAN(*args, **kwargs)#
Bases:
TSCNRLDSTSCNRLDS solver extended with Jacobian (sensitivity) output.
Computes dT/dp for each parameter during the transient simulation.
- __init__#
Create a Jacobian solver bound to a ThermalMathematicalModel.
- deinitialize#
Release solver resources.
- initialize#
Allocate solver resources and collect parameter names.
- property parameter_names#
List of parameter names for which sensitivities are computed.
- solve#
Run the transient simulation with Jacobian computation.