diff --git a/process/models/physics/confinement_time.py b/process/models/physics/confinement_time.py index 6e697c71c..1781fa2c0 100644 --- a/process/models/physics/confinement_time.py +++ b/process/models/physics/confinement_time.py @@ -37,6 +37,8 @@ class ConfinementTimeData: """Plasma energy confinement time in seconds.""" p_plasma_loss_mw: float """Total plasma loss power in MW.""" + hstar: float + """Non-radiation corrected H factor on energy confinement times""" class PlasmaConfinementTime(Model): @@ -936,8 +938,11 @@ def calculate_confinement_time( # Calculate H* non-radiation corrected H factor # Note: we will assume the IPB-98y2 scaling. - if self.data.physics.i_rad_loss == ConfinementRadiationLossModel.CORE_ONLY: - self.data.physics.hstar = ( + if ( + ConfinementRadiationLossModel(self.data.physics.i_rad_loss) + == ConfinementRadiationLossModel.CORE_ONLY + ): + hstar = ( hfact * ( p_plasma_loss_mw @@ -952,7 +957,7 @@ def calculate_confinement_time( elif ( self.data.physics.i_rad_loss == ConfinementRadiationLossModel.FULL_RADIATION ): - self.data.physics.hstar = ( + hstar = ( hfact * ( p_plasma_loss_mw @@ -964,7 +969,7 @@ def calculate_confinement_time( ** 0.31 ) elif self.data.physics.i_rad_loss == ConfinementRadiationLossModel.NO_RADIATION: - self.data.physics.hstar = hfact + hstar = hfact # Calculation of the transport power loss terms # Transport losses in Watts/m3 are 3/2 * n.e.T / tau , with T in eV @@ -1002,6 +1007,7 @@ def calculate_confinement_time( t_ion_energy_confinement=t_ion_energy_confinement, t_plasma_energy_confinement=t_energy_confinement, p_plasma_loss_mw=p_plasma_loss_mw, + hstar=hstar, ) @staticmethod diff --git a/process/models/physics/physics.py b/process/models/physics/physics.py index 3987ad7a0..9dfa228e0 100644 --- a/process/models/physics/physics.py +++ b/process/models/physics/physics.py @@ -886,6 +886,7 @@ def run(self): confinement_time_data.t_ion_energy_confinement ) self.data.physics.p_plasma_loss_mw = confinement_time_data.p_plasma_loss_mw + self.data.physics.hstar = confinement_time_data.hstar # Total transport power from scaling law (MW) self.data.physics.p_electron_transport_loss_mw = ( diff --git a/process/models/stellarator/stellarator.py b/process/models/stellarator/stellarator.py index a2f6129e6..4127b69c4 100644 --- a/process/models/stellarator/stellarator.py +++ b/process/models/stellarator/stellarator.py @@ -2295,6 +2295,7 @@ def st_phys(self, output): confinement_time_data.t_ion_energy_confinement ) self.data.physics.p_plasma_loss_mw = confinement_time_data.p_plasma_loss_mw + self.data.physics.hstar = confinement_time_data.hstar self.data.physics.ntau, self.data.physics.nTtau = ( self.physics.confinement.calculate_double_and_triple_product(