Update README.md to include finite beta explanation and example code
Browse files
README.md
CHANGED
|
@@ -550,6 +550,8 @@ size_categories:
|
|
| 550 |
|
| 551 |
A dataset of diverse quasi-isodynamic (QI) stellarator boundary shapes with corresponding performance metrics and ideal magneto-hydrodynamic (MHD) equilibria, as well as settings for their generation.
|
| 552 |
|
|
|
|
|
|
|
| 553 |
## Dataset Details
|
| 554 |
|
| 555 |
### Dataset Description
|
|
@@ -557,6 +559,7 @@ A dataset of diverse quasi-isodynamic (QI) stellarator boundary shapes with corr
|
|
| 557 |
<!-- Provide a longer summary of what this dataset is. -->
|
| 558 |
|
| 559 |
Stellarators are magnetic confinement devices that are being pursued to deliver steady-state carbon-free fusion energy. Their design involves a high-dimensional, constrained optimization problem that requires expensive physics simulations and significant domain expertise. Specifically, QI-stellarators are seen as a promising path to commercial fusion due to their intrinsic avoidance of current-driven disruptions.
|
|
|
|
| 560 |
With the release of this dataset, we aim to lower the barrier for optimization and machine learning researchers to contribute to stellarator design, and to accelerate cross-disciplinary progress toward bringing fusion energy to the grid.
|
| 561 |
|
| 562 |
- **Curated by:** Proxima Fusion
|
|
@@ -576,8 +579,46 @@ With the release of this dataset, we aim to lower the barrier for optimization a
|
|
| 576 |
|
| 577 |
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
|
| 578 |
|
| 579 |
-
|
| 580 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 581 |
<table>
|
| 582 |
<tr>
|
| 583 |
<th style="border-right: 1px solid gray;">default</th>
|
|
@@ -585,22 +626,59 @@ The dataset consists of 2 tabular parts. Both parts have a column `plasma_config
|
|
| 585 |
</tr>
|
| 586 |
<tr>
|
| 587 |
<td style="border-right: 1px solid gray;">
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
</
|
| 598 |
-
|
| 599 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 600 |
</tr>
|
| 601 |
</table>
|
| 602 |
|
| 603 |
-
|
| 604 |
|
| 605 |
## Uses
|
| 606 |
|
|
@@ -806,6 +884,7 @@ from constellaration.utils import visualization
|
|
| 806 |
visualization.plot_flux_surfaces(vmecpp_wout, boundary)
|
| 807 |
```
|
| 808 |

