Skip to content

Commit ede2e1f

Browse files
glesurvrevilleHal BaljeankpfMarc Coiffier
authored
V2.2.01 (#336)
## [2.2.01] 2025-04-16 ### Changed - Fix a bug that led to instabilities in the RKL scheme with very small grid spacings (#323) - Fix a bug that prevented Idefix from running with Sycl backend (required on Intel GPUs) (#331) - Fix an error that led to incorrect electrical current regularisation around the polar axis in non-Ideal MHD (#333) - Improve div(B) checks with a dimensionless implementation, avoiding too large divB errors in grids with large stretch factors (#334) ### Added - Time-Implicit drag for multiple dust species, preventing small time steps for strongly coupled dust grains (#321) - Collisionless heat flux added to the Braginskii module (#317) - New global `idfx::DumpArray` debugging function to dump any Idefix array into a numpy array that can read from python (#318) - Automatic benchmark plots in the documentation (#319) - More CI tests of grid coarsening (#329) - Dump outputs based on wallclock time (#335) --------- Co-authored-by: Victor Réville <victorreville@gmail.com> Co-authored-by: Hal Bal <vreville@irap.omp.eu> Co-authored-by: Jean Kempf <jean.kempf@irap.omp.eu> Co-authored-by: Victor Réville <47865059+vreville@users.noreply.github.com> Co-authored-by: Marc Coiffier <marc.coiffier@univ-grenoble-alpes.fr> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 54482d5 commit ede2e1f

67 files changed

Lines changed: 2313 additions & 289 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/idefix-ci-jobs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ jobs:
6565
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang -all $TESTME_OPTIONS
6666
- name: Orszag Tang 3D+restart tests
6767
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang3D -all $TESTME_OPTIONS
68+
- name: Axis Flux tube
69+
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AxisFluxTube -all $TESTME_OPTIONS
6870

6971
ParabolicMHD:
7072
runs-on: self-hosted
@@ -177,6 +179,8 @@ jobs:
177179
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragTDiffusion -all $TESTME_OPTIONS
178180
- name: Spherical anisotropic viscosity
179181
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragViscosity -all $TESTME_OPTIONS
182+
- name: Collisionless thermal conduction
183+
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/clessTDiffusion -all $TESTME_OPTIONS
180184

181185
Examples:
182186
needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity]
@@ -201,3 +205,5 @@ jobs:
201205
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/lookupTable -all $TESTME_OPTIONS
202206
- name: Dump Image
203207
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/dumpImage -all $TESTME_OPTIONS
208+
- name: Column density
209+
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/columnDensity -all $TESTME_OPTIONS

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ doc/source/_static/*
44
doc/source/_public/*
55
doc/source/api/*
66
doc/source/xml/*
7+
doc/env/*
78

89
# compiled files
910
**/__pycache__

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.2.01] 2025-04-16
8+
### Changed
9+
10+
- Fix a bug that led to instabilities in the RKL scheme with very small grid spacings (#323)
11+
- Fix a bug that prevented Idefix from running with Sycl backend (required on Intel GPUs) (#331)
12+
- Fix an error that led to incorrect electrical current regularisation around the polar axis in non-Ideal MHD (#333)
13+
- Improve div(B) checks with a dimensionless implementation, avoiding too large divB errors in grids with large stretch factors (#334)
14+
15+
### Added
16+
17+
- Time-Implicit drag for multiple dust species, preventing small time steps for strongly coupled dust grains (#321)
18+
- Collisionless heat flux added to the Braginskii module (#317)
19+
- New global `idfx::DumpArray` debugging function to dump any Idefix array into a numpy array that can read from python (#318)
20+
- Automatic benchmark plots in the documentation (#319)
21+
- More CI tests of grid coarsening (#329)
22+
- Dump outputs based on wallclock time (#335)
23+
24+
725
## [2.2.00] 2025-01-17
826
### Changed
927

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set (CMAKE_CXX_STANDARD 17)
66

77
set(Idefix_VERSION_MAJOR 2)
88
set(Idefix_VERSION_MINOR 2)
9-
set(Idefix_VERSION_PATCH 00)
9+
set(Idefix_VERSION_PATCH 01)
1010

11-
project (idefix VERSION 2.2.00)
11+
project (idefix VERSION 2.2.01)
1212
option(Idefix_MHD "enable MHD" OFF)
1313
option(Idefix_MPI "enable Message Passing Interface parallelisation" OFF)
1414
option(Idefix_HIGH_ORDER_FARGO "Force Fargo to use a PPM reconstruction scheme" OFF)

doc/python_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ exhale==0.3.7
1414
m2r2==0.3.2
1515
sphinx-copybutton==0.5.2
1616
#sphinxcontrib-applehelp==1.0.7
17+
matplotlib==3.10.0

doc/source/bench.json

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
[
2+
{
3+
"date": "2025-03-04_12:57:12",
4+
"gpumodel": "v100",
5+
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
6+
"bench_commit": "37161676db15115c38fed3f35c94fa447cbac7bd",
7+
"results": [
8+
{
9+
"nbgpu": 1,
10+
"cell_updates": 1.193720E+8
11+
},
12+
{
13+
"nbgpu": 2,
14+
"cell_updates": 1.178864E+8
15+
},
16+
{
17+
"nbgpu": 4,
18+
"cell_updates": 1.155336E+8
19+
},
20+
{
21+
"nbgpu": 8,
22+
"cell_updates": 1.014338E+8
23+
},
24+
{
25+
"nbgpu": 16,
26+
"cell_updates": 9.855007E+7
27+
},
28+
{
29+
"nbgpu": 32,
30+
"cell_updates": 9.012061E+7
31+
},
32+
{
33+
"nbgpu": 64,
34+
"cell_updates": 8.538461E+7
35+
},
36+
{
37+
"nbgpu": 128,
38+
"cell_updates": 8.531021E+7
39+
}
40+
]
41+
},
42+
{
43+
"date": "2025-03-04_13:07:10",
44+
"gpumodel": "a100",
45+
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
46+
"bench_commit": "b536949200e50fac68d8a46d5db38fc8e3f02da5",
47+
"results": [
48+
{
49+
"nbgpu": 1,
50+
"cell_updates": 2.044728E+8
51+
},
52+
{
53+
"nbgpu": 2,
54+
"cell_updates": 2.003563E+8
55+
},
56+
{
57+
"nbgpu": 4,
58+
"cell_updates": 1.963512E+8
59+
},
60+
{
61+
"nbgpu": 8,
62+
"cell_updates": 1.933039E+8
63+
},
64+
{
65+
"nbgpu": 16,
66+
"cell_updates": 9.759154E+7
67+
},
68+
{
69+
"nbgpu": 32,
70+
"cell_updates": 6.369645E+7
71+
},
72+
{
73+
"nbgpu": 64,
74+
"cell_updates": 4.629474E+7
75+
},
76+
{
77+
"nbgpu": 128,
78+
"cell_updates": 4.580281E+7
79+
}
80+
]
81+
},
82+
{
83+
"date": "2025-03-04_13:16:01",
84+
"gpumodel": "h100",
85+
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
86+
"bench_commit": "b536949200e50fac68d8a46d5db38fc8e3f02da5",
87+
"results": [
88+
{
89+
"nbgpu": 1,
90+
"cell_updates": 3.079643E+8
91+
},
92+
{
93+
"nbgpu": 2,
94+
"cell_updates": 3.012300E+8
95+
},
96+
{
97+
"nbgpu": 4,
98+
"cell_updates": 2.944091E+8
99+
},
100+
{
101+
"nbgpu": 8,
102+
"cell_updates": 2.837224E+8
103+
},
104+
{
105+
"nbgpu": 16,
106+
"cell_updates": 2.827778E+8
107+
},
108+
{
109+
"nbgpu": 32,
110+
"cell_updates": 2.822657E+8
111+
},
112+
{
113+
"nbgpu": 64,
114+
"cell_updates": 2.767820E+8
115+
},
116+
{
117+
"nbgpu": 128,
118+
"cell_updates": 2.767322E+8
119+
}
120+
]
121+
},
122+
{
123+
"date": "2025-03-06_11:21:56",
124+
"gpumodel": "mi250x",
125+
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
126+
"bench_commit": "868be0a87c6fcda665cbb62db7020aeff70dc62d",
127+
"results": [
128+
{
129+
"nbgpu": 1,
130+
"cell_updates": 1.436580E+8
131+
},
132+
{
133+
"nbgpu": 2,
134+
"cell_updates": 1.372499E+8
135+
},
136+
{
137+
"nbgpu": 4,
138+
"cell_updates": 1.344528E+8
139+
},
140+
{
141+
"nbgpu": 8,
142+
"cell_updates": 1.293602E+8
143+
},
144+
{
145+
"nbgpu": 16,
146+
"cell_updates": 1.260359E+8
147+
},
148+
{
149+
"nbgpu": 32,
150+
"cell_updates": 1.204980E+8
151+
},
152+
{
153+
"nbgpu": 64,
154+
"cell_updates": 1.163099E+8
155+
},
156+
{
157+
"nbgpu": 128,
158+
"cell_updates": 1.192343E+8
159+
}
160+
]
161+
}
162+
]

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
extensions = [
3636
"sphinx_rtd_theme",
3737
'sphinx_git',
38+
'matplotlib.sphinxext.plot_directive',
3839
"breathe",
3940
"exhale",
4041
"m2r2",

doc/source/faq.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,6 @@ I want to test a modification to *Idefix* source code specific to my problem wit
7373

7474
I want to use a lookup table from a CSV file in my idefix_loop. How could I proceed?
7575
Use the ``LookupTable`` class (see :ref:`LookupTableClass`)
76+
77+
I want to compute a cumulative sum (e.g a column density) on the fly. How could I proceed?
78+
Use the ``Column`` class (see :class:`::Column`)

doc/source/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ Jonah Mauxion
8484
Clément Robert
8585
gitlab integration, linter
8686

87-
Jean Kempf & François Rincon
88-
anisotropic diffusion
87+
Jean Kempf, Victor Reville, François Rincon
88+
anisotropic diffusion and collisionless thermal conduction
89+
90+
Marc Coiffier
91+
Continuous integration, automatic benchmarking
8992

9093
========================
9194
About this documentation

doc/source/modules/braginskii.rst

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Braginskii module
44
===================
55

66
Equations solved and methods
7-
---------------------------
7+
----------------------------
88

99
The ``Braginskii`` module implements the anisotropic heat and momentum fluxes specific
1010
to weakly collisional, magnetised plasma like the intracluster medium
@@ -37,7 +37,7 @@ though adapted to vector quantities.
3737
cell interface by a simple arithmetic average
3838
(Eq. (6)-(7) from Sharma & Hammett 2007).
3939
However in the same paper, the authors showed that this implementation can lead to
40-
unphysical heat flux from high to low temperature regions.
40+
unphysical heat flux from low to high temperature regions.
4141
So we implemented slope limiters for the computation of these transverse heat fluxes,
4242
as described in Eq. (17) from Sharma & Hammett (2007).
4343
Only the van Leer and the Monotonized Central (MC) limiters are available
@@ -72,18 +72,68 @@ of the Braginskii heat flux and viscosity.
7272
7373
.. _braginskiiParameterSection:
7474

75+
76+
Saturation with collisionless heat flux
77+
---------------------------------------
78+
79+
The ``Braginskii`` module can include a collisionless saturation of the Braginskii heat flux, typically due to supra-thermal electrons.
80+
The heat flux is then computed as follows:
81+
82+
:math:`q = \alpha (q_B + q_\perp) + (1-\alpha)\beta*p*v`,
83+
84+
where :math:`\alpha \in [0,1]` controls the transition between the Braginskii heat flux and the collisionless heat flux
85+
and :math:`\beta` controls the amplitude of the collisionless heat flux (typically :math:`\beta \in [1,4]`, see Hollweg 1976).
86+
87+
.. note::
88+
As a result, even with :math:`\kappa_\perp = 0`, the heat flux is no longer necessarilly strictly aligned with the magnetic field.
89+
.. note::
90+
The collisionless heat flux is a hyperbolic term and the diffusion coefficient is set proportional to :math:`\alpha`.
91+
.. note::
92+
If selected, slope limiters are also used in the collisionless flux, where an upwind scheme has been implemented for stability.
93+
.. note::
94+
This saturation has been thought to be used mostly using the userdef function that takes four userdef arrays as input.
95+
7596
Main parameters of the module
7697
-----------------------------
7798

7899
The ``Braginskii`` module can be enabled adding one or two lines in the ``[Hydro]`` section
79-
starting with the keyword
80-
`bragTDiffusion` or/and *bragViscosity*. The following table summarises the different options
100+
starting with the keyword `bragTDiffusion` or/and *bragViscosity*. The following tables summarise the different options
81101
associated to the activation of the Braginskii module:
82102

83103
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
84104
| Column | Entry name | Parameter type | Comment |
85105
+========+=======================+=========================+=======================================================================================+
86-
| 0 | bragModule | string | | Activates Braginskii diffusion. Can be ``bragTDiffusion`` or ``bragViscosity``. |
106+
| 0 | bragTDiffusion | string | | Activates Braginskii thermal diffusion. |
107+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
108+
| 1 | integration | string | | Specifies the type of scheme to be used to integrate the parabolic term. |
109+
| | | | | Can be ``rkl`` or ``explicit``. |
110+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
111+
| 2 | slope limiter | string | | Choose the type of limiter to be used to compute anisotropic transverse flux terms. |
112+
| | | | | Can be ``mc``, ``vanleer`` or ``nolimiter``. |
113+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
114+
| 3 | saturation mode | string | | Include or not collisionless saturation. Can be ``nosat`` or ``wcless``. |
115+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
116+
| 4 | diffusivity type | string | | Specifies the type of diffusivity wanted. Can be ``constant`` or ``userdef``. |
117+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
118+
| 5 | parallel diffusivity | real | | Mandatory if the diffusivity type is ``constant``. Not needed otherwise. |
119+
| | | | | Value of the parallel diffusivity. Should be a real number. |
120+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
121+
| 6 | normal diffusivity | real | | When bragModule ``bragTDiffusion`` and diffusivity type ``constant``, |
122+
| | | | | value of the normal diffusivity. Should be a real number. |
123+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
124+
| 7 | alpha collisionless | real | | If the diffusivity type is ``constant`` and saturation is ``wcless``. |
125+
| | | | | Set to 1 if not provided. |
126+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
127+
| 8 | beta collisionless | real | | If the diffusivity type is ``constant`` and saturation is ``wcless``. |
128+
| | | | | Set to 0 if not provided. |
129+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
130+
131+
for the *bragViscosity*:
132+
133+
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
134+
| Column | Entry name | Parameter type | Comment |
135+
+========+=======================+=========================+=======================================================================================+
136+
| 0 | bragViscosity | string | | Activates Braginskii viscosity. |
87137
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
88138
| 1 | integration | string | | Specifies the type of scheme to be used to integrate the parabolic term. |
89139
| | | | | Can be ``rkl`` or ``explicit``. |
@@ -101,7 +151,7 @@ associated to the activation of the Braginskii module:
101151
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
102152

103153
Numerical checks
104-
---------------
154+
----------------
105155

106156
In Cartesian geometry, the ``Braginskii`` module has been tested with many setups
107157
and in all configurations of magnetic polarisation:
@@ -119,3 +169,5 @@ The same goes for the anisotropic heat flux in Cylindrical/Polar geometry while
119169
the anisotropic viscosity has *never* been tested in this geometry.
120170
In spherical geometry, both ``Braginskii`` operators have been partially validated
121171
(diffusion along the polar axis has not been directly tested).
172+
173+
The collisionless saturation has been tested in 1D and 2D spherical geometry.

0 commit comments

Comments
 (0)