This article aims to provide a good understanding on how to couple Speos with other Ansys software for multi-physics analysis, using System Coupling.
Overview
The Ansys portfolio of simulation software facilitates the creation of multidisciplinary physics analyses — not only within the context of a single product, but also using Ansys System Coupling. System Coupling can integrate multiple individual analyses, enabling you to leverage different physics solvers and/or static external data sources in a single multi-physics simulation. When two or more analyses are coupled, an examination of their combined results can capture more complex interactions than an examination of those results in isolation, producing more accurate results and yielding an optimal solution.
System Coupling manages the execution of simulations between coupling participants, which are the applications or data sources that send and/or receive data in a coupled analysis. Participant support is determined by the context you're using. See System Coupling Overview.
The innovative addition of Speos as a coupling participant allows for the seamless integration of optical analysis capabilities alongside thermal, structural, and fluids dynamics solvers. This integrated approach offers the means to accurately model the relationships between optical and other physical properties calculated by the various physics solvers.
Example of a STOP analysis framework for a high power laser, encompassing Structural, Optical, and Thermal analyses
Prerequisites
You can find the Speos integration for System Coupling installation files here.
Additional requirements:
- Ansys System Coupling 2024 R2 or above. *
- Ansys Speos, Speos for NX or Speos for Creo 2024 R2 or above (Enterprise license).
- Ansys Mechanical 2024R2 or above. **
- Ansys Fluent 2024R2 or above. **
- Ansys Ensight 2024R2 or above. ***
* Ansys System Coupling is part of the Ansys Unified Installer, it will be automatically installed with any of the physics solvers.
** The installation of additional physics solvers will depend on the type of analysis you want to perform.
*** Ansys Ensight is a visualization software used for the post-processing of System Coupling’s interface results; optical simulation results can be visualized with the Viewers included with Speos.
Supported connections
In this section, we'll break down every supported connection by explaining the type of coupling region and the physical quantity that is either used as input/output for/from Speos.
Body deformation
Each body geometry included in the simulation is actually a coupling region. It's a surface region (surface mesh of the body), and it can receive a displacement vector field from any other solver (ex: Mechanical).
Gradient refractive index based on temperature
Gradient refractive index can be simulated in Speos using Non-Homogeneous Material. Therefore any non-homogeneous material in your simulation can be used as a coupling region. It's a volume region (volume mesh of the ".gradedmaterial" file), and it can receive a temperature scalar field from any other solver (ex: Mechanical, Fluent).
Note: if you want to generate a non-homogeneous material region based on an existing library glass data, please refer to Appendix1.
Body thermal emissivity
Body emissivity can be simulated in Speos through Thermic Sources. Therefore any thermic source (with ".OPTTemperatureField" file input) from the simulation can be used as a coupling region. It's a surface region (surface mesh of the ".OPTTemperatureField" file), and it can receive a temperature scalar field from any other solver (ex: Mechanical, Fluent).
Note: if you want to generate thermic source with a ".OPTTemperatureField" file based on an existing body geometry, please refer to Appendix2.
Heat flux from 3D irradiance sensor
3D irradiance sensors from your simulation can be used as coupling region. It's a surface region (surface mesh of the sensor), and it can send a heat flux scalar field to other solvers (ex: Mechanical). The 3D irradiance sensor must have the follow definition:
- Type : Radiometric
- Integration Type : Planar
- Layer : None
- Absorption : True
Heat generation from from 3D energy density
3D energy density sensors from your simulation can be used as coupling region. It's a volume region (volume mesh of the sensor), and it can send a heat generation scalar field to other solvers (ex: Mechanical).
Summary table
Region |
Topology | Region Discretization | Input Variables | Output Variables | Location | Tensor Type |
Body | Surface | Surface Mesh | Incremental Displacement | Node | Vector | |
Non-Homogeneous material | Volume | Volume Mesh | Temperature | Element | Scalar | |
Thermic Source | Surface | Surface Mesh | Temperature | Element | Scalar | |
3D Irradiance | Surface | Point Cloud | Heat Flux | Node | Scalar | |
3D Energy Density | Volume | Volume Mesh | Heat Generation | Element | Scalar |
System Coupling workflow with Speos
Preparing your Speos project
This section covers the few steps you need to perform in Speos to prepare for the System Coupling connection.
- Make sure that your simulation(s) contain(s) the objects that matches the type of data you want to exchange with other solvers. You can refer to the previous section on the available data exchanges.
- Right click on your simulation(s), and select "Linked Export". The generated simulation(s) file(s) will be the one(s) used by System Coupling during the co-simulation.
Adding Speos as a coupling participant
This section covers how to register Speos as a participant of a multi-physics workflow in System Coupling.
- From the System Coupling GUI toolbar, click on the first icon to add a new Participant.
- Set the Participant configuration as Python Script.
- Add the sysc_SpeosServer.py file from the installation directory (default location: C:\Program Files\ANSYS Inc\v2xx\SystemCoupling\Participants\SpeosServer) as Python script.
- Select a Speos working directory, which will be where every Speos result is saved. It is recommended to have a dedicated sub-directory in the current System Coupling project.
- Click Add.
- A pop-up window appears. Browse for the exported Speos simulation.
- In the case of transient analysis, you can select the dedicated option. If your simulation contains ambient sources, you will be asked to specify the starting date and time of the ambient source for the transient analysis.
Creating a Coupling Interface
- From the Simulation Coupling tree, right-click on Setup and select the Add Coupling Interface option.
- Set up the interface for each coupling side:
- Select the Coupling side.
- Select the Solver to assign to the active coupling side.
- Click on the Region List icon to expand the Select Region window; alternatively, you can activate the regions from the drop-down menu.
- Select the regions to enable for the coupling interface; you can do multi-selection by pressing the Ctrl key.
- Click on the arrow icon to enable the selected regions.
- Click OK to close the Select Regions window.
Creating a Data Transfer
- From the Simulation Coupling tree, right-click on Coupling Interface and select the Add Data Transfer option.
- Define the Source and Target variables for Transfer.
- For data transfers between surfaces, change the Face Alignment Mapping Control options from “ProgramControlled” to “SameOrientation”
Co-simulation execution
Note that it’s necessary to have at least one data-transfer to get the Solve options enabled. The co-simulation can be started from the Play button in the toolbar, or right-click on the Solution item in the tree and select Solve.
Results Post-processing
Speos results
After the co-simulation is finished, you will find the final Speos results located in the previously selected Speos working directory.
Result Visualization with Ensight
After the solution is complete, the results can be visualized in Ansys Ensight. The coupled solution file can be launched from the Ensight button in the Toolbar or right-click on the Solution item in the tree and select the Open Results in Ensight option.
For more information about the use of Ensight refer to Ansys Ensight User's Guide.
Additional resources
Appendix 1 - Creating a non-homogeneous material region for a glass.
- From your Speos project, open the scripting tab (Design > Script)
- Open and import the following script:
"C:\Program Files\ANSYS Inc\v242\SystemCoupling\Participants\SpeosServer\NonHomogeneousMaterialRegion.py"
- Run the script.
- When prompted, select the body to be a NHM region, and specify the glass catalog and glass name (in capital scripts), a base temperature in Celsius degrees as well as the NHM regionsampling in all three directions, then press the green tick to validate.
A non-homogeneous material is created and applied to the geometry.
Appendix 2 - Creating a homogeneous temperature field based on an existing geometry.
- From your Speos project, open the scripting tab (Design > Script)
- Open and import the following script:
"C:\Program Files\ANSYS Inc\v242\SystemCoupling\Participants\SpeosServer\ThermicSourceRegion.py"
- Run the script.
- When prompted, select the body to be a thermic source, and specify a base temperature in Kelvins. Press the green tick to validate.
A thermic source is automatically applied to the body.