The Optical Propagation Code (OPC) implements wavefront propagation of optical fields and is tailored to work together with several FEL gain codes (Genesis 1.3, Medusa and Minerva) to model FEL systems. OPC implements several propagation methods (Fresnel, modified Fresnel and the spectral methode) and various optical elements (lenses, mirrors, diaphragms, etc). OPC also implements phase and amplitude masks, and these can, for example, be used to model cylindrical lenses. Furthermore, OPC provides complete control over the input parameters of the FEL gain codes.

OPC is implemented in Fortran and Perl. The core calculations are done using the Fortran programming language and the user interface, including communication with the FEL gain codes, is handled via Perl.

For more information please have a look at the OPC_manual.

To download the latest version for Linux or OSX: Physics-OPC-0.7.9.tar
To download the latest version for MS Windows: OPC version (64 bit) (205 downloads)

Installation on Windows systems

  • Save the zip file to a directory where you want to install OPC. Unzip the file.
  • To use multiple cores, the intel MPI runtime library is required. Please go to Intel MPI to find the link to the free runtime library.
  • In order to use the plotting capabilities, install GnuPlot for windows.
  • In order to execute the perl scripts, install Strawberry Perl for windows.

To use OPC, open a CMD window and set the OPC_HOME environment variable to the root of the OPC package, e.g., “set OPC_HOME=C:\Users\Name\…\Physics-OPC.07.10.3”. You should now be able to run OPC from any directory that contains the script you want to run. To execute the plot.pl script, use “%OPC_HOME%\plot.pl graph=contour file_in=name.dfl”