Register Solver Scripts
You need to register solver scripts when the solver is not a suite 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
Register solver scripts in HyperStudy with the Register Solver Scripts dialog.
-
Open the Register Solver Script dialog.
- From the menu bar, click .
- In the Define Models step, click the Solver Execution Script cell and select Register new Solver from the drop-down menu.
-
Add a solver script.
- In the Path column, enter the location of the solver script to be registered.
- Optional: In the Arguments column, enter a solver script argument for the solver script.
- 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.
-
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/.
-
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.
- 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.
-
Immediately following the existing *RegisterSolverScript
statements, register further solver scripts using the following syntax:
where:*RegisterSolverScript(script_name,"script_label","executable","solver_type ", “arguments”)
- script_name
- Unique name for the script.
- "script_label"
- Name used within HyperStudy to reference the
script.Note: This name must be enclosed in double quotes.
- "executable"
- Full path of the solver script, including the file name and extension.
- "solver_type"
- Indicates to HyperStudy which solver is used.
- "arguments"
- Solver input arguments.
- Save the preferences_study.mvw file.
Example: Register LS-DYNA in the Preferences File
*BeginSolverDefaults()
*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")
*EndSolverDefaults()