Machine module#

To deal with ITER PFC.

PFC Mesh#

cherab.iter.machine.pfc_mesh.load_pfc_mesh(world, path='/home/koyo/Documents/cherab/cherab_iter/cherab/iter/machine', reflections=True, roughness={'Be': 0.26, 'Fe': 0.13, 'W': 0.29}, detail=False)#

Loads ITER PFC mesh and connects it to Raysect World instance. The coordinates of PFCs from the pfc_list are given in TGCS for the sector 1.

Note

Currently the entire first wall is obtained by copying and rotating the 1st sector 18 times.

The coordinates of custom port plugs are given in TGCS. The coordinates of general port plugs are given in internal coordinate system (which can be transformed to TGCS for the sector 1 by rotating on 10 deg counter-clockwise over Z-axis).

Parameters:
  • world (World) – Raysect World instance

  • path (str) – Path to directory containing “simple” or “detail”, and “portplugs”, by default “../cherab/iter/machine/”

  • reflections (bool) – Reflection on/off, by default True

  • roughness (dict[str, float]) – Roughness dict for PFC materials, by default {“Be”: 0.26, “W”: 0.29, “Fe”: 0.13}.

  • detail (bool) – Load the detailed wall model instead of the simple one. If True, wall meshes are loaded from “path/detail” directory, otherwise, from “path/simple” directory, by default False.

Returns:

dict of ITER PFC meshes

Return type:

dict[str, Mesh]

Warning

Currently the detailed wall model has not yet offered from default directory.

Examples

from raysect.core import World
from cherab.iter.machine import load_pfc_mesh

world = World()
mesh = load_pfc_mesh(world, reflections=True)

Rough Conductor#

class cherab.iter.machine.rough_conductor.RtmRoughConductor#

Bases: RoughConductor

RoughConductor optimized for calculation of ray transfer matrix (geometry matrix) when the spectral array is used to store the data for individual light sources and not the actual spectrum. The spectral array in this case contains ~ 10^5 - 10^6 spectral bins but the wavelengths for all of them are equal. The Fresnel indeces are equal for all spectral bins, so the unnecessary calculations must be avoided.

evaluate_shading(world, ray, s_incoming, s_outgoing, w_reflection_origin, w_transmission_origin, back_face, world_to_surface, surface_to_world)#

Wall Outline#

cherab.iter.machine.wall_outline.plot_iter_wall_outline(style='k')#

plot ITER wall outline

Parameters:

style (str) – the style parameter put into plt.plot(x, y, style), by default “k”

Return type:

None