Skip to content

Commit

Permalink
❇️ Create new p_plasma_sync_mw variable and integrate into physics
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-ashe committed Feb 12, 2025
1 parent 8202277 commit e6c61c4
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 48 deletions.
2 changes: 1 addition & 1 deletion examples/data/csv_output_large_tokamak_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.7935E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.4356E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4715E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.2665E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.2665E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_1_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.8950E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.5195E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4609E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.5187E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.5187E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_2_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.8950E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.5195E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4609E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.5187E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.5187E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_3_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.8950E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.5195E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4609E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.5187E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.5187E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_4_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.8950E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.5195E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4609E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.5187E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.5187E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
18 changes: 9 additions & 9 deletions examples/data/scan_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -1277,7 +1277,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -2272,7 +2272,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -3267,7 +3267,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -4262,7 +4262,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -5257,7 +5257,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -6252,7 +6252,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -7247,7 +7247,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down Expand Up @@ -8242,7 +8242,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 4.3494E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.0456E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.7753E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 2.2989E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 2.2989E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
2 changes: 1 addition & 1 deletion process/io/mfile_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"f_nd_alpha_electron",
"wallmw",
"p_plasma_inner_rad_mw",
"pden_plasma_sync_mw*vol_plasma",
"p_plasma_sync_mw",
"p_plasma_rad_mw",
"pnucblkt",
"pnucshld",
Expand Down
9 changes: 6 additions & 3 deletions process/physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,9 @@ def physics(self):
physics_variables.pden_plasma_outer_rad_mw = radpwrdata.pden_plasma_outer_rad_mw
physics_variables.pden_plasma_rad_mw = radpwrdata.pden_plasma_rad_mw

physics_variables.p_plasma_sync_mw = (
physics_variables.pden_plasma_sync_mw * physics_variables.vol_plasma
)
physics_variables.p_plasma_inner_rad_mw = (
physics_variables.pden_plasma_core_rad_mw * physics_variables.vol_plasma
)
Expand Down Expand Up @@ -4590,9 +4593,9 @@ def outplas(self):
po.osubhd(self.outfile, "Radiation Power (excluding SOL):")
po.ovarre(
self.outfile,
"Synchrotron radiation power (MW)",
"(pden_plasma_sync_mw*vol_plasma)",
physics_variables.pden_plasma_sync_mw * physics_variables.vol_plasma,
"Plasma total synchrotron radiation power (MW)",
"(p_plasma_sync_mw)",
physics_variables.p_plasma_sync_mw,
"OP ",
)
po.ovarrf(
Expand Down
4 changes: 4 additions & 0 deletions source/fortran/physics_variables.f90
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,9 @@ module physics_variables
real(dp) :: pden_plasma_sync_mw
!! synchrotron radiation power per volume (MW/m3)

real(dp) :: p_plasma_sync_mw
!! Total synchrotron radiation power from plasma (MW)

integer :: ilhthresh
!! switch for L-H mode power threshold scaling to use (see pthrmw for list)

Expand Down Expand Up @@ -1061,6 +1064,7 @@ subroutine init_physics_variables
proton_rate_density = 0.0D0
psolradmw = 0.0D0
pden_plasma_sync_mw = 0.0D0
p_plasma_sync_mw = 0.0D0
ilhthresh = 19
plhthresh = 0.0D0
pthrmw = 0.0D0
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/data/large_tokamak_1_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.8950E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.5195E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4609E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.5187E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.5187E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/data/large_tokamak_2_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.8950E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.5195E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4609E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.5187E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.5187E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/data/large_tokamak_3_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
Total_power_deposited_in_plasma_(MW)____________________________________ (tot_power_plasma)____________ 3.8950E+02 OP
Bremsstrahlung_radiation_power_(MW)_____________________________________ (pbrempv*vol)_________________ 6.5195E+01 OP
Line_radiation_power_(MW)_______________________________________________ (plinepv*vol)_________________ 1.4609E+02 OP
Synchrotron_radiation_power_(MW)________________________________________ (pden_plasma_sync_mw*vol)_________________ 1.5187E+01 OP
Synchrotron_radiation_power_(MW)________________________________________ (p_plasma_sync_mw)_________________ 1.5187E+01 OP
Synchrotron_wall_reflectivity_factor____________________________________ (f_sync_reflect)_______________________ 6.0000E-01
Normalised_minor_radius_defining_'core'_________________________________ (coreradius)__________________ 7.5000E-01
Fraction_of_core_radiation_subtracted_from_P_L__________________________ (coreradiationfraction)_______ 6.0000E-01
Expand Down
Loading

0 comments on commit e6c61c4

Please sign in to comment.