In additional to HyperSizer supplied input data, users can add their own users inputs.
User defined constants are component settings. The example below shows a user constant for a column buckling analysis, "c_fixity".
The user data directory is a location where the analysis plugin can look to load external data. This setting is defined per database in the Database Plugin Options form. See Database Plugin Options.
The following Fortran pseudo code shows how this external data can be loaded. For performance reasons it is important that this is only loaded once.
subroutine LoadExternalMaterialData(state)
! Loads user material data from a text file.
! The location of the text file is determined by the UserDataDirectory.
type(PanelBeamStateType), intent(in) :: state
! Flag to determine whether the data has already been loaded.
! The save attribute indicates that this local variable save throughout the scope of the application (instead of just locally)
logical, save :: isLoaded = .false.
character(len=LEN_DIR) :: materialDataPath
if (.not. isLoaded) then
materialDataPath = state%UserDataDirectory // "\material_data.txt"
! Open the file ...
! Load the data into global variable storage ....
! Close the file...
! Make sure we don't read the file again.
isLoaded = .true.
end if
end subroutine