bluemira.radiation_transport.advective_transport ================================================ .. py:module:: bluemira.radiation_transport.advective_transport .. autoapi-nested-parse:: A simplified 2-D solver for calculating charged particle heat loads. Classes ------- .. autoapisummary:: bluemira.radiation_transport.advective_transport.ChargedParticleSolver bluemira.radiation_transport.advective_transport.ChargedParticleSolverParams Module Contents --------------- .. py:class:: ChargedParticleSolver(config: ChargedParticleSolverParams | dict[str, float], equilibrium: bluemira.equilibria.equilibrium.Equilibrium, dx_mp: float = 0.001, psi_n_tol: float = 1e-06) A simplified charged particle transport model along open field lines. :param config: The parameters for running the transport model. See :py:class:`~bluemira.radiation_transport.advective_transport.ChargedParticleSolverParams` for available parameters and their defaults. :type config: Dict[str, float] :param equilibrium: The equilibrium defining flux surfaces. :type equilibrium: Equilibrium :param dx_mp: The midplane spatial resolution between flux surfaces [m] (default: 0.001). :type dx_mp: float (optional) .. py:attribute:: eq .. py:attribute:: params .. py:attribute:: dx_mp :value: 0.001 .. py:attribute:: first_wall :value: None .. py:attribute:: flux_surfaces_ob_down :value: None .. py:attribute:: flux_surfaces_ob_up :value: None .. py:attribute:: flux_surfaces_ib_down :value: None .. py:attribute:: flux_surfaces_ib_up :value: None .. py:attribute:: x_sep_omp :value: None .. py:attribute:: x_sep_imp :value: None .. py:attribute:: result :value: None .. py:attribute:: psi_n_tol :value: 1e-06 .. py:attribute:: _o_point .. py:attribute:: _yz_plane .. py:property:: flux_surfaces :type: list[bluemira.equilibria.flux_surfaces.PartialOpenFluxSurface] All flux surfaces in the ChargedParticleSolver. :returns: The list of partially open flux surfaces. :rtype: flux_surfaces .. py:method:: _check_params() Check input fractions for validity. :raises AdvectionTransportError: Sum of total power fractions is not ~= 1 .. py:method:: _process_first_wall(first_wall) Force working first wall geometry to be closed and counter-clockwise. :returns: * *first_wall* -- the first wall wire * *int_intersection* -- the internal intersection coordinate * *out_intersection* -- the external intersection coordinate .. py:method:: _get_arrays(flux_surfaces) -> tuple[numpy.typing.NDArray[float], numpy.typing.NDArray[float], numpy.typing.NDArray[float], numpy.typing.NDArray[float], numpy.typing.NDArray[float]] :staticmethod: Get arrays of flux surface values. :returns: * *x_mp* -- the array of mid-plane intersection point x-coordinate for each flux surface * *z_mp* -- the array of mid-plane intersection point z-coordinate for each flux surface * *x_fw* -- the array of first-wall intersection point x-coordinate for each flux surface * *z_fw* -- the array of first-wall intersection point z-coordinate for each flux surface * *alpha* -- the array of alpha angle for each flux surface .. py:method:: _make_flux_surfaces_ob() Make the flux surfaces on the outboard. .. py:method:: _make_flux_surfaces_ib() Make the flux surfaces on the inboard. .. py:method:: _clip_flux_surfaces(first_wall) Clip the flux surfaces to a first wall. Catch the cases where no intersections are found. .. py:method:: _no_wall_intersection_region(x_up_inter, z_up_inter, x_down_inter, z_down_inter, *, lfs=True) Get first wall mid-plane region with no flux line intersections. :returns: * *x_reg_inter* -- the x region intersection point * *z_reg_inter* -- the z region intersection point * *wire_length* -- the length of the wire .. py:method:: analyse(first_wall: bluemira.geometry.coordinates.Coordinates) Perform the calculation to obtain charged particle heat fluxes on the the specified first_wall :param first_wall: The closed first wall geometry on which to calculate the heat flux :type first_wall: Coordinates :returns: * *x* -- The x coordinates of the flux surface intersections * *z* -- The z coordinates of the flux surface intersections * *heat_flux* -- The perpendicular heat fluxes at the intersection points [MW/m^2] .. rubric:: Notes The heat flux model assumes pure parallel transport and fudges the perpendicular transport via the power decay length, lambda. This approach, while is widely used, leads to no power deposited on the wall at the mid-plane. _analyse_SN and _analyse_DN assume, in the area in proximity of the mid-plane, where the outermost flux tube is open, that the remaining power of from the exponential decay is deposited on the wall perpendicularly. .. py:method:: _analyse_SN() Calculation for the case of single nulls. :returns: * *x* -- The x coordinates of the flux surface intersections * *z* -- The z coordinates of the flux surface intersections * *heat_flux* -- The perpendicular heat fluxes at the intersection points [MW/m^2] .. py:method:: _analyse_DN() -> tuple[numpy.typing.NDArray[float], Ellipsis] Calculation for the case of double nulls. :returns: * *x* -- The x coordinates of the flux surface intersections * *z* -- The z coordinates of the flux surface intersections * *heat_flux* -- The perpendicular heat fluxes at the intersection points [MW/m^2] .. py:method:: _q_par(x, dx, B, Bp, *, outboard=True) Calculate the parallel power at the midplane. :returns: parallel power at the midplane .. py:method:: plot(ax: matplotlib.axes.Axes = None, *, show=False) -> matplotlib.axes.Axes Plot the ChargedParticleSolver results. :returns: The axes object on which the ChargedParticleSolver is plotted. .. py:method:: _make_params(config) :staticmethod: Convert the given params to ``ChargedParticleSolverParams`` :returns: a ChargedParticleSolverParams object :raises TypeError: Unsupported config type :raises ValueError: Unknown configuration parameters .. py:class:: ChargedParticleSolverParams Parameters for use with :class:`~ChargedParticleSolver`. .. py:attribute:: P_sep_particle :type: float :value: 150 Separatrix power [MW]. .. py:attribute:: f_p_sol_near :type: float :value: 0.5 Near scrape-off layer power rate [dimensionless]. .. py:attribute:: fw_lambda_q_near_omp :type: float :value: 0.003 Lambda q near SOL at the outboard [m]. .. py:attribute:: fw_lambda_q_far_omp :type: float :value: 0.05 Lambda q far SOL at the outboard [m]. .. py:attribute:: fw_lambda_q_near_imp :type: float :value: 0.003 Lambda q near SOL at the inboard [m]. .. py:attribute:: fw_lambda_q_far_imp :type: float :value: 0.05 Lambda q far SOL at the inboard [m]. .. py:attribute:: f_lfs_lower_target :type: float :value: 0.9 Fraction of SOL power deposited on the LFS lower target [dimensionless]. .. py:attribute:: f_hfs_lower_target :type: float :value: 0.1 Fraction of SOL power deposited on the HFS lower target [dimensionless]. .. py:attribute:: f_lfs_upper_target :type: float :value: 0 Fraction of SOL power deposited on the LFS upper target (DN only) [dimensionless]. .. py:attribute:: f_hfs_upper_target :type: float :value: 0 Fraction of SOL power deposited on the HFS upper target (DN only) [dimensionless].