HyperStudy

Edit

Edit

Previous topic Next topic Expand/collapse all hidden text  

Edit

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

From the Edit menu you can edit the study setup mostly through the editing of the preferences file.

A preferences file is an ASCII file that configures the application. The standard preferences file is located in the HyperWorks installation directory and is executed every time a license is activated. An additional preferences file can be created in your working directory, and can contain personal settings that can either overwrite the standard preferences file or be added to the existing settings in the standard preferences file.

An example of a personal setting is the precision used in HyperStudy to manipulate, read, and write numbers. Set or modify this setting using the preferences file statement *Hst_Precision(value), where default value is 10.

A sample preferences file that changes the precision setting to 15 (from its default value of 10) is shown below:

hmtoggle_plus1Sample Preferences File: Changes the Precision to 15, From its Default Value of 10

From the menu bar, click File > Set Preferences File to select a .mvw file.                                                                                                            

*Id("HyperStudy v12.0")

  *BeginStudyDefaults()

 *BeginHstProperties()

     *Hst_Precision(15)

 *EndHstProperties()

  *EndStudyDefaults()  

 

 

The Edit menu offers the following features:

hmtoggle_plus1greyRegister Solver Script

HyperStudy has the following solver codes registered by default:

HyperMath
HyperXtrude
MotionSolve – standalone
Python
RADIOSS
OptiStruct
TCL
Templex

 

When HyperStudy is initiated from MotionView, the script MotionSolve_Hst should be used in the study.

You need to register solver scripts in cases where:

The solver is not a HyperWorks solver and hence is not registered by default.
You need to perform a series of actions such as copying files, running one or more solvers, and extracting data. In order to do these tasks, you may have to use HyperStudy process environment variables in your solver script. For more information please refer to Process Environment Variables and Solver Script Files.

 

You can register solver scripts in HyperStudy or by editing the preferences file.

 

How do I…

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 list.
2.Click Add Solver Script.
3.In the HyperStudy - Add dialog, enter a label for the solver script.
4.Select the type of solver script to create. You can select one of the following types of solver scripts:
HstSolver_Generic:

Default option. Generic job submission script.

HstSolver_Feko, HstSolver_Flux, HstSolver_MotionSolve, HstSolver_Optistruct, HstSolver_Radioss, HstSolver_Workbench:

HyperStudy diagnostic messages are richer for HyperWorks solvers. Select these script types to use a different version of Feko, Flux, MotionSolve, OptiStruct, RADIOSS, or Workbench, than the default scripts provided and still be able to receive the same rich, diagnostic information.

hs_register_solver_script

5.Click OK.
6.In the Path column, specify the location of the solver script to be registered.
7.Optional - In the Argument field, enter a solver input argument for the solver script.
8.Click Save.
9.In the Save Preferences dialog, save the preferences file. Do not overwrite the system preferences file located in <install_directory>/hw/. On UNIX, the preferences file can also be located in your home directory or in the working directory from which you launched HyperStudy.
10.From the menu bar, click File > Set Preferences File.
11.In the HyperStudy - Set Preferences File dialog, open the preferences file you just saved. HyperStudy reads the default preferences file in the installation directory, followed by the preferences file that you specify. This ensures that all readers and import templates are available.
12.To exit the solver registration, click Close.

 

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 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.

3.Immediately following the existing *RegisterSolverScript statements, further solver scripts may be registered using the following syntax:

*RegisterSolverScript(script_name,"script_label","executable","solver_type ", “arguments”)

where:

script_name

is a unique name for the script.

"script_label"

is the name which will appear within the HyperStudy GUI referring to this script. This name must be enclosed in double quotes.

"executable"

is the full path, including file name and extension, of the solver script.

"solver_type"

indicates to HyperStudy which solver is used.

“arguments”

solver input arguments

 

Example

Below is the ‘solver defaults’ section of the preferences_study.mvw file. A LS-DYNA executable is added to the default list of registered solver scripts for a Windows operating system.  The added line is in bold.

 

*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()

 

 

hmtoggle_plus1greyRegister User Utility

To use the user-written utility features from the HyperStudy graphical user interface, they must be registered. Utilities can be registered in HyperStudy or by editing the preferences file.

 

How do I…

1.From the menu bar, click Edit > Register User Utility.
2.In the Register User Utility dialog, click Add User Utility.
3.In the HyperStudy - Add dialog, enter a label for the user utility.

hs_register_user_utility

