HyperWorks Solvers

User_Subroutines

User_Subroutines

Previous topic Next topic Expand/collapse all hidden text  

User_Subroutines

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  
hmtoggle_plus1How to check which MinGW version you used?

It is recommend to use MinGW 4.9.2. After installing MinGW 4.9.2 successfully, open the Run terminal.

faq_run_terminal

Type gcc –v or gfortran –v to check the MinGW version. Message indicates a successful installation of the freeware win64 Fortran compiler.

faq_subroutine_mingw

hmtoggle_plus1How to compile Starter and Engine file with MinGW?

Copy the Starter file lecm29.f and the Engine file sigeps29c.f to your working directory. Example: D:\99_temp\User_Subroutine_example.

faq_subroutine_directory

You can also use a script to compile. For example, create the script script.bat. Inside this file define the environment first and then define the compile command.

Note: Here win64_gfortran is used, but you also need to use build_userlib_win64_gfortran.bat.

faq_subroutine_script

In your working direction, launch your script script.bat.

faq_subroutine_working_directory

After successfully compiling the Starter and Engine (figure), the libraduser_win64.dll file will display in your working direction.

faq_subroutine_libraduser

faq_subroutine_files

hmtoggle_plus1How to import your user material law in HyperCrash?

In order to import your user material (example: /MAT/USER2) to HyperCrash, follow this installation procedure:

1.Copy the MF_GenYld_29.cfg file to your HyperWorks installation directory: ~\hw\hc\config\CFG\Version\MAT.
2.Edit the file data_hierarchy.cfg in the directory ~\hw\hc\config\CFG\Version.
3.Add the following lines:

HIERARCHY {

KEYWORD = MAT_ELASTO_PLASTIC_LAW30;

TITLE = "Mat User2 (30)";

FILE = "MAT/Mat_User2.cfg";

SUBTYPE = USER;

USER_ID = 30;

USER_NAMES = (LAW30,USER2);

}

KEYWORD = MAT_ELASTO_PLASTIC_LAW30; determines where the configured law will be organized in the menu when creating a new material law in the Materials panel.

TITLE = "Mat User2 (30)"; determines what the configured law will be named in the menu when creating a new material law in the Materials panel.

faq_subroutine_menu

hmtoggle_plus1How to launch the RADIOSS model with your user subroutine?

Copy the libraduser_win64.dll file to the same directory where the RADIOSS model is located.

For example, if the RADIOSS model is in D:\99_temp\User_Subroutine_example\RADIOSS_RUN, the libraduser_win64.dll file needs to be copied to this directory.

Now launch the Starter and Engine. For example, here the RADIOSS model is run with V14.0 SPM:

./ s_14.0_win64.exe -i main_TEST4_0000.rad

./ e_14.0_win64.exe -i main_TEST4_0001.rad

faq_subroutine_radioss_run

faq_subroutine_files2