Shallow Moments with topography (Simple)

Shallow Moments with topography (Simple)#

Imports#

# | code-fold: true
# | code-summary: "Load packages"
# | output: false

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, Matrix

from zoomy_jax.fvm.solver_jax import HyperbolicSolver, Settings
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.misc.misc import Zstruct

from zoomy_core.model.models.shallow_moments_topo import ShallowMomentsTopo, ShallowMomentsTopoNumerical
from zoomy_core.model.models.shallow_moments import ShallowMoments2d

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.lsq_reconstruction import compute_derivatives
from zoomy_tests.swashes import plots_paper
import postprocessing.visualization as visu


from zoomy_core.mesh import BaseMesh
import postprocessing.postprocessing as postprocessing
from zoomy_jax.mesh.mesh import convert_mesh_to_jax
import argparse
2025-08-30 13:04:07.259 | WARNING  | library.core.fvm.solver_jax:<module>:28 - No module named 'precice'

Model#

level = 4
offset = 1+level
n_fields = 3 + 2 * level
settings = Settings(
    name="SME",
    output=Zstruct(
        directory=f"outputs/topo_{level}", filename="SME", snapshots=30
    ),
)
2025-08-30 13:04:10.281 | WARNING  | library.core.misc.misc:__init__:146 - No 'clean_directory' attribute found in output Zstruct. Default: False
inflow_dict = { 
    0: lambda t, x, dx, q, qaux, p, n: q[0],
    1: lambda t, x, dx, q, qaux, p, n: Piecewise((0.1, t < 0.2),(q[1], True)),
    2: lambda t, x, dx, q, qaux, p, n: Piecewise((0.01, t < 0.2),(-q[2], True)),
                }
inflow_dict.update({2+i: lambda t, x, dx, q, qaux, p, n: 0.0 for i in range(1, level+1)})
inflow_dict.update({2+offset+i: lambda t, x, dx, q, qaux, p, n: 0.0 for i in range(level+1)})

bcs = BC.BoundaryConditions(
    [
        BC.Lambda(tag="inflow", prescribe_fields=inflow_dict),
        BC.Wall(tag="wall", momentum_field_indices=[[2+i, 2+offset+i] for i in range(level+1)]),
    ]
)

def custom_ic(x):
    Q = np.zeros(4 + 2 * level, dtype=float)
    Q[0] = x[0] * (0.01)
    Q[1] = np.where(x[0] < 0.35, 0.01, 0.)
    return Q

# def custom_ic_aux(x):
#     Q = custom_ic(x)
#     h = Q[1]
#     # Qaux = np.zeros(1 + 2 + 2 * level, dtype=float)
#     Qaux = np.zeros(1, dtype=float)
#     Qaux[0] = np.where(h > 0, 1/h, 0.0)
#     return Qaux

ic = IC.UserFunction(custom_ic)
# ic_aux = IC.UserFunction(custom_ic_aux)

class MyModel(ShallowMomentsTopoNumerical):
    def source(self):
        out = Matrix([0 for i in range(self.n_variables)])
        out += self.newtonian()
        out += self.slip_mod()
        return self.substitute_precomputed_denominator(out, self.variables[1], self.aux_variables.hinv)
        

model = MyModel(
    level=level,
    boundary_conditions=bcs,
    initial_conditions=ic,
    # aux_initial_conditions=ic_aux,
    parameters=Zstruct(nu=0.000001, lamda=1/1000., c_slipmod=1/30),
    aux_variables = ['hinv'] + [f'dalpha_{i}_dx' for i in range(level+1)] + [f'dbeta_{i}_dy' for i in range(level+1)],
    # aux_variables = ['hinv'],
    
)

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")
)