|
|
|
|
| 809 |
Save ideal MHD equilibrium to *VMEC2000 WOut* file:
|
| 810 |
```python
|
| 811 |
import pathlib
|
|
@@ -813,6 +892,43 @@ from constellaration.utils import file_exporter
|
|
| 813 |
|
| 814 |
file_exporter.to_vmec2000_wout_file(vmecpp_wout, pathlib.Path("vmec2000_wout.nc"))
|
| 815 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 816 |
|
| 817 |
## Dataset Creation
|
| 818 |
|
|
|
|
| 550 |
|
| 551 |
A dataset of diverse quasi-isodynamic (QI) stellarator boundary shapes with corresponding performance metrics and ideal magneto-hydrodynamic (MHD) equilibria, as well as settings for their generation.
|
| 552 |
|
| 553 |
+
The performance metrics and ideal MHD equilibria were evaluated under vacuum (default) and with plasma inside (finite beta).
|
| 554 |
+
|
| 555 |
## Dataset Details
|
| 556 |
|
| 557 |
### Dataset Description
|
|
|
|
| 559 |
<!-- Provide a longer summary of what this dataset is. -->
|
| 560 |
|
| 561 |
Stellarators are magnetic confinement devices that are being pursued to deliver steady-state carbon-free fusion energy. Their design involves a high-dimensional, constrained optimization problem that requires expensive physics simulations and significant domain expertise. Specifically, QI-stellarators are seen as a promising path to commercial fusion due to their intrinsic avoidance of current-driven disruptions.
|
| 562 |
+
|
| 563 |
With the release of this dataset, we aim to lower the barrier for optimization and machine learning researchers to contribute to stellarator design, and to accelerate cross-disciplinary progress toward bringing fusion energy to the grid.
|
| 564 |
|
| 565 |
- **Curated by:** Proxima Fusion
|
|
|
|
| 579 |
|
| 580 |
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
|
| 581 |
|
| 582 |
+
There are 6 tuples of datasets, one for each percentage of volume-averaged plasma inside the boundary:
|
| 583 |
+
<table>
|
| 584 |
+
<tr>
|
| 585 |
+
<th>Condition</th>
|
| 586 |
+
<th>Boundaries, Metrics, Generation Settings, Misc</th>
|
| 587 |
+
<th>Ideal MHD Equilibira</th>
|
| 588 |
+
</tr>
|
| 589 |
+
<tr>
|
| 590 |
+
<th>Vacuum</th>
|
| 591 |
+
<th>default</th>
|
| 592 |
+
<th>vmecpp_wout</th>
|
| 593 |
+
</tr>
|
| 594 |
+
<tr>
|
| 595 |
+
<th>1% Beta</th>
|
| 596 |
+
<th>finte_beta_1pct</th>
|
| 597 |
+
<th>vmecpp_wout_finite_beta_1pct</th>
|
| 598 |
+
</tr>
|
| 599 |
+
<tr>
|
| 600 |
+
<th>2% Beta</th>
|
| 601 |
+
<th>finte_beta_2pct</th>
|
| 602 |
+
<th>vmecpp_wout_finite_beta_2pct</th>
|
| 603 |
+
</tr>
|
| 604 |
+
<tr>
|
| 605 |
+
<th>3% Beta</th>
|
| 606 |
+
<th>finte_beta_3pct</th>
|
| 607 |
+
<th>vmecpp_wout_finite_beta_3pct</th>
|
| 608 |
+
</tr>
|
| 609 |
+
<tr>
|
| 610 |
+
<th>4% Beta</th>
|
| 611 |
+
<th>finte_beta_4pct</th>
|
| 612 |
+
<th>vmecpp_wout_finite_beta_4pct</th>
|
| 613 |
+
</tr>
|
| 614 |
+
<tr>
|
| 615 |
+
<th>5% Beta</th>
|
| 616 |
+
<th>finte_beta_5pct</th>
|
| 617 |
+
<th>vmecpp_wout_finite_beta_5pct</th>
|
| 618 |
+
</tr>
|
| 619 |
+
</table>
|
| 620 |
+
<br>
|
| 621 |
+
Contents of datasets:
|
| 622 |
<table>
|
| 623 |
<tr>
|
| 624 |
<th style="border-right: 1px solid gray;">default</th>
|
|
|
|
| 626 |
</tr>
|
| 627 |
<tr>
|
| 628 |
<td style="border-right: 1px solid gray;">
|
| 629 |
+
Contains information about:
|
| 630 |
+
<ul>
|
| 631 |
+
<li>Plasma boundaries</li>
|
| 632 |
+
<li>Ideal MHD metrics in vacuum</li>
|
| 633 |
+
<li>Omnigenous field and targets, used as input for sampling of plasma boundaries</li>
|
| 634 |
+
<li>Sampling settings for various methods (DESC, VMEC, QP initialization, Near-axis expansion)</li>
|
| 635 |
+
<li>Miscellaneous information about errors that might have occurred during sampling or metrics computation.</li>
|
| 636 |
+
<li>Miscellaneous information
|
| 637 |
+
<ul>
|
| 638 |
+
<li>the corresponding ideal MHD equilibrium ID in <b>vmecpp_wout</b></li>
|
| 639 |
+
<li>errors that might have occurred during sampling or metrics computation.</li>
|
| 640 |
+
</ul>
|
| 641 |
+
</li>
|
| 642 |
+
</ul>
|
| 643 |
+
</td>
|
| 644 |
+
<td>
|
| 645 |
+
Contains:
|
| 646 |
+
<ul>
|
| 647 |
+
<li>For each plasma boundary in <b>default</b>, a JSON-string representation of the "WOut" file as obtained when running VMEC, initialized on the boundary.<br>The JSON representation can be converted to a VMEC2000 output file.</li>
|
| 648 |
+
<li>The corresponding plasma configuration ID in <b>default</b></li>
|
| 649 |
+
</ul>
|
| 650 |
+
</td>
|
| 651 |
+
</tr>
|
| 652 |
+
<tr>
|
| 653 |
+
<td colspan="2">
|
| 654 |
+
The <b>default</b> (vacuum) subset above is special in the sense that it contains more information than the other subsets (finite betas) below. Those are derived from the <b>default</b> (vacuum) subset by setting for each plasma boundary the respective volume-averaged beta percentage and re-computing the performance metrics and ideal MHD equilibria:
|
| 655 |
+
</td>
|
| 656 |
+
</tr>
|
| 657 |
+
<tr>
|
| 658 |
+
<th style="border-right: 1px solid gray;">finite_beta_*pct</th>
|
| 659 |
+
<th>vmecpp_wout_finite_beta_*pct</th>
|
| 660 |
+
</tr>
|
| 661 |
+
<tr>
|
| 662 |
+
<td style="border-right: 1px solid gray;">
|
| 663 |
+
Contains information about:
|
| 664 |
+
<ul>
|
| 665 |
+
<li>Ideal MHD metrics with plasma</li>
|
| 666 |
+
<li>Miscellaneous information
|
| 667 |
+
<ul>
|
| 668 |
+
<li>the corresponding source plasma configuration ID in <b>default</b></li>
|
| 669 |
+
<li>the corresponding ideal MHD equilibrium ID in <b>vmecpp_wout_finite_beta_*pct</b></li>
|
| 670 |
+
<li>errors that might have occurred metrics computation.</li>
|
| 671 |
+
</ul>
|
| 672 |
+
</li>
|
| 673 |
+
</ul>
|
| 674 |
+
</td>
|
| 675 |
+
<td>
|
| 676 |
+
Same as <b>vmecpp_wout</b> above, corresponding to <b>finite_beta_*pct</b>
|
| 677 |
+
</td>
|
| 678 |
</tr>
|
| 679 |
</table>
|
| 680 |
|
| 681 |
+
For each of the components above there is an identifier column (ending with `.id`), a JSON column containing a JSON-string representation, as well as one column per leaf in the nested JSON structure (with `.` separating the keys on the JSON path to the respective leaf).
|
| 682 |
|
| 683 |
## Uses
|
| 684 |
|
|
|
|
| 884 |
visualization.plot_flux_surfaces(vmecpp_wout, boundary)
|
| 885 |
```
|
| 886 |

