Importing Field Data from Ansys Mechanical

This multi-part tutorial shows how to import field data from Ansys Mechanical:


Note:  This tutorial requires installations of both Ansys optiSLang and Ansys Mechanical.


Preparing Data for Export in Mechanical

To prepare data for export in Mechanical:

  1. In Ansys Workbench, open the archive file circuit.wbpz in oSP3D_examples\ansys\circuit.

  2. Rename the project to circuit_to_sos and save it as a project file in the same folder.

  3. If you see a message indicating that the oSP3D extension will be upgraded permanently when you save the project, click OK.

     

  4. Open the Parameter Set bar and verify the parameters.

     

    • The mechanical simulation has three input parameters.

    • The thermal simulation has three input parameters.

    • The static structural simulation has one output parameter: Equivalent Stress Maximum.

  5. Close the Parameter Set bar.

  • The mechanical simulation has three input parameters.

  • The thermal simulation has three input parameters.

  • There is one output parameter: Equivalent Stress Maximum.

Preparing the Thermal Model

To prepare the thermal model:

  1. Open the thermal model, solve it, and check the solution.

     

  2. In the Mechanical ribbon, select Add-ons > optiSLang 3D Post-Processing

  3. On the oSP3D tab, select Export > Thermal results.

     

    An Export results (SoS) node is added to the Solution block.

  4. Use the box select method to select all bodies in the model view.

  5. Configure the Export results (SoS) node:

    1. Save all 23 bodies for the mesh part.

    2. Export all 23 bodies to oSP3D

     

  6. Generate the data of the Export results (SoS) node.

  7. In the Outline view, right-click the Solution node and select Open Solver Files Directory to see the files that have been created.

  8. In the generated SoS_Export folder, verify the export of the mesh and field data:

    • The file sos_mesh.cdb contains the exported mesh part.

    • The file sos_results.k is the LS-PrePost output file contains the exported field data. For information on supported LS-PrePost keywords, see LS-PrePost Files in the optiSLang 3D Post-Processing User's Guide.

Preparing the Mechanical Model

To prepare the Mechanical model:

  1. Open the Mechanical model, solve it, and check the solutions for Total Deformation and Equivalent Stress.

     

  2. In the Mechanical ribbon, select Add-ons > optiSLang 3D Post-Processing

  3. On the oSP3D tab, select Export > Mechanical results.

    An Export results SoS) node is added under Solution.

  4. Use the box select method to select all bodies in the model view.

  5. Configure the Export results SoS) node:

    1. Save all 23 bodies for the mesh part.

    2. Export all 23 bodies to oSP3D

    3. Export Displacements, Stress (principal), and Stress (von Mises) as node values.

     

  6. Save the project and close Workbench.

    In the folder for the project:

    • dp0\SYS-1\MECH\SoS_Export contains the thermal results.

    • dp0\SYS-2\MECH\SoS_Export contains the mechanical results.

You can now select output files that are saved to optiSLang design directories.

Selecting Output Files Saved to optiSLang Design Directories

To select output files that are saved to optiSLang design directories:

  1. From under optiSLang Integrations in the Workbench Toolbox, insert a Data Send system in the Project Schematic.

     

  2. Connect the Solution cell in the Static Structural system to the Setup cell in the Data Send system.

     

  3. In the Data Send system, double-click the Setup cell.

  4. Select the files sos_mesh.cdb and sos_results.k files for export:

     

  5. Click OK.

You can now perform a DOE in optiSLang.

Performing a DOE in optiSLang

This multi-part tutorial shows how to perform a DOE in optiSLang:

Setting Up a DOE in optiSLang

