bluemira.radiation_transport.radiation_profile
1-D radiation model inspired by the PROCESS function “plot_radprofile” in plot_proc.py.
Classes
Radiation source parameter frame |
|
Initial and generic class (no distinction between core and SOL) |
|
Specific class to calculate the core radiation source. |
|
Specific class to calculate the SOL radiation source. |
|
Specific class to make the SOL radiation source for a double null configuration. |
|
Specific class to make the SOL radiation source for a double null configuration. |
|
Simplified solver to easily access the radiation model location inputs. |
Module Contents
- class bluemira.radiation_transport.radiation_profile.RadiationSourceParams
Bases:
bluemira.base.parameter_frame.ParameterFrameRadiation source parameter frame
- sep_corrector_omp: bluemira.base.parameter_frame.Parameter[float]
Separation correction for double and single null plasma
- sep_corrector_imp: bluemira.base.parameter_frame.Parameter[float]
Separation correction for double and single null plasma
- alpha_n: bluemira.base.parameter_frame.Parameter[float]
Density profile factor
- alpha_t: bluemira.base.parameter_frame.Parameter[float]
Temperature profile index
- det_t: bluemira.base.parameter_frame.Parameter[float]
Detachment target temperature
- eps_cool: bluemira.base.parameter_frame.Parameter[float]
electron energy loss
- f_ion_t: bluemira.base.parameter_frame.Parameter[float]
Hydrogen first ionization
- main_ext: bluemira.base.parameter_frame.Parameter[float]
radiation region extension in main chamber
- rec_ext_out_leg: bluemira.base.parameter_frame.Parameter[float]
recycling region extension in outer leg
- rec_ext_in_leg: bluemira.base.parameter_frame.Parameter[float]
recycling region extension in inner leg
- fw_lambda_q_far_imp: bluemira.base.parameter_frame.Parameter[float]
Lambda_q far SOL imp
- fw_lambda_q_far_omp: bluemira.base.parameter_frame.Parameter[float]
Lambda_q far SOL omp
- fw_lambda_q_near_imp: bluemira.base.parameter_frame.Parameter[float]
Lambda_q near SOL imp
- fw_lambda_q_near_omp: bluemira.base.parameter_frame.Parameter[float]
Lambda_q near SOL omp
- lambda_t_factor: bluemira.base.parameter_frame.Parameter[float]
Lambda_t factor for non conduction-limited regime
- lambda_n_factor: bluemira.base.parameter_frame.Parameter[float]
Lambda_n factor for non conduction-limited regime
- gamma_sheath: bluemira.base.parameter_frame.Parameter[float]
sheath heat transmission coefficient
- k_0: bluemira.base.parameter_frame.Parameter[float]
material’s conductivity
- lfs_p_fraction: bluemira.base.parameter_frame.Parameter[float]
lfs fraction of SoL power
- n_e_0: bluemira.base.parameter_frame.Parameter[float]
Electron density on axis
- n_e_ped: bluemira.base.parameter_frame.Parameter[float]
Electron density pedestal height
- n_e_sep: bluemira.base.parameter_frame.Parameter[float]
Electron density at separatrix
- P_sep: bluemira.base.parameter_frame.Parameter[float]
Radiation power
- rho_ped_n: bluemira.base.parameter_frame.Parameter[float]
Density pedestal r/a location
- rho_ped_t: bluemira.base.parameter_frame.Parameter[float]
Temperature pedestal r/a location
- n_points_core_95: bluemira.base.parameter_frame.Parameter[float]
rho discretization to 95% of core
- n_points_core_99: bluemira.base.parameter_frame.Parameter[float]
rho discretization to 99% of core
- n_points_mantle: bluemira.base.parameter_frame.Parameter[float]
rho discretization to separatrix
- t_beta: bluemira.base.parameter_frame.Parameter[float]
Temperature profile index beta
- T_e_0: bluemira.base.parameter_frame.Parameter[float]
Electron temperature on axis
- T_e_ped: bluemira.base.parameter_frame.Parameter[float]
Electron temperature pedestal height
- T_e_sep: bluemira.base.parameter_frame.Parameter[float]
Electron temperature at separatrix
- theta_inner_target: bluemira.base.parameter_frame.Parameter[float]
Inner divertor poloidal angle with the separatrix flux line
- theta_outer_target: bluemira.base.parameter_frame.Parameter[float]
Outer divertor poloidal angle with the separatrix flux line
- class bluemira.radiation_transport.radiation_profile.Radiation(eq: bluemira.equilibria.equilibrium.Equilibrium, params: dict | bluemira.base.parameter_frame.ParameterFrame)
Initial and generic class (no distinction between core and SOL) to calculate radiation source within the flux tubes.
- Parameters:
params (dict | bluemira.base.parameter_frame.ParameterFrame)
- params
- eq
- collect_flux_tubes(psi_n: numpy.ndarray) list[bluemira.geometry.coordinates.Coordinates]
Collect flux tubes according to the normalised psi. For now only used for the core as for the SoL the flux surfaces to calculate the heat flux from charged particles are used.
- Parameters:
psi_n (numpy.ndarray) – normalised psi
- Returns:
list of flux tubes
- Return type:
flux tubes
- static flux_tube_pol_t(flux_tube: bluemira.geometry.coordinates.Coordinates, te_mp: float, t_rad_in: float = 0, t_rad_out: float = 0, rad_i: numpy.ndarray | None = None, rec_i: numpy.ndarray | None = None, t_tar: float = 0, *, core: bool = False, x_point_rad: bool = False, main_chamber_rad: bool = False) numpy.ndarray
Along a single flux tube, it assigns different temperature values.
- Parameters:
flux_tube (bluemira.geometry.coordinates.Coordinates) – flux tube geometry
te_mp (float) – electron temperature at the midplane [keV]
t_rad_in (float) – temperature value at the entrance of the radiation region [keV]
t_rad_out (float) – temperature value at the exit of the radiation region [keV]
rad_i (numpy.ndarray | None) – indexes of points, belonging to the flux tube, which fall into the radiation region
rec_i (numpy.ndarray | None) – indexes of points, belonging to the flux tube, which fall into the recycling region
t_tar (float) – electron temperature at the target [keV]
core (bool) – if True, t is constant along the flux tube. If false,it varies
x_point_rad (bool) – if True, it assumes there is no radiation at all in the recycling region.
main_chamber_rad (bool) – if True, the temperature from the midplane to the radiation region entrance is not constant
- Returns:
poloidal distribution of electron temperature
- Return type:
te [keV]
- Raises:
ValueError – Required inputs not provided
- static flux_tube_pol_n(flux_tube: bluemira.geometry.coordinates.Coordinates, ne_mp: float, n_rad_in: float | None = None, n_rad_out: float | None = None, rad_i: numpy.ndarray | None = None, rec_i: numpy.ndarray | None = None, n_tar: float | None = None, *, core: bool = False, main_chamber_rad: bool = False) numpy.ndarray
Along a single flux tube, it assigns different density values.
- Parameters:
flux_tube (bluemira.geometry.coordinates.Coordinates) – flux tube geometry
ne_mp (float) – electron density at the midplane [1/m^3]
n_rad_in (float | None) – density value at the entrance of the radiation region [1/m^3]
n_rad_out (float | None) – density value at the exit of the radiation region [1/m^3]
rad_i (numpy.ndarray | None) – indexes of points, belonging to the flux tube, which fall into the radiation region
rec_i (numpy.ndarray | None) – indexes of points, belonging to the flux tube, which fall into the recycling region
n_tar (float | None) – electron density at the target [1/m^3]
core (bool) – if True, n is constant along the flux tube. If false,it varies
main_chamber_rad (bool) – if True, the temperature from the midplane to the radiation region entrance is not constant
- Returns:
poloidal distribution of electron density
- Return type:
ne
- Raises:
ValueError – Required inputs not provided
- static mp_profile_plot(rho: numpy.ndarray, rad_power: numpy.ndarray, imp_name: str | list[str], ax=None) matplotlib.pyplot.Axes
1D plot of the radiation power distribution along the midplane.
- Parameters:
rho (numpy.ndarray) – dimensionless radius. Values between 0 and 1 for the plasma core. Values > 1 for the scrape-off layer
rad_power (numpy.ndarray) – radiated power at each mid-plane location corresponding to rho [Mw/m^3]
imp_name (str | list[str]) – impurity names
- Returns:
axes on which the mid-plane radiation power distribution profile is plotted.
- Return type:
ax
Notes
if rad_power.ndim > 1 the plot shows as many line as the number of impurities, plus the total radiated power
- class bluemira.radiation_transport.radiation_profile.CoreRadiation(eq: bluemira.equilibria.equilibrium.Equilibrium, params: bluemira.base.parameter_frame.ParameterFrame, midplane_profiles: bluemira.radiation_transport.midplane_temperature_density.MidplaneProfiles, impurity_content: dict[str, float], impurity_data: dict[str, dict[str, tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]]])
Bases:
RadiationSpecific class to calculate the core radiation source.
Temperature and density are assumed to be constant along a single flux tube. In addition to Radiation, this class also includes the impurity data of all gases except Argon.
- Parameters:
eq (bluemira.equilibria.equilibrium.Equilibrium) – The equilibrium defining flux surfaces.
midplane_profiles (bluemira.radiation_transport.midplane_temperature_density.MidplaneProfiles) – Electron density and electron temperature profile at the mid-plane.
impurity_content (dict[str, float]) – The dictionary of impurities (e.g. ‘H’) and their fractions (e.g. 1E-2) in the core.
impurity_data (dict[str, dict[str, tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]]]) – The dictionary of impurities in the core at a defined time, sorted by species, then sorted by “T_ref” v.s. “L_ref”, where T_ref = reference ion temperature [eV], L_ref = the loss function value $L_z(n_e, T_e)$ [W m^3].
params (bluemira.base.parameter_frame.ParameterFrame)
- impurities_content
- imp_data_t_ref
- imp_data_l_ref
- imp_data_z_ref
- impurity_symbols
- profiles
- calculate_mp_radiation_profile()
1D profile of the line radiation loss at the mid-plane from the magnetic axis to the separatrix
- plot_mp_radiation_profile()
Plot one dimensional behaviour of line radiation against the adimensional radius
- calculate_core_distribution() list[list[numpy.ndarray]]
Build poloidal distribution (distribution along the field lines) of line radiation loss in the plasma core.
- Returns:
Line core radiation for each impurity species and for each closed flux line in the core.
- Return type:
rad
- calculate_core_radiation_map()
Build core radiation map.
- Returns:
the core radiation map
- radiation_distribution_plot(flux_tubes: numpy.ndarray, power_density: numpy.ndarray, ax=None) matplotlib.pyplot.Axes
2D plot of the core radiation power distribution.
- Parameters:
flux_tubes (numpy.ndarray) – array of the closed flux tubes within the separatrix.
power_density (numpy.ndarray) – arrays containing the power radiation density of the points lying on each flux tube [MW/m^3]
- Returns:
the axes
- Return type:
matplotlib.pyplot.Axes
- plot_radiation_distribution()
Plot poloidal radiation distribution within the plasma core
- plot_lz_vs_tref()
Plot radiative loss function for a set of given impurities against the reference temperature.
- class bluemira.radiation_transport.radiation_profile.ScrapeOffLayerRadiation(eq: bluemira.equilibria.equilibrium.Equilibrium, params: bluemira.base.parameter_frame.ParameterFrame, x_sep_omp: float | None = None, x_sep_imp: float | None = None, dx_omp: float | None = None, dx_imp: float | None = None)
Bases:
RadiationSpecific class to calculate the SOL radiation source. In the SOL is assumed a conduction dominated regime until the x-point, with no heat sinks, and a convection dominated regime between x-point and target.
- Parameters:
eq (bluemira.equilibria.equilibrium.Equilibrium) – The equilibrium defining flux surfaces.
x_sep_omp (float | None) – outboard mid-plane separatrix x-coordinates [m]
x_sep_imp (float | None) – inboard mid-plane separatrix x-coordinates [m]
dx_omp (float | None) – The midplane spatial resolution between flux surfaces at the outboard [m]
dx_imp (float | None) – The midplane spatial resolution between flux surfaces at the inboard [m]
params (bluemira.base.parameter_frame.ParameterFrame)
- x_sep_omp = None
- x_sep_imp = None
- dx_omp = None
- dx_imp = None
- collect_x_and_o_point_coordinates()
Magnetic axis coordinates and x-point(s) coordinates.
- collect_separatrix_parameters()
Radiation source relevant parameters at the separatrix
- x_point_radiation_z_ext(main_ext: float | None = None, pfr_ext: float = 0.3, *, low_div: bool = True) tuple[float, Ellipsis]
Simple definition of a radiation region around the x-point. The region is supposed to extend from an arbitrary z coordinate on the main plasma side, to an arbitrary z coordinate on the private flux region side.
- Parameters:
main_ext (float | None) – region extension on the main plasma side [m]
pfr_ext (float) – region extension on the private flux region side [m]
low_div (boolean) – default=True for the lower divertor. If False, upper divertor
- Returns:
z_main – vertical (z coordinate) extension of the radiation region toward the main plasma [m]
z_pfr – vertical (z coordinate) extension of the radiation region toward the pfr [m]
- Return type:
tuple[float, Ellipsis]
- radiation_region_ends(z_main: float, z_pfr: float, *, lfs: bool = True) tuple[float, Ellipsis]
Entering and exiting points (x, z) of the radiation region detected on the separatrix. The separatrix is supposed to be given by relevant half.
- Parameters:
z_main (float) – vertical (z coordinate) extension of the radiation region toward the main plasma [m]
z_pfr (float) – vertical (z coordinate) extension of the radiation region toward the pfr [m]
lfs (bool) – default=True for the low field side (right half). If False, high field side (left half).
- Returns:
entrance_x, entrance_z – x, z coordinates of the radiation region starting point
exit_x, exit_z – x, z coordinates of the radiation region ending point
- Return type:
tuple[float, Ellipsis]
- static radiation_region_points(flux_tube: bluemira.geometry.coordinates.Coordinates, z_main: float, z_pfr: float, *, lower: bool = True) tuple[numpy.ndarray, Ellipsis]
For a given flux tube, indexes of points which fall respectively into the radiation and recycling region
- Parameters:
flux_tube (bluemira.geometry.coordinates.Coordinates) – flux tube geometry
z_main (float) – vertical (z coordinate) extension of the radiation region toward the main plasma. Taken on the separatrix [m]
z_pfr (float) – vertical (z coordinate) extension of the radiation region toward the pfr. Taken on the separatrix [m]
lower (bool) – default=True for the lower divertor. If False, upper divertor
- Returns:
rad_i – indexes of the points within the radiation region
rec_i – indexes pf the points within the recycling region
- Return type:
tuple[numpy.ndarray, Ellipsis]
- mp_electron_density_temperature_profiles(te_sep: float | None = None, *, omp: bool = True) tuple[numpy.ndarray, Ellipsis]
Calculation of electron density and electron temperature profiles across the SoL at midplane. It uses the customised version for the mid-plane of the exponential decay law described in “electron_density_and_temperature_sol_decay”.
- Parameters:
te_sep (float | None) – electron temperature at the separatrix [keV]
omp (bool) – outer mid-plane. Default value True. If False it stands for inner mid-plane
- Returns:
te_sol – radial decayed temperatures through the SoL at the mid-plane. Unit [keV]
ne_sol – radial decayed densities through the SoL at the mid-plane. Unit [1/m^3]
- Return type:
tuple[numpy.ndarray, Ellipsis]
- any_point_density_temperature_profiles(x_p: float, z_p: float, t_p: float, t_u: float, *, lfs: bool = True) tuple[numpy.ndarray, Ellipsis]
Calculation of electron density and electron temperature profiles across the SoL, starting from any point on the separatrix. (The z coordinate is the same. While the x coordinate changes) Using the equation to calculate T(s||).
- Parameters:
x_p (float) – x coordinate of the point at the separatrix [m]
z_p (float) – z coordinate of the point at the separatrix [m]
t_p (float) – point temperature [eV]
t_u (float) – upstream temperature [eV]
lfs (bool) – low (toroidal) field side (outer wall side). Default value True. If False it stands for high field side (hfs).
- Returns:
te_prof – radial decayed temperatures through the SoL. Unit [eV]
ne_prof – radial decayed densities through the SoL. Unit [1/m^3]
- Return type:
tuple[numpy.ndarray, Ellipsis]
- tar_electron_densitiy_temperature_profiles(ne_div: numpy.ndarray, te_div: numpy.ndarray, f_m: float = 1, *, detachment: bool = False) tuple[numpy.ndarray, Ellipsis]
Calculation of electron density and electron temperature profiles across the SoL at the target. From the pressure balance, considering friction losses.
- Parameters:
ne_div (numpy.ndarray) – density of the flux tubes at the entrance of the recycling region, assumed to be corresponding to the divertor plane [1/m^3]
te_div (numpy.ndarray) – temperature of the flux tubes at the entrance of the recycling region, assumed to be corresponding to the divertor plane [eV]
f_m (float) – fractional loss of pressure due to friction. It can vary between 0 and 1.
detachment (bool)
- Returns:
te_t – target temperature [eV]
ne_t – target density [1/m^3]
- Return type:
tuple[numpy.ndarray, Ellipsis]
- calculate_sector_distributions(flux_tubes: numpy.ndarray, x_strike: float, z_strike: float, main_ext: float, firstwall_geom: bluemira.geometry.coordinates.Coordinates, pfr_ext: float | None = None, rec_ext: float | None = None, *, x_point_rad: bool = False, detachment: bool = False, lfs: bool = True, low_div: bool = True, main_chamber_rad: bool = False) tuple[numpy.ndarray, Ellipsis]
Temperature and density profiles calculation. Within the scrape-off layer sector, it gives temperature and density profile along each flux tube.
- Parameters:
flux_tubes (array) – set of flux tubes
x_strike (float) – x coordinate of the first open flux surface strike point [m]
z_strike (float) – z coordinate of the first open flux surface strike point [m]
main_ext (float) – extension of the radiation region from the x-point towards the main plasma [m]
firstwall_geom (bluemira.geometry.coordinates.Coordinates) – first wall geometry
pfr_ext (float | None) – extension of the radiation region from the x-point towards private flux region [m]
rec_ext (float | None) – extension of the recycling region, along the separatrix, from the target [m]
x_point_rad (bool) – if True, it assumes there is no radiation at all in the recycling region, and pfr_ext MUST be provided.
detachment (bool) – if True, it makes the temperature decay through the recycling region from the H ionization temperature to the assign temperature for detachment at the target. Else temperature is constant through the recycling region.
lfs (bool) – low field side. Default value True. If False it stands for high field side (hfs)
low_div (bool) – default=True for the lower divertor. If False, upper divertor
main_chamber_rad (bool) – if True, the temperature from the midplane to the radiation region entrance is not constant
- Returns:
t_pol – temperature poloidal profile along each flux tube within the specified set [keV]
n_pol – density poloidal profile along each flux tube within the specified set [1/m^3]
- Raises:
ValueError – Required inputs not provided
- Return type:
tuple[numpy.ndarray, Ellipsis]
- radiation_distribution_plot(flux_tubes, power_density, firstwall, ax=None)
2D plot of the radiation power distribution.
- Parameters:
flux_tubes ([np.array]) – list of arrays of the flux tubes of different sectors. Example: if len(flux_tubes) = 2, it could contain the set of flux tubes of the lower that go from the omp to the outer lower divertor, and the set of flux tubes that go from the imp to the inner lower divertor.
power_density ([np.array]) – list of arrays containing the power radiation density of the points lying on the specified flux tubes. expected len(flux_tubes) = len(power_density)
firstwall (Grid) – first wall geometry
- Returns:
Axes on which the 2D radiation power distribution is plotted.
- Return type:
ax
- static poloidal_distribution_plot(flux_tubes: numpy.ndarray, flux_property: numpy.ndarray, *, temperature: bool = True, ax=None)
2D plot of a generic property (density, temperature or radiation) as poloidal section the flux tube points.
- Parameters:
flux_tubes (numpy.ndarray) – array of the open flux tubes within the SoL.
flux_property (numpy.ndarray) – arrays containing the property values associated to the points of each flux tube.
temperature (bool)
- Returns:
Axes on which the flux tubes’ properties are plotted.
- Return type:
ax
- static plot_t_vs_n(flux_tube, t_distribution, n_distribution, ax1=None) matplotlib.pyplot.Axes
2D plot of temperature and density of a single flux tube within the SoL
- Parameters:
flux_tube (flux surface object as described in advective_transport.py) – open flux tube within the SoL.
t_distribution (np.array([np.array])) – arrays containing the temperature values associated to the points of the flux tube.
n_distribution (np.array([np.array])) – arrays containing the density values associated to the points of the flux tube.
- Returns:
ax1 – Axes object on which the electron temperature is plotted
ax2 – Axes object on which the electron density is plotted
- Return type:
matplotlib.pyplot.Axes
- class bluemira.radiation_transport.radiation_profile.DNScrapeOffLayerRadiation(eq: bluemira.equilibria.equilibrium.Equilibrium, params: bluemira.base.parameter_frame.ParameterFrame, flux_surfaces: list[bluemira.equilibria.flux_surfaces.PartialOpenFluxSurface], impurity_content: dict[str, float], impurity_data: dict[str, dict[str, tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]]], firstwall_geom: bluemira.geometry.coordinates.Coordinates, x_sep_omp: float | None = None, x_sep_imp: float | None = None, dx_omp: float | None = None, dx_imp: float | None = None)
Bases:
ScrapeOffLayerRadiationSpecific class to make the SOL radiation source for a double null configuration. Here the SOL is divided into for regions. From the outer midplane to the outer lower target; from the omp to the outer upper target; from the inboard midplane to the inner lower target; from the imp to the inner upper target.
- Parameters:
eq (bluemira.equilibria.equilibrium.Equilibrium) – The equilibrium defining flux surfaces.
flux_surfaces (list[bluemira.equilibria.flux_surfaces.PartialOpenFluxSurface]) – list of flux surfaces, all of which terminating at the first walls.
impurity_content (dict[str, float]) – The dictionary of impurities in the double-null’s scrape-off layer (e.g. ‘H’) and their fractions (e.g. 1E-2).
impurity_data (dict[str, dict[str, tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]]]) – The dictionary of impurities in the double-null’s scrape-off layer at a defined time, sorted by species, then sorted by “T_ref” v.s. “L_ref”, where T_ref = reference ion temperature [eV], L_ref = the loss function value $L_z(n_e, T_e)$ [W m^3].
firstwall_geom (bluemira.geometry.coordinates.Coordinates) – The closed first wall geometry
x_sep_omp (float | None) – outboard mid-plane separatrix x-coordinates [m]
x_sep_imp (float | None) – inboard mid-plane separatrix x-coordinates [m]
dx_omp (float | None) – The midplane spatial resolution between flux surfaces at the outboard [m]
dx_imp (float | None) – The midplane spatial resolution between flux surfaces at the inboard [m]
params (bluemira.base.parameter_frame.ParameterFrame)
- impurities_content
- imp_data_t_ref
- imp_data_l_ref
- flux_tubes_lfs_low
- flux_tubes_hfs_low
- flux_tubes_lfs_up
- flux_tubes_hfs_up
- x_strike_lfs
- z_strike_lfs
- alpha_lfs
- b_pol_out_tar
- b_tor_out_tar
- b_tot_out_tar
- x_strike_hfs
- z_strike_hfs
- alpha_hfs
- b_pol_inn_tar
- b_tor_inn_tar
- b_tot_inn_tar
- t_omp
- t_imp
- calculate_sol_distribution(firstwall_geom: bluemira.geometry.coordinates.Coordinates)
Temperature and density profiles calculation. For each scrape-off layer sector, it gives temperature and density profile along each flux tube.
- Parameters:
firstwall_geom (grid) – first wall geometry
- Returns:
t_and_n_pol[“lfs_low”] – temperature and density poloidal profile along each flux tube within the lfs lower divertor set
t_and_n_pol[“lfs_up”] – temperature and density poloidal profile along each flux tube within the lfs upper divertor set
t_and_n_pol[“hfs_low”] – temperature and density poloidal profile along each flux tube within the hfs lower divertor set
t_and_n_pol[“hfs_up”] – temperature and density poloidal profile along each flux tube within the hfs upper divertor set
- calculate_sol_radiation_distribution(lfs_low, lfs_up, hfs_low, hfs_up)
Radiation profiles calculation. For each scrape-off layer sector, it gives the radiation profile along each flux tube.
- Parameters:
lfs_low – temperature and density poloidal profile along each flux tube within the lfs lower divertor set
lfs_up – temperature and density poloidal profile along each flux tube within the lfs upper divertor set
hfs_low – temperature and density poloidal profile along each flux tube within the hfs lower divertor set
hfs_up – temperature and density poloidal profile along each flux tube within the hfs upper divertor set
- Returns:
rad[“lfs_low”] – radiation poloidal profile along each flux tube within the lfs lower divertor set
rad[“lfs_up”] – radiation poloidal profile along each flux tube within the lfs upper divertor set
rad[“hfs_low”] – radiation poloidal profile along each flux tube within the hfs lower divertor set
rad[“hfs_up”] – radiation poloidal profile along each flux tube within the hfs upper divertor set
- calculate_sol_radiation_map(lfs_low, lfs_up, hfs_low, hfs_up)
Scrape off layer radiation map calculation.
- Parameters:
lfs_low – radiation poloidal profile along each flux tube within the lfs lower divertor set
lfs_up – radiation poloidal profile along each flux tube within the lfs upper divertor set
hfs_low – radiation poloidal profile along each flux tube within the hfs lower divertor set
hfs_up – radiation poloidal profile along each flux tube within the hfs upper divertor set
- Returns:
the SOL radiation map
- plot_poloidal_radiation_distribution(firstwall_geom: bluemira.equilibria.grid.Grid)
Plot poloidal radiation distribution within the scrape-off layer
- Parameters:
firstwall_geom (bluemira.equilibria.grid.Grid) – first wall geometry
- class bluemira.radiation_transport.radiation_profile.SNScrapeOffLayerRadiation(eq: bluemira.equilibria.equilibrium.Equilibrium, params: bluemira.base.parameter_frame.ParameterFrame, flux_surfaces: list[bluemira.equilibria.flux_surfaces.PartialOpenFluxSurface], impurity_content: dict[str, float], impurity_data: dict[str, dict[str, tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]]], firstwall_geom: bluemira.geometry.coordinates.Coordinates, x_sep_omp: float, dx_omp: float)
Bases:
ScrapeOffLayerRadiationSpecific class to make the SOL radiation source for a double null configuration. Here the SOL is divided into for regions. From the outer midplane to the outer lower target; from the omp to the outer upper target; from the inboard midplane to the inner lower target; from the imp to the inner upper target.
- Parameters:
eq (bluemira.equilibria.equilibrium.Equilibrium) – The equilibrium defining flux surfaces.
flux_surfaces (list[bluemira.equilibria.flux_surfaces.PartialOpenFluxSurface]) – list of flux surfaces, all of which terminating at the first walls.
impurity_content (dict[str, float]) – The dictionary of impurities in the single-null scrape-off layer (e.g. ‘H’) and their fractions (e.g. 1E-2).
impurity_data (dict[str, dict[str, tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]]]) – The dictionary of impurities in the single-null scrape-off layer at a defined time, sorted by species, then sorted by “T_ref” v.s. “L_ref”, where T_ref = reference ion temperature [eV], L_ref = the loss function value $L_z(n_e, T_e)$ [W m^3].
firstwall_geom (bluemira.geometry.coordinates.Coordinates) – The closed first wall geometry
x_sep_omp (float) – outboard mid-plane separatrix x-coordinates [m]
dx_omp (float) – The midplane spatial resolution between flux surfaces at the outboard [m]
params (bluemira.base.parameter_frame.ParameterFrame)
- impurities_content
- imp_data_t_ref
- imp_data_l_ref
- flux_tubes_lfs
- flux_tubes_hfs
- x_strike_lfs
- z_strike_lfs
- alpha_lfs
- b_pol_out_tar
- b_tor_out_tar
- b_tot_out_tar
- x_strike_hfs
- z_strike_hfs
- alpha_hfs
- b_pol_inn_tar
- b_tor_inn_tar
- b_tot_inn_tar
- t_omp
- calculate_sol_distribution(firstwall_geom: bluemira.equilibria.grid.Grid) dict[str, numpy.typing.NDArray[numpy.float64]]
Temperature and density profiles calculation. For each scrape-off layer sector, it gives temperature and density profile along each flux tube.
- Parameters:
firstwall_geom (bluemira.equilibria.grid.Grid) – first wall geometry
- Returns:
t_and_n_pol[“lfs”] – temperature and density poloidal profile along each flux tube within the lfs divertor set
t_and_n_pol[“hfs”] – temperature and density poloidal profile along each flux tube within the hfs divertor set
- Return type:
dict[str, numpy.typing.NDArray[numpy.float64]]
- calculate_sol_radiation_distribution(lfs: numpy.ndarray, hfs: numpy.ndarray) dict[str, list[list[numpy.ndarray]]]
Radiation profiles calculation. For each scrape-off layer sector, it gives the radiation profile along each flux tube.
- Parameters:
lfs (numpy.ndarray) – temperature and density poloidal profile along each flux tube within the lfs divertor set
hfs (numpy.ndarray) – temperature and density poloidal profile along each flux tube within the hfs divertor set
- Returns:
rad[“lfs”] – radiation poloidal profile along each flux tube within the lfs divertor set
rad[“hfs”] – radiation poloidal profile along each flux tube within the hfs divertor set
- Return type:
dict[str, list[list[numpy.ndarray]]]
- calculate_sol_radiation_map(lfs: numpy.ndarray, hfs: numpy.ndarray)
Scrape off layer radiation map calculation.
- Parameters:
lfs (numpy.ndarray) – radiation poloidal profile along each flux tube within the lfs divertor set
hfs (numpy.ndarray) – radiation poloidal profile along each flux tube within the hfs upper divertor set
- plot_poloidal_radiation_distribution(firstwall_geom: bluemira.geometry.coordinates.Coordinates)
Plot poloidal radiation distribution within the scrape-off layer
- Parameters:
firstwall_geom (bluemira.geometry.coordinates.Coordinates) – first wall geometry
- class bluemira.radiation_transport.radiation_profile.RadiationSource(eq: bluemira.equilibria.equilibrium.Equilibrium, firstwall_shape: bluemira.geometry.coordinates.Coordinates, params: bluemira.base.parameter_frame.typed.ParameterFrameLike, midplane_profiles: bluemira.radiation_transport.midplane_temperature_density.MidplaneProfiles, core_impurities: dict[str, float], sol_impurities: dict[str, float], confinement_time_core: float = np.inf, confinement_time_sol: float = 10, source_sol_dl: float | None = None, dx_mp: float = 0.001)
Simplified solver to easily access the radiation model location inputs.
- Parameters:
eq (bluemira.equilibria.equilibrium.Equilibrium) – The equilibrium defining flux surfaces.
firstwall_shape (bluemira.geometry.coordinates.Coordinates) – BluemiraWire defining the first wall.
midplane_profiles (bluemira.radiation_transport.midplane_temperature_density.MidplaneProfiles) – Electron density and electron temperature profile at the mid-plane.
core_impurities (dict[str, float]) – The dictionary of impurities in the core (e.g. ‘H’) and their fractions (e.g. 1E-2).
sol_impurities (dict[str, float]) – The dictionary of impurities in the scrape-off layer (e.g. ‘H’) and their fractions (e.g. 1E-2).
confinement_time_sol (float) – Confinement timescale at the scrape-off layer [s]
confinement_time_core (float) – Confinement timescale in the core [s]
source_sol_dl (float | None) – the discretisation length of the scrape of layer source term [m]
dx_mp (float) – The midplane spatial resolution between flux surfaces [m]
params (bluemira.base.parameter_frame.typed.ParameterFrameLike)
- params: RadiationSourceParams
- param_cls: type[RadiationSourceParams]
- eq
- imp_content_core
- imp_data_core
- imp_content_sol
- imp_data_sol
- lcfs
- midplane_profiles
- core_rad = None
- sol_rad = None
- x_tot = None
- z_tot = None
- rad_tot = None
- analyse(firstwall_geom: bluemira.geometry.coordinates.Coordinates) tuple[CoreRadiation, ScrapeOffLayerRadiation]
Using core radiation model and SOL radiation model to calculate the radiation source at all points
- Parameters:
firstwall_geom (bluemira.geometry.coordinates.Coordinates) – The closed first wall geometry
- Returns:
self.core_rad – Core radiation source
self.sol_rad – Scrape-off-layer radiation source
- Return type:
tuple[CoreRadiation, ScrapeOffLayerRadiation]
- rad_core_by_psi_n(psi_n: float | numpy.ndarray) numpy.ndarray
Calculation of core radiation source for a given (set of) psi norm value(s)
- Parameters:
psi_n (float | numpy.ndarray) – The normalised magnetic flux value(s), between the minimum and maximum of [self.midplane_profiles.psi_n.min(), self.midplane_profiles.psi_n.max()].
- Returns:
Local radiation source value(s) associated to the given psi_n
- Return type:
rad_new
- rad_core_by_points(x: float | numpy.ndarray, z: float | numpy.ndarray) numpy.ndarray
Calculation of core radiation source for a given (set of) x, z coordinates
- Parameters:
x (float | numpy.ndarray) – The x coordinate(s) of desired radiation source point(s)
z (float | numpy.ndarray) – The z coordinate(s) of desired radiation source point(s)
- Returns:
Local radiation source value(s) associated to the point(s)
- Return type:
self.rad_core_by_psi_n(psi_n)
- rad_sol_by_psi_n(psi_n: float | numpy.ndarray[float]) numpy.ndarray
Calculation of SOL radiation sources for a given psi norm value.
Each psi_n corresponds to a flux surface defined by a list of x-z coordinates. In the SOL (i.e. outside the LCFS) the radiation intensity is not constant, but rather varies across the flux surface. Therefore this method returns a radiation intensity value for each x-z coordinates in the list defining each flux surface.
- Parameters:
psi_n (float) – The normalised magnetic flux value, between the minimum and maximum of [self.eq.psi_norm().min(), self.eq.psi_norm().max()].
- Returns:
Local radiation source values associated to the given psi_n
- Return type:
list
- rad_sol_by_points(x_lst: collections.abc.Iterable[float], z_lst: collections.abc.Iterable[float]) numpy.ndarray
Calculation of SOL radiation source for a given (set of) x, z coordinates
- Parameters:
x_lst (collections.abc.Iterable[float]) – The x coordinate(s) of desired radiation source point(s)
z_lst (collections.abc.Iterable[float]) – The z coordinate(s) of desired radiation source point(s)
- Returns:
Local radiation source value(s) associated to the point(s)
- Return type:
list
- rad_by_psi_n(psi_n: float) numpy.ndarray
Calculation of any radiation source for a given (set of) psi norm value(s)
- Parameters:
psi_n (float) – The normalised magnetic flux value(s), between the minimum and maximum of [self.eq.psi_norm().min(), self.eq.psi_norm().max()].
- Returns:
Local radiation source value(s) associated to the given psi_n
- Return type:
rad_any
- rad_by_points(x: float | numpy.ndarray, z: float | numpy.ndarray) numpy.ndarray
Calculation of any radiation source for a given (set of) x, z coordinates
- Parameters:
x (float | numpy.ndarray) – The x coordinate(s) of desired radiation source point(s)
z (float | numpy.ndarray) – The z coordinate(s) of desired radiation source point(s)
- Returns:
Local radiation source values located at the meshgrid formed by meshgrid of x and z.
- Return type:
rad_any
- rad_map(firstwall_geom: bluemira.geometry.coordinates.Coordinates)
Mapping all the radiation values associated to all the points as three arrays containing x coordinates, z coordinates and local radiated power density [MW/m^3]
- Returns:
self.x_tot – x-coordinates of flux tubes [m]
self.z_tot – z-coordinates of flux tubes [m]
self.rad_tot – total radiated power density [MW/m^3]
- Parameters:
firstwall_geom (bluemira.geometry.coordinates.Coordinates)
- plot(ax=None, *, plot_flux_tubes: bool = False) matplotlib.pyplot.Axes
Plot the RadiationSolver results.
- Returns:
The axes object on which radiation solver results are plotted.
- Return type:
ax
- Parameters:
plot_flux_tubes (bool)