FUSE Introductory Tutorial

Download this tutorial from the FuseExamples repository


NOTE: Julia is a Just In Time (JIT) programming language. The first time something is executed it will take longer because of the compilation process. Subsequent calls the the same code will be blazingly fast.


Import the necessary packages

using Plots # for plotting
using FUSE # this will also import IMAS in the current namespace

Starting from a use-case

FUSE comes with some predefined use-cases, some of which are used for regression testing. Note that some use cases are for non-nuclear experiments and certain Actors like Blankets or BalanceOfPlant will not perform any actions.

FUSE.test_cases
ARC             ini, act = FUSE.case_parameters(:ARC)
CAT             ini, act = FUSE.case_parameters(:CAT)
D3D             ini, act = FUSE.case_parameters(:D3D; scenario=:default)
D3D_Hmode       ini, act = FUSE.case_parameters(:D3D; scenario_sources=true, scenario=:H_mode)
D3D_Lmode       ini, act = FUSE.case_parameters(:D3D; scenario_sources=false, scenario=:L_mode)
DTT             ini, act = FUSE.case_parameters(:DTT)
EXCITE          ini, act = FUSE.case_parameters(:EXCITE)
FPP             ini, act = FUSE.case_parameters(:FPP)
ITER_ods        ini, act = FUSE.case_parameters(:ITER; init_from=:ods)
ITER_scalars    ini, act = FUSE.case_parameters(:ITER; init_from=:scalars)
JET_HDB5        ini, act = FUSE.case_parameters(:HDB5; case=500, tokamak=:JET)
KDEMO           ini, act = FUSE.case_parameters(:KDEMO)
KDEMO_compact   ini, act = FUSE.case_parameters(:KDEMO_compact)
MANTA           ini, act = FUSE.case_parameters(:MANTA)
SPARC           ini, act = FUSE.case_parameters(:SPARC; init_from=:ods)

Get initial parameters (ini) and actions (act) for a given use-case

ini, act = FUSE.case_parameters(:KDEMO);

Modifying ini parameters.

ini.equilibrium.B0 = 7.8
ini.equilibrium.R0 = 6.5;

Modifying act parameters.

act.ActorCoreTransport.model = :FluxMatcher;

Initialize the data dictionary (dd) using the 0D parameters.

NOTE: init() does not return a self-consistent solution, just a plausible starting point to initialize our simulations!

dd = FUSE.init(ini, act);
actors: Equilibrium
actors:  TEQUILA
actors: HCD
actors:  SimpleEC
actors:  SimpleIC
actors:  SimpleLH
actors:  SimpleNB
actors:  SimplePellet
actors: Current
actors:  SteadyStateCurrent
actors: CXbuild
actors: PassiveStructures

