Introduction

The software allows parametric simulations of optical components to be carried out within an integrated programming environment (IDE). Integrated tools are available for the study and evaluation of complex optical conditions. Each simulation is specifically defined by the user with the objective of only simulating the aspects that are of interest to them. For example, in a simulation that contains lenses, the propagation of the beams through them can be studied, and/or only the reflection. In this way the simulation time is reduced and the results obtained only have information about the aspect to be analyzed.

The software has partial compatibility with Zemax® component files (.zmx) that are usually available from manufacturers such as Thorlabs®. It is also fully compatible with the beam files that Zemax® exports (.zbf) which can be imported from the program.

Download

Link to download the software and documentation

Supported Versions

Free App Version 0.1.0. Integrated optical simulation software beta version with trial period of 1000 free initializations.

Paid App Version 0.1.0. Send a message to OpticStudioIDE@gmail.com.



Getting Started

The section describes the installation processes for the different operating systems. The software is developed in .NET, having good compatibility with the various Windows® operating systems.




Windows 7 & 8

It is suggested to open the program. In case an error appears like the one shown in the following image

You must access the following Microsoft® link and download the updated framework

https://support.microsoft.com/en-us/topic/microsoft-net-framework-4-7-2-offline-installer-for-windows-05a72734-2127-a15d-50cf-daf56d5faec2

Once installed, the software should start correctly.




Windows 10

It does not require installation since .NET Framework 4.7.2 is installed natively.




Linux & Mac

The installation of the program for these operating systems must be done by installing MONO. You must follow the steps set out in the following link

https://www.mono-project.com/download/stable/#download-lin




Using Docker

You can run the simulation software within docker using the following steps:

1. Build the image

docker build -t OpticStudio

2. Start the container

docker run -v /tmp:/tmp -v $PWD:/mnt OpticStudio:latest $DISPLAY $USER

Note: This functionality was not tested, but in theory it should work. If it doesn't work, please report it through an Issue on GitHub using the following link.

Report Bug



Graphical interface and functions

Instructions for use

