Author

Ingo Steldermann

Published

July 10, 2025

Shallow Moment Tutorial (Minimal)

Imports

Load packages
import os
import numpy as np
import jax
from jax import numpy as jnp
import pytest
from types import SimpleNamespace
from sympy import cos, pi, Piecewise

from zoomy_jax.fvm.solver_jax import HyperbolicSolver
from zoomy_core.fvm.ode import RK1
import zoomy_core.fvm.reconstruction as recon
import zoomy_core.fvm.timestepping as timestepping
import zoomy_core.fvm.flux as flux
import zoomy_core.fvm.nonconservative_flux as nc_flux
from zoomy_core.model.boundary_conditions import BoundaryCondition
from zoomy_core.model.models.basisfunctions import Basisfunction, Legendre_shifted
from zoomy_core.model.models.basismatrices import Basismatrices
from zoomy_core.model.models.shallow_moments import ShallowMoments2d
import zoomy_core.misc.io as io

import zoomy_core.model.initial_conditions as IC
import zoomy_core.model.boundary_conditions as BC
import zoomy_core.misc.io as io
from zoomy_core.mesh.mesh import compute_derivatives
from zoomy_tests.swashes import plots_paper

from zoomy_core.misc.misc import Zstruct, Settings


import zoomy_core.mesh.mesh as petscMesh
import postprocessing.postprocessing as postprocessing
from zoomy_core.mesh.mesh import convert_mesh_to_jax
import argparse

Model

level = 0
offset = 1 + level
settings = Settings(
    name="test",
    output=Zstruct(
        directory=f"outputs/junction_{level}", filename="test", output_snapshots=30, clean_directory=True
    ),
)
2025-08-08 06:20:41.268 | WARNING  | library.core.misc.misc:__init__:136 - No 'solver' Zstruct found in Settings. Default: empty Zstruct

2025-08-08 06:20:41.269 | WARNING  | library.core.misc.misc:__init__:139 - No 'model' Zstruct found in Settings. Default: empty Zstruct

2025-08-08 06:20:41.269 | WARNING  | library.core.misc.misc:__init__:156 - No 'parameters' attribute found in model Zstruct. Default: empty Zstruct
inflow_dict = {
    0: lambda t, x, dx, q, qaux, p, n: Piecewise((0.1, t < 0.2), (q[0], True)),
    1: lambda t, x, dx, q, qaux, p, n: Piecewise((-0.3, t < 0.2), (-q[1], True)),
}
inflow_dict.update({1 + i: lambda t, x, dx, q, qaux, p, n: 0 for i in range(level)})
inflow_dict.update(
    {1 + offset + i: lambda t, x, dx, q, qaux, p, n: 0 for i in range(level + 1)}
)

bcs = BC.BoundaryConditions(
    [
        BC.Lambda(tag="inflow", prescribe_fields=inflow_dict),
        BC.Wall(tag="wall"),
    ]
)


def custom_ic(x):
    Q = np.zeros(3 + 2 * level, dtype=float)
    Q[0] = 0.01
    return Q


ic = IC.UserFunction(custom_ic)

model = ShallowMoments2d(
    level = level,
    boundary_conditions=bcs,
)

main_dir = os.getenv("ZOOMY_DIR")
mesh = petscMesh.Mesh.from_gmsh(
    os.path.join(main_dir, "meshes/channel_junction/mesh_2d_coarse.msh")
    # os.path.join(main_dir, "meshes/channel_junction/mesh_2d_fine.msh")
)


class SMESolver(HyperbolicSolver):
    def update_qaux(self, Q, Qaux, Qold, Qauxold, mesh, model, parameters, time, dt):
        dudx = compute_derivatives(Q[1] / Q[0], mesh, derivatives_multi_index=[[0, 0]])[
            :, 0
        ]
        dvdy = compute_derivatives(
            Q[1 + offset] / Q[0], mesh, derivatives_multi_index=[[0, 1]]
        )[:, 0]
        Qaux = Qaux.at[0].set(dudx)
        Qaux = Qaux.at[1].set(dvdy)
        return Qaux