mesh = convert_mesh_to_jax(mesh)
class SMESolver(HyperbolicSolver):
    def update_q(self, Q, Qaux, mesh, model, parameters):
        h = Q[1]
        h = jnp.where(h > 0, h, 0.0)
        eps = 1e-6
        denom = jnp.where(h**2 > eps, h**2, eps)
        factor = (h**2) / denom
        
        Q = Q.at[1].set(h)
        Q = Q.at[2:].multiply(factor)
        return Q
    
    def update_qaux(self, Q, Qaux, Qold, Qauxold, mesh, model, parameters, time, dt):
        level = (model.n_variables-2)//2 -1
        offset = 1+level
        ## h with wet/dry fix
        h = Q[1]
        # hinv = 1/h

        ### This does not work for some reason
        # h = jnp.where(h > 0, h, 0.0)
        # eps = 1e-6
        # denom = jnp.sqrt(h**4 + jnp.where(h**4 > eps, h**4, eps))
        # hinv = (jnp.sqrt(2.0) * h) / denom
        # Qaux = Qaux.at[0].set(hinv)
        
        h = jnp.where(h > 0, h, 0.0)
        eps = 1e-6
        denom = jnp.where(h**2 > eps, h**2, eps)
        hinv = (h) / denom
        Qaux = Qaux.at[0].set(hinv)
        
        idxs = jnp.arange(level+1)

        # derivatives of alpha and beta for 3d interpolation
        # dalphaidx for each i
        dalphaidxs = jax.vmap(
            lambda i: compute_derivatives(Q[2+i] * hinv, mesh,
                                        derivatives_multi_index=[[0, 0]])[:, 0]
        )(idxs)

        # dbetaidy for each i
        dbetaidys = jax.vmap(
            lambda i: compute_derivatives(Q[2+offset+i] * hinv, mesh,
                                        derivatives_multi_index=[[0, 1]])[:, 0]
        )(idxs)

        # scatter results into Qaux
        Qaux = Qaux.at[1:1+level+1].set(dalphaidxs)
        Qaux = Qaux.at[1+offset:1+offset+level+1].set(dbetaidys)
        
        return Qaux
# solver = SMESolver(settings=settings, time_end=0.000035, compute_dt=timestepping.constant(dt =0.0000001))

solver = SMESolver(settings=settings, time_end=0.533, compute_dt=timestepping.adaptive(CFL=0.45))

model.source()
../../../_images/f25f424372c3b690b44d0748fe506f5f3b31905b6afc4ccbb850d7a52708fcdf.png

Solve#

