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

We can @checkin and @checkout variables with an associated tag.

This is handy to save and restore our progress (we'll use this later).

@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.27   max:8.52 
│  └─ z241-element Vector{Float64} [m]min:-4.04   avg:-0.0295   max:3.89 
├─ ovality ➡ 0.00308297
├─ squareness ➡ -0.00753311
├─ squareness_lower_innerFunction
├─ squareness_lower_outerFunction
├─ squareness_upper_innerFunction
├─ squareness_upper_outerFunction
├─ strike_point
│  ├─ 1
│  │  ├─ r ➡ 5.50924 [m]
│  │  └─ z ➡ -4.91359 [m]
│  └─ 2
│     ├─ r ➡ 4.30003 [m]
│     └─ z ➡ -4.59874 [m]
├─ tilt ➡ -0.00645963
├─ triangularity ➡ 0.585259
├─ triangularity_lowerFunction
├─ triangularity_upperFunction
├─ twist ➡ 0.00262375
└─ x_point
   ├─ 1
   │  ├─ r ➡ 5.13542 [m]
   │  └─ z ➡ -4.05302 [m]
   └─ 2
      ├─ r ➡ 4.90576 [m]
      └─ z ➡ 4.30741 [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 uses Plots.jl recipes for visualizing data from dd.

This allows different plots to be shown when calling plot() 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:3.3e+03   avg:1.56e+05   max:1.95e+05
├─ j_non_inductive ➡ 101-element Vector{Float64} [A/m^2]
│                    min:3.3e+03   avg:8.39e+05   max:4.98e+06
├─ j_ohmic ➡ 101-element Vector{Float64} [A/m^2]
│            min:535   avg:4.54e+05   max:1.53e+06
├─ j_tor ➡ 101-element Vector{Float64} [A/m^2]
│          min:3.23e+03   avg:1.31e+06   max:6.65e+06
├─ j_total ➡ 101-element Vector{Float64} [A/m^2]
│            min:3.84e+03   avg:1.29e+06   max:6.48e+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}:
 382161.41109300684
 380830.63957078604
 379391.591101457
 377782.55757196713
 376004.2172426514
 374061.3354757094
 371959.28457999736
 369703.3617717455
 367298.6384800007
 364749.9444273129
      ⋮
  19912.277704598586
  18499.461216714055
  16815.06186436015
  14478.45803169503
  11093.81383850173
   6816.64842006658
   3120.9952290519527
   1038.1040174980417
    218.37794919600034

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.87e+06   avg:3.62e+09   max:1.25e+10
├─ electrons
│  ⋮
│
├─ grid
│  ⋮
│
├─ ion
│  ⋮
│
├─ j_bootstrap ➡ 101-element Vector{Float64} [A/m^2]
│                min:3.3e+03   avg:1.56e+05   max:1.95e+05
├─ j_non_inductive ➡ 101-element Vector{Float64} [A/m^2]
│                    min:3.3e+03   avg:8.39e+05   max:4.98e+06
├─ j_ohmic ➡ 101-element Vector{Float64} [A/m^2]
│            min:535   avg:4.54e+05   max:1.53e+06
├─ j_tor ➡ 101-element Vector{Float64} [A/m^2]
│          min:3.23e+03   avg:1.31e+06   max:6.65e+06
├─ j_total ➡ 101-element Vector{Float64} [A/m^2]
│            min:3.84e+03   avg:1.29e+06   max:6.48e+06
├─ pressure ➡ 101-element Vector{Float64} [Pa]
│             min:413   avg:4.09e+05   max:8.84e+05
├─ pressure_ion_total ➡ 101-element Vector{Float64} [Pa]
│                       min:195   avg:1.67e+05   max:3.41e+05
├─ pressure_parallel ➡ 101-element Vector{Float64} [Pa]
│                      min:138   avg:1.36e+05   max:2.95e+05
├─ pressure_perpendicular ➡ 101-element Vector{Float64} [Pa]
│                           min:138   avg:1.36e+05   max:2.95e+05
├─ pressure_thermal ➡ 101-element Vector{Float64} [Pa]
│                     min:413   avg:3.55e+05   max:7.23e+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.32e+04   max:2.5e+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          20.0229      96.5099
   2 │ in                                         oh        1.02879      1.68288   2.71167  nb3sn           6.94595     78.5726
   3 │ hfs                                        tf        0.511494     2.71167   3.22317  nb3sn_kdemo    43.1969     874.813   convex hull
   4 │ hfs     gap tf vacuum vessel                         0.0960705    3.22317   3.31924  vacuum          9.72933    568.692   double ellipse
   5 │ hfs     vacuum  outer                      vessel    0.0960705    3.31924   3.41531  steel           3.06312    125.967   negative offset
   6 │ hfs     gap water                                    0.144106     3.41531   3.55941  water           4.48592    184.595   negative offset
   7 │ hfs     vacuum  inner                      vessel    0.0960705    3.55941   3.65548  steel           2.9181     120.159   negative offset
   8 │ hfs     gap high temp shield vacuum vess…            0.00960705   3.65548   3.66509  vacuum          0.288619    11.8881  negative offset
   9 │ hfs     high temp                          shield    0.192141     3.66509   3.85723  steel           5.65021    232.874   negative offset
  10 │ hfs                                        blanket   0.365068     3.85723   4.2223   lithium_lead   21.0811     978.388   negative offset
  11 │ hfs     first                              wall      0.0192141    4.2223    4.24151  tungsten        0.819713    30.1598  offset
  12 │ lhfs                                       plasma    4.55014      4.24151   8.79165  plasma         34.4099    1347.12
  13 │ lfs     first                              wall      0.0192141    8.79165   8.81086  tungsten        0.819202    30.1434  offset
  14 │ lfs                                        blanket   1.15285      8.81086   9.96371  lithium_lead   21.0816     978.404   negative offset
  15 │ lfs     high temp                          shield    0.192141     9.96371  10.1559   steel           5.65021    232.874   negative offset
  16 │ lfs     gap high temp shield vacuum vess…            0.111037    10.1559   10.2669   vacuum          0.288619    11.8881  negative offset
  17 │ lfs     vacuum  inner                      vessel    0.0960705   10.2669   10.363    steel           2.9181     120.159   negative offset
  18 │ lfs     gap water                                    0.144106    10.363    10.5071   water           4.48592    184.595   negative offset
  19 │ lfs     vacuum  outer                      vessel    0.0960705   10.5071   10.6031   steel           3.06312    125.967   negative offset
  20 │ lfs     gap tf vacuum vessel                         0.757997    10.6031   11.3611   vacuum          9.72933    568.692   double ellipse
  21 │ lfs                                        tf        0.511494    11.3611   11.8726   nb3sn_kdemo    43.1969     874.813   convex hull
  22 │ out                                                  1.92141     11.8726   13.794    vacuum        106.188     6023.93
  23 │ out                                        cryostat  0.0960705   13.794    13.8901   steel           4.50743    282.5     silo
  24 │ out                                                  0.960705    13.8901   14.8508   vacuum         47.1048    3072.85

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.190541 [Hz]
         │  ├─ n_tor0
         │  └─ perturbation_type
         │     ├─ description"Vertical stability margin, > 0.15 for stability (N.B., not in Hz)"
         │     └─ name"m_s"
         └─ 2
            ├─ growthrate ➡ 6.04028 [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.0725814 [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.41747 [m]
│     │     └─ name ➡ "lfs high temp shield"
│     ├─ name ➡ "blanket"
│     └─ time_slice
│        └─ 1
│           ├─ peak_escape_flux ➡ 1.02817e+06 [W/m^2]
│           ├─ peak_wall_flux ➡ 2.83617e+06 [W/m^2]
│           ├─ power_incident_neutrons ➡ 3.05206e+08 [W]
│           ├─ power_incident_radiated ➡ 0 [W]
│           ├─ power_thermal_extracted ➡ 3.66247e+08 [W]
│           ├─ power_thermal_neutrons ➡ 3.66247e+08 [W]
│           ├─ power_thermal_radiated ➡ 0 [W]
│           ├─ time ➡ 0 [s]
│           └─ tritium_breeding_ratio ➡ 1.21349
├─ time ➡ [0] [s]
└─ tritium_breeding_ratio ➡ [1.15432]

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.32206e+08] [W]
│     │  └─ time ➡ [0] [s]
│     ├─ power_convected
│     │  ├─ data ➡ [0] [W]
│     │  └─ time ➡ [0] [s]
│     ├─ power_incident
│     │  ├─ data ➡ [2.24472e+07] [W]
│     │  └─ time ➡ [0] [s]
│     ├─ power_thermal_extracted
│     │  ├─ data ➡ [2.24472e+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

FUSE.ActorBalanceOfPlant(dd, act; do_plot=true);
nothing #hide

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 → 18.7 [keV]                       
a → 2.01 [m]                           ip → 13.2 [MA]                         Ti0 → 17.6 [keV]                       
1/ϵ → 3.24                             q95 → 7.35                             <Te> → 10.1 [keV]                      
κ → 2                                  <Bpol> → 0.831 [T]                     <Ti> → 9.06 [keV]                      
δ → 0.585                              βpol_MHD → 0.985                       Te0/<Te> → 1.85                        
ζ → -0.00753                           βtor_MHD → 0.0106                      Ti0/<Ti> → 1.95                        
Volume → 979 [m³]                      βn_MHD → 1.28                                                                 
Surface → 786 [m²]                                                                                                   
                                                                                                                     
DENSITIES                              PRESSURES                              TRANSPORT                              
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────    
ne0 → 8.68e+19 [m⁻³]                   P0 → 0.547 [MPa]                       τe → 2.07 [s]                          
ne_ped → 6.93e+19 [m⁻³]                <P> → 0.261 [MPa]                      τe_exp → 2.75 [s]                      
ne_line → 8.55e+19 [m⁻³]               P0/<P> → 2.1                           H98y2 → 0.929                          
<ne> → 8.16e+19 [m⁻³]                  βn → 1.23                              H98y2_exp → 1.02                       
ne0/<ne> → 1.06                        βn_th → 1.17                           Hds03 → 0.654                          
fGW → 0.821                                                                   Hds03_exp → 0.744                      
zeff_ped → 2                                                                  τα_thermalization → 0.844 [s]          
<zeff> → 2                                                                    τα_slowing_down → 1.04 [s]             
impurities → DT Ne20 He4                                                                                             
                                                                                                                     
SOURCES                                EXHAUST                                CURRENTS                               
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────    
Pec → 50 [MW]                          Psol → 132 [MW]                        ip_bs_aux_ohm → 13.6 [MA]              
rho0_ec → 0.5 [MW]                     PLH → 73.3 [MW]                        ip_ni → 7.69 [MA]                      
PnbiNaN [MW]                        Bpol_omp → 1.54 [T]                    ip_bs → 3.44 [MA]                      
Enbi1NaN [MeV]                      λq → 0.728 [mm]                        ip_aux → 4.24 [MA]                     
Pic → 50 [MW]                          qpol → 3.39e+03 [MW/m²]                ip_ohm → 5.88 [MA]                     
PlhNaN [MW]                         qpar → 1.35e+04 [MW/m²]                ejima → 0.4                            
Paux_tot → 100 [MW]                    P/R0 → 20.3 [MW/m]                     flattopNaN [Hours]                  
 → 80.2 [MW]                         PB/R0 → 159 [MW T/m]                                                          
PohmNaN [MW]                        PBp/R0 → 16.9 [MW T/m]                                                        
PheatNaN [MW]                       PBϵ/R0q95 → 6.67 [MW T/m]                                                     
Prad_tot → -44 [MW]                    neutrons_peak → 0.514 [MW/m²]                                                 
                                                                                                                     
BOP                                    BUILD                                  COSTING                                
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────    
Pfusion → 401 [MW]                     PF_material → nb3sn                    capital_cost → 5.25 [$B]               
Qfusion → 4.01                         TF_material → nb3sn_kdemo              levelized_CoE → Inf [$/kWh]            
thermal_cycle_type → rankine           OH_material → nb3sn                    TF_of_total → 14.8 [%]                 
thermal_efficiency_plantNaN [%]     TF_max_bNaN [T]                     BOP_of_total → 0 [%]                   
thermal_efficiency_cycleNaN [%]     OH_max_bNaN [T]                     blanket_of_total → 22.2 [%]            
power_electric_generatedNaN [MW]    TF_j_marginNaN                      cryostat_of_total → 2.95 [%]           
Pelectric_netNaN [MW]               OH_j_marginNaN                                                             
QplantNaN                           TF_stress_marginNaN                                                        
TBR → 1.15                             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 → 18.7 [keV]
a → 2.01 [m]                           ip → 13.2 [MA]                         Ti0 → 17.6 [keV]
1/ϵ → 3.24                             q95 → 7.35                             <Te> → 10.1 [keV]
κ → 2                                  <Bpol> → 0.831 [T]                     <Ti> → 9.06 [keV]
δ → 0.585                              βpol_MHD → 0.985                       Te0/<Te> → 1.85
ζ → -0.00753                           βtor_MHD → 0.0106                      Ti0/<Ti> → 1.95
Volume → 979 [m³]                      βn_MHD → 1.28
Surface → 786 [m²]

DENSITIES                              PRESSURES                              TRANSPORT
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────
ne0 → 8.68e+19 [m⁻³]                   P0 → 0.547 [MPa]                       τe → 2.07 [s]
ne_ped → 6.93e+19 [m⁻³]                <P> → 0.261 [MPa]                      τe_exp → 2.75 [s]
ne_line → 8.55e+19 [m⁻³]               P0/<P> → 2.1                           H98y2 → 0.929
<ne> → 8.16e+19 [m⁻³]                  βn → 1.23                              H98y2_exp → 1.02
ne0/<ne> → 1.06                        βn_th → 1.17                           Hds03 → 0.654
fGW → 0.821                                                                   Hds03_exp → 0.744
zeff_ped → 2                                                                  τα_thermalization → 0.844 [s]
<zeff> → 2                                                                    τα_slowing_down → 1.04 [s]
impurities → DT Ne20 He4

SOURCES                                EXHAUST                                CURRENTS
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────
Pec → 50 [MW]                          Psol → 132 [MW]                        ip_bs_aux_ohm → 13.6 [MA]
rho0_ec → 0.5 [MW]                     PLH → 73.3 [MW]                        ip_ni → 7.69 [MA]
Pnbi → NaN [MW]                        Bpol_omp → 1.54 [T]                    ip_bs → 3.44 [MA]
Enbi1 → NaN [MeV]                      λq → 0.728 [mm]                        ip_aux → 4.24 [MA]
Pic → 50 [MW]                          qpol → 3.39e+03 [MW/m²]                ip_ohm → 5.88 [MA]
Plh → NaN [MW]                         qpar → 1.35e+04 [MW/m²]                ejima → 0.4
Paux_tot → 100 [MW]                    P/R0 → 20.3 [MW/m]                     flattop → NaN [Hours]
Pα → 80.2 [MW]                         PB/R0 → 159 [MW T/m]
Pohm → NaN [MW]                        PBp/R0 → 16.9 [MW T/m]
Pheat → NaN [MW]                       PBϵ/R0q95 → 6.67 [MW T/m]
Prad_tot → -44 [MW]                    neutrons_peak → 0.514 [MW/m²]

BOP                                    BUILD                                  COSTING
───────────────────────────────────    ───────────────────────────────────    ───────────────────────────────────
Pfusion → 401 [MW]                     PF_material → nb3sn                    capital_cost → 5.25 [$B]
Qfusion → 4.01                         TF_material → nb3sn_kdemo              levelized_CoE → Inf [$/kWh]
thermal_cycle_type → rankine           OH_material → nb3sn                    TF_of_total → 14.8 [%]
thermal_efficiency_plant → NaN [%]     TF_max_b → NaN [T]                     BOP_of_total → 0 [%]
thermal_efficiency_cycle → NaN [%]     OH_max_b → NaN [T]                     blanket_of_total → 22.2 [%]
power_electric_generated → NaN [MW]    TF_j_margin → NaN                      cryostat_of_total → 2.95 [%]
Pelectric_net → NaN [MW]               OH_j_margin → NaN
Qplant → NaN                           TF_stress_margin → NaN
TBR → 1.15                             OH_stress_margin → NaN

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