solver = SMESolver(settings=settings)

Solver

Qnew, Qaux = solver.solve(mesh, model)

io.generate_vtk(
    os.path.join(settings.output.directory, f"{settings.output.filename}.h5")
)
2025-08-08 06:20:46.419 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 1, time: 0.000677, dt: 0.000677, next write at time: 0.011111

2025-08-08 06:20:46.434 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 2, time: 0.001209, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.459 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 3, time: 0.001740, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.478 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 4, time: 0.002272, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.491 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 5, time: 0.002804, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.508 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 6, time: 0.003335, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.527 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 7, time: 0.003867, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.542 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 8, time: 0.004398, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.558 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 9, time: 0.004930, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.576 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 10, time: 0.005462, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.597 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 11, time: 0.005993, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.612 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 12, time: 0.006525, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.631 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 13, time: 0.007056, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.647 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 14, time: 0.007588, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.665 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 15, time: 0.008120, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.698 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 16, time: 0.008651, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.727 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 17, time: 0.009183, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.741 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 18, time: 0.009714, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.763 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 19, time: 0.010246, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.779 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 20, time: 0.010778, dt: 0.000532, next write at time: 0.011111

2025-08-08 06:20:46.805 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 21, time: 0.011303, dt: 0.000525, next write at time: 0.011111

2025-08-08 06:20:46.827 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 22, time: 0.011824, dt: 0.000522, next write at time: 0.022222

2025-08-08 06:20:46.841 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 23, time: 0.012340, dt: 0.000515, next write at time: 0.022222

2025-08-08 06:20:46.858 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 24, time: 0.012853, dt: 0.000514, next write at time: 0.022222

2025-08-08 06:20:46.879 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 25, time: 0.013362, dt: 0.000508, next write at time: 0.022222

2025-08-08 06:20:46.893 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 26, time: 0.013871, dt: 0.000509, next write at time: 0.022222

2025-08-08 06:20:46.911 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 27, time: 0.014375, dt: 0.000504, next write at time: 0.022222

2025-08-08 06:20:46.930 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 28, time: 0.014881, dt: 0.000506, next write at time: 0.022222

2025-08-08 06:20:46.957 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 29, time: 0.015382, dt: 0.000501, next write at time: 0.022222

2025-08-08 06:20:46.980 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 30, time: 0.015886, dt: 0.000504, next write at time: 0.022222

2025-08-08 06:20:46.997 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 31, time: 0.016384, dt: 0.000499, next write at time: 0.022222

2025-08-08 06:20:47.019 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 32, time: 0.016888, dt: 0.000503, next write at time: 0.022222

2025-08-08 06:20:47.064 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 33, time: 0.017385, dt: 0.000497, next write at time: 0.022222

2025-08-08 06:20:47.097 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 34, time: 0.017887, dt: 0.000502, next write at time: 0.022222

2025-08-08 06:20:47.129 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 35, time: 0.018382, dt: 0.000495, next write at time: 0.022222

2025-08-08 06:20:47.150 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 36, time: 0.018883, dt: 0.000501, next write at time: 0.022222

2025-08-08 06:20:47.169 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 37, time: 0.019378, dt: 0.000494, next write at time: 0.022222

2025-08-08 06:20:47.193 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 38, time: 0.019877, dt: 0.000500, next write at time: 0.022222

2025-08-08 06:20:47.209 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 39, time: 0.020371, dt: 0.000493, next write at time: 0.022222

2025-08-08 06:20:47.231 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 40, time: 0.020869, dt: 0.000498, next write at time: 0.022222

2025-08-08 06:20:47.248 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 41, time: 0.021361, dt: 0.000492, next write at time: 0.022222

2025-08-08 06:20:47.265 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 42, time: 0.021858, dt: 0.000497, next write at time: 0.022222

