ukaea/PROCESS

Incorrect output of TF cable areas [BUG]

Opened this issue · 1 comments

Describe the bug

This output makes no sense:

 Fractions by area
 internal area of the cable space                                         (acstf)                   2.486E-02
 Coolant fraction in conductor excluding central channel                  (vftf)                    5.000E-02
 Copper fraction of conductor                                             (fcutfsu)                 7.500E-01
 Superconductor fraction of conductor                                     (1-fcutfsu)               2.500E-01
 Check total area fractions in winding pack = 1                                                         1.000

It comes from outtf:

                po.ocmmnt(self.outfile, "Fractions by area")
                po.ovarre(
                    self.outfile,
                    "internal area of the cable space",
                    "(acstf)",
                    tfcoil_variables.acstf,
                )
                po.ovarre(
                    self.outfile,
                    "Coolant fraction in conductor excluding central channel",
                    "(vftf)",
                    tfcoil_variables.vftf,
                )
                po.ovarre(
                    self.outfile,
                    "Copper fraction of conductor",
                    "(fcutfsu)",
                    tfcoil_variables.fcutfsu,
                )
                po.ovarre(
                    self.outfile,
                    "Superconductor fraction of conductor",
                    "(1-fcutfsu)",
                    1 - tfcoil_variables.fcutfsu,
                )

The check that is then carried out uses a completely different set of variables:

                po.ovarrf(
                    self.outfile,
                    "Check total area fractions in winding pack = 1",
                    "",
                    (
                        tfcoil_variables.acond
                        + tfcoil_variables.n_tf_turn * tfcoil_variables.acndttf
                        + tfcoil_variables.aiwp
                        + tfcoil_variables.avwp
                        + tfcoil_variables.awphec
                    )
                    / ap,
                )

In fact, acstf is an area, with units m2, not a fraction at all:

real(dp) :: acstf
!! Cable space area (per turn)  [m2]
!! Includes the area of voids and central helium channel

As far as I can tell this is just an output errror, not an error in the calculation.

Steps to reproduce

For example, Charles's STEP output file with negative cable area (attached in the comment below).

Expected behaviour

It is usually best to avoid fractions and use dimensional quantities. We would then expect to see a table of the area of each component of the turn and the total area of the turn.

Additional context

It would be a good idea to fix this if and when steps are taken to prevent the negative area problem arising (see #1709 etc).

@cjwgriesel @timothy-nunn

I am looking at the magnet dimensions as this is related to the cable pack problem