Shallow Moments with topography and turbulence (Advanced)

Shallow Moments with topography and turbulence (Advanced)#

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.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_turbulence import ShallowMomentsTopoTurbulence

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_core.mesh import BaseMesh
import argparse

Model#

level = 1
offset = 1+level
n_fields = 3 + 2 * level
settings = Settings(
    name="SMETT",
    output=Zstruct(
        directory=f"outputs/topo_{level}", filename="SMETT", snapshots=30, clean_directory=True
    ),
)
bcs = BC.BoundaryConditions(
    [
        BC.Periodic(tag="left", periodic_to_physical_tag="right"),
        BC.Periodic(tag="right", periodic_to_physical_tag="left"),
    ]
)

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.35, 0.35)
    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)


model = ShallowMomentsTopoTurbulence(
    level=level,
    boundary_conditions=bcs,
    initial_conditions=ic,
    # aux_initial_conditions=ic_aux,
    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 = petscMesh.Mesh.create_1d([0, 25, 250])


solver = HyperbolicSolver(settings=settings, time_end=0.1, compute_dt=timestepping.adaptive(CFL=0.9))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 26
     22 ic = IC.UserFunction(custom_ic)
     23 # ic_aux = IC.UserFunction(custom_ic_aux)
---> 26 model = ShallowMomentsTopoTurbulence(
     27     level=level,
     28     boundary_conditions=bcs,
     29     initial_conditions=ic,
     30     # aux_initial_conditions=ic_aux,
     31     aux_variables = ['hinv'] + [f'dalpha_{i}_dx' for i in range(level+1)] + [f'dbeta_{i}_dy' for i in range(level+1)],
     32     # aux_variables = ['hinv'],
     33 
     34 )
     36 # main_dir = os.getenv("ZOOMY_DIR")
     37 # mesh = petscMesh.Mesh.from_gmsh(
     38 #     os.path.join(main_dir, "meshes/channel_junction/mesh_2d_coarse.msh")
     39 #     # os.path.join(main_dir, "meshes/channel_junction/mesh_2d_fine.msh")
     40 # )
     42 mesh = petscMesh.Mesh.create_1d([0, 25, 250])

File ~/Git/Zoomy/library/zoomy_core/zoomy_core/model/models/shallow_moments_topo.py:37, in ShallowMomentsTopo.__init__(self, init_functions, **kwargs)
     34 self.variables[1] = new_h
     36 if init_functions:
---> 37     self._initialize_functions()

File ~/Git/Zoomy/library/zoomy_core/zoomy_core/model/basemodel.py:186, in Model._initialize_functions(self)
    147 regs = [
    148     ("flux", self.flux, std_sig),
    149     ("dflux", self.dflux, std_sig),
   (...)    183     ),
    184 ]
    185 for name, method, sig in regs:
--> 186     self.register_symbolic_function(name, method, sig)
    188 # --- Boundary Conditions Setup ---
    189 
    190 # 1. Main Boundary Conditions
    191 self._boundary_conditions = (
    192     self.boundary_conditions.get_boundary_condition_function(
    193         self.time,
   (...)    201     )
    202 )

File ~/Git/Zoomy/library/zoomy_core/zoomy_core/model/basefunction.py:41, in SymbolicRegistrar.register_symbolic_function(self, name, method_ref, sig_struct)
     40 def register_symbolic_function(self, name, method_ref, sig_struct):
---> 41     definition = method_ref()
     42     self.functions[name] = Function(
     43         name=name, definition=definition, args=sig_struct
     44     )
     46     def proxy_caller(*input_args):

File ~/Git/Zoomy/library/zoomy_core/zoomy_core/model/basemodel.py:311, in Model.quasilinear_matrix(self)
    309 for d in range(self.dimension):
    310     JacF[:, :, d] = ZArray(JacF[:, :, d].tomatrix().T)
--> 311 return self._simplify(JacF + self.nonconservative_matrix())

File ~/Git/Zoomy/library/zoomy_core/zoomy_core/misc/misc.py:111, in ZArray.__add__(self, other)
    110 def __add__(self, other):
--> 111     return ZArray(super().__add__(self._to_array(other)))

File ~/miniforge3/envs/zoomy/lib/python3.11/site-packages/sympy/tensor/array/ndim_array.py:403, in NDimArray.__add__(self, other)
    400     return NotImplemented
    402 if self.shape != other.shape:
--> 403     raise ValueError("array shape mismatch")
    404 result_list = [i+j for i,j in zip(Flatten(self), Flatten(other))]
    406 return type(self)(result_list, self.shape)

ValueError: array shape mismatch
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)