SystemModel#
A SystemModel freezes the model into operator slots of one balance law:
$$ M,\partial_t Q + \nabla\cdot\big(F + P\big) + \sum_d B_d,\partial_d Q = S + \nabla\cdot\big(A : \nabla Q\big). $$
What you write: usually nothing but SystemModel.from_model(model) and the
initial conditions. The solvers read the slots; they never inspect the model.
slot |
shape |
treatment |
|---|---|---|
|
|
explicit |
|
|
explicit (well-balanced with the NCP) |
|
|
explicit, path-conservative |
|
|
implicit slot: implicit under IMEX, else in the RK step |
|
|
always explicit |
|
|
implicit slot, as |
|
same |
always explicit |
|
|
|
|
|
Spatial derivatives the operators need are registered as aux variables
(dhdx, …) and filled by the solver with least-squares gradients.
The C1 bump of the quick start, inspected
(docs/book/examples/inspect_bump.py):
state ['b', 'h', 'q_x_0', 'q_y_0']
aux_state ['dq_x0dx', 'dhdx', 'dq_y0dy', 'dhdy', 'dbdx', 'dbdy', 'hinv']
parameters {'g': 9.81, 'rho': 1.0, 'nu': 0.0, 'lambda_s': 0.0, 'e_x': 0.0, 'n': 0.0}
flux shape (4, 2), nonzero 4
hydrostatic_pressure shape (4, 2), nonzero 4
nonconservative_matrix shape (4, 4, 2), nonzero 4
source shape (4, 1), nonzero 4
source_explicit None
diffusion_matrix None
diffusion_matrix_explicit None
eigenvalues None
you set |
how |
|---|---|
initial state |
|
initial aux |
|
parameter values |
|
pressure split (Chorin) |
|
Connects to: NumericalSystemModel.from_system_model(sm, ...)
(NumericalSystemModel). sm.describe() renders
the slots.
API: zoomy_core.systemmodel.