Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ LIST(APPEND PROCESS_SRCS
pfcoil.f90
reinke_module.f90
sctfcoil.f90
plasma_profiles.f90
final_module.f90
cost_variables.f90
divertor_variables.f90
Expand Down
18 changes: 10 additions & 8 deletions process/current_drive.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import numpy as np

from process.plasma_profiles import PlasmaProfile

from process.fortran import (
heat_transport_variables,
current_drive_variables,
physics_variables,
cost_variables,
constants,
profiles_module,
process_output as po,
error_handling as eh,
)


class CurrentDrive:
def __init__(self):
def __init__(self, plasma_profile: PlasmaProfile):
self.outfile = constants.nout
self.plasma_profile = plasma_profile

def cudriv(self, output: bool):
"""Routine to calculate the current drive power requirements
Expand Down Expand Up @@ -1375,15 +1377,15 @@ def cullhy(self):

# Local density, temperature, toroidal field at this minor radius

dlocal = 1.0e-19 * profiles_module.nprofile(
dlocal = 1.0e-19 * self.plasma_profile.neprofile.calculate_profile_y(
rratio,
physics_variables.rhopedn,
physics_variables.ne0,
physics_variables.neped,
physics_variables.nesep,
physics_variables.alphan,
)
tlocal = profiles_module.tprofile(
tlocal = self.plasma_profile.teprofile.calculate_profile_y(
rratio,
physics_variables.rhopedt,
physics_variables.te0,
Expand Down Expand Up @@ -1439,7 +1441,7 @@ def culecd(self):
rrr = 1.0e0 / 3.0e0

# Temperature
tlocal = profiles_module.tprofile(
tlocal = self.plasma_profile.teprofile.calculate_profile_y(
rrr,
physics_variables.rhopedt,
physics_variables.te0,
Expand All @@ -1450,7 +1452,7 @@ def culecd(self):
)

# Density (10**20 m**-3)
dlocal = 1.0e-20 * profiles_module.nprofile(
dlocal = 1.0e-20 * self.plasma_profile.neprofile.calculate_profile_y(
rrr,
physics_variables.rhopedn,
physics_variables.ne0,
Expand Down Expand Up @@ -1829,7 +1831,7 @@ def lheval(self, drfind, rratio):
routine <A HREF="lhrad.html">lhrad</A>.
AEA FUS 172: Physics Assessment for the European Reactor Study
"""
dlocal = 1.0e-19 * profiles_module.nprofile(
dlocal = 1.0e-19 * self.plasma_profile.neprofile.calculate_profile_y(
rratio,
physics_variables.rhopedn,
physics_variables.ne0,
Expand All @@ -1840,7 +1842,7 @@ def lheval(self, drfind, rratio):

# Local electron temperature

tlocal = profiles_module.tprofile(
tlocal = self.plasma_profile.teprofile.calculate_profile_y(
rratio,
physics_variables.rhopedt,
physics_variables.te0,
Expand Down
2 changes: 1 addition & 1 deletion process/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def __init__(self):
self.fw = Fw()
self.blanket_library = BlanketLibrary(fw=self.fw)
self.ccfe_hcpb = CCFE_HCPB(blanket_library=self.blanket_library)
self.current_drive = CurrentDrive()
self.current_drive = CurrentDrive(plasma_profile=self.plasma_profile)
self.physics = Physics(
plasma_profile=self.plasma_profile, current_drive=self.current_drive
)
Expand Down
Loading