To set up a DOE in optiSLang:

  1. Start a new project in optiSLang and start the Solver wizard.

  2. Under Integrations, select Ansys Workbench.

  3. On the Ansys Workbench connection page, open the Workbench project file circuit_to_sos.wbpj that you saved previously, making sure that the correct Workbench executable is used.

  4. Click Next.

  5. On the Integrated Solver Settings page:

    1. Drag all inputs to the Parameter list.

    2. Drag the output variable Equivalent Stress Maximum to the Response list.

     

  6. Set the parameter ranges as shown in this image:

     


    Tip:  For quicker entry, you can type the range in the format min:max. For example, you would type -10:40 for the first entry.


  7. Complete the Solver wizard.

  8. Save and run the optiSLang project.

  9. Drag the Sensitivity wizard onto the solver chain's title bar.

  10. In the Sensitivity wizard, do the following:

    1. Set Sampling method to Advanced Latin Hypercube Sampling.

    2. On the Additional options page, clear the Create MOP check box.

      You will create a field-MOP with oSP3D later.

    3. Complete the Sensitivity wizard.

  11. Save and run the optiSLang project.

Running the DOE takes some time. Once the DOE is complete, postprocessing opens so that you can check the results for plausibility.

You are now ready to prepare the DOE data for oSP3D import.

Importing DOE Data into oSP3D

To import DOE data prepared in optiSLang into oSP3D:

  1. Start a new oSP3D project.

  2. Set the file sos_mesh.cdb as the reference mesh:

    1. Select File > Mesh > Set reference mesh.

    2. For the file format, select Ansys Mechanical input files.

    3. Open the file sos_mesh.cdb in the optiSLang project directory (circuit_doe.opd\Sensitivity\Design0001\dp0\SYS-1\MECH\SoS_Export).

  3. Set a named selection:

    1. Select File > Mesh > Set reference named selection.

    2. Set nodes used for statistics/models to SOS_DATA_NODES.

    3. Set elements used for statistics/models to SOS_ELEMENT_NODES.

     

    These named selections contain the nodes and elements on the printed circuit board's surface only. Subsequent analysis in oSP3D is performed on these named selections.

  4. Select File > Process multiple designs > Import field designs.

  5. In the Import designs wizard, do the following:

    1. Add the result files of the mechanical and thermal simulation.

    2. Set the file format to LS-PrePost output files:

      • circuit_doe.opd\Sensitivity\Design0001\dp0\SYS-1\MECH\SoS_Export\sos_results.k

      • circuit_doe.opd\Sensitivity\Design0001\dp0\SYS-2\MECH\SoS_Export\sos_results.k

    3. Set Path of reference design to circuit_doe.opd\Sensitivity\Design0001.

    4. Select all field data quantities for import and complete the Import designs wizard:

     

  6. Select File > Import data > Import data from optiSLang .omdb.

  7. Open circuit_doe.opd\Sensitivity.omdb and import the input parameters.

  8. Verify successful import of all field designs and scalar input parameters.

  9. To support the tutorials in Advanced Field-MOP Tutorials, execute the script for calculating logarithmic equivalent stress and adding it as a new field quantity identifier LOGSEQV:

    1. Copy this script.

      local inputs = sos.database():data():filterType(sos.NODE_DATA):filterQuantity("SEQV"):samples():active()  -- get all active designs of SEQV
      for i=1,inputs:size() do                                    -- loop over all selected data objects
          local seqv = inputs[i-1]                                -- get the i-th data object
      	local design = seqv:ident():design();		    -- get the design ident of the current object
      	local seqv_data = seqv:getData();		        -- get the data vector of the current object
      	local logseqv_data = seqv_data:CW():Log();	      -- apply the logarithm to all entries in the data vector
      	local logseqv = sos.createNodeDataObject(
              		  sos.database(), logseqv_data, true
      	);						              -- insert new object into database
      	local new_ident = sos.DataObjectKey(design, "LOGSEQV") -- define the ident of the new object
      	sos.database():data():insert(new_ident, logseqv)       -- insert new object into database
      end

    2. Paste the script into the oSP3D command line as shown.

       

    3. Press the Enter key.

You have finished the DOE data import. You can either move on to the next tutorial or jump to the tutorials in Advanced Field-MOP Tutorials.