zoomy_core.model.analysis#
Module zoomy_core.model.analysis.
Module Contents#
Classes#
Linear analysis of a system model: linearisation about a base state, plane-wave ansatz, dispersion relation. |
API#
- class zoomy_core.model.analysis.ModelAnalyser(model)#
Linear analysis of a system model: linearisation about a base state, plane-wave ansatz, dispersion relation.
Takes a
SystemModeland nothing else — the analysis lives at the system level and does not know whether the system was derived or written down (SystemModel.from_model(model)is the way in).Initialization
Initialize the instance.
- get_equations()#
Get equations.
- print_equations()#
Print equations.
- get_time_space()#
Get time space.
- get_eps()#
Get eps.
- create_functions_from_list(names)#
Create functions from list.
- delete_equations(indices)#
Delete equations.
- insert_plane_wave_ansatz(functions_to_replace)#
Apply the ansatz to ALL variables passed in the list.
- solve_for_dispersion_relation()#
Solve for dispersion relation.
- remove_exponential()#
Remove exponential.
- linearize_system(q, qaux, source=None, constraints=None)#
Linearize the system given the state vectors q and qaux.
Args
q: State vector (prognostic variables)qaux: Auxiliary state vectorsource: (Optional) The source term vector S. If None, S=0.constraints: (Optional) The constraint vector C. If None, C=empty.
- solve_for_constraints(list_of_selected_equations, list_of_variables)#
Manually solve specific equations for specific variables and substitute the results into the remaining system.
Args
list_of_selected_equations: Indices of equations to solve (e.g., [3, 4, 7])list_of_variables: Variables to solve for (e.g., [p0, p1, w2])