Ansys Speos

This node allows you to use Ansys Speos inside optiSLang It requires a prepared Speos model (*.scdocx) with published input parameters.

From version 2023 R2 and later, a wizard-based Speos integration has been added into optiSLang.

Setup

There are two methods for setting up a Speos workflow:

  • Set up using the Solver wizard (for more details, see Ansys Speos Wizard).

  • Set up manually:

    1. In the Modules pane, expand Process chain elements > Integrations or type Ansys Speos in the search bar.

    2. Drag and drop the Ansys Speos node onto the Scenery pane or your solver chain.

    3. Add Ansys Speos Core and Ansys Speos Output nodes to the solver chain for a complete Speos workflow.

    4. In the dialog box of the Ansys Speos node, browse for and open an existing Speos project. The Ansys Speos solver node supports Speos project files (*.scdocx).

Parametrization Tab

Parameters are loaded and listed in the table. Register the parameters by dragging them to the Parameter pane or highlighting them in the table and clicking the multi-action button. You should rename the parameter names to short names.


Note:  For identically named parameters, you must move them to the Parameter pane and rename them individually.


Execution Settings Tab

The following execution sequence runs for each design:

  1. Open the project

  2. Execute Python script pre-update

  3. Update parametrics

  4. Update Optical Part Design

  5. Check the set parametrics

  6. Execute Python script post-update

  7. Export geometries and images

  8. Export simulations

  9. Close the project

OptionDescription
ProductLists the supported versions of Speos (Ansys Speos 2023 R2 and later). Select the version you are using from the list.
Batch modeWhen selected, Speos is started without a user interface. When cleared, Speos is started with a user interface.
Python script pre updateWhen selected, you can load a Python script that executes before the design is updated.
Python script post updateWhen selected, you can load a Python script that executes after the design has been updated.

Note:
  • The parameters are updated for the project in the order that they are displayed in the registration table. The sort order is always alphabetical and can be changed by renaming.

  • If the Speos project contains Block Recording or history track parameters, the published parameters cannot be changed. All parametric changes must be done with Block Recording.


The following environment variables are available for the Python scripts (pre- and post-update) during the execution sequence:

Environment VariableDescription
OSL_DESIGN_NOThe current design number (for example, 1).
OSL_DESIGN_NAMEThe current design directory name (for example, Design0001).
OSL_DESIGN_DIRThe absolute path of the current design directory.
OSL_PROJECT_DIRThe absolute path of the current project (*.opd).
OSL_WORKING_DIR The absolute path of the current working directory.
OSL_NODE_NAMEThe name of the current node.
OSL_RLS_VERThe version number of optiSLang.
OSL_RLS_REVThe revision number of optiSLang.
OSL_RLS_FLGEmpty unless a specific version of optiSLang is used.

Note:
  • You get access to the environment variables by using the following IronPython code:

    import os
    OSL_DESIGN_DIR = os.getenv('OSL_DESIGN_DIR')
  • The default working directory of Speos is NOT the design directory. If you need to change the current working directory to the design directory, then use the following IronPython code:

    import os
    os.chdir(os.getenv('OSL_DESIGN_DIR'))

Simulations Tab
OptionDescription
Speos Simulations to be solvedThe selected simulations are exported in the design directory and resolved by the Speos Core node.
Export Tab
OptionDescription
Export formatsThe selected formats are written as result files in the design directory.
Additional formatsExports defined file types during the run. In the field, separate the file types using commas (,), semicolons (;), or pipes (|). For supported export formats, see Exporting: Supported File Formats in the Discovery SpaceClaim documentation.
Run Options

This node has general Run Options. The number of supported options is individual for each node.

Hint: Using the run option "Designs per process" can lead to a very high memory allocation of the Speos project, as the allocated memory is only released when the Speos process is closed. It is recommended to use a small number for "Designs in process" if memory is limited.

Limitations
  • Only supported on Windows systems.

  • Both optiSLang and Speos must be the same version (for example, 2024R1).

  • Currently, there is no functionality to define the geometry update order for the Optical Part Design.

    Workaround: Create a Python script to define the update order manually and use it in the pre-update function (see Execution Settings Tab).

  • If OPD features cannot be updated with given parameter values, an error message is not displayed in optiSLang.

  • Currently, multi-design process (number of parallel runs > 1) is not supported.

  • 3D texture updates are not automatically updated. To optimize them, use a Python script: texture = SpeosSim.Component3DTexture.Find("my3dtexturename").Compute() sim = SpeosSim.SimulationDirect.Find("mysimulationname").LinkedExport()

Supported Versions

See the Supported Integration Versions table.