Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 68 additions & 6 deletions process/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from process.fortran import fwbs_variables
from process.fortran import error_handling
from process.fortran import process_output as po
from process.fortran import buildings_variables
from process.variables import AnnotatedVariable
import numpy as np
import logging
Expand Down Expand Up @@ -1918,7 +1919,8 @@ def radialb(self, output: bool):
"(tfthko)",
build_variables.tfthko,
)
# Vertical build
# VERTICAL BUILD *************************************************
# Include the cryostat in the vertical build table Issue #3070 MDK

po.oheadr(self.outfile, "Vertical Build")

Expand All @@ -1935,8 +1937,10 @@ def radialb(self, output: bool):
# write(self.outfile,20)
# 20 format(t43,'Thickness (m)',t60,'Height (m)')

# Start at the top and work down.
vbuild = (
build_variables.tfcth
buildings_variables.clh1
+ build_variables.tfcth
+ build_variables.tftsgap
+ build_variables.thshield_vb
+ build_variables.vgap2
Expand All @@ -1950,6 +1954,21 @@ def radialb(self, output: bool):
# To calculate vertical offset between TF coil centre and plasma centre
vbuile1 = vbuild

po.obuild(
self.outfile,
"Cryostat roof structure*",
buildings_variables.clh1,
vbuild,
"(clh1)",
)
po.ovarre(
self.mfile,
"Cryostat roof structure*",
"(clh1)",
buildings_variables.clh1,
)
vbuild = vbuild - buildings_variables.clh1

po.obuild(
self.outfile,
"TF coil",
Expand Down Expand Up @@ -2164,16 +2183,26 @@ def radialb(self, output: bool):
"(tfcth)",
)

vbuild = vbuild - buildings_variables.clh1
po.obuild(
self.outfile,
"Cryostat floor structure**",
buildings_variables.clh1,
vbuild,
"(clh1)",
)

# To calculate vertical offset between TF coil centre and plasma centre
build_variables.tfoffset = (vbuile1 + vbuild) / 2.0e0

# end of Double null case
# End of Double null case
else:
# po.ocmmnt(self.outfile, "Single null case")
# write(self.outfile, 20)

vbuild = (
build_variables.tfcth
buildings_variables.clh1
+ build_variables.tfcth
+ build_variables.tftsgap
+ build_variables.thshield_vb
+ build_variables.vgap2
Expand All @@ -2189,6 +2218,21 @@ def radialb(self, output: bool):
# To calculate vertical offset between TF coil centre and plasma centre
vbuile1 = vbuild

po.obuild(
self.outfile,
"Cryostat roof structure*",
buildings_variables.clh1,
vbuild,
"(clh1)",
)
po.ovarre(
self.mfile,
"Cryostat roof structure*",
"(clh1)",
buildings_variables.clh1,
)
vbuild = vbuild - buildings_variables.clh1

po.obuild(
self.outfile,
"TF coil",
Expand Down Expand Up @@ -2416,22 +2460,40 @@ def radialb(self, output: bool):
"(tfcth)",
)

vbuild = vbuild - buildings_variables.clh1

po.obuild(
self.outfile,
"Cryostat floor structure**",
buildings_variables.clh1,
vbuild,
"(clh1)",
)

# To calculate vertical offset between TF coil centre and plasma centre
build_variables.tfoffset = (vbuile1 + vbuild) / 2.0e0

# end of Single null case
po.ocmmnt(
self.outfile,
"*Cryostat roof allowance includes uppermost PF coil and outer thermal shield.",
)
po.ocmmnt(
self.outfile,
"**Cryostat floor allowance includes lowermost PF coil, outer thermal shield and gravity support.",
)

# Other build quantities

po.ovarre(
self.mfile,
"External cryostat thickness (m)",
"External cryostat thickness (excludes structure) (m)",
"(ddwex)",
build_variables.ddwex,
)
po.ovarre(
self.mfile,
"Ratio of Central solenoid height to TF coil internal height",
"Ratio of Central Solenoid height to TF coil internal height",
"(ohhghf)",
pfcoil_variables.ohhghf,
)
Expand Down