drbx 2.0.0.dev0__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- drbx-2.1.0/PKG-INFO +379 -0
- drbx-2.1.0/README.md +348 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/pyproject.toml +2 -1
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/__init__.py +1 -1
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/cli.py +47 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/data/atomic_rates/iz_AMJUEL_H.x_2.1.5.json +1 -1
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/data/atomic_rates/rec_AMJUEL_H.x_2.1.8.json +1 -1
- drbx-2.1.0/src/drbx/fci_braginskii/__init__.py +1 -0
- drbx-2.1.0/src/drbx/fci_braginskii/_host_guards.py +43 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry/__init__.py +1 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry/fci_control_volumes.py +194 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry/fci_geometry.py +4277 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry/fci_simulation_geometry.py +146 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/Bfield_evaluator.py +584 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/MetricEvaluator.py +3479 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/ScalarPotential_evaluator.py +923 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/WallEvaluator.py +367 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/__init__.py +1 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_boundaries.py +4652 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_control_volumes.py +1396 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_geometry.py +6781 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_helpers.py +106 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_model.py +207 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_owner_boundary_overlap.py +652 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_rlp_overlap.py +2598 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_simulation_geometry.py +993 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_trace_executor.py +535 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/fci_trace_jax.py +409 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/hsx_fci_builder.py +2504 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/hsx_jax_field.py +70 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/hsx_simulation_geometry.py +974 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/jax_bfield_evaluator.py +276 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/jax_metric_evaluator.py +597 -0
- drbx-2.1.0/src/drbx/fci_braginskii/geometry_build/solve_MMPDE.py +818 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/__init__.py +1 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/characteristic_wall_residual.py +180 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_angular_agglomeration.py +659 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_boundaries.py +4069 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_control_volume_operators.py +268 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_curvature_production_flux.py +357 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_drb_EB_rhs.py +3126 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_gmres.py +707 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_halo.py +2573 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_helpers.py +86 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_model.py +28 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_operators.py +5848 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_parallel_production_flux.py +1317 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_sharding.py +891 -0
- drbx-2.1.0/src/drbx/fci_braginskii/native/fci_support_pair.py +153 -0
- drbx-2.1.0/src/drbx/fci_braginskii/run.py +3864 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/__init__.py +19 -17
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/essos_import.py +265 -84
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/fci_geometry.py +0 -103
- drbx-2.0.0.dev0/src/drbx/geometry/vmec_jax_import.py → drbx-2.1.0/src/drbx/geometry/vmex_import.py +51 -36
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_2_field_rhs.py +3 -20
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_4_field_rhs.py +6 -154
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_boundaries.py +12 -238
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_drb_EB_rhs.py +4 -122
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_drb_rhs.py +2 -22
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_halo.py +0 -29
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_helpers.py +2 -67
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_neutral.py +16 -7
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_operators.py +0 -123
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/neutrals/__init__.py +4 -2
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/neutrals/atomic_rates.py +5 -2
- drbx-2.1.0/src/drbx/native/neutrals/detachment_sol_model.py +877 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/neutrals/reactions.py +9 -1
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/neutrals/recycling_sol_model.py +2 -2
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_imported_drb_movie_campaign.py +2 -20
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_imported_fci_campaign.py +1 -15
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_imported_pytree_campaign.py +1 -14
- drbx-2.1.0/src/drbx.egg-info/PKG-INFO +379 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx.egg-info/SOURCES.txt +47 -2
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx.egg-info/requires.txt +3 -0
- drbx-2.1.0/tests/test_detachment_control.py +37 -0
- drbx-2.1.0/tests/test_landreman_paul_turbulence.py +129 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_atomic_rates.py +15 -0
- drbx-2.1.0/tests/test_native_detachment_sol.py +205 -0
- drbx-2.1.0/tests/test_neutral_energy_conservation.py +135 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_packaging_metadata.py +5 -2
- drbx-2.0.0.dev0/tests/test_vmec_jax_import.py → drbx-2.1.0/tests/test_vmex_import.py +20 -20
- drbx-2.0.0.dev0/PKG-INFO +0 -380
- drbx-2.0.0.dev0/README.md +0 -351
- drbx-2.0.0.dev0/src/drbx/native/neutrals/detachment_sol_model.py +0 -221
- drbx-2.0.0.dev0/src/drbx.egg-info/PKG-INFO +0 -380
- drbx-2.0.0.dev0/tests/test_detachment_control.py +0 -58
- drbx-2.0.0.dev0/tests/test_native_detachment_sol.py +0 -83
- {drbx-2.0.0.dev0 → drbx-2.1.0}/LICENSE +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/setup.cfg +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/__main__.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/config/__init__.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/config/boutinp.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/config/model.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/config/normalization.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/data/atomic_rates/__init__.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/data/atomic_rates/iz_AMJUEL_H.x_2.3.9a.json +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/data/atomic_rates/rec_AMJUEL_H.x_2.3.13a.json +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/embedding.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/fci_maps.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/island_divertor.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/metric_tensor.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/open_slab.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/rotating_ellipse.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/shifted_torus.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/stellarator.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/geometry/vmec_extender_import.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/linear/__init__.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/linear/dispersion.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/linear/eigen.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/__init__.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/array_backend.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/deck_runner.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/electromagnetic.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/expression.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_differentiable_case.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_model.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_sharding.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_sheath_recycling.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_time_integrator.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fci_vorticity.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/fluid_1d.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/hasegawa_wakatani.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/limiters.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/mesh.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/metrics.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/sol_flux_tube.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/stellarator_turbulence.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/transport.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/units.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/native/vorticity.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/__init__.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/artifacts.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/memory.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/output.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/paths.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/performance.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/run_config.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/scheduler.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/runtime/state.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/__init__.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/autodiff_diffusion.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/autodiff_diffusion_uncertainty.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/diverted_tokamak_movie.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_fieldline_import_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_imported_artifact_audit.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_vmec_closed_field_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_vmec_closed_field_transient_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/essos_vmec_fieldline_surface_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/fluid_1d_mms_convergence.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/geometry_lineouts.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/geometry_slices.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/publication_plotting.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_drb_pytree_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_fci_geometry_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_fci_operator_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_fci_suite_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_metric_mms_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_neutral_physics_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_sheath_recycling_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_sol_showcase.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/stellarator_vorticity_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/vmec_extender_edge_field_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx/validation/vmec_extender_sol_smoke_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx.egg-info/dependency_links.txt +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx.egg-info/entry_points.txt +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/src/drbx.egg-info/top_level.txt +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_autodiff_methods.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_boutinp.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_cli_command_surface.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_cli_run.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_diffusion_precision_benchmark.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_essos_fieldline_import.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fast_research_checks.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fci_differentiable.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fci_halo.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fci_model_state.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fci_neutrals_3d.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fci_operators.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fci_operators_domain_decomp.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_fci_sharded_2field.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_geometry_fci_maps.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_hasegawa_wakatani.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_island_divertor.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_linear_dispersion.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_mms_convergence.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_mms_shifted_torus_2_field.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_mms_shifted_torus_4_field.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_mms_shifted_torus_EB.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_mms_slab_2_field.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_multigrid_preconditioner.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_array_backend.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_electromagnetic.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_expression.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_fluid_1d.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_limiters.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_mesh.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_metrics.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_reactions.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_recycling_sol.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_transport.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_native_vorticity.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_normalization.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_open_field_line_sol.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_restartable_diffusion_tutorial.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_rotating_ellipse_fci.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_rotating_ellipse_filament.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_run_config.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_runtime_artifacts.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_runtime_memory.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_runtime_performance.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_runtime_precision.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_scheduler.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_shifted_torus_4_field_blob.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_shifted_torus_4_field_free_decay.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_shifted_torus_EB_blob.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_state.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_stellarator_turbulence.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_validation_autodiff_diffusion.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_validation_autodiff_diffusion_uncertainty.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_validation_diverted_tokamak_movie.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_validation_fluid_1d_mms_convergence.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_validation_stellarator_fci_campaigns.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_validation_vmec_extender_edge_field_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_validation_vmec_extender_sol_smoke_campaign.py +0 -0
- {drbx-2.0.0.dev0 → drbx-2.1.0}/tests/test_vmec_extender_import.py +0 -0
drbx-2.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: drbx
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: JAX-first edge and scrape-off-layer plasma code with differentiable, hardware-agnostic solver infrastructure.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: jax
|
|
14
|
+
Requires-Dist: scipy
|
|
15
|
+
Requires-Dist: matplotlib
|
|
16
|
+
Requires-Dist: netCDF4
|
|
17
|
+
Requires-Dist: rich
|
|
18
|
+
Requires-Dist: pillow
|
|
19
|
+
Requires-Dist: solvax>=0.8.6
|
|
20
|
+
Requires-Dist: tomli; python_version < "3.11"
|
|
21
|
+
Provides-Extra: essos
|
|
22
|
+
Requires-Dist: essos>=0.19.4; extra == "essos"
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-xdist; extra == "dev"
|
|
27
|
+
Provides-Extra: docs
|
|
28
|
+
Requires-Dist: mkdocs; extra == "docs"
|
|
29
|
+
Requires-Dist: pymdown-extensions; extra == "docs"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# DRBX
|
|
33
|
+
|
|
34
|
+
[](https://github.com/uwplasma/drbx/actions/workflows/test.yml)
|
|
35
|
+
[](https://github.com/uwplasma/drbx/actions/workflows/docs.yml)
|
|
36
|
+
[](https://github.com/uwplasma/drbx/actions/workflows/coverage.yml)
|
|
37
|
+
[](https://pypi.org/project/drbx/)
|
|
38
|
+
[](https://pypi.org/project/drbx/)
|
|
39
|
+
[](LICENSE)
|
|
40
|
+
[](https://jax.readthedocs.io/)
|
|
41
|
+
[](https://drbx.readthedocs.io/)
|
|
42
|
+
|
|
43
|
+
DRBX is a JAX code for drift-reduced Braginskii (DRB) fluid simulations of
|
|
44
|
+
edge and scrape-off-layer (SOL) plasma turbulence. It runs on closed and open
|
|
45
|
+
field lines, in axisymmetric (tokamak) and non-axisymmetric (stellarator)
|
|
46
|
+
geometry, using the flux-coordinate-independent (FCI) approach for parallel
|
|
47
|
+
operators. Every model is written in JAX, so each step is `jit`-compiled and
|
|
48
|
+
differentiable: gradients of any output (a saturated fluctuation energy, a
|
|
49
|
+
target temperature, a transport level) with respect to any input (a gradient
|
|
50
|
+
drive, an adiabaticity, a diffusivity, a geometry parameter) are taken through
|
|
51
|
+
the solver.
|
|
52
|
+
|
|
53
|
+
- **Turbulence models:** Hasegawa-Wakatani, two- and four-field drift-reduced models, electromagnetic terms.
|
|
54
|
+
- **Geometry:** FCI on rotating-ellipse and shifted-torus stellarators, island divertors, imported ESSOS coil fields and VMEC (VMEX) equilibria.
|
|
55
|
+
- **Boundary physics:** open field lines with Bohm-type sheath closures, fluid neutrals with AMJUEL rates, recycling and detachment.
|
|
56
|
+
- **Gradients:** forward, reverse and checkpointed reverse mode, gated to agree; sensitivity, uncertainty, inverse design and control.
|
|
57
|
+
- **Runtime:** TOML-deck CLI, small Python API, restartable runs, multi-device `shard_map` stepping.
|
|
58
|
+
|
|
59
|
+
Documentation: [drbx.readthedocs.io](https://drbx.readthedocs.io/en/latest/).
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install drbx # from PyPI
|
|
65
|
+
# or, from source:
|
|
66
|
+
git clone https://github.com/uwplasma/drbx && cd drbx && pip install -e .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Runtime dependencies are `jax`, `scipy`, `matplotlib`, `netCDF4`, `rich`,
|
|
70
|
+
`pillow`, and [`solvax`](https://github.com/uwplasma/SOLVAX). Python 3.10-3.12.
|
|
71
|
+
|
|
72
|
+
For ESSOS field imports, install `drbx[essos]` (Python 3.10+).
|
|
73
|
+
|
|
74
|
+
## Quick start
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
drbx inspect examples/inputs/restartable_diffusion.toml # resolve and print the plan
|
|
78
|
+
drbx run examples/inputs/restartable_diffusion.toml # run and write artifacts
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
From Python, a differentiable turbulence run is a few lines:
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
import jax.numpy as jnp
|
|
85
|
+
import numpy as np
|
|
86
|
+
from drbx.native.hasegawa_wakatani import HasegawaWakataniParameters, hw_grid, hw_run
|
|
87
|
+
|
|
88
|
+
grid = hw_grid(64, 2 * jnp.pi * 8)
|
|
89
|
+
params = HasegawaWakataniParameters(adiabaticity=1.0, gradient=1.0)
|
|
90
|
+
rng = np.random.default_rng(0)
|
|
91
|
+
zeta0 = jnp.fft.fft2(jnp.asarray(1e-2 * rng.standard_normal((64, 64))))
|
|
92
|
+
n0 = jnp.fft.fft2(jnp.asarray(1e-2 * rng.standard_normal((64, 64))))
|
|
93
|
+
zeta, n = hw_run(zeta0, n0, grid, params, dt=5e-3, steps=500) # jit-compiled, differentiable
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Every example is a flat script: parameters at the top, run, plot. Start with
|
|
97
|
+
[`examples/model_selection_guide.py`](examples/model_selection_guide.py) to
|
|
98
|
+
choose a model family, dimension and boundary conditions.
|
|
99
|
+
|
|
100
|
+
## Stellarator turbulence in three dimensions
|
|
101
|
+
|
|
102
|
+
Four-field drift-reduced turbulence on a rotating-ellipse stellarator, a torus
|
|
103
|
+
whose elliptical cross-section rotates with the toroidal angle. The cutaway
|
|
104
|
+
shows density fluctuations on a flux surface and through the interior.
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
*[`examples/stellarator/stellarator_3d_render.py`](examples/stellarator/stellarator_3d_render.py)*
|
|
109
|
+
|
|
110
|
+
## Closed and open field lines
|
|
111
|
+
|
|
112
|
+
The same geometry supports a closed core and an open SOL. Beyond a toroidal
|
|
113
|
+
limiter the field lines (red) end on the limiter plate, where a Bohm sheath
|
|
114
|
+
drains the plasma; core field lines (blue) stay on flux surfaces. The movies
|
|
115
|
+
run the same multi-mode seed with all field lines closed and with the limiter
|
|
116
|
+
SOL, on four toroidal cross-sections.
|
|
117
|
+
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+

|
|
121
|
+
|
|
122
|
+

|
|
123
|
+
|
|
124
|
+
*[`examples/stellarator/stellarator_turbulence.py`](examples/stellarator/stellarator_turbulence.py)*
|
|
125
|
+
|
|
126
|
+
## Imported stellarator equilibria
|
|
127
|
+
|
|
128
|
+
Field lines and turbulence run on imported geometry. The Landreman-Paul
|
|
129
|
+
precise-QA configuration is read from ESSOS coils (Biot-Savart, Poincare
|
|
130
|
+
classification of closed and open lines) or from a VMEC `wout` file through
|
|
131
|
+
VMEX, where the traced rotational transform matches the equilibrium `iotaf`
|
|
132
|
+
profile to about 1e-6. Four-field turbulence then runs on the imported field
|
|
133
|
+
with a closed core and a sheath-drained SOL.
|
|
134
|
+
|
|
135
|
+

|
|
136
|
+
|
|
137
|
+
*[`examples/stellarator/landreman_paul_turbulence.py`](examples/stellarator/landreman_paul_turbulence.py),
|
|
138
|
+
[`examples/geometry-3D/essos-field-lines/closed_open_vacuum_poincare.py`](examples/geometry-3D/essos-field-lines/closed_open_vacuum_poincare.py),
|
|
139
|
+
[`examples/geometry-3D/vmex/closed_field_lines.py`](examples/geometry-3D/vmex/closed_field_lines.py),
|
|
140
|
+
[`examples/geometry-3D/vmex/closed_open_field_lines.py`](examples/geometry-3D/vmex/closed_open_field_lines.py)*
|
|
141
|
+
|
|
142
|
+
## Island divertor
|
|
143
|
+
|
|
144
|
+
A sheared rotational transform with resonant perturbations forms island chains
|
|
145
|
+
and a stochastic edge. The open SOL is not imposed: multi-transit field-line
|
|
146
|
+
tracing marks the finite connection-length region, and the turbulence drains
|
|
147
|
+
through it.
|
|
148
|
+
|
|
149
|
+

|
|
150
|
+
|
|
151
|
+
*[`examples/stellarator/island_divertor.py`](examples/stellarator/island_divertor.py)*
|
|
152
|
+
|
|
153
|
+
## FCI parallel operators
|
|
154
|
+
|
|
155
|
+
Parallel derivatives are computed by field-line tracing and interpolation on a
|
|
156
|
+
grid that need not be field aligned. On the genuinely non-axisymmetric
|
|
157
|
+
rotating-ellipse metric, both the direct and traced-field-line parallel
|
|
158
|
+
gradients converge at second order, and the operator is differentiable with
|
|
159
|
+
respect to the shape.
|
|
160
|
+
|
|
161
|
+

|
|
162
|
+
|
|
163
|
+
*[`examples/stellarator/rotating_ellipse_fci.py`](examples/stellarator/rotating_ellipse_fci.py),
|
|
164
|
+
[`examples/stellarator/fci_differentiable.py`](examples/stellarator/fci_differentiable.py)*
|
|
165
|
+
|
|
166
|
+
## Sheath-bounded SOL, neutrals and detachment
|
|
167
|
+
|
|
168
|
+
On open field lines, parallel transport to Bohm-sheath targets relaxes to the
|
|
169
|
+
two-point steady state (Mach 1 at the targets, target density half the
|
|
170
|
+
upstream value). Fluid neutrals with AMJUEL ionization, recombination and
|
|
171
|
+
charge-exchange rates conserve particles and momentum exactly against the
|
|
172
|
+
plasma, and their energy transfers conserve thermal plus kinetic energy.
|
|
173
|
+
|
|
174
|
+
The 1D divertor-leg model reproduces the SD1D equations (Dudson et al., PPCF
|
|
175
|
+
61, 065008, 2019) term by term and solves for the steady state with a Newton
|
|
176
|
+
method, so target quantities are differentiable through the implicit-function
|
|
177
|
+
theorem. Against the published SD1D hydrogen-only scan (13.6 eV ionisation
|
|
178
|
+
cost, 800 cells) the target temperature agrees within 0.35% and the target
|
|
179
|
+
particle flux within 0.15% over 18 upstream densities, with particle and power
|
|
180
|
+
ledgers closed to 1e-8. Carbon radiation and excitation are not modelled, so
|
|
181
|
+
this case cools to ~3 eV without the flux rollover seen in SD1D's carbon runs.
|
|
182
|
+
|
|
183
|
+

|
|
184
|
+
|
|
185
|
+
*[`examples/sol/open_sol_flux_tube.py`](examples/sol/open_sol_flux_tube.py),
|
|
186
|
+
[`examples/sol/recycling_sol.py`](examples/sol/recycling_sol.py),
|
|
187
|
+
[`examples/benchmarks/b6_detachment_sd1d.py`](examples/benchmarks/b6_detachment_sd1d.py)*
|
|
188
|
+
|
|
189
|
+
## Differentiable design and control
|
|
190
|
+
|
|
191
|
+
Because the solve is differentiable, gradients drive design loops. Implicit
|
|
192
|
+
derivatives of the steady SD1D-matched solution give Newton steps that find the
|
|
193
|
+
upstream density placing the target at a requested temperature (10 eV in four
|
|
194
|
+
solves); gradient descent through a nonlinear drift-wave run recovers a drive
|
|
195
|
+
parameter.
|
|
196
|
+
|
|
197
|
+

|
|
198
|
+
|
|
199
|
+
Forward, reverse and checkpointed reverse mode give the same gradient at
|
|
200
|
+
different cost; the example measures which is cheapest for a given problem.
|
|
201
|
+
|
|
202
|
+

|
|
203
|
+
|
|
204
|
+
*[`examples/autodiff/detachment_control.py`](examples/autodiff/detachment_control.py),
|
|
205
|
+
[`examples/autodiff/differentiation_methods.py`](examples/autodiff/differentiation_methods.py),
|
|
206
|
+
[`examples/tokamak/drift_wave_inverse_design.py`](examples/tokamak/drift_wave_inverse_design.py),
|
|
207
|
+
plus [sensitivity](examples/autodiff_diffusion_sensitivity.py),
|
|
208
|
+
[uncertainty](examples/autodiff_diffusion_uncertainty.py) and
|
|
209
|
+
[inverse design](examples/autodiff_diffusion_inverse_design.py) on a reduced model.*
|
|
210
|
+
|
|
211
|
+
## Linear verification
|
|
212
|
+
|
|
213
|
+
`drbx.linear` linearizes any model about an equilibrium. Drift-wave,
|
|
214
|
+
shear-Alfven and interchange dispersion relations are reproduced against their
|
|
215
|
+
analytic forms.
|
|
216
|
+
|
|
217
|
+

|
|
218
|
+
|
|
219
|
+
*[`examples/benchmarks/linear_dispersion.py`](examples/benchmarks/linear_dispersion.py),
|
|
220
|
+
[`examples/benchmarks/linear_drb_survey.py`](examples/benchmarks/linear_drb_survey.py)*
|
|
221
|
+
|
|
222
|
+
## Parallel performance
|
|
223
|
+
|
|
224
|
+
The FCI operator and domain-decomposition stack (`FciGeometry3D`,
|
|
225
|
+
`fci_operators`, halo exchange) was contributed by **Aiken Xie** in
|
|
226
|
+
[PR #3](https://github.com/uwplasma/drbx/pull/3). The drift-reduced two-field
|
|
227
|
+
step runs across devices with `shard_map` and is bit-exact against the
|
|
228
|
+
single-device step ([`tests/test_fci_sharded_2field.py`](tests/test_fci_sharded_2field.py)).
|
|
229
|
+
On a 36-core Linux host a 1.05M-cell step reaches a 4.5x speedup at 16 shards
|
|
230
|
+
(1.18 s to 0.27 s), and one NVIDIA A4000 GPU runs the same step about 21x faster
|
|
231
|
+
than a single CPU shard, with identical checksums
|
|
232
|
+
([docs](docs/performance_and_differentiability.md)). GPU runs are measured
|
|
233
|
+
by hand; CI tests CPU only.
|
|
234
|
+
|
|
235
|
+

|
|
236
|
+
|
|
237
|
+
*[`examples/benchmarks/fci_sharded_strong_scaling.py`](examples/benchmarks/fci_sharded_strong_scaling.py)*
|
|
238
|
+
|
|
239
|
+
## HSX stellarator scrape-off layer (experimental FCI backend)
|
|
240
|
+
|
|
241
|
+
An experimental seven-field electrostatic Braginskii backend runs a seeded
|
|
242
|
+
filament in the full HSX scrape-off layer, up to the vessel wall. Its eta
|
|
243
|
+
slices are surfaces of a scalar potential that follow the stellarator; small
|
|
244
|
+
wall-cut cells are merged into owner cells; the current and potential are
|
|
245
|
+
advanced together in an implicit stage; and the potential is solved with GMRES
|
|
246
|
+
sharded over eta. Verified on the canonical 32-cubed geometry: continuity of
|
|
247
|
+
the returned (Ve, vorticity) across the implicit stage to about 1e-16, restarts
|
|
248
|
+
bitwise equal to straight runs, identical GMRES counts on 1, 2 and 4 devices,
|
|
249
|
+
normalization tests, and the real-geometry tests. Vorticity converges at about
|
|
250
|
+
second order in time; n, T and Vi at 1.4-1.6, and phi near first order because
|
|
251
|
+
the electron response is stiff at the physical mass ratio (see the
|
|
252
|
+
[backend notes](docs/fci_braginskii_hsx_backend.md)). A step takes about 6 s on
|
|
253
|
+
a laptop CPU and about 35 s on a shared RTX A4000, where GMRES dominates.
|
|
254
|
+
|
|
255
|
+

|
|
256
|
+
|
|
257
|
+

|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
drbx run examples/inputs/hsx_fci_blob.toml # or: python simulate_hsx_blob.py --geometry <bundle> ...
|
|
261
|
+
python examples/stellarator/hsx_fci_blob_render.py run/history.npz docs/media
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
The geometry bundle is distributed separately; see
|
|
265
|
+
[docs/fci_braginskii_hsx_backend.md](docs/fci_braginskii_hsx_backend.md).
|
|
266
|
+
*Scope:* experimental and wall-limited: no sheath, neutral or recycling
|
|
267
|
+
coupling yet.
|
|
268
|
+
|
|
269
|
+
## Comparison with other edge and SOL codes
|
|
270
|
+
|
|
271
|
+
✅ supported, 🟡 partial or reduced, ❌ not supported, ❔ not verified from a public source.
|
|
272
|
+
For DRBX, ✅ means the feature is on `main` and covered by tests.
|
|
273
|
+
|
|
274
|
+
| Feature | DRBX | BOUT++ / Hermes-3 | GRILLIX | GBS | SOLPS-ITER | EMC3-EIRENE | SOLEDGE3X |
|
|
275
|
+
|---|---|---|---|---|---|---|---|
|
|
276
|
+
| 3D turbulence | ✅ | ✅ [1b] | ✅ [3] | ✅ [5] | ❌ [7] | ❌ [8] | ✅ [9] |
|
|
277
|
+
| Stellarator / non-axisymmetric geometry | ✅ | 🟡 [2] | 🟡 [3] | ✅ [6] | ❌ [7] | ✅ [8] | ❔ |
|
|
278
|
+
| FCI | ✅ | 🟡 [2] | ✅ [3] | ❔ | ❌ [7] | ❌ [8] | ❔ |
|
|
279
|
+
| Open + closed field lines | ✅ | ✅ [1] | ✅ [3] | ✅ [5] | ✅ [7] | ✅ [8] | ✅ [9] |
|
|
280
|
+
| Fluid neutrals | 🟡 [a] | ✅ [1] | ✅ [4] | ❔ | ❔ | ❌ [8] | ❔ |
|
|
281
|
+
| Kinetic neutrals (EIRENE) | ❌ | ❔ | ❔ | 🟡 [5] | ✅ [7] | ✅ [8] | ✅ [9] |
|
|
282
|
+
| Sheath boundary conditions | 🟡 [b] | ✅ [1] | ✅ [3] | ✅ [5] | ✅ [7] | ✅ [8] | ✅ [9] |
|
|
283
|
+
| Implicit time integration | 🟡 [c] | ✅ [1] | ✅ [10] | ❔ | ❔ | ❔ | ❔ |
|
|
284
|
+
| GPU support | 🟡 [d] | ❔ | ❌ [10] | 🟡 [5] | ❔ | ❔ | ❔ |
|
|
285
|
+
| Automatic differentiation / gradients | ✅ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ |
|
|
286
|
+
| Python / TOML interface | ✅ | 🟡 [1] | ❔ | ❔ | ❔ | ❔ | ❔ |
|
|
287
|
+
| Open source | ✅ | ✅ [1] | ❔ | ❔ | ❔ | ❔ | ❔ |
|
|
288
|
+
|
|
289
|
+
<details>
|
|
290
|
+
<summary>Notes and evidence</summary>
|
|
291
|
+
|
|
292
|
+
DRBX notes:
|
|
293
|
+
- [a] Reduced fluid/diffusive neutral models with AMJUEL rates (`tests/test_native_recycling_sol.py`, `tests/test_fci_neutrals_3d.py`, `tests/test_neutral_energy_conservation.py`); no kinetic neutrals.
|
|
294
|
+
- [b] Bohm-type reduced sheath closures on targets and limiters (`tests/test_open_field_line_sol.py`).
|
|
295
|
+
- [c] Implicit Spitzer conduction in the 1D detachment model (`tests/test_native_detachment_sol.py`); the 3D turbulence steps are explicit.
|
|
296
|
+
- [d] Runs on GPU through JAX and was measured by hand on an A4000; GPU is not exercised in CI.
|
|
297
|
+
|
|
298
|
+
Other codes (❔ means no public source was checked for that cell; it is not a claim that the feature is absent):
|
|
299
|
+
1. Hermes-3: Dudson et al., Comput. Phys. Commun. 296, 108991 (2024), [arXiv:2303.12131](https://arxiv.org/abs/2303.12131): CVODE, backward-Euler (PETSc) and IMEX-BDF2 time integration (sec. 2.1); fluid deuterium atoms coupled by reactions; Bohm–Chodura sheath boundaries; BOUT++ input files with Python post-processing; GPL-3 at [github.com/boutproject/hermes-3](https://github.com/boutproject/hermes-3). Kinetic neutrals, FCI and GPU are not discussed in that paper.
|
|
300
|
+
1b. 3D turbulence: Dudson et al., TCV-X21 validation, [arXiv:2506.12180](https://arxiv.org/abs/2506.12180) (neutrals omitted there).
|
|
301
|
+
2. FCI and stellarator turbulence have been run in BOUT++ (BSTING: Shanahan, Dudson & Hill, PPCF 61, 025007 (2019), rotating ellipse and W7-X grids, no sheath boundaries in those runs); not established for Hermes-3 itself.
|
|
302
|
+
3. GRILLIX: Stegmeir et al., [GRILLIX: a 3D turbulence code based on the FCI approach](https://pure.mpg.de/rest/items/item_2537240_5/component/file_2570380/content), and [advanced divertor configurations](https://arxiv.org/abs/1908.05398); FCI is described as compatible with stellarator geometry, published applications are tokamaks.
|
|
303
|
+
4. GRILLIX fluid neutrals: [Self-consistent plasma-neutrals fluid modeling, PPCF (2025)](https://iopscience.iop.org/article/10.1088/1361-6587/add8ba).
|
|
304
|
+
5. GBS: Giacomin et al., J. Comput. Phys. (2022), [arXiv:2112.03573](https://arxiv.org/abs/2112.03573); self-consistent kinetic neutral model (GBS's own, not EIRENE); GPU port stated as planned.
|
|
305
|
+
6. GBS stellarators: [Global fluid simulation of plasma turbulence in stellarators with GBS, Nucl. Fusion (2024)](https://iopscience.iop.org/article/10.1088/1741-4326/ad4ef5); [TJ-K validation](https://arxiv.org/abs/2304.00758).
|
|
306
|
+
7. SOLPS-ITER: Wiesen et al., J. Nucl. Mater. 463, 480 (2015); [Bonnin et al., Plasma Fusion Res. 11, 1403102 (2016)](https://www.jstage.jst.go.jp/article/pfr/11/0/11_1403102/_article): B2.5 2D axisymmetric fluid transport coupled to EIRENE.
|
|
307
|
+
8. EMC3-EIRENE: [FusionWiki](https://wiki.fusion.ciemat.es/wiki/EMC3-EIRENE), [W7-X modelling, arXiv:2201.06341](https://arxiv.org/abs/2201.06341): 3D Monte Carlo fluid transport with anomalous diffusion and kinetic EIRENE neutrals; HSX application: Boeyaert et al., Nucl. Mater. Energy 42, 101874 (2025).
|
|
308
|
+
10. GRILLIX numerics: Zholobenko et al., Contrib. Plasma Phys. 59 (2019) with its 2020 corrigendum (semi-implicit time stepping with GMRES); Zholobenko, PhD thesis (TU München), GPU support listed as future work.
|
|
309
|
+
9. SOLEDGE3X: Bufferand et al., [Nucl. Fusion 61, 116052 (2021)](https://iopscience.iop.org/article/10.1088/1741-4326/ac2873): 2D transport or 3D turbulence, coupled to EIRENE, up to the first wall.
|
|
310
|
+
|
|
311
|
+
</details>
|
|
312
|
+
|
|
313
|
+
## Validation
|
|
314
|
+
|
|
315
|
+
Each benchmark has a test and an example that regenerates its figure:
|
|
316
|
+
|
|
317
|
+
| Case | Anchor | What is checked |
|
|
318
|
+
|------|--------|-----------------|
|
|
319
|
+
| Method of manufactured solutions | Riva et al., *Phys. Plasmas* 21, 062301 (2014); Dudson et al. 23, 062303 (2016) | operator / 1D-fluid / FCI convergence order 2 |
|
|
320
|
+
| Resistive drift-wave dispersion | Dudson et al., *Comput. Phys. Commun.* 180, 1467 (2009) | growth rate and frequency vs analytic |
|
|
321
|
+
| Shear-Alfven wave dispersion | Stegmeir et al., *Phys. Plasmas* 26, 052517 (2019) | phase velocity vs analytic (with electron inertia) |
|
|
322
|
+
| Interchange / Rayleigh-Taylor | curvature-driven flute dispersion | growth rate vs `sqrt(g kappa) k_y/k` |
|
|
323
|
+
| FCI on non-axisymmetric geometry | Shanahan et al., *PPCF* 61, 025007 (2019) | parallel-operator MMS; grad vs finite difference 6e-11 |
|
|
324
|
+
| Rotating-ellipse FCI | Stegmeir et al., *Comput. Phys. Commun.* 198, 139 (2016) | second-order parallel gradient; shape-differentiable; seeded filament |
|
|
325
|
+
| Island-divertor field | Shanahan et al., *J. Plasma Phys.* 90 (2024) | island chains, stochastic edge, emergent open SOL |
|
|
326
|
+
| Open-field-line SOL | Stangeby, *The Plasma Boundary of Magnetic Fusion Devices* (2000) | Mach 1 at targets; target density half upstream; Bohm particle balance |
|
|
327
|
+
| Neutrals and recycling | Dudson et al., *Comput. Phys. Commun.* 296, 108991 (2024); AMJUEL | exact plasma-neutral particle and momentum conservation |
|
|
328
|
+
| SD1D 1D divertor leg | Dudson et al., *PPCF* 61, 065008 (2019) and its published dataset | 13.6 eV hydrogen scan: target T within 0.35%, target flux within 0.15% (800 cells); ledgers closed; grid convergence 100–1600 cells (~3% between 800 and 1600) |
|
|
329
|
+
| HSX scrape-off-layer filament (experimental) | HSX geometry; FCI construction of Stegmeir et al., *Comput. Phys. Commun.* 198, 139 (2016) | implicit-stage continuity ~1e-16; bitwise restart; equal GMRES counts on 1/2/4 devices; time order 1.8-1.9 (vorticity), 1.4-1.6 (n, T, Vi), ~1 (phi, stiff electrons) |
|
|
330
|
+
|
|
331
|
+
More in [docs/validation_gallery.md](docs/validation_gallery.md).
|
|
332
|
+
|
|
333
|
+
## Documentation
|
|
334
|
+
|
|
335
|
+
- Physics and numerics: [physics_models.md](docs/physics_models.md),
|
|
336
|
+
[equation_to_code_map.md](docs/equation_to_code_map.md),
|
|
337
|
+
[code_structure.md](docs/code_structure.md).
|
|
338
|
+
- Performance and differentiability:
|
|
339
|
+
[performance_and_differentiability.md](docs/performance_and_differentiability.md),
|
|
340
|
+
[profiling_runtime.md](docs/profiling_runtime.md).
|
|
341
|
+
- Testing policy: [testing_strategy.md](docs/testing_strategy.md).
|
|
342
|
+
- Release notes: [release_notes.md](docs/release_notes.md).
|
|
343
|
+
|
|
344
|
+
## Testing
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
pytest -q -m "not slow" # fast suite
|
|
348
|
+
pytest -q -m "not slow" --cov=drbx --cov-branch # with coverage
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
CI runs the fast suite on Python 3.10-3.12 (CPU).
|
|
352
|
+
|
|
353
|
+
## Tokamak with an internal island chain
|
|
354
|
+
|
|
355
|
+
A `(2, 1)` resonance at the `q = 2` surface opens an island chain; the
|
|
356
|
+
four-field model evolves the density flux-driven (source shell in, wall buffer
|
|
357
|
+
out, nothing clamped). The traced islands match the pendulum width
|
|
358
|
+
`W = 4 sqrt(eps/(m |iota'|))` to about 1%, and in the turbulence-dominated
|
|
359
|
+
regime the mean profile flattens across the chain (gradient ratio 0.83). Top
|
|
360
|
+
row: the 3D state, the `q` profile and the Poincare section; bottom row: the
|
|
361
|
+
evolving mean profile, turbulent radial particle flux and time traces.
|
|
362
|
+
Production `48x96x32` runs take about 1 h on one 16 GB GPU.
|
|
363
|
+
|
|
364
|
+

|
|
365
|
+
|
|
366
|
+

|
|
367
|
+
|
|
368
|
+
*[`examples/island_tokamak_profiles.py`](examples/island_tokamak_profiles.py);
|
|
369
|
+
figures via [`examples/island_tokamak_figure.py`](examples/island_tokamak_figure.py);
|
|
370
|
+
write-up in [docs/island_tokamak.md](docs/island_tokamak.md).*
|
|
371
|
+
|
|
372
|
+
## Citing
|
|
373
|
+
|
|
374
|
+
If you use DRBX in published work, please cite this repository
|
|
375
|
+
(https://github.com/uwplasma/DRBX).
|
|
376
|
+
|
|
377
|
+
## License
|
|
378
|
+
|
|
379
|
+
MIT, see [LICENSE](LICENSE).
|