Run Altair Radioss™ with PolyUMod using the Command Line

In this tutorial I will show how you can easily run Radioss with the PolyUMod® library using the command line on Windows and Linux.

Windows Computers

One easy way to run Radioss with PolyUMod using the command line is to setup a bat-file with the commands below. The bat-file first sets the variable radi to the desired version of Radioss. It then checks if there is a file with the name libraduser_win64.dll in the current directory. If there is, then it sets the environment variable RAD_USERLIB_LIBPATH to the current directory, and uses that dll-file as the PolyUMod library.

If there is no such dll-file in the current directory, then it assumes that the environment variable RAD_USERLIB_LIBPATH already exists and contains the path the PolyUMod library. Typically this environment variable should have the following value: C:\Program Files\PolymerFEM\PolyUMod_Altair\PolyUMod_Radioss. You also need to customize the bat-file so that it contains the correct rad-file (in the example it is called cylinder_shear_BB_0000.rad), and uses the desired number of processors (using the command line argument -np). Note that the PolyUMod installer attempts to set the RAD_USERLIB_LIBPATH variable for you.

				
					@echo off

echo ### Start Run ###

rem set radi="C:\Program Files\Altair\2020\hwsolvers\scripts\radioss.bat"
set radi="C:\Program Files\Altair\2021\hwsolvers\scripts\radioss.bat"

if exist libraduser_win64.dll (
    echo Found a local PolyUMod dll file.
    set RAD_USERLIB_LIBPATH=%cd%
) else (
    echo No PolyUMod dll file in the working directory.
    echo Use the following path for the PolyUMod library:
    echo %RAD_USERLIB_LIBPATH%
    echo Here are the files in this directory:
    dir "%RAD_USERLIB_LIBPATH%"
)


echo ### Call Radioss ###
call %radi% -np 2 cylinder_shear_BB_0000.rad

echo Done.
pause

pause
				
			

Linux Computers

Running Radioss with PolyUMod using the command line on a Linux computer is also very easy. The bash script below first sets the variable radi to the desired version of Radioss. It then checks if there is a PolyUMod library in the standard locations, and sets the environment variable RAD_USERLIB_LIBPATH to the proper path.

You need to customize the script file so that is using the correct rad-file (in the example it is called cylinder_shear_BB_0000.rad), and the desired number of processors (using the command line argument -np).

				
					#!/bin/bash

set -e

#radi="/opt/altair/2020/altair/hwsolvers/scripts/radioss"
radi="/opt/altair/2021/altair/hwsolvers/scripts/radioss"

## need to set the env variable RAD_USERLIB_LIBPATH
name="libraduser_linux64.so"
DD="/opt/PolymerFEM/PolyUMod_Altair/PolyUMod"
if [ -f "$DD/$name" ]; then
    export RAD_USERLIB_LIBPATH=$DD
fi
DD="/opt/PolymerFEM/PolyUMod_Altair/PolyUMod_RADIOSS"
if [ -f "$DD/$name" ]; then
    export RAD_USERLIB_LIBPATH=$DD
fi
DD=$PWD
if [ -f "$DD/$name" ]; then
    echo Use the PolyUMod so-file in the current directory.
    export RAD_USERLIB_LIBPATH=$DD
fi

echo a=$RAD_USERLIB_LIBPATH
ls $RAD_USERLIB_LIBPATH

##
## run it
##
$radi -np 2 cylinder_shear_BB_0000.rad
				
			
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

More to explore

Leave a Comment