2025-08-08 06:20:47.286 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 43, time: 0.022349, dt: 0.000492, next write at time: 0.022222

2025-08-08 06:20:47.308 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 44, time: 0.022845, dt: 0.000495, next write at time: 0.033333

2025-08-08 06:20:47.342 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 45, time: 0.023336, dt: 0.000491, next write at time: 0.033333

2025-08-08 06:20:47.362 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 46, time: 0.023830, dt: 0.000494, next write at time: 0.033333

2025-08-08 06:20:47.386 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 47, time: 0.024321, dt: 0.000491, next write at time: 0.033333

2025-08-08 06:20:47.413 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 48, time: 0.024814, dt: 0.000493, next write at time: 0.033333

2025-08-08 06:20:47.430 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 49, time: 0.025304, dt: 0.000490, next write at time: 0.033333

2025-08-08 06:20:47.449 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 50, time: 0.025796, dt: 0.000492, next write at time: 0.033333

2025-08-08 06:20:47.475 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 51, time: 0.026286, dt: 0.000490, next write at time: 0.033333

2025-08-08 06:20:47.497 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 52, time: 0.026778, dt: 0.000491, next write at time: 0.033333

2025-08-08 06:20:47.520 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 53, time: 0.027267, dt: 0.000490, next write at time: 0.033333

2025-08-08 06:20:47.541 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 54, time: 0.027758, dt: 0.000490, next write at time: 0.033333

2025-08-08 06:20:47.574 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 55, time: 0.028247, dt: 0.000489, next write at time: 0.033333

2025-08-08 06:20:47.593 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 56, time: 0.028737, dt: 0.000490, next write at time: 0.033333

2025-08-08 06:20:47.609 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 57, time: 0.029226, dt: 0.000489, next write at time: 0.033333

2025-08-08 06:20:47.628 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 58, time: 0.029714, dt: 0.000489, next write at time: 0.033333

2025-08-08 06:20:47.648 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 59, time: 0.030203, dt: 0.000489, next write at time: 0.033333

2025-08-08 06:20:47.665 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 60, time: 0.030691, dt: 0.000488, next write at time: 0.033333

2025-08-08 06:20:47.684 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 61, time: 0.031180, dt: 0.000488, next write at time: 0.033333

2025-08-08 06:20:47.701 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 62, time: 0.031667, dt: 0.000488, next write at time: 0.033333

2025-08-08 06:20:47.724 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 63, time: 0.032156, dt: 0.000488, next write at time: 0.033333

2025-08-08 06:20:47.744 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 64, time: 0.032643, dt: 0.000487, next write at time: 0.033333

2025-08-08 06:20:47.764 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 65, time: 0.033130, dt: 0.000488, next write at time: 0.033333

2025-08-08 06:20:47.781 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 66, time: 0.033617, dt: 0.000487, next write at time: 0.033333

2025-08-08 06:20:47.813 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 67, time: 0.034104, dt: 0.000488, next write at time: 0.044444

2025-08-08 06:20:47.829 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 68, time: 0.034590, dt: 0.000486, next write at time: 0.044444

2025-08-08 06:20:47.848 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 69, time: 0.035078, dt: 0.000487, next write at time: 0.044444

2025-08-08 06:20:47.864 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 70, time: 0.035563, dt: 0.000486, next write at time: 0.044444

2025-08-08 06:20:47.882 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 71, time: 0.036050, dt: 0.000487, next write at time: 0.044444

2025-08-08 06:20:47.901 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 72, time: 0.036535, dt: 0.000485, next write at time: 0.044444

2025-08-08 06:20:47.918 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 73, time: 0.037022, dt: 0.000487, next write at time: 0.044444

2025-08-08 06:20:47.935 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 74, time: 0.037507, dt: 0.000485, next write at time: 0.044444

2025-08-08 06:20:47.955 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 75, time: 0.037993, dt: 0.000487, next write at time: 0.044444

