News: Need training? HyperSizer Training Videos are available now! Learn more here: https://hypersizer.com/trainingevents/e-learning/

Author Topic: OptiStruct-HyperFEA Integration  (Read 43301 times)

Ryan

  • Administrator
  • *****
  • Posts: 145
    •  
OptiStruct-HyperFEA Integration
« on: October 23, 2015, 04:02:17 PM »
Optistruct can be integrated with HyperFEA in 7.1 with the following workaround. Formal support for the OptiStruct solver is coming in 7.2.

OptiStruct HyperFEA Batch File
Use the attached batch file to call OptiStruct from HyperFEA. The batch file with call the optistruct.bat batch file (provided in your OptiStruct installation). This path may need to be modified.
The batch file will also copy the OptiStruct *.out file to an *.f06 file for HyperFEA. HyperSizer expects that each call to the MSC Nastran solver returns an F06 file for Nastran error reporting.


@echo off
 
REM Set the location of the Optistruct solver.
set SOLVER_BAT=C:\Program Files\Altair\13.0\hwsolvers\scripts\optistruct.bat
 
REM FEM path is passed in as the 1st argument.
REM Filename = 'model.bdf'
REM Basename = 'model'
set FEM_FILENAME=%~nx1
set FEM_BASENAME=%~n1
set OUT_FILENAME=%FEM_BASENAME%.out
set F06_FILENAME=%FEM_BASENAME%.f06

REM Echo all variables to the screen.
echo FEM Filename : %FEM_FILENAME%
echo FEM Basename : %FEM_BASENAME%
echo Solver Path  : %SOLVER_BAT%

REM Always delete the old output files that HyperSizer does not know about before executing the solver.
del "%OUT_FILENAME%"

REM Run the solver.
call "%SOLVER_BAT%" "%FEM_FILENAME%"
 
REM HyperFEA checks the F06 file for solver error messages.
REM Optistruct doesn't have an F06, so copy the OUT file to make a fake F06 to trick HyperFEA.

if exist %OUT_FILENAME% (
   copy "%OUT_FILENAME%" "%F06_FILENAME%" /Y
)


OP2 Output Requests
OptiStruct users should verify that the output requests are specified in the primary input file. See the Nastran listing below for the OP2 requests.


INIT MASTER(S)
SOL SESTATIC
CEND
  TITLE = Wing box
  ECHO = NONE
  FORCE(PLOT) = ALL
  DISPLACEMENT(PLOT) = ALL

SUBCASE 101
  SUBTITLE = Wing Pressure
  SPC  = 100
  LOAD = 101
SUBCASE 201
  SUBTITLE = Wing Temperature
  SPC  = 100
  TEMP(LOAD) = 201
BEGIN BULK
PARAM,POST,-1

cfriedland5

  • Client
  • **
  • Posts: 18
    •  
Re: OptiStruct-HyperFEA Integration
« Reply #1 on: October 26, 2015, 11:39:14 AM »
Is this only for topology and topography optimization or could optistruct also control the design variables that hypersizer uses?

Ryan

  • Administrator
  • *****
  • Posts: 145
    •  
Re: OptiStruct-HyperFEA Integration
« Reply #2 on: October 28, 2015, 06:35:38 AM »
The 7.2 integration will only use OptiStruct as the FEA solver. There will not be any explicit linking of HyperSizer and OptiStruct design variables. However, adding OptiStruct as a supported solver should make it easier to setup a custom process using both HyperSizer and OptiStruct optimization capabilities.