Qnew, Qaux = solver.solve(mesh, model)
2025-08-30 12:59:54.836 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 10, time: 0.011645, dt: 0.000860, next write at time: 0.044828
2025-08-30 12:59:57.354 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 20, time: 0.019959, dt: 0.000810, next write at time: 0.044828
2025-08-30 12:59:59.785 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 30, time: 0.027914, dt: 0.000784, next write at time: 0.044828
2025-08-30 13:00:02.192 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 40, time: 0.035686, dt: 0.000771, next write at time: 0.044828
2025-08-30 13:00:04.576 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 50, time: 0.043362, dt: 0.000764, next write at time: 0.044828
2025-08-30 13:00:07.119 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 60, time: 0.050987, dt: 0.000761, next write at time: 0.089655
2025-08-30 13:00:09.573 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 70, time: 0.058582, dt: 0.000758, next write at time: 0.089655
2025-08-30 13:00:11.953 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 80, time: 0.066159, dt: 0.000757, next write at time: 0.089655
2025-08-30 13:00:14.369 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 90, time: 0.073725, dt: 0.000756, next write at time: 0.089655
2025-08-30 13:00:16.763 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 100, time: 0.081282, dt: 0.000755, next write at time: 0.089655
2025-08-30 13:00:19.149 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 110, time: 0.088832, dt: 0.000755, next write at time: 0.089655
2025-08-30 13:00:21.657 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 120, time: 0.096377, dt: 0.000754, next write at time: 0.134483
2025-08-30 13:00:24.125 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 130, time: 0.103917, dt: 0.000754, next write at time: 0.134483
2025-08-30 13:00:26.576 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 140, time: 0.111447, dt: 0.000753, next write at time: 0.134483
2025-08-30 13:00:28.945 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 150, time: 0.118966, dt: 0.000752, next write at time: 0.134483
2025-08-30 13:00:31.325 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 160, time: 0.126477, dt: 0.000751, next write at time: 0.134483
2025-08-30 13:00:33.597 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 170, time: 0.133979, dt: 0.000750, next write at time: 0.134483
2025-08-30 13:00:35.997 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 180, time: 0.141474, dt: 0.000749, next write at time: 0.179310
2025-08-30 13:00:38.293 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 190, time: 0.148963, dt: 0.000749, next write at time: 0.179310
2025-08-30 13:00:40.578 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 200, time: 0.156446, dt: 0.000748, next write at time: 0.179310
2025-08-30 13:00:42.877 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 210, time: 0.163926, dt: 0.000748, next write at time: 0.179310
2025-08-30 13:00:45.257 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 220, time: 0.171402, dt: 0.000747, next write at time: 0.179310
2025-08-30 13:00:47.575 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 230, time: 0.178876, dt: 0.000747, next write at time: 0.179310
2025-08-30 13:00:50.018 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 240, time: 0.186348, dt: 0.000747, next write at time: 0.224138
2025-08-30 13:00:52.424 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 250, time: 0.193820, dt: 0.000747, next write at time: 0.224138
2025-08-30 13:00:54.706 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 260, time: 0.201292, dt: 0.000747, next write at time: 0.224138
2025-08-30 13:00:57.161 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 270, time: 0.208766, dt: 0.000747, next write at time: 0.224138
2025-08-30 13:00:59.609 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 280, time: 0.216241, dt: 0.000748, next write at time: 0.224138
2025-08-30 13:01:02.165 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 290, time: 0.223718, dt: 0.000748, next write at time: 0.224138
2025-08-30 13:01:04.714 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 300, time: 0.231197, dt: 0.000748, next write at time: 0.268966
2025-08-30 13:01:07.157 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 310, time: 0.238679, dt: 0.000748, next write at time: 0.268966
2025-08-30 13:01:09.589 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 320, time: 0.246163, dt: 0.000749, next write at time: 0.268966
2025-08-30 13:01:12.054 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 330, time: 0.253650, dt: 0.000749, next write at time: 0.268966
2025-08-30 13:01:14.592 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 340, time: 0.261138, dt: 0.000749, next write at time: 0.268966
2025-08-30 13:01:16.816 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 350, time: 0.268628, dt: 0.000749, next write at time: 0.268966
2025-08-30 13:01:19.358 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 360, time: 0.276116, dt: 0.000747, next write at time: 0.313793
2025-08-30 13:01:21.690 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 370, time: 0.283551, dt: 0.000740, next write at time: 0.313793
2025-08-30 13:01:24.003 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 380, time: 0.290914, dt: 0.000734, next write at time: 0.313793
2025-08-30 13:01:26.455 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 390, time: 0.298188, dt: 0.000724, next write at time: 0.313793
2025-08-30 13:01:28.931 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 400, time: 0.305413, dt: 0.000720, next write at time: 0.313793
2025-08-30 13:01:31.373 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 410, time: 0.312581, dt: 0.000715, next write at time: 0.313793
2025-08-30 13:01:33.859 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 420, time: 0.319686, dt: 0.000707, next write at time: 0.358621
2025-08-30 13:01:36.276 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 430, time: 0.326727, dt: 0.000701, next write at time: 0.358621
2025-08-30 13:01:38.729 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 440, time: 0.333707, dt: 0.000695, next write at time: 0.358621
2025-08-30 13:01:41.220 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 450, time: 0.340629, dt: 0.000690, next write at time: 0.358621
2025-08-30 13:01:43.727 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 460, time: 0.347503, dt: 0.000686, next write at time: 0.358621
2025-08-30 13:01:46.163 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 470, time: 0.354334, dt: 0.000681, next write at time: 0.358621
2025-08-30 13:01:48.670 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 480, time: 0.361126, dt: 0.000678, next write at time: 0.403448
2025-08-30 13:01:51.194 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 490, time: 0.367886, dt: 0.000675, next write at time: 0.403448
2025-08-30 13:01:53.652 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 500, time: 0.374618, dt: 0.000672, next write at time: 0.403448
2025-08-30 13:01:56.117 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 510, time: 0.381328, dt: 0.000670, next write at time: 0.403448
2025-08-30 13:01:58.552 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 520, time: 0.388021, dt: 0.000669, next write at time: 0.403448
2025-08-30 13:02:00.988 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 530, time: 0.394698, dt: 0.000667, next write at time: 0.403448
2025-08-30 13:02:03.444 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 540, time: 0.401363, dt: 0.000666, next write at time: 0.403448
2025-08-30 13:02:06.007 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 550, time: 0.408018, dt: 0.000665, next write at time: 0.448276
2025-08-30 13:02:08.436 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 560, time: 0.414665, dt: 0.000664, next write at time: 0.448276
2025-08-30 13:02:10.905 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 570, time: 0.421232, dt: 0.000647, next write at time: 0.448276
2025-08-30 13:02:13.306 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 580, time: 0.427589, dt: 0.000628, next write at time: 0.448276
2025-08-30 13:02:15.694 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 590, time: 0.433798, dt: 0.000617, next write at time: 0.448276
2025-08-30 13:02:18.149 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 600, time: 0.439922, dt: 0.000610, next write at time: 0.448276
2025-08-30 13:02:20.535 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 610, time: 0.446002, dt: 0.000607, next write at time: 0.448276
2025-08-30 13:02:23.024 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 620, time: 0.452064, dt: 0.000606, next write at time: 0.493103
2025-08-30 13:02:25.518 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 630, time: 0.458125, dt: 0.000606, next write at time: 0.493103
2025-08-30 13:02:27.941 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 640, time: 0.464183, dt: 0.000606, next write at time: 0.493103
2025-08-30 13:02:30.363 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 650, time: 0.470228, dt: 0.000605, next write at time: 0.493103
2025-08-30 13:02:32.878 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 660, time: 0.476252, dt: 0.000602, next write at time: 0.493103
2025-08-30 13:02:35.310 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 670, time: 0.482249, dt: 0.000599, next write at time: 0.493103
2025-08-30 13:02:37.723 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 680, time: 0.488225, dt: 0.000596, next write at time: 0.493103
2025-08-30 13:02:40.229 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 690, time: 0.494177, dt: 0.000594, next write at time: 0.537931
2025-08-30 13:02:42.796 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 700, time: 0.500105, dt: 0.000593, next write at time: 0.537931
2025-08-30 13:02:45.194 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 710, time: 0.506021, dt: 0.000593, next write at time: 0.537931
2025-08-30 13:02:47.617 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 720, time: 0.511919, dt: 0.000590, next write at time: 0.537931
2025-08-30 13:02:50.069 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 730, time: 0.517806, dt: 0.000587, next write at time: 0.537931
2025-08-30 13:02:52.407 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 740, time: 0.523684, dt: 0.000585, next write at time: 0.537931
2025-08-30 13:02:54.821 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 750, time: 0.529551, dt: 0.000584, next write at time: 0.537931
2025-08-30 13:02:57.165 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 760, time: 0.532051, dt: 0.000072, next write at time: 0.537931
2025-08-30 13:02:59.674 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 770, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:02.150 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 780, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:04.574 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 790, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:06.984 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 800, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:09.364 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 810, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:11.718 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 820, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:14.184 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 830, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:16.526 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 840, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:18.766 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 850, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:21.101 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 860, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:23.398 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 870, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:25.679 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 880, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:27.898 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 890, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:30.111 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 900, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:32.431 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 910, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:34.902 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 920, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:37.274 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 930, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:39.718 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 940, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:42.154 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 950, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:44.737 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 960, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:47.155 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 970, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:49.657 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 980, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:52.084 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 990, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:54.750 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 1000, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:57.367 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 1010, time: 0.532149, dt: 0.000000, next write at time: 0.537931
2025-08-30 13:03:59.900 | INFO     | library.core.fvm.solver_jax:log_callback_hyperbolic:44 - iteration: 1020, time: 0.532149, dt: 0.000000, next write at time: 0.537931

Visualization#

io.generate_vtk(os.path.join(settings.output.directory, f"{settings.output.filename}.h5"))
# postprocessing.vtk_project_2d_to_3d(model, settings, Nz=20, filename='out_3d')
# visu.pyvista_3d(settings.output.directory, scale=1.0)