4.Click OK.
5.In the Path column, specify the location of the utility to be registered.
6.Optional: In the Arguments field, enter any arguments.
7.Click Save.
8.In the Save Preferences dialog, save the preferences file. Do not overwrite the system preferences file located in <install_directory>/hw/ by default. On UNIX, the preferences file can also be located in your home directory or in the working directory from which you launched HyperStudy.
9.Close the Register User Utility dialog.
10.From the menu bar, click File > Set Preferences File.
11.In the HyperStudy - Set Preferences File dialog, open the preferences file you just saved. HyperStudy reads the default preferences file in the installation directory, followed by the preferences file that you specify. This ensures that all readers and import templates are available.
12.Optional: To append the current user preferences file, click Append.
13.Close the solver registration. In the last case, the solver will only be registered for the current study.

 

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 *BeginUserUtilityDefaults.

Below this 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 *RegisterUserUtility statements. Otherwise, you will need to append the second list of *RegisterUserUtility statements.

3.Immediately following the existing *RegisterUserUtility statements, further solver scripts may be registered using the following syntax:

*RegisterUserUtility (script_name,"script_label","utility interpreter", "utility path")

where:

script_name:

is a unique name for the utility.

script_label:

is the name which will appear within the HyperStudy GUI referring to this utility. This name must be enclosed in double quotes.

utility interpreter:

is the full path, including file name and extension, of the interpreter of the utility. For example, wish.exe for a Tcl script.

utility path:

is the full path, including file name and extension, of the utility.

 

Example

Below is the 'user utility defaults' section of the preferences.mvw file. Here, a Tcl script is added to the list of registered user utilities for a Windows operating system.

 

*BeginUserUtilityDefaults()

*RegisterUserUtilityScript(u_1,"U1","C:\wish.exe","C:\param.tcl")

*EndUserUtilityDefaults()

 

 

hmtoggle_plus1greyRegister Optimizer

HyperStudy has a sample external optimizer (xopt.exe) registered by default. In order to use HyperStudy with other external optimizers, they must be registered.

External optimizers can be registered in HyperStudy or by editing the preferences file.

 

How do I…

1.From the menu bar, click Edit > Register Optimizer.
2.In the Register External Optimizer dialog, click Add External Optimizer.
3.In the HyperStudy - Add External Optimizer dialog, enter a label for the external optimizer.
4.Click OK.
5.In the Path column, specify the location of the external optimizer to be registered.
6.Click Save.
7.In the Save Preferences dialog, save the preferences file. Do not overwrite the system preferences file located in <install_directory>/hw/. On UNIX, the preferences file can also be located in your home directory or in the working directory from which you launched HyperStudy.
8.From the menu bar, click File > Set Preferences File.
9.In the HyperStudy - Set Preferences File dialog, open the preferences file you just saved. HyperStudy reads the default preferences file in the installation directory, followed by the preferences file that you specify. This ensures that all readers and import templates are available.
10.Optional: To append the current user preferences file, click Append.
11.Close the solver registration. In the last case, the solver will only be registered for the current study.

 

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 *BeginExternalOptimizerDefaults.

Below this 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, you will need to append the first list of *RegisterExternalOptimizer statements.  Otherwise, you will need to append the second list of *RegisterExternalOptimizer statements.

3.Immediately following the existing *RegisterExternalOptimizer statements, further solver scripts may be registered using the following syntax:

*RegisterExternalOptimizer (opti_name,"opti_label","executable")

where:

opti_name:

is a unique name for the optimizer.

opti_label:

is the name which will appear within the HyperStudy GUI referring to this optimizer. This name must be enclosed in double quotes.

executable:

is the full path, including file name and extension, of the external optimizer.

 

Example

Below is the ‘solver defaults’ section of the preferences_study.mvw file.  The sqp.exe executable is added to the default list of registered external optimizer for a Windows operating system. The added line is in bold.

 

*BeginExternalOptimizerDefaults()

     

       {machtype = sysid()}

       {if (machtype == "windows")}

 

              *RegisterExternalOptimizer(xopt, "Xopt", { getenv("HST_ALTAIR_HOME") + "/hw/bin/WIN64/xopt.exe" })

*RegisterExternalOptimizer(sqp, "SQP", {"C:/My_SQPOptimizer/sqp.exe" })

             

         {else}

         

              *RegisterExternalOptimizer(xopt, "Xopt", { getenv("HST_ALTAIR_HOME") + "/hw/bin/" + getenv("ALTAIR_PROD_ARCH") + "/xopt" })

             

         {endif}

             

   *EndExternalOptimizerDefaults()