Class FluidODEsExporter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStructural description of the exported ODE system. -
Method Summary
Modifier and TypeMethodDescriptionstatic FluidODEsExporter.SymODEsbuild(NetworkStruct sn, SolverOptions options) Build the structural description of the ODE system for the method set in the solver options.Linear invariants of the exported drift, as expressions g(x) meaning g(x) = 0.static Stringrender(FluidODEsExporter.SymODEs sys, SolverOptions options, String modelName, String notation) Render the LaTeX document for the given system.State variable names of the exported drift, x1 ...Right-hand side of the ODE system as expression strings, one per state variable, in the format the symbolic backend parses.
-
Method Details
-
build
Build the structural description of the ODE system for the method set in the solver options. -
render
public static String render(FluidODEsExporter.SymODEs sys, SolverOptions options, String modelName, String notation) Render the LaTeX document for the given system.- Parameters:
sys- structural description built by build()options- solver options (hide_immediate remark)modelName- model name shown in the documentnotation- "scalar" or "matrix"- Returns:
- LaTeX source
-
stateVariables
State variable names of the exported drift, x1 ... xn.- Parameters:
sys- the ODE system- Returns:
- the variable names
-
conservationConstraints
Linear invariants of the exported drift, as expressions g(x) meaning g(x) = 0.The drift conserves the population of every closed chain and the mass held at each (Source, class), but f(x) = 0 cannot see either: on its own it is solved by one point per population, a continuum that the computer algebra engine returns as a free-parameter family or, on p-norm radicals, never finishes. These are the equations that pin the equilibrium down, sent as the constraints of the fluid/odes request. The Source mass is the unit phase mass of the J form and zero in the W form, where the Source state carries no flow. Mirrors
conservation_constraintsin the native Pythonsymodes.py.- Parameters:
sys- the ODE systemsn- the NetworkStruct the system was built from- Returns:
- one expression per invariant
-
symbolicDrift
Right-hand side of the ODE system as expression strings, one per state variable, in the format the symbolic backend parses.ONLY SMOOTH DRIFTS ARE EXPORTED. The default, matrix, closing and statedep methods scale rates by min(n_i, S_i), which is not differentiable at n_i = S_i, so their Jacobian does not exist there; emitting a one-sided derivative would be a silent lie exactly at the regime switch that matters. Use the p-norm smoothing (
options.config.pstar) or the softmin method.FineTol is carried in exactly the places the integrated systems put it, and nowhere else: the p-norm drift offsets the station total, the softmin drift offsets the phase-weighted total but not the plain station total that feeds the softmin, and the closing rates offset neither. Mirrors
@SolverFLD/getSymbolicDrift.m.- Parameters:
sys- the ODE system- Returns:
- one expression per state variable
- Throws:
RuntimeException- if the drift is not differentiable
-