Register Solver Scripts

You need to register solver scripts when the solver is not a HyperWorks solver and hence is not registered by default, or when you need to perform a series of actions such as copying files, running one or more solvers, and extracting data.

Register solver scripts in HyperStudy or by editing the preferences file.

Register Solver Scripts in HyperStudy

Register solver scripts in HyperStudy with the Register Solver Scripts dialog.

  1. Open the Register Solver Script dialog.
    • From the menu bar, click Edit > Register Solver Script.
    • In the Define Models step, click the Solver Execution Script cell and select Register new Solver from the drop-down menu.
  2. Add a solver script.
    1. Click Add Solver Script.
    2. In the Add - HyperStudy dialog, select the type of script to create and click OK.
      HyperStudy diagnostic messages are richer for HyperWorks solvers. Select the solver specific script types to use a different version of Feko, Flux, MotionSolve, OptiStruct, Radioss, or Workbench other than the default scripts provided and still be able to receive the same rich, diagnostic information.
  3. In the Path column, enter the location of the solver script to be registered.
  4. Optional: In the Arguments column, enter a solver script argument for the solver script.
  5. Click Close to exit the solver registration.

Register Solver Scripts by Editing the Preferences File

Register solver scripts in the *BeginSolverDefaults section of the preferences_study.mvw file.

  1. In a text editor, open the preferences_study.mvw file.
    You can find the preferences_study.mvw file in the HyperWorks installation directory under <install directory>/hw/prefinc/.
  2. Search for the syntax *BeginSolverDefaults.

    Below this syntax there is an ‘if-else-loop.’ The first part of the loop registers the three solvers listed above when the operating system is Windows. The second part (else) registers these solvers when the operating system is not Windows.

  3. If you are working with a Windows operating system, append the first list of *RegisterSolverScript statements. Otherwise, you will need to append the second list of *RegisterSolverScript statements.
  4. Immediately following the existing *RegisterSolverScript statements, register further solver scripts using the following syntax:
    *RegisterSolverScript(script_name,"script_label","executable","solver_type ", “arguments”)
    Unique name for the script.
    Name used within HyperStudy to reference the script.
    Note: This name must be enclosed in double quotes.
    Full path of the solver script, including the file name and extension.
    Indicates to HyperStudy which solver is used.
    Solver input arguments.
  5. Save the preferences_study.mvw file.

Example: Register LS-DYNA in the Preferences File

In this example, a LS-DYNA executable is added to the solver defaults section of the preferences_study.mvw file for a Windows operating system. The added line is in bold.
*RegisterSolverScript(radioss,"RADIOSS",{ getenv("radioss_launch") }, HST_SolverRadioss)
*RegisterSolverScript(os,"OptiStruct",{ getenv("opti_launch") },    HST_SolverOptiStruct)
*RegisterSolverScript(templex,"Templex",{getenv("templex_launch") }, HST_SolverGeneric)
*RegisterSolverScript(hx,"HyperXtrude",{getenv("hx_launch") },      HST_SolverGeneric)
*RegisterSolverScript(ms,"MotionSolve - standalone", { getenv("ms_launch") }, HST_SolverMotionSolve)
*RegisterSolverScript(tcl,"TCL",{ getenv("tclsh_fullpath") }, HST_SolverGeneric)
*RegisterSolverScript(lsdyna, "Ls-Dyna", "C:\Solvers\dyna\dyna.exe", "HST_SolverGeneric")