2025-08-08 06:20:47.969 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 76, time: 0.038478, dt: 0.000484, next write at time: 0.044444

2025-08-08 06:20:47.990 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 77, time: 0.038964, dt: 0.000486, next write at time: 0.044444

2025-08-08 06:20:48.013 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 78, time: 0.039448, dt: 0.000484, next write at time: 0.044444

2025-08-08 06:20:48.038 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 79, time: 0.039934, dt: 0.000486, next write at time: 0.044444

2025-08-08 06:20:48.062 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 80, time: 0.040417, dt: 0.000483, next write at time: 0.044444

2025-08-08 06:20:48.076 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 81, time: 0.040903, dt: 0.000486, next write at time: 0.044444

2025-08-08 06:20:48.093 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 82, time: 0.041386, dt: 0.000483, next write at time: 0.044444

2025-08-08 06:20:48.114 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 83, time: 0.041872, dt: 0.000486, next write at time: 0.044444

2025-08-08 06:20:48.131 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 84, time: 0.042354, dt: 0.000483, next write at time: 0.044444

2025-08-08 06:20:48.150 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 85, time: 0.042840, dt: 0.000486, next write at time: 0.044444

2025-08-08 06:20:48.175 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 86, time: 0.043322, dt: 0.000482, next write at time: 0.044444

2025-08-08 06:20:48.189 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 87, time: 0.043807, dt: 0.000485, next write at time: 0.044444

2025-08-08 06:20:48.210 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 88, time: 0.044289, dt: 0.000482, next write at time: 0.044444

2025-08-08 06:20:48.225 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 89, time: 0.044774, dt: 0.000485, next write at time: 0.044444

2025-08-08 06:20:48.259 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 90, time: 0.045256, dt: 0.000482, next write at time: 0.055556

2025-08-08 06:20:48.275 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 91, time: 0.045740, dt: 0.000485, next write at time: 0.055556

2025-08-08 06:20:48.297 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 92, time: 0.046222, dt: 0.000481, next write at time: 0.055556

2025-08-08 06:20:48.312 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 93, time: 0.046706, dt: 0.000484, next write at time: 0.055556

2025-08-08 06:20:48.334 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 94, time: 0.047187, dt: 0.000481, next write at time: 0.055556

2025-08-08 06:20:48.357 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 95, time: 0.047671, dt: 0.000484, next write at time: 0.055556

2025-08-08 06:20:48.376 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 96, time: 0.048152, dt: 0.000481, next write at time: 0.055556

2025-08-08 06:20:48.393 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 97, time: 0.048636, dt: 0.000484, next write at time: 0.055556

2025-08-08 06:20:48.415 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 98, time: 0.049116, dt: 0.000481, next write at time: 0.055556

2025-08-08 06:20:48.444 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 99, time: 0.049600, dt: 0.000483, next write at time: 0.055556

2025-08-08 06:20:48.461 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 100, time: 0.050080, dt: 0.000480, next write at time: 0.055556

2025-08-08 06:20:48.492 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 101, time: 0.050564, dt: 0.000483, next write at time: 0.055556

2025-08-08 06:20:48.531 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 102, time: 0.051044, dt: 0.000480, next write at time: 0.055556

2025-08-08 06:20:48.562 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 103, time: 0.051527, dt: 0.000483, next write at time: 0.055556

2025-08-08 06:20:48.599 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 104, time: 0.052007, dt: 0.000480, next write at time: 0.055556

2025-08-08 06:20:48.615 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 105, time: 0.052490, dt: 0.000483, next write at time: 0.055556

2025-08-08 06:20:48.635 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 106, time: 0.052970, dt: 0.000480, next write at time: 0.055556

2025-08-08 06:20:48.654 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 107, time: 0.053452, dt: 0.000483, next write at time: 0.055556

2025-08-08 06:20:48.675 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 108, time: 0.053932, dt: 0.000480, next write at time: 0.055556

