.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/geometry/plot_ring_2.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_geometry_plot_ring_2.py: 2x2 Ring - Geometry Visualization ================================= This script demonstrates how to create and visualize a 2x2 ring geometry using the FiberFusing library. .. GENERATED FROM PYTHON SOURCE LINES 6-12 .. code-block:: Python from FiberFusing import Geometry, BackGround from FiberFusing.fiber.catalogue import load_fiber from FiberFusing.configuration.ring import FusedProfile_02x02 from PyOptik import MaterialBank .. GENERATED FROM PYTHON SOURCE LINES 13-14 Define the operational parameters .. GENERATED FROM PYTHON SOURCE LINES 14-46 .. code-block:: Python wavelength = 1.55e-6 # Wavelength in meters (1.55 micrometers) # Set up the background medium (air) air_background = BackGround(index=1.0) # Create the cladding structure based on the fused fiber profile cladding = FusedProfile_02x02( fiber_radius=62.5e-6, # Radius of the fibers in the cladding (in meters) fusion_degree=0.9, # Degree of fusion in the structure index=MaterialBank.fused_silica.compute_refractive_index(wavelength) # Refractive index of silica at the specified wavelength ) # Load fibers (e.g., SMF-28) positioned at the cores of the cladding structure fibers = [ load_fiber('SMF28', wavelength=wavelength, position=core_position) for core_position in cladding.cores ] # Set up the geometry with the defined background, cladding structure, and resolution geometry = Geometry( background=air_background, additional_structure_list=[cladding], x_bounds='centering', y_bounds='centering', resolution=280 ) # Add the fibers to the geometry geometry.add_fiber(*fibers) # Plot the resulting geometry geometry.plot() .. image-sg:: /gallery/geometry/images/sphx_glr_plot_ring_2_001.png :alt: Fiber structure, Fiber structure :srcset: /gallery/geometry/images/sphx_glr_plot_ring_2_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none
.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 7.764 seconds) .. _sphx_glr_download_gallery_geometry_plot_ring_2.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ring_2.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ring_2.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_ring_2.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_