|
| 887 |
+
|
| 888 |
Save ideal MHD equilibrium to *VMEC2000 WOut* file:
|
| 889 |
```python
|
| 890 |
import pathlib
|
|
|
|
| 892 |
|
| 893 |
file_exporter.to_vmec2000_wout_file(vmecpp_wout, pathlib.Path("vmec2000_wout.nc"))
|
| 894 |
```
|
| 895 |
+
Match the boundaries from the **default** dataset to the corresponding metrics under a certain plasma condition:
|
| 896 |
+
```python
|
| 897 |
+
import datasets
|
| 898 |
+
|
| 899 |
+
# Load default dataset to get the boundaries
|
| 900 |
+
default_ds = datasets.load_dataset(
|
| 901 |
+
"proxima-fusion/constellaration",
|
| 902 |
+
split="train",
|
| 903 |
+
num_proc=4,
|
| 904 |
+
)
|
| 905 |
+
|
| 906 |
+
# Load finite beta 3% dataset
|
| 907 |
+
finite_beta_3pct_ds = datasets.load_dataset(
|
| 908 |
+
"proxima-fusion/constellaration",
|
| 909 |
+
name="finite_beta_3pct",
|
| 910 |
+
split="train",
|
| 911 |
+
num_proc=4,
|
| 912 |
+
)
|
| 913 |
+
|
| 914 |
+
# Join the two datasets on plasma_config_id <-> misc.source_plasma_config_id
|
| 915 |
+
default_df = (
|
| 916 |
+
default_ds
|
| 917 |
+
.to_pandas()
|
| 918 |
+
.set_index("plasma_config_id")
|
| 919 |
+
.filter(like="boundary.")
|
| 920 |
+
)
|
| 921 |
+
finite_beta_3pct_df = (
|
| 922 |
+
finite_beta_3pct_ds
|
| 923 |
+
.to_pandas()
|
| 924 |
+
.set_index("misc.source_plasma_config_id")
|
| 925 |
+
)
|
| 926 |
+
finite_beta_3pct_with_boundaries_df = (
|
| 927 |
+
finite_beta_3pct_df
|
| 928 |
+
.join(default_df, how="inner") # joins on index
|
| 929 |
+
.reset_index(names="misc.source_plasma_config_id")
|
| 930 |
+
)
|
| 931 |
+
```
|
| 932 |
|
| 933 |
## Dataset Creation
|
| 934 |
|