Using checkpoints to save and restore states (we'll use this later)

empty!(FUSE.checkpoint)
@checkin :init dd ini act

Exploring the data dictionary

  • FUSE stores data following the IMAS data schema.
  • The root of the data structure is dd, which stands for "Data Dictionary".
  • More details are available in the documentation.

Display part of the equilibrium data in dd

dd.equilibrium.time_slice[2].boundary
boundary
├─ elongation ➡ 1.99926
├─ elongation_lowerFunction
├─ elongation_upperFunction
├─ geometric_axis
│  ├─ r ➡ 6.49971 [m]
│  └─ z ➡ -0.00101717 [m]
├─ minor_radius ➡ 2.00728 [m]
├─ outline
│  ├─ r241-element Vector{Float64} [m]
│  │      min:4.51   avg:6.28   max:8.52 
│  └─ z241-element Vector{Float64} [m]min:-4.08   avg:-0.03   max:3.93 
├─ ovality ➡ 0.00308297
├─ squareness ➡ -0.00753311
├─ squareness_lower_innerFunction
├─ squareness_lower_outerFunction
├─ squareness_upper_innerFunction
├─ squareness_upper_outerFunction
├─ strike_point
│  ├─ 1
│  │  ├─ r ➡ 5.44008 [m]
│  │  └─ z ➡ -5.01853 [m]
│  └─ 2
│     ├─ r ➡ 4.24377 [m]
│     └─ z ➡ -4.48402 [m]
├─ tilt ➡ -0.00645963
├─ triangularity ➡ 0.585259
├─ triangularity_lowerFunction
├─ triangularity_upperFunction
├─ twist ➡ 0.00262375
└─ x_point
   ├─ 1
   │  ├─ r ➡ 5.10505 [m]
   │  └─ z ➡ -4.08783 [m]
   └─ 2
      ├─ r ➡ 4.88353 [m]
      └─ z ➡ 4.34169 [m]

this can be done up to a certain depth with print_tree

print_tree(dd.equilibrium.time_slice[2].boundary; maxdepth=1)
boundary
├─ elongation ➡ 1.99926
├─ elongation_lower ➡ Function
├─ elongation_upper ➡ Function
├─ geometric_axis
│  ⋮
│
├─ minor_radius ➡ 2.00728 [m]
├─ outline
│  ⋮
│
├─ ovality ➡ 0.00308297
├─ squareness ➡ -0.00753311
├─ squareness_lower_inner ➡ Function
├─ squareness_lower_outer ➡ Function
├─ squareness_upper_inner ➡ Function
├─ squareness_upper_outer ➡ Function
├─ strike_point
│  ⋮
│
├─ tilt ➡ -0.00645963
├─ triangularity ➡ 0.585259
├─ triangularity_lower ➡ Function
├─ triangularity_upper ➡ Function
├─ twist ➡ 0.00262375
└─ x_point
   ⋮

Plotting data from dd

FUSE provides Plots.jl recipes for visualizing data from dd, this means different plots are shown by calling the same plot() function on different items in the data structure. Learn more about Plots.jl here

For example plotting the equilibrium...

plot(dd.equilibrium)
Example block output

...or the core profiles

plot(dd.core_profiles)
Example block output

Whant to know what arguments can be passed? use help_plot() function

help_plot(dd.equilibrium; core_profiles_overlay=true, psi_levels_in=21, psi_levels_out=5, show_secondary_separatrix=true, coordinate=:psi_norm)
Example block output

These plots can be composed by calling plot!() instead of plot()

plot(dd.equilibrium; color=:gray, cx=true)
plot!(dd.build; equilibrium=false, pf_active=false)
plot!(dd.pf_active)
Example block output

Plotting an array...

plot(dd.core_profiles.profiles_1d[1].pressure_thermal)
Example block output

...is different from plotting a field from the IDS (which plots the quantity against its coordinate and with units)

plot(dd.core_profiles.profiles_1d[1], :pressure_thermal)
Example block output

Customizing plot attributes:

plot(dd.core_profiles.profiles_1d[1], :pressure_thermal; label="", linewidth=2, color=:red, labelfontsize=25)
Example block output

Working with time series

The IMAS data structure supports time-dependent data, and IMAS.jl provides ways to handle time data efficiently.

Each dd has a global_time attribute, and actors operate at such time

dd.global_time
0.0

Here we see that equilibrium has mulitiple time_slices

dd.equilibrium.time
2-element Vector{Float64}:
 -Inf
   0.0

Accessing time-dependent arrays of structures, via integer index

eqt = dd.equilibrium.time_slice[2]
eqt.time
0.0

At a given time, by passing the time as a floating point number (in seconds)

eqt = dd.equilibrium.time_slice[0.0]
eqt.time
0.0

At the global time, leaving the square brackets empty

eqt = dd.equilibrium.time_slice[]
eqt.time
0.0

Using the @ddtime macro to access and modify time-dependent arrays at dd.global_time:

dd.equilibrium.vacuum_toroidal_field.b0
2-element Vector{Float64}:
 7.80034989842101
 7.80034989842101

Accessing data at dd.global_time

my_b0 = @ddtime(dd.equilibrium.vacuum_toroidal_field.b0)
7.80034989842101

Writin data at dd.global_time

@ddtime(dd.equilibrium.vacuum_toroidal_field.b0 = my_b0 + 1)

dd.equilibrium.vacuum_toroidal_field.b0
2-element Vector{Float64}:
 7.80034989842101
 8.800349898421011

Expressions in dd

Some fields in the data dictionary are expressions (ie. Functions). For example dd.core_profiles.profiles_1d[].pressure is dynamically calculated as the product of thermal densities and temperature with addition of fast ions contributions

print_tree(dd.core_profiles.profiles_1d[1]; maxdepth=1)
1
├─ conductivity_parallel ➡ Function [ohm^-1.m^-1]
├─ electrons
│  ⋮
│
├─ grid
│  ⋮
│
├─ ion
│  ⋮
│
├─ j_bootstrap ➡ 101-element Vector{Float64} [A/m^2]
│                min:8.02e+03   avg:1.71e+05   max:4.68e+05
├─ j_non_inductive ➡ 101-element Vector{Float64} [A/m^2]
│                    min:8.02e+03   avg:8.9e+05   max:5.23e+06
├─ j_ohmic ➡ 101-element Vector{Float64} [A/m^2]
│            min:378   avg:3.59e+05   max:1.15e+06
├─ j_tor ➡ 101-element Vector{Float64} [A/m^2]
│          min:7e+03   avg:1.27e+06   max:6.52e+06
├─ j_total ➡ 101-element Vector{Float64} [A/m^2]
│            min:8.4e+03   avg:1.25e+06   max:6.35e+06
├─ pressure ➡ Function [Pa]
├─ pressure_ion_total ➡ Function [Pa]
├─ pressure_parallel ➡ Function [Pa]
├─ pressure_perpendicular ➡ Function [Pa]
├─ pressure_thermal ➡ Function [Pa]
├─ rotation_frequency_tor_sonic ➡ 101-element Vector{Float64} [s^-1]
│                                 all:0
├─ t_i_average ➡ Function [eV]
├─ time ➡ 0 [s]
└─ zeff ➡ 101-element Vector{Float64}
          all:2

accessing a dynamic expression, automatically evaluates it (in the pressure example, we get an array with data)

dd.core_profiles.profiles_1d[1].electrons.pressure
101-element Vector{Float64}:
 404069.7674418606
 402676.39614741056
 401188.69386268617
 399538.217176196
 397724.14560254384
 395750.4731921339
 393622.078210206
 391343.9022614207
 388920.7411999893
 386357.19999876065
      ⋮
  42719.87665551564
  40586.07330511076
  37459.269373948504
  32406.321396106454
  24688.808073507695
  14967.908148062737
   6626.039795948137
   1990.951110677052
    218.31440777766358

In addition to evaluating expressions by accessing them, expressions in the tree can be evaluated using IMAS.freeze()

print_tree(IMAS.freeze(dd.core_profiles.profiles_1d[1]); maxdepth=1)
profiles_1d
├─ conductivity_parallel ➡ 101-element Vector{Float64} [ohm^-1.m^-1]
│                          min:2.88e+06   avg:4.1e+09   max:1.36e+10
├─ electrons
│  ⋮
│
├─ grid
│  ⋮
│
├─ ion
│  ⋮
│
├─ j_bootstrap ➡ 101-element Vector{Float64} [A/m^2]
│                min:8.02e+03   avg:1.71e+05   max:4.68e+05
├─ j_non_inductive ➡ 101-element Vector{Float64} [A/m^2]
│                    min:8.02e+03   avg:8.9e+05   max:5.23e+06
├─ j_ohmic ➡ 101-element Vector{Float64} [A/m^2]
│            min:378   avg:3.59e+05   max:1.15e+06
├─ j_tor ➡ 101-element Vector{Float64} [A/m^2]
│          min:7e+03   avg:1.27e+06   max:6.52e+06
├─ j_total ➡ 101-element Vector{Float64} [A/m^2]
│            min:8.4e+03   avg:1.25e+06   max:6.35e+06
├─ pressure ➡ 101-element Vector{Float64} [Pa]
│             min:413   avg:4.6e+05   max:9.45e+05
├─ pressure_ion_total ➡ 101-element Vector{Float64} [Pa]
│                       min:195   avg:1.86e+05   max:3.6e+05
├─ pressure_parallel ➡ 101-element Vector{Float64} [Pa]
│                      min:138   avg:1.53e+05   max:3.15e+05
├─ pressure_perpendicular ➡ 101-element Vector{Float64} [Pa]
│                           min:138   avg:1.53e+05   max:3.15e+05
├─ pressure_thermal ➡ 101-element Vector{Float64} [Pa]
│                     min:413   avg:3.95e+05   max:7.65e+05
├─ rotation_frequency_tor_sonic ➡ 101-element Vector{Float64} [s^-1]
│                                 all:0
├─ t_i_average ➡ 101-element Vector{Float64} [eV]
│                min:80   avg:1.48e+04   max:2.64e+04
├─ time ➡ 0 [s]
└─ zeff ➡ 101-element Vector{Float64}
          all:2

Whole facility design

Here we restore the :init checkpoint that we had previously stored. Resetting any changes to dd, ini, and act that we did in the meantime.

@checkout :init dd ini act

Actors in FUSE can be executed by passing two arguments to them: dd and act. Internally, actors can call other actors, creating workflows. For example, the ActorWholeFacility can be used to to get a self-consistent stationary whole facility design. The actors: print statements with their nested output tell us what actors are calling other actors.

FUSE.ActorWholeFacility(dd, act);
nothing #hide

Like before we can checkpoint results for later use

@checkin :awf dd ini act

Running a custom workflow

Let's now run a series of actors similar to what ActorWholeFacility does and play around with plotting to get a sense of what each individual actor does.

Let's start again from after the initialization stage

@checkout :init dd ini act

Let's start by positioning the PF coils, so that we stand a chance to reproduce the desired plasma shape. This will be important to ensure the stability of the ActorStationaryPlasma that we are going to run next.

actor = FUSE.ActorPFdesign(dd, act);
actors: PFdesign

The ActorStationaryPlasma iterates between plasma transport, pedestal, equilibrium and sources to return a self-consistent plasma solution

peq = plot(dd.equilibrium; label="before")
pcp = plot(dd.core_profiles; color=:gray, label="before")
FUSE.ActorStationaryPlasma(dd, act);
nothing #hide

we can compare equilibrium before and after the self-consistency loop

plot!(peq, dd.equilibrium; label="after")
Example block output

we can compare core_profiles before and after the self-consistency loop

plot!(pcp, dd.core_profiles; label="after")
Example block output

here are the sources

plot(dd.core_sources)
Example block output

and the flux-matched transport

plot(dd.core_transport)
Example block output

HFS sizing actor changes the thickness of the OH and TF layers on the high field side to satisfy current and stresses constraints

plot(dd.build)
FUSE.ActorHFSsizing(dd, act);
plot!(dd.build; cx=false)

The stresses on the center stack are stored in the solid_mechanics IDS

plot(dd.solid_mechanics.center_stack.stress)

LFS sizing actors change location of the outer TF leg to meet ripple requirements

plot(dd.build)
FUSE.ActorLFSsizing(dd, act);
plot!(dd.build; cx=false)
Example block output

A custom show() method is defined to print the summary of dd.build.layer

dd.build.layer
24×10 DataFrame
 Row │ group   details                            type      ΔR          R_start   R_end     material      area        volume     shape
     │ String  String                             String    Float64     Float64   Float64   String        Float64     Float64    String
─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ in                                                   1.68288      0.0       1.68288  steel          22.2098     107.051
   2 │ in                                         oh        1.02879      1.68288   2.71167  nb3sn           7.70459     87.1544
   3 │ hfs                                        tf        0.511494     2.71167   3.22317  nb3sn_kdemo    45.381      919.044   convex hull
   4 │ hfs     gap tf vacuum vessel                         0.0960705    3.22317   3.31924  vacuum         14.6305     779.057   double ellipse
   5 │ hfs     vacuum  outer                      vessel    0.0960705    3.31924   3.41531  steel           3.13352    127.129   negative offset
   6 │ hfs     gap water                                    0.144106     3.41531   3.55941  water           4.59152    186.415   negative offset
   7 │ hfs     vacuum  inner                      vessel    0.0960705    3.55941   3.65548  steel           2.9885     121.424   negative offset
   8 │ hfs     gap high temp shield vacuum vess…            0.00960705   3.65548   3.66509  vacuum          0.295659    12.0169  negative offset
   9 │ hfs     high temp                          shield    0.192141     3.66509   3.85723  steel           5.79137    235.545   negative offset
  10 │ hfs                                        blanket   0.365068     3.85723   4.2223   lithium_lead   22.6154    1015.17    negative offset
  11 │ hfs     first                              wall      0.0192141    4.2223    4.24151  tungsten        0.81387     29.4331  offset
  12 │ lhfs                                       plasma    4.55071      4.24151   8.79222  plasma         34.7526    1360.62
  13 │ lfs     first                              wall      0.0192141    8.79222   8.81144  tungsten        0.812886    29.402   offset
  14 │ lfs                                        blanket   1.15285      8.81144   9.96429  lithium_lead   22.6164    1015.2     negative offset
  15 │ lfs     high temp                          shield    0.192141     9.96429  10.1564   steel           5.79137    235.545   negative offset
  16 │ lfs     gap high temp shield vacuum vess…            0.111204    10.1564   10.2676   vacuum          0.295659    12.0169  negative offset
  17 │ lfs     vacuum  inner                      vessel    0.0960705   10.2676   10.3637   steel           2.9885     121.424   negative offset
  18 │ lfs     gap water                                    0.144106    10.3637   10.5078   water           4.59152    186.415   negative offset
  19 │ lfs     vacuum  outer                      vessel    0.0960705   10.5078   10.6039   steel           3.13352    127.129   negative offset
  20 │ lfs     gap tf vacuum vessel                         0.757997    10.6039   11.3619   vacuum         14.6305     779.057   double ellipse
  21 │ lfs                                        tf        0.511494    11.3619   11.8734   nb3sn_kdemo    45.381      919.044   convex hull
  22 │ out                                                  1.92141     11.8734   13.7948   vacuum        114.339     6591.64
  23 │ out                                        cryostat  0.0960705   13.7948   13.8908   steel           4.64448    294.895   silo
  24 │ out                                                  0.960705    13.8908   14.8516   vacuum         48.4753    3201.35

ActorHFSsizing and ActorLFSsizing only change the layer's thicknesses, so we then need to trigger a build of the 2D cross-sections after them:

FUSE.ActorCXbuild(dd, act);
plot(dd.build)
Example block output

Generate passive structures information (for now the vacuum vessel)

FUSE.ActorPassiveStructures(dd, act)
plot(dd.pf_passive)
Example block output

We can now give the PF coils their final position given the new build

actor = FUSE.ActorPFdesign(dd, act);
plot(actor)
Example block output

With information about both pfactive and pfpassive we can now evaluate vertical stability

FUSE.ActorVerticalStability(dd, act)
IMAS.freeze(dd.mhd_linear)
mhd_linear
├─ time[0] [s]
└─ time_slice
   └─ 1
      ├─ time ➡ 0 [s]
      └─ toroidal_mode
         ├─ 1
         │  ├─ growthrate ➡ 0.11825 [Hz]
         │  ├─ n_tor0
         │  └─ perturbation_type
         │     ├─ description"Vertical stability margin, > 0.15 for stability (N.B., not in Hz)"
         │     └─ name"m_s"
         └─ 2
            ├─ growthrate ➡ 10.444 [Hz]
            ├─ n_tor0
            └─ perturbation_type
               ├─ description"Normalized vertical growth rate, < 10 for stability (N.B., not in Hz)"
               └─ name"γτ"

The ActorNeutronics calculates the heat flux on the first wall

FUSE.ActorNeutronics(dd, act);
p = plot(; layout=2, size=(900, 350))
plot!(p, dd.neutronics.time_slice[].wall_loading, subplot=1)
plot!(p, FUSE.define_neutrons(dd, 100000)[1], dd.equilibrium.time_slice[]; subplot=1, colorbar_entry=false)
plot!(p, dd.neutronics.time_slice[].wall_loading; cx=false, subplot=2, ylabel="")
Example block output

The ActorBlanket will change the thickess of the first wall, breeder, shield, and Li6 enrichment to achieve target TBR

FUSE.ActorBlanket(dd, act);
print_tree(IMAS.freeze(dd.blanket); maxdepth=5)
actors: Blanket
actors:  CXbuild
blanket
├─ module
│  └─ 1
│     ├─ layer
│     │  ├─ 1
│     │  │  ├─ material ➡ "tungsten"
│     │  │  ├─ midplane_thickness ➡ 0.195005 [m]
│     │  │  └─ name ➡ "lfs first wall"
│     │  ├─ 2
│     │  │  ├─ material ➡ "lithium-lead: Li6/7=100.000"
│     │  │  ├─ midplane_thickness ➡ 1.15285 [m]
│     │  │  └─ name ➡ "lfs blanket"
│     │  └─ 3
│     │     ├─ material ➡ "steel"
│     │     ├─ midplane_thickness ➡ 1.49218 [m]
│     │     └─ name ➡ "lfs high temp shield"
│     ├─ name ➡ "blanket"
│     └─ time_slice
│        └─ 1
│           ├─ peak_escape_flux ➡ 952109 [W/m^2]
│           ├─ peak_wall_flux ➡ 2.56731e+06 [W/m^2]
│           ├─ power_incident_neutrons ➡ 2.76935e+08 [W]
│           ├─ power_incident_radiated ➡ 0 [W]
│           ├─ power_thermal_extracted ➡ 3.32322e+08 [W]
│           ├─ power_thermal_neutrons ➡ 3.32322e+08 [W]
│           ├─ power_thermal_radiated ➡ 0 [W]
│           ├─ time ➡ 0 [s]
│           └─ tritium_breeding_ratio ➡ 1.19785
├─ time ➡ [0] [s]
└─ tritium_breeding_ratio ➡ [1.14117]

The ActorDivertors actor calculates the divertors heat flux

FUSE.ActorDivertors(dd, act);
print_tree(IMAS.freeze(dd.divertors); maxdepth=4)
actors: Divertors
divertors
├─ divertor
│  └─ 1
│     ├─ power_conducted
│     │  ├─ data ➡ [1.27961e+08] [W]
│     │  └─ time ➡ [0] [s]
│     ├─ power_convected
│     │  ├─ data ➡ [0] [W]
│     │  └─ time ➡ [0] [s]
│     ├─ power_incident
│     │  ├─ data ➡ [2.1999e+07] [W]
│     │  └─ time ➡ [0] [s]
│     ├─ power_thermal_extracted
│     │  ├─ data ➡ [2.1999e+07] [W]
│     │  └─ time ➡ [0] [s]
│     └─ target
│        ├─ 1
│        │  ⋮
│        │
│        └─ 2
│           ⋮
│
└─ time ➡ [0] [s]

The ActorBalanceOfPlant calculates the optimal cooling flow rates for the heat sources (breeder, divertor, and wall) and get an efficiency for the electricity conversion cycle

actor = FUSE.ActorBalanceOfPlant(dd, act);
actors: BalanceOfPlant
actors:  ThermalPlant
actors:  PowerNeeds

plot(actor)

ActorCosting will break down the capital and operational costs

FUSE.ActorCosting(dd, act)
plot(dd.costing)
Example block output

Let's checkpoint our results

@checkin :manual dd ini act

Saving and loading data

tutorial_temp_dir = tempdir()
filename = joinpath(tutorial_temp_dir, "$(ini.general.casename).json")
"/tmp/K-DEMO.json"

When saving data to be shared outside of FUSE, one can set freeze=true so that all expressions in the dd are evaluated and saved to file.

IMAS.imas2json(dd, filename; freeze=false, strict=false);

Load from JSON

dd1 = IMAS.json2imas(filename);

Comparing two IDSs

We can introduce a change in the dd1 and spot it with the diff function

dd1.equilibrium.time_slice[1].time = -100.0
IMAS.diff(dd.equilibrium, dd1.equilibrium)
Dict{String, String} with 1 entry:
  "time_slice[1].time" => "value:  -Inf --  -100.0"

Summary

Snapshot of dd in 0D quantities (evaluated at dd.global_time)

FUSE.extract(dd)
GEOMETRY                               EQUILIBRIUM                            TEMPERATURES                           
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────    
R0 → 6.5 [m]                           B0 → 7.8 [T]                           Te0 → 17.6 [keV]                       
a → 2.01 [m]                           ip → 13.1 [MA]                         Ti0 → 17.1 [keV]                       
1/ϵ → 3.24                             q95 → 7.29                             <Te> → 9.85 [keV]                      
κ → 2                                  <Bpol> → 0.827 [T]                     <Ti> → 8.85 [keV]                      
δ → 0.585                              βpol_MHD → 0.943                       Te0/<Te> → 1.79                        
ζ → -0.00753                           βtor_MHD → 0.0102                      Ti0/<Ti> → 1.93                        
Volume → 969 [m³]                      βn_MHD → 1.23                                                                 
Surface → 780 [m²]                                                                                                   
                                                                                                                     
DENSITIES                              PRESSURES                              TRANSPORT                              
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────    
ne0 → 8.53e+19 [m⁻³]                   P0 → 0.51 [MPa]                        τe → 2.04 [s]                          
ne_ped → 6.93e+19 [m⁻³]                <P> → 0.25 [MPa]                       τe_exp → 2.71 [s]                      
ne_line → 8.43e+19 [m⁻³]               P0/<P> → 2.03                          H98y2 → 0.91                           
<ne> → 8.07e+19 [m⁻³]                  βn → 1.21                              H98y2_exp → 0.994                      
ne0/<ne> → 1.06                        βn_th → 1.15                           Hds03 → 0.64                           
fGW → 0.813                                                                   Hds03_exp → 0.728                      
zeff_ped → 2                                                                  τα_thermalization → 0.816 [s]          
<zeff> → 2                                                                    τα_slowing_down → 0.973 [s]            
impurities → DT Ne20 He4                                                                                             
                                                                                                                     
SOURCES                                EXHAUST                                CURRENTS                               
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────    
Pec → 50 [MW]                          Psol → 128 [MW]                        ip_bs_aux_ohm → 13.3 [MA]              
rho0_ec → 0.5 [MW]                     PLH → 72.3 [MW]                        ip_ni → 7.63 [MA]                      
PnbiNaN [MW]                        Bpol_omp → 1.52 [T]                    ip_bs → 3.15 [MA]                      
Enbi1NaN [MeV]                      λq → 0.737 [mm]                        ip_aux → 4.48 [MA]                     
Pic → 50 [MW]                          qpol → 3.24e+03 [MW/m²]                ip_ohm → 5.64 [MA]                     
PlhNaN [MW]                         qpar → 1.31e+04 [MW/m²]                ejima → 0.4                            
Paux_tot → 100 [MW]                    P/R0 → 19.7 [MW/m]                     flattopNaN [Hours]                  
 → 72.7 [MW]                         PB/R0 → 154 [MW T/m]                                                          
PohmNaN [MW]                        PBp/R0 → 16.3 [MW T/m]                                                        
PheatNaN [MW]                       PBϵ/R0q95 → 6.51 [MW T/m]                                                     
Prad_tot → -42.5 [MW]                  neutrons_peak → 0.466 [MW/m²]                                                 
                                                                                                                     
BOP                                    BUILD                                  COSTING                                
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────    
Pfusion → 363 [MW]                     PF_material → nb3sn                    capital_cost → 6.48 [$B]               
Qfusion → 3.63                         TF_material → nb3sn_kdemo              levelized_CoE → Inf [$/kWh]            
thermal_cycle_type → rankine           OH_material → nb3sn                    TF_of_total → 12.8 [%]                 
thermal_efficiency_plant → 36.5 [%]    TF_max_bNaN [T]                     BOP_of_total → 5.5 [%]                 
thermal_efficiency_cycleNaN [%]     OH_max_bNaN [T]                     blanket_of_total → 19.8 [%]            
power_electric_generated → 145 [MW]    TF_j_marginNaN                      cryostat_of_total → 2.5 [%]            
Pelectric_net → -0.337 [MW]            OH_j_marginNaN                                                             
Qplant → 0.998                         TF_stress_marginNaN                                                        
TBR → 1.14                             OH_stress_marginNaN                                                        
                                                                                                                     

Extract + plots saved to PDF (or printed to screen it filename is omitted)

filename = joinpath(tutorial_temp_dir, "$(ini.general.casename).pdf")
FUSE.digest(dd)#, filename)
GEOMETRY                               EQUILIBRIUM                            TEMPERATURES
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────
R0 → 6.5 [m]                           B0 → 7.8 [T]                           Te0 → 17.6 [keV]
a → 2.01 [m]                           ip → 13.1 [MA]                         Ti0 → 17.1 [keV]
1/ϵ → 3.24                             q95 → 7.29                             <Te> → 9.85 [keV]
κ → 2                                  <Bpol> → 0.827 [T]                     <Ti> → 8.85 [keV]
δ → 0.585                              βpol_MHD → 0.943                       Te0/<Te> → 1.79
ζ → -0.00753                           βtor_MHD → 0.0102                      Ti0/<Ti> → 1.93
Volume → 969 [m³]                      βn_MHD → 1.23
Surface → 780 [m²]

DENSITIES                              PRESSURES                              TRANSPORT
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────
ne0 → 8.53e+19 [m⁻³]                   P0 → 0.51 [MPa]                        τe → 2.04 [s]
ne_ped → 6.93e+19 [m⁻³]                <P> → 0.25 [MPa]                       τe_exp → 2.71 [s]
ne_line → 8.43e+19 [m⁻³]               P0/<P> → 2.03                          H98y2 → 0.91
<ne> → 8.07e+19 [m⁻³]                  βn → 1.21                              H98y2_exp → 0.994
ne0/<ne> → 1.06                        βn_th → 1.15                           Hds03 → 0.64
fGW → 0.813                                                                   Hds03_exp → 0.728
zeff_ped → 2                                                                  τα_thermalization → 0.816 [s]
<zeff> → 2                                                                    τα_slowing_down → 0.973 [s]
impurities → DT Ne20 He4

SOURCES                                EXHAUST                                CURRENTS
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────
Pec → 50 [MW]                          Psol → 128 [MW]                        ip_bs_aux_ohm → 13.3 [MA]
rho0_ec → 0.5 [MW]                     PLH → 72.3 [MW]                        ip_ni → 7.63 [MA]
Pnbi → NaN [MW]                        Bpol_omp → 1.52 [T]                    ip_bs → 3.15 [MA]
Enbi1 → NaN [MeV]                      λq → 0.737 [mm]                        ip_aux → 4.48 [MA]
Pic → 50 [MW]                          qpol → 3.24e+03 [MW/m²]                ip_ohm → 5.64 [MA]
Plh → NaN [MW]                         qpar → 1.31e+04 [MW/m²]                ejima → 0.4
Paux_tot → 100 [MW]                    P/R0 → 19.7 [MW/m]                     flattop → NaN [Hours]
Pα → 72.7 [MW]                         PB/R0 → 154 [MW T/m]
Pohm → NaN [MW]                        PBp/R0 → 16.3 [MW T/m]
Pheat → NaN [MW]                       PBϵ/R0q95 → 6.51 [MW T/m]
Prad_tot → -42.5 [MW]                  neutrons_peak → 0.466 [MW/m²]

BOP                                    BUILD                                  COSTING
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────
Pfusion → 363 [MW]                     PF_material → nb3sn                    capital_cost → 6.48 [$B]
Qfusion → 3.63                         TF_material → nb3sn_kdemo              levelized_CoE → Inf [$/kWh]
thermal_cycle_type → rankine           OH_material → nb3sn                    TF_of_total → 12.8 [%]
thermal_efficiency_plant → 36.5 [%]    TF_max_b → NaN [T]                     BOP_of_total → 5.5 [%]
thermal_efficiency_cycle → NaN [%]     OH_max_b → NaN [T]                     blanket_of_total → 19.8 [%]
power_electric_generated → 145 [MW]    TF_j_margin → NaN                      cryostat_of_total → 2.5 [%]
Pelectric_net → -0.337 [MW]            OH_j_margin → NaN
Qplant → 0.998                         TF_stress_margin → NaN
TBR → 1.14                             OH_stress_margin → NaN

@ time = 0.0 [s]
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
GKS: could not find font middle.ttf
​
​
​