2025-08-08 06:20:48.691 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 109, time: 0.054415, dt: 0.000482, next write at time: 0.055556

2025-08-08 06:20:48.714 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 110, time: 0.054894, dt: 0.000480, next write at time: 0.055556

2025-08-08 06:20:48.730 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 111, time: 0.055376, dt: 0.000482, next write at time: 0.055556

2025-08-08 06:20:48.749 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 112, time: 0.055856, dt: 0.000480, next write at time: 0.055556

2025-08-08 06:20:48.768 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 113, time: 0.056338, dt: 0.000482, next write at time: 0.066667

2025-08-08 06:20:48.793 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 114, time: 0.056817, dt: 0.000480, next write at time: 0.066667

2025-08-08 06:20:48.812 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 115, time: 0.057299, dt: 0.000482, next write at time: 0.066667

2025-08-08 06:20:48.843 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 116, time: 0.057779, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:48.858 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 117, time: 0.058260, dt: 0.000481, next write at time: 0.066667

2025-08-08 06:20:48.883 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 118, time: 0.058739, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:48.899 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 119, time: 0.059221, dt: 0.000481, next write at time: 0.066667

2025-08-08 06:20:48.922 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 120, time: 0.059700, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:48.942 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 121, time: 0.060181, dt: 0.000481, next write at time: 0.066667

2025-08-08 06:20:48.959 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 122, time: 0.060660, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:48.980 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 123, time: 0.061141, dt: 0.000481, next write at time: 0.066667

2025-08-08 06:20:48.997 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 124, time: 0.061621, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:49.017 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 125, time: 0.062101, dt: 0.000481, next write at time: 0.066667

2025-08-08 06:20:49.036 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 126, time: 0.062581, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:49.059 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 127, time: 0.063061, dt: 0.000480, next write at time: 0.066667

2025-08-08 06:20:49.093 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 128, time: 0.063541, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:49.109 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 129, time: 0.064021, dt: 0.000480, next write at time: 0.066667

2025-08-08 06:20:49.125 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 130, time: 0.064500, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:49.144 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 131, time: 0.064981, dt: 0.000480, next write at time: 0.066667

2025-08-08 06:20:49.163 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 132, time: 0.065460, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:49.180 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 133, time: 0.065940, dt: 0.000480, next write at time: 0.066667

2025-08-08 06:20:49.208 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 134, time: 0.066420, dt: 0.000479, next write at time: 0.066667

2025-08-08 06:20:49.229 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 135, time: 0.066899, dt: 0.000480, next write at time: 0.066667

2025-08-08 06:20:49.249 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 136, time: 0.067379, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.264 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 137, time: 0.067859, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.290 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 138, time: 0.068338, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.306 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 139, time: 0.068818, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.333 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 140, time: 0.069297, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.351 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 141, time: 0.069777, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.373 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 142, time: 0.070256, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.388 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 143, time: 0.070736, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.411 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 144, time: 0.071215, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.429 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 145, time: 0.071695, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.449 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 146, time: 0.072174, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.472 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 147, time: 0.072654, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.488 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 148, time: 0.073133, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.509 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 149, time: 0.073612, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.530 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 150, time: 0.074092, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.548 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 151, time: 0.074571, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.581 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 152, time: 0.075050, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.603 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 153, time: 0.075529, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.624 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 154, time: 0.076009, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.645 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 155, time: 0.076488, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.663 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 156, time: 0.076967, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.676 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 157, time: 0.077446, dt: 0.000479, next write at time: 0.077778

2025-08-08 06:20:49.693 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 158, time: 0.077926, dt: 0.000480, next write at time: 0.077778

2025-08-08 06:20:49.709 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 159, time: 0.078404, dt: 0.000479, next write at time: 0.088889

2025-08-08 06:20:49.733 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 160, time: 0.078884, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:49.759 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 161, time: 0.079363, dt: 0.000479, next write at time: 0.088889