The executable is located in the folderSoftware\OpticStudio.exe. In case it cannot be executed correctly, follow the installation steps found on the documentation page (https://emilianojan.github.io/OpticStudioDev)

Features and basic description of the software

The following image shows the main window of the software

The software is made up of various panels that can be located in different places. To move one of the panels, drag the respective tab to the area of ​​interest. A blue block automatically appears in the area where the panel will be inserted. The following image shows the change of location of the Read Me documentation component, which will now be together with the 3D viewer(*).

(*)Changing the location of the panels is only available on Windows operating systems.

The panels that are initialized with the program are the following:

  • Logic: Allows you to set the simulation logic
  • 3D Viewer: The beams propagated in the various components are displayed.
  • Properties, Actions and Documentation: When you click on a logical block, it shows the various properties and actions that can be carried out.
  • Console Output: Indicates simulation errors and additional information from the simulation engine.

Logic panel and Properties:

The following image corresponds to the logic tab, in which the order in which the simulations will be carried out is established. Each block will be processed in the simulation taking into account its connection. The nodes on the left are the inputs to the block, while the nodes on the right are its outputs. Field generating components usually do not have inputs, but do have an output that returns the generated field. Passive optical components have one input and two outputs. The entry establishes which field you want to interact with the component. The Incident output returns the field above the foreground of the component. The Output output returns the field that was processed by the component just above the output plane. The beams propagate in space in case the exit plane of one component and the entry plane of the next are not the same.

Each optical component can have multiple blocks. This is because it is common to have the same component, but for the beams to pass through it multiple times. To add multiple blocks to a component you must click on one of the blocks and go to the sidebar. In this bar you will find the properties, actions and documentation of the component. In the Actions tab there is a list of possible modifications that can be made. The following image shows the actions.

 

The usual actions of the components are described below. Some components may have more actions.

  • Add new node: Add a new simulation block in the logical manager. It allows different beams to be propagated on the same component.
  • Change 3D color: Change the color of the component in the 3D viewer. The changes are applied the next time it is simulated.
  • Change 3D representation: Opens the 3D component viewer and allows you to load a new geometry from a file or from the library. The loaded geometry is not used in the simulations. It is only to complement the 3D visualization.
  • Node Property: Allows you to generate a simulation block that modifies any property of the component. It is usually useful if you want to modify the position or rotation of the component from the logic.

Visor 3D

It allows the simulation to be represented in three dimensions. The following image shows an example case.

 

The default components are illustrated as 10 cm X 10 cm gray rectangular planes. However, the 3D representation along with the color can be modified from the properties and actions panel.

In the View menu, the transparencies of components and beams can be configured, along with changing the display type. The following image shows the various types of possible visualizations.

  • Lambda: The colors loaded into the beams correspond to the wavelength of the beam without taking into account its power.
  • Attenuation (linear scale): Shows the attenuation on a linear scale of the beam. It is important to note that it is the attenuation of the beam with respect to the generating beam, it does not show the intensity of the beam.
  • Attenuation (log scale): Similar to the linear display, only the scale used is logarithmic.

Component Library

It allows various components to be incorporated into the logic panel, which may be internal or those incorporated by the user. The following image shows the component library.

The library structure consists of several categories that may contain multiple subcategories. In each subcategory you can have multiple components. As you select the category, subcategory and component, the information is updated. In the right panel you will find the component documentation, properties and 3D representation. The Internal category cannot be modified, nor can components be added, however the rest of the categories do have these functionalities. Clicking the OK button (located at the bottom right) automatically loads the component into the logic panel.

Table manager:

The table manager is used by various components and in multiple fields. It allows you to manage all the information that can be represented as a function y = f(x) (one input, one output). Examples of use are the dependence of the refractive index as a function of the wavelength, the temporal dependence of the power in a beam, or the focal shift of a lens.

The following image shows the main window of the manager.

A different table can be loaded by clicking on the Add table menu. The menu that appears contains all the possible ways to generate a table. They are all shown below.

The main ones are described below:

  • From library: Loads the table from the table library, which contains, for example, the NIST emission spectra, or the complete list of refraction indices on the pagehttps://refractiveindex.info/ 
  • From picture: Opens a window in which you can load an image and manually convert it to a series of points. It is particularly useful when you want to use the information contained in a figure in a paper. The individual component can be downloaded fromhttps://github.com/EmilianoJan/PlotToData



Basic Features

Basic beam

The simulator mainly uses fields composed of a linear superposition of Gaussian beams that propagate between the various components. Each optical component can process each beam individually, or together. The main properties of a Gaussian beam are described below.

  • Cumulative_Attenuation: Establishes the power that was lost between the various components and media as it was propagated. Usually this parameter is modified by the components and not by the user.
  • Application_Plane: Indicates the plane on which the beam exists, generally coinciding with the plane of an optical component.
  • Direction: Direction of beam propagation.
  • k_attenuation: Attenuation of the medium in which the beam is immersed. If it propagates in said medium, this data is used to modify the value of the Cumulative_Attenuation parameters.
  • Lambda: Beam wavelength.
  • n: Refractive index of the medium. When the beam propagates at distance d, this parameter is used to calculate the time of flight among other data.
  • Polarization_Roll: The beam has a linear polarization in which if the Poynting vector points in the Z direction, the electric field will be in the X direction for Polarization_Roll = 0. If Polarization_Roll= 90, the electric field will be in the Y direction .
  • Power: Sets the power as a function of beam time for the initial instant. There are multiple functions that can be used from time-independent functions to dependencies given by data table.
  • Propagates_From: Indicates fromwhich plane the current beam was propagated. The information is used to generate the 3D viewer among others.
  • Propagation_Distance: Distance propagated from the initial instant (and plane). Units are in meters.
  • Time: Time the beam was propagated. Units are found in seconds.
  • wo_x and wo_y: Size of the beam waists in the directions transverse to that of beam propagation.

To calculate the beam, information on the radius of curvature and direction is mainly used, which is usually called “paraxial approximation”. This simplification allows the operation on the various components to be quick. However, the computation is left to the components, giving the flexibility of being able to use other optical models for the calculation.

Mathematical form

The Gaussian beam is a transverse electromagnetic (TEM) mode. The mathematical expression for the electric field amplitude is a solution to the paraxial Helmholtz equation. Assuming polarization in the x direction and propagation in the +z direction, the electric field in phasor (complex) notation is given by:

where

  • r is the radial distance from the center axis of the beam,
  • z is the axial distance from the beam's focus (or "waist"),
  • i is the imaginary unit,
  • k = 2πn/λ is the wave number (in radians per meter) for a free-space wavelength λ, and n is the index of refraction of the medium in which the beam propagates,
  • E0 = E(0, 0), the electric field amplitude (and phase) at the origin (r = 0, z = 0),
  • w(z) is the radius at which the field amplitudes fall to 1/e of their axial values (i.e., where the intensity values fall to 1/e2 of their axial values), at the plane z along the beam,
  • w0 = w(0) is the waist radius,
  • R(z) is the radius of curvature of the beam's wavefronts at z, and
  • ψ(z) is the Gouy phase at z, an extra phase term beyond that attributable to the phase velocity of light.

The physical electric field is obtained from the phasor field amplitude given above by taking the real part of the amplitude times a time factor:




Inspection plane

It is one of the main components of the simulator and allows calculating the distribution of Gaussian beams on a spatial plane to be configured. Beams propagate between components without calculating intermediate points. If there is information in a position where there is no optical component, an inspection plane is placed. At the same time, the inspection planes associated with other components are used, such as the Gaussian beam to Fresnel field converter.

Main properties of the component

  • Pos_x, Pos_y, Pos_z: Sets the position of the component in space.
  • Rot_x, Rot_y, Rot_z: These are the rotations in the three directions of the light generating plane.

Example of use

From the BPM tab insert a Basic Beam and two inspection planes. Place different positions in the z direction for each plane and simulate.

 



Infinity Mirror

The component allows you to simulate a perfect infinity mirror. All of the energy is reflected following simple ray tracing rules. It does not present dependence on the wavelength or polarization.

Main properties of the component

  • Pos_x, Pos_y, Pos_z: Sets the position of the component in space.
  • Rot_x, Rot_y, Rot_z: These are the rotations in the three directions of the light generating plane.

Example of use

From the BPM tab insert a Basic Beam, two mirrors and an inspection plane. The logical connection is illustrated below along with the 3D image. The mirrors are orange.

For the first mirror, set the position z = 5cm, and the rotation in the Y axis of 36º. For the second mirror, set the z position = 4cm, Y position = 5cm and the Y axis rotation at 36º. Finally, the configurations of the inspection plane are Pos_z = 10cm, Pos_y = 4cm.

By clicking on one of the mirrors and going to the Actions tab, you can modify the Yaw scroll bar to analyze the behavior at different rotations.




Simple telescope using two lenses of different focal lengths.

The following example allows you to simulate a telescope using simple lenses. The simulation does not take into account the polarization of the beams, nor the materials of the lenses. The lenses use a paraxial approximation.

Insert simulation components

In the BPM tab a Gaussian beam, two simple lenses and an inspection plane must be inserted. The following image shows the buttons that need to be used.

Carry out the connection following the logic of the first image. Once finished, the spatial properties of the components must be modified. The first lens must be set to a position of 0.05, (Pos_z = 0.05), and modify the property Focal_Length = 0.05. The settings should look like the image below.

For the second lens, it must be placed at a position of Pos_z= f_lens1 + f_lens2. Which in this case would be Pos_z = 0.15 m. The focal length of the lens is set to Focal_Length = 0.1. The final configurations should be similar to those seen in the image below.

 

Finally, the position of the inspection plane is established, setting Pos_z = 0.25.

By modifying the positions, different magnifications or changes in the position of the beam can be observed.


Advanced Features

Diffraction due to a slit

Figure 1 shows the logical scheme and the diffraction pattern of a beam emerging from a slit that has a width of 1 um and a height of 1cm.

Figure 1

The Simple Slit component allows generating a series of coherent beams of a configurable wavelength that, when superimposed, compose an interference pattern consistent with that of a slit.

Insert simulation components and configure them

In the BPM tab, the Simple Slit, Inspection plane and To Fresnel components are inserted, which generate the diffraction pattern, propagate it to a plane and convert it to a scalar electromagnetic field respectively.

 

Figure 2 shows the slit configurations. By clicking on the arrow to the left of the Slit property, all the properties of the slit are displayed, among which are Height and Width that establish the width and height of the slit. In turn, the step can be established in the x and y directions (X_Steps and Y_Steps respectively). The greater the number of steps, the greater the fidelity of the simulated field, however the longer it takes to complete the simulation.

Figure 2

The To Fresnel component (called Beam Field to Matrix in the logic diagram) has the properties shown in Figure 3 configured.

Figure 3

Finally, to view the Fresnel plane, the View (t) component is incorporated, found in the Fresnel tab. The component is named in the logical schema as View Field. The properties of said component are found in figure 4

 

Figure 4

 




Pulse propagation in medium

The simulation consists of propagating light pulses of different wavelengths that propagate through a glass of a defined thickness. Ideal power analyzers are placed to observe the temporal evolution of power. Each of the beams presents a Gaussian power distribution in time with Sigma=1ps.

        Figure 1 shows the propagated beams in the 3D display along with the energy of the pulses as a function of time over an inspection plane.

Figure 1

The logical scheme is found in figure 2. On the right is the energy as a function of the initial time of the system.

Figure 2

Glass has a refractive index (n) that varies with wavelength. Figure 3 exposes the dependency.

Figure 3

Because it has different indices, the time of flight within the material will differ for different wavelengths. In Figure 2 on the right it can be seen that for the original emission plane of the three beams, all the pulses are aligned, with the maximum at 6ps. Figure 4 shows the energies as a function of time for a plane that is 10cm from the source, and 4cm from the glass.

Figure 4

From Figure 4 it can be seen that the first three pulses are found, before 400ps, one of which left the glass earlier. Then at 550ps there is another set of pulses that are due to internal reflection within the glass. Changing the thickness of the glass modifies the position of these pulses.

By zooming in on the main pulses coming out of the glass, the time difference between both can be calculated, which is around 5.2ps. Figure 5 details the pulses.

Figure 5

Insert simulation components and configure them

3 Pulse Gaussian Beam components are inserted from the BPM tab, and the properties Pulse_Energy = 1, Mean_Time = 6ps, Sigma_Time = 1ps, and BaseBeam-> Lambda are configured for each of them. Figure 6 shows the main configurations.

Figure 6

Then two field sum components (Add Fields in the BPM tab) are inserted to join the sequence of pulses. Then the Polarization Glass component is inserted from the BPM tab, and an inspection plane. After connecting the components as shown in Figure 2, the positions of the components are set. For the glass a position z = 5cm is placed, while for the inspection plane Pos_z = 10cm is placed.

In the glass configurations you can modify the thickness by changing the Glass_thick property. On the other hand, in the actions tab, several elements appear that can be modified. Figure 7 shows the elements to modify.

Figure 7

If you click on the “Change Refractive Index” button, you can modify theindex ofrefraction of thecomponent using a table editing window shown in Figure 8

Figure 8

In the Add Table menu you can add standard tables or tables from a library. Figure 9 shows several of the tables that can be incorporated. When you click on From library, the library that contains tables of various natures is initialized.

Figure 9

Figure 10 shows the library in which there are categories with different natures of the tables. Within each category there are subcategories, which in this case are of different media. A Schott BAFN6 type glass is selected. If you click Ok, said table will be loaded onto the glass.

Figure 10


Future Developments

Below are listed all the functionalities that are planned for the software in future versions, in brackets is the progress status of the functionality.

Components:

  • Fiber optic module [advanced]
  • Generic light source (graphical interface to model the geometry, direction, wavelength and timing of the beams) [in development]
  • Cutout on lenses and apertures [coming soon]
  • Real powermeter (with dependence on wavelength and response time) [coming soon]
  • Ideal Spectrometer [under development]
  • Real spectrometer (with time and wavelength response) [in development]
  • Linear and lossy materials [advanced]
  • Fiber optic module [advanced]
  • Fiber optic components (splitters, WDM, Circulators, Interferometers) [in development]
  • Arbitrary user-defined surface (via AFM files, formula, or data set) [in development]

Simulation tools:

  • Export the optical model to Python to allow more complex simulations. Currently the functionality is implemented for C# and VB.NET [advanced]
  • Compiled to native code (.dll) [coming soon]
  • Generation of components described in Python [coming soon]
  • Full support for Zemax® files [in development]
  • MonteCarlo simulations within the IDE [coming soon]
  • Fresnel plane to Gaussian beam superposition converter [coming soon]
  • Add Thorlabs® components to the database [on completion of Zemax® file support development]
  • Temporal display in the 3D viewer [coming soon]

If you have in mind any functionality that you think could be useful for the project, do not hesitate to add an Issue in GitHub and label it as enhancement. You can also communicate it by email to OpticStudioIDE@gmail.com .