2025-08-08 06:20:49.787 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 162, time: 0.079842, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:49.807 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 163, time: 0.080321, dt: 0.000479, next write at time: 0.088889

2025-08-08 06:20:49.833 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 164, time: 0.080800, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:49.858 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 165, time: 0.081279, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:49.877 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 166, time: 0.081758, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:49.896 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 167, time: 0.082237, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:49.910 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 168, time: 0.082716, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:49.932 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 169, time: 0.083195, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:49.950 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 170, time: 0.083674, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:49.976 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 171, time: 0.084152, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:49.992 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 172, time: 0.084632, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:50.009 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 173, time: 0.085110, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:50.027 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 174, time: 0.085589, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:50.044 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 175, time: 0.086067, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:50.063 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 176, time: 0.086547, dt: 0.000480, next write at time: 0.088889

2025-08-08 06:20:50.093 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 177, time: 0.087025, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:50.118 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 178, time: 0.087504, dt: 0.000479, next write at time: 0.088889

2025-08-08 06:20:50.148 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 179, time: 0.087982, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:50.178 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 180, time: 0.088462, dt: 0.000479, next write at time: 0.088889

2025-08-08 06:20:50.208 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 181, time: 0.088940, dt: 0.000478, next write at time: 0.088889

2025-08-08 06:20:50.224 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 182, time: 0.089419, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.243 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 183, time: 0.089897, dt: 0.000478, next write at time: 0.100000

2025-08-08 06:20:50.264 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 184, time: 0.090376, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.283 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 185, time: 0.090854, dt: 0.000478, next write at time: 0.100000

2025-08-08 06:20:50.306 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 186, time: 0.091334, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.328 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 187, time: 0.091811, dt: 0.000478, next write at time: 0.100000

2025-08-08 06:20:50.343 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 188, time: 0.092291, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.364 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 189, time: 0.092768, dt: 0.000478, next write at time: 0.100000

2025-08-08 06:20:50.385 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 190, time: 0.093248, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.407 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 191, time: 0.093725, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.423 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 192, time: 0.094205, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.441 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 193, time: 0.094682, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.456 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 194, time: 0.095162, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.476 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 195, time: 0.095639, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.495 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 196, time: 0.096118, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.513 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 197, time: 0.096596, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.532 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 198, time: 0.097075, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.547 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 199, time: 0.097552, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.563 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 200, time: 0.098032, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.584 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 201, time: 0.098509, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.612 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 202, time: 0.098988, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.632 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 203, time: 0.099466, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.652 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 204, time: 0.099945, dt: 0.000479, next write at time: 0.100000

2025-08-08 06:20:50.668 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:43 - iteration: 205, time: 0.100422, dt: 0.000477, next write at time: 0.100000

2025-08-08 06:20:50.691 | INFO     | library.core.fvm.solver_jax:log_callback_execution_time:55 - Finished simulation with in 5.187 seconds

Visualization

io.generate_vtk(os.path.join(settings.output.directory, f"{settings.name}.h5"))
postprocessing.vtk_project_2d_to_3d(model, settings, Nz=20, filename='out_3d')
2025-08-08 06:20:54.409 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 0/10

2025-08-08 06:20:54.440 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 1/10

2025-08-08 06:20:54.477 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 2/10

2025-08-08 06:20:54.509 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 3/10

2025-08-08 06:20:54.540 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 4/10

2025-08-08 06:20:54.564 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 5/10

2025-08-08 06:20:54.589 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 6/10

2025-08-08 06:20:54.613 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 7/10

2025-08-08 06:20:54.636 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 8/10

2025-08-08 06:20:54.665 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:62 - Converted snapshot 9/10

2025-08-08 06:20:55.398 | INFO     | library.postprocessing.postprocessing:vtk_project_2d_to_3d:65 - Output is written to: /home/ingo/Git/Zoomy/outputs/junction_0/out_3d.h5/out_3d.*.vtk