180
Altair Radioss USER’S CODE | INTRODUCTION JAN 2019 1 Altair Radioss User’s Code Interface 2019 version – January 2019 Introduction Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Altair Radioss User’s Code Interface

  • Upload
    others

  • View
    29

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | INTRODUCTION

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 Introduction

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA

Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 2: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | INTRODUCTION

JAN 2019 2

INTRODUCTION This manual describes the interface between Altair Radioss and a user’s subroutines.

You can define private code of various categories, including:

User window (general interface for external code) User material laws for solids and shells User spring elements User solid elements (may be degenerated to shell or beam elements) User sensors User failure models

To link Altair Radioss to a user module of each category, two subroutines must be provided: one linked with Altair Radioss Starter and one with Altair Radioss Engine. The Starter subroutines are only used to read user data and initialize specified parameters. The Engine subroutines define and execute user programs. Storage arrays are provided for each type of application. The communication between Altair Radioss and the User’s subroutines is done by passing function arguments by specialized functions. The function arguments are used for general purpose user window interface, user materials and elements. Only integer and float variables or arrays are used. The float arguments are, Double Precision.

Otherwise, all user subroutines use special access functions to retrieve information from the Altair Radioss database.

The next chapters will describe the standardized headers for each user subroutine, the access functions, and link procedures. Example program codes for each category are also provided.

Page 3: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | INTRODUCTION

JAN 2019 3

Table 1: Altair Radioss Starter and Engine Subroutines and Executables (nn = 29, 30 or 31; n = 1, 2 or 3; m = 1, 2, 3, … ; i = 1 to 18 ; j = 1 to 99 ; k = 1 to 99), ll =04, 05 or 06

Altair Radioss

Starter Altair Radioss

Engine

User’s Input Options Engine File Options

User material /MAT/USERn /ANIM/keyword/USRi /ANIM/keyword/USRj/k

User property /PROP/USERn

User sensor /SENSOR/USERm

User failure /FAIL/USern

User’s Subroutines

User window USERWIS.f USERWI.f

User material

laws 29, 30, 31

Shell LECMnn.f SIGEPSnnC.f

Solid LECMnn.f SIGEPSnn.f

User property Spring LECGnn.f and RINInn.f RUSERnn.f

Solid LECGnn.f and SINInn.f SUSERnn.f

User failure

01, 02, 04

Shell LECRll.f flllawC.f

Solid LECRll.f flllaw.f

User sensor LECSEN_USERm.f USER_SENm.f

Object Files

User window USERWIS.o USERWI.o

User material laws

29, 30, 31

Shell LECMnn.o

Solid LECMnn.o

User spring Spring LECGnn.o and RINInn.o

Solid LECGnn.o and SINInn.o

User failure 01, 02, 04 Shell LECRll.o

Solid LECRll.o

User sensor LECSEN_USERm.o USER_SENm.o

Object library

"radioss_engine_library".a "radioss_starter_library".a

User’s Executables

"user_engine_executable" "user_starter_executable"

Page 4: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | INTRODUCTION

JAN 2019 4

Starter INPUT file

Starter listing file

Engine file

Engine listing file General options

User’s options

Print report about general model Print information about user’s options

Print report about general model Print information about user’s options

Save general results Save user’s variables

STARTER EXECUTABLE ENGINE EXECUTABLE

Program Starter Program Engine

Compile

Link Link

RESTART file

Engine library Starter library

Engine output file

Materials

Properties

Sensors

Failure

Read user’s data stored in user’s

options (Starter input file)

Initialize user’s variables

Altair Radioss Starter

Altair Radioss Engine

Materials

Properties

Sensors

Failure

Define and execute user’s

programs(s)

Altair Radioss STARTER

CODE

STARTER USER’S SUBROUTNE(S)

  Compile

Altair Radioss ENGINE

CODE ENGINE USER’S SUBROUTINE(S)

Page 5: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | INTRODUCTION

JAN 2019 5

Saving User’s Variables in Animation File The user’s variables UVAR (element_number,i) defined in the user’s material law can be saved in an animation file using the output USERi as keyword3 in the Engine option /ANIM/keyword2/keyword3. The number of saved variables is limited to 18 ( 1≤ i≤ 18 ). Results are saved for each integration point. Example: The user variable number 1 UVAR (element number,1) is saved in animations by the Engine option /ANIM/ELEM/USER1. The number of user’s variables is set in NUVAR (Starter argument.)

Page 6: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 Global User Window

Chapter 1

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA

Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 7: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 2

TABLE OF CONTENTS 1.0 Global User’s Window 3

1.1 Starter Subroutine USERWIS_INI 4

1.2 Starter Subroutine USERWIS 5

1.3 Engine Subroutine USERIS 6

1.4 USERWI Engine Interface routines 7

1.5 Example of User Window 8

Page 8: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 3

1.0 Global User’s Window With Altair Radioss, it is possible to define a global user window. This is the most general interface between Radioss and external code.

To define a user’s window, two subroutines must be provided. One must be linked with Radioss Starter and the other with Radioss Engine.

• The Starter subroutine is called USERWIS and is used to read the global data and to initialize global memory.

• The Engine subroutine is called USERWI and is used to compute the forces and moments.

Note: All communication between Radioss and the subroutines takes place within the argument list.

Page 9: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 4

1.1 Starter Subroutine USERWIS_INI

This subroutine reads input data and prepares the Radioss buffers for allocation.

The argument list of USERWIS and its individual arguments and descriptions are as follows:

C-----------------------------------------------------------------------------------------

SUBROUTINE USERWIS_INI(

. IIN ,IOUT ,IUPARAM ,NUMNOD ,ITAB ,

. X ,V ,VR ,MASS ,INER ,

. NUVAR ,NUVARI )

C-----------------------------------------------------------------------------------------

Argument Format Description IIN Integer read only scalar Input file unit (Starter input file) on which the data are

read. IOUT Integer read only scalar Output file unit (Starter listing file). IUPARAM(*) Integer array Parameters to be transferred to Radioss. NUMNOD Integer scale Number of nodes (defined by /NODE option). ITAB(NUMNOD) Integer array An array of size NUMNOD. This defines the node ID

versus Radioss internal node number. X(3,NUMNOD) Float array Nodal coordinates. V(3,NUMNOD) Float array Nodal initial velocities. VR(3,NUMNOD) Float array Nodal initial rotational velocities. MASS(NUMNOD) Float array Nodal mass. INER(NUMNOD) Float array Nodal spherical inertia. NUVAR Integer scalar Size of global user’s float array. Memory size available

for float. NUVARI Integer scale Size of global user’s integer array. Memory size

available for integer.

Page 10: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 5

1.2 Starter Subroutine USERWIS

This subroutine is reads input data. You can specify the number of cards and their format. The argument list of USERWIS and its individual arguments and descriptions are as follows:

C-----------------------------------------------------------------------------------------

SUBROUTINE USERWIS(IIN ,IOUT ,NUMNOD ,ITAB ,

. X ,V ,VR ,MASS ,INER ,

. NUVAR ,NUVARI ,UVAR ,IUVAR )

C-----------------------------------------------------------------------------------------

Argument Format Description IIN Integer read only scalar Input file unit (Starter input file) on which the data

are read. IOUT Integer read only scalar Output file unit (Starter listing file). NUMNOD Integer scalar Number of nodes (defined with /NODE option). ITAB(NUMNOD) Integer array An array of size NUMNOD. This defines the node

ID versus Radioss internal node number. X(3,NUMNOD) Float array Nodal coordinates. V(3,NUMNOD) Float array Nodal initial coordinates. VR(3,NUMNOD) Float array Nodal initial rotational velocities. Mass(NUMNOD) Float array Nodal mass. INTER(NUMNOD) Float array Nodal spherical inertia. NUVAR Integer scalar Needed size of global user float array. NUVARI Integer scalar Needed size of global user integer array. UVAR(MAXNUVAR) Float array An array of size MAXNUVAR in Radioss Starter.

This array is transmitted versus restart file to Radioss Engine, where it has a size of NUVAR.

IUVAR(MAXNUVARI) Integer array An array of size MAXNUVARI in Radioss Starter. This array is transmitted versus restart file to Radioss Engine, where it has a size of NUVARI.

Page 11: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 6

1.3 Engine Subroutine USERWI This subroutine calculates the internal forces and moments versus the velocity, old forces and moments, and specified variables and parameters.

The argument list of USERWI and its individual arguments and descriptions are as follows:

C----------------------------------------------------------------------------------------- SUBROUTINE USERWI(

1 IIN ,IOUT ,NUVAR ,NUVARI ,NUMNOD ,NCYCLE ,

2 LENWA ,IUVAR ,ITAB ,

3 TT ,DT1 ,DT2 ,USREINT,EXWORK ,

4 UVAR ,D ,X ,V ,VR ,MASS ,

5 INER ,STIFN ,STIFR ,A ,AR ,WA )

C-----------------------------------------------------------------------------------------

Argument Format Description IIN Integer read only scalar Input file unit (Engine file). IOUT Integer read only scalar Output file unit (listing file). NUVAR Integer read only scalar Size of user float array. NUVARI Integer read only scalar Size of user integer array. NUMNOD Integer read only scalar Number of nodes. NCYCLE Integer read only scalar Current cycle number. IUVAR(NUVARI) Integer read write array An array of size NUVARI. This array contains user

data and variables and is saved on restart file. ITAB(NUMNOD) Integer read only array An array of size NUMNOD. This array defines the

node ID versus Radioss internal node number. TT Float read only scalar Current time. DT1 Float read only scalar Current time step. DT2 Float write only scalar User stability time step. With element time step

formulation, DT2 has to be computed at each cycle. USREINT Float read write scalar User window internal energy. EXWORK Float read write scalar External work. Variable can be increased. UVAR(NUVAR) Float read-write array An array of size NUVAR. This array contains user

data and variables and is saved on restart file. D(3,NUMNOD) Float read only array Nodal displacements. X(3,NUMNOD) Float read only array Nodal coordinates. V(3,NUMNOD) Float read only array Nodal initial velocities. VR(3,NUMNOD) Float read only array Nodal mass. INER(NUMNOD) Float read only array Nodal spherical inertia. STIFEN(NUMNOD) Float read write array Nodal stiffness for nodal time step formulation. The

added user stiffness has to be added to STIFEN. STIFR(NUMNOD) Float read write array Nodal rotational stiffness for nodal time step

formulation. The added user stiffness has to be added to STIFR.

A(3,NUMNOD) Float read write array Nodal forces. User forces have to be added to A.

Page 12: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 7

Argument Format Description AR(3,NUMNOD) Float read write array Nodal moments. User moments have to be added to

AR.

STIFN, STIFR are used by Radioss to compute the nodal or the element time step. DT2 is needed to compute element.

1.4 USERWI Engine Interface routines

USERWINDOW_GET_A(A_BUF): Gets the node forces from previous explicit cycle. A_BUF is a 3xNUMNOD array must be allocated before calling the routine

USERWINDOW_GET_AR(AR_BUF) : Gets the nodal moments from previous explicit cycle. AR_BUF is a 3xNUMNOD array must be Allocated before calling the routine

Page 13: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 8

1.5 Example of User Window

1.5.1 User’s Subroutine USERWIS_INI C------------------------------------------------------------------

C This subroutine initializes the global user’s window

C------------------------------------------------------------------

SUBROUTINE USERWIS_INI(

. IIN ,IOUT ,IUPARAM ,NUMNOD ,ITAB ,

. X ,V ,VR ,MASS ,INER ,

. NUVAR ,NUVARI )

C-----------------------------------------------

C I m p l i c i t T y p e s

C-----------------------------------------------

IMPLICIT NONE

C-----------------------------------------------

C The user’s data can be stored in UVAR for floating points and

C IUVAR for integers

C-----------------------------------------------

C D u m m y A r g u m e n t s

C-----------------------------------------------

INTEGER, INTENT (IN) :: IIN ,IOUT ,NUMNOD

INTEGER, INTENT (IN) :: ITAB(NUMNOD)

INTEGER, INTENT (OUT) :: NUVAR ,NUVARI

INTEGER, INTENT (OUT) :: IUPARAM(100)

DOUBLE PRECISION , INTENT (IN) ::

. X(3,NUMNOD) ,V(3,NUMNOD) ,VR(3,NUMNOD) ,MASS(NUMNOD) ,

. INER(NUMNOD)

C

RETURN

END

1.5.2 Starter User’s Subroutine USERWIS C---------------------------------------------------------------------

C This subroutine initializes the global user’s window

C---------------------------------------------------------------------

SUBROUTINE USERWIS(

. IIN ,IOUT ,NUMNOD ,ITAB ,

. X ,V ,VR ,MASS ,INER ,

. NUVAR ,NUVARI ,UVAR ,IUVAR )

C-----------------------------------------------

C I m p l i c i t T y p e s

Page 14: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 9

C-----------------------------------------------

IMPLICIT NONE

C-----------------------------------------------

C The user’s data can be stored in UVAR for floating points and

C IUVAR for integers

C-----------------------------------------------

C D u m m y A r g u m e n t s

C-----------------------------------------------

C----------+---------+---+---+----------------------------------------

C VAR | SIZE |TYP| RW| DEFINITION

C----------+---------+---+---+----------------------------------------

C IIN | 1 | I | R | INPUT FILE UNIT (D00 file)

C IOUT | 1 | I | R | OUTPUT FILE UNIT (L00 file)

C NUVAR | 1 | I | R | SIZE OF USER REAL ARRAY

C NUVARI | 1 | I | R | SIZE OF USER INTEGER ARRAY

C NUMNOD | 1 | I | R | NUMBER OF NODES

C----------+---------+---+---+----------------------------------------

C IUVAR | NUVARI | I | W | USER INTEGER ARRAY

C----------+---------+---+---+----------------------------------------

C UVAR | NUVAR | F | W | USER D PRECISION ARRAY

C----------+---------+---+---+----------------------------------------

C ITAB | NUMNOD | I | R | USER NODE ID

C----------+---------+---+---+----------------------------------------

C X |3,NUMNOD | F | R | X,Y,Z COORDINATES

C V |3,NUMNOD | F | R | X,Y,Z VELOCITIES

C VR |3,NUMNOD | F | R | XX,YY,ZZ ROTATIONAL VELOCITIES

C----------+---------+---+---+----------------------------------------

C MASS | NUMNOD | F |R/W| NODAL MASS

C INER | NUMNOD | F |R/W| NODAL SHERICAL INERTIA

C----------+---------+---+---+----------------------------------------

C

C This subroutine initializes the global user's window

C and fills up the user variable buffers :

C UVAR for floating points and

C IUVAR for integers

C-----------------------------------------------

C D u m m y A r g u m e n t s

C-----------------------------------------------

INTEGER, INTENT (IN) :: IIN ,IOUT ,NUMNOD, NUVAR ,NUVARI

INTEGER, INTENT (IN) :: ITAB(NUMNOD)

DOUBLE PRECISION , INTENT (IN) ::

. X(3,NUMNOD) ,V(3,NUMNOD),VR(3,NUMNOD),MASS(NUMNOD),INER(NUMNOD)

Page 15: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GLOBAL USER’S WINDOW

JAN 2019 10

INTEGER , DIMENSION(NUVARI) ,INTENT(OUT) :: IUVAR

DOUBLE PRECISION , DIMENSION(NUVAR) ,INTENT(OUT) :: UVAR

C

RETURN

END

1.5.3 Engine User’s Subroutine USERWI C------------------------------------------------------------------

C Global user window subroutine

C------------------------------------------------------------------

SUBROUTINE USERWI(

1 IIN ,IOUT ,NUVAR ,NUVARI ,NUMNOD ,NCYCLE ,

2 LENWA ,IUVAR ,ITAB ,

3 TT ,DT1 ,DT2 ,USREINT,EXWORK ,

4 UVAR ,D ,X ,V ,VR ,MASS ,

5 INER ,STIFN ,STIFR ,A ,AR ,WA )

C

C-----------------------------------------------

C I m p l i c i t T y p e s

C-----------------------------------------------

C#include "implicit_f.inc"

C----------------------------------------------------------

C D u m m y A r g u m e n t s a n d F u n c t i o n

C----------------------------------------------------------

INTEGER

1 IIN ,IOUT ,NUVAR ,NUVARI,NUMNOD,NCYCLE ,LENWA,

2 IUVAR(NUVARI) ,ITAB(NUMNOD)

DOUBLE PRECISION

1 TT ,DT1 ,DT2 ,USREINT,EXWORK ,

2 UVAR(NUVAR) ,D(3,NUMNOD) ,X(3,NUMNOD) ,V(3,NUMNOD) ,

3 VR(3,NUMNOD) ,A(3,NUMNOD) ,AR(3,NUMNOD) ,MASS(NUMNOD) ,

4 INER(NUMNOD) ,STIFN(NUMNOD) ,STIFR(NUMNOD),WA(LENWA)

C=================================================================

C

C EXAMPLE :

C

C=================================================================

C-----------------------------------------------

C L o c a l V a r i a b l e s

C-----------------------------------------------

C-------------------------------

RETURN

END

Page 16: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 Material Laws

Chapter 2

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA

Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 17: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 2

TABLE OF CONTENTS

2.0 User’s Material Laws 29, 30, 31 3

2.1 Starter Subroutine LECMnn 4

2.2 Engine Subroutine SIGEPSnn for Solid Elements 5

2.3 Example of User’s Material Law for Solid Elements 9

2.4 Engine Subroutine SIGEPSnnC for Shell Elements 13

2.5 Example of User’s Material Law for Shell Elements 17

Page 18: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 3

2.0 User’s Material Laws 29, 30, 31

Up to 3 material user’s laws (law 29, 30 and 31) can be defined for 3D, 2D solid elements and 3D shell elements. User’s laws for beam or truss elements are not available.

To define a user’s law, two subroutines for each law. One must be linked with Altair Radioss Starter and the other with Altair Radioss Engine.

The Starter subroutine is called LECM29, LECM30, or LECM31 and is used to read material data and to initialize material parameters.

The Engine subroutine for solids is called SIGEPS29, SIGEPS30, or SIGEPS31 and is used to compute the solid element stress tensor at the integration point.

The corresponding shell subroutines are SIGEPS29C, SIGEPS30C or SIGEPS31C.

Note: All communication between Altair Radioss and the subroutines takes place within the argument list.

Page 19: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 4

2.1. Starter Subroutine LECMnn This subroutine reads the user’s law input data. The seven first material cards (see Altair Radioss Starter Input Manual 3.1 to 4.1) are read before this subroutine is called.

The number of specific material cards and their formats is free.

The argument list of LECMnn and its individual arguments and descriptions are as follows:

------------------------------------------------------------------------------------------

SUBROUTINE LECMnn(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM NUVAR,IFUNC,MAXFUNC,NFUNC,PARMAT )

-----------------------------------------------------------------------------------------------------

Argument Format Description IIN Integer read only scalar Input file unit (Starter input file) on which the data are

read. IOUT Integer read only scalar Output file unit (Starter listing file). UPARAM Float array Array with a size NUPARAM used to store material data. MAXNUPARAM Integer read only scalar Maximum possible size of UPARAM. NUPARAM Integer scalar Effective size of UPARAM. (MAXNUPARAM~NUPARAM,

MAXNUPARAM set to 1,000). NUVAR Integer scalar Number of extra variables needed for each element in

SIGEPSnn. IFUNC Integer array Array with a size NFUNC with the list of Altair Radioss

functions used for this law. The function numbers have to be stored in this array (and not in UPARAM) because of a possible renumbering of function numbers.

MAXFUNC Integer read only scalar Maximum possible size of IFUNC. NFUNC Integer scalar Number of RADOISS functions. (MAXFUNC, NFUNC,

MAXFUNC set to 100). PARMAT Float array of size 3 Modulus needed to compute interface stiffness. The

Young’s or bulk modulus can define this value. The value is also used in RADOISS Starter to make an estimation of the time step.

Page 20: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 5

2.2. Engine Subroutine SIGEPSnn for Solid Elements This subroutine calculates the stress tensor versus the strain tensor, strain rate tensor, density, volume, internal energy, or user-defined variables.

The argument list of SIGEPSnn and its individual arguments and descriptions are as follows:

C-----------------------------------------------------------------------------------------

SUBROUTINE SIGEPS29 (

1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC ,NPF

2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 ,RHO ,

3 VOLUME ,EINT ,

4 EPSPXX ,EPSPYY ,EPSPZZ ,EPSPXY ,EPSPYZ ,EPSPZX ,

5 DEPSXX ,DEPSYY ,DEPSZZ ,DEPSXY ,DEPSYZ ,DEPSZX ,

6 EPSXX ,EPSYY ,EPSZZ ,EPSXY ,EPSYZ ,EPSZX ,

7 SIGOXX ,SIGOYY ,SIGOZZ ,SIGOXY ,SIGOYZ ,SIGOZX ,

8 SIGNXX ,SIGNYY ,SIGNZZ ,SIGNXY ,SIGNYZ ,SIGNZX ,

9 SIGVXX ,SIGVYY ,SIGVZZ ,SIGVXY ,SIGVYZ ,SIGVZX ,

A SOUNDSP,VISCMAX,UVAR ,OFF )

C-----------------------------------------------------------------------------------------

The user’s material law can be used in isotropic or orthotropic modes.

With isotropic mode, the directions XX, YY, ... are the global reference frame axis. The old elastoplastic stresses (arrays SIGOXX, SIGOYY, ...) are already rotated to take into account the rigid body rotation.

With orthotropic mode, the directions are the orthotropic frame axis.

Use the Fortran float external function FINTER (shown below) to get the value Y of the function for the abscissa X.

Y=FINTER(IFUNC(I),X,NPF,TF,DYDX)

The SOUNDSP array is used in the calculation of the stability time step, the hourglass forces, and the artificial viscous pressure Q.

For isotropic materials, the sound speed value should be equal to the plane wave speed.

where: Variable Description

Y Interpolated value

X Abscissa value of the function

I The ith user’s function

DYDX Slope

NPF, TF Private function parameters

Page 21: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 6

For elastic or elastoplastic materials, the sound speed is given by the following equation.

00

2μ3/4G

ρ

+λ=

ρ

+K=c

Use VISCMAX to calculate the time step stability when the material law formulation is viscous.

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

NUPARAM Integer read only scalar Size of the user parameter array.

NUVAR Integer read only scalar Number of user element variables.

NFUNC Integer read only scalar Number of functions used for material law.

IFUNC Integer array read only Array of size NFUNC with function indexes.

NPF Integer array private data Array used by FINTER (float external function).

TF Integer array private data Array used by FINTER (float external function).

TIME Float read only Current time.

TIMESTEP Float read only Current time step.

UPARAM Float array read only User material parameter array of size NUPARAM.

RHO0 Float array read only Array of size NEL containing initial densities.

RHO Float array read only Array of size NEL containing current densities.

VOLUME Float array read only Array of size NEL containing current element volumes.

where: Variable Description Equation

K Bulk modulus

2υ13 E

=K

G Shear modulus

υ+E

=μ=G12

λ and μ Lame parameters 2υ11

12μ

υ+

υE=+λ

Page 22: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 7

Argument Format Description

EINT Float array read only Array of size NEL containing total internal energy.

EPSPXX, EPSPYY, EPSPZZ, EPSPXY, EPSPYZ, EPSPZX

Float array read only Arrays of size NEL containing ε strain rates in directions XX, YY, and ZZ and γ strain rates in directions XY, YZ, ZX.

DEPSXX, DEPSYY, DEPSZZ, DEPSXY, DEPSYZ, DEPSZX

Float array read only Arrays of size NEL containing ε strain increments in directions XX, YY, and ZZ and γ strain increments in directions XY, YZ, and ZX.

EPSXX, EPSYY, EPSZZ, EPSXY, EPSYZ, EPSZX

Float array read only Array of size NEL containing ε strains in directions XX, YY, and ZZ and γ strains in directions XY, YZ, and ZX.

SIGOXX, SIGOYY, SIGOZZ, SIGOXY, SIGOYZ, SIGOZX

Float array read only Array of size NEL with old (previous time step) elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

SIGNXX, SIGNYY, SIGNZZ, SIGNXY, SIGNYZ, SIGNZX

Float array write only Array of size NEL with new computed elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

SIGVXX, SIGVYY, SIGVZZ, SIGVXY, SIGVYZ, SIGVZX

Float array write only Array of size NEL containing viscous stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

SOUNDSP Float array write only Array of size NEL containing sound speed.

VISCMAX Float array write only Array of size NEL containing the maximum damping modulus.

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

OFF Float array read write Array of size NEL containing deleted element flags. The value is 0 if the element if OFF; the value is 1 if the element is ON.

2.2.1. Additional Data Necessary for Compatibility with HEPH You must provide Altair Radioss with plasticity information to calculate physical stabilization forces of HEPH. Yield and Plastic strain values must be given back to Altair Radioss in the user law (SIGEPS29.F, SIGEPS.F, or SIGEPS.F) to be compatible with the HEPH element. This can be done through a call to routine SET_U_SOLPLAS.

Page 23: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 8

The prototype of this routine and the necessary data to provide are described below. C---------------------------------------------------------------------

C New routine : SET_U_SOLPLAS allows to return to Altair Radioss,

C Yield and Plastic strain for all elements.

C

C Description of the arguments to be given to

C SET_U_SOLPLAS(NEL,YLD,PLA) :

C---------+-----------+---+--------------------------------------------

C VAR | SIZE |TYP| DEFINITION

C----------+--------+---+----------------------------------------------

C NEL | 1 | I | NUMBER OF ELEMENTS

C YLD | NEL | F | YIELD VALUE FOR EACH ELEMENT,

C (FOR THE CURRENT INTEGRATION POINT)

C PLA | NEL | F | PLASTIC STRAIN VALUE FOR EACH ELEMENT,

C (FOR THE CURRENT INTEGRATION POINT)

C---------+---------+---+---------------------------------------------

The arrays YLD and PLA, defined in the routine SET_U_SOLPLAS, have to be declared as local variables in the user material routines SIGEPS29.F, SIGEPS30.F, and SIGEPS31.F with a sufficiently-long NEL.

It is recommended to use the following statement, if these routines are compiled with a compiler that supports FORTRAN 90.

DOUBLE PRECISION YLD(NEL), PLA(NEL)

This statement is not possible if the compiler only supports FORTRAN 77, since NEL is set by Altair Radioss and given as an argument to the user routine. Therefore, the dynamic allocation is intended in this statement.

DOUBLE PRECISION YLD(4096), PLA(4096)

The statement must be sufficient in all cases, meaning the value of NEL given from Altair Radioss to the user routine should be less than 4096.

Page 24: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 9

2.3. Example of User’s Material Law for Solid Elements

Example: An elastic material law is defined for solid elements. Input user data includes density, Young’s modulus, and Poisson ratio. This model is made of solid elements:

2.3.1. User’s Input Data (/MAT/USERn/ option) […]

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/MAT/USER1/2

user’s elastic material law

# RHO

0.0027

# E Nu

60400 0.33

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

[…]

2.3.2. Starter User’s Subroutine LECMnn C================================================================= C This subroutine reads the user material parameters. C================================================================= SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, . NUVAR,IFUNC,MAXFUNC,NFUNC ,STIFINT) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C IMPLICIT NONE C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),STIFINT C----------------------------------------------- C L o c a l V a r i a b l e s C-----------------------------------------------

DOUBLE PRECISION E,NU,A11,A12,A44 C C====================================== C ELASTIC LAW WITH SOLIDS

Page 25: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 10

C====================================== C C----------------------------------------------- C INPUT FILE READING (USER DATA) C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU A11 = E * (1.-NU) / (1.+NU) / (1.-2.*NU) A12 = E * NU / (1.+NU) / (1.-2.*NU) A44 = E / 2. / (1.+NU) C C----------------------------------------------- C DATA CHECKING C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF NUPARAM = 3 IF(NUPARAM.GT.MAXUPARAM)THEN WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPARAM' WRITE(IOUT,*)' NUPARAM =',NUPARAM, . ' MAXUPARAM =',MAXUPARAM ELSE C----------------------------------------------- C USER MATERIAL PARAMETERS DEFINITION C----------------------------------------------- C used in sigeps29 (solid 2d,3d) UPARAM(1) = A11 UPARAM(2) = A12 UPARAM(3) = A44 ENDIF C C------------------------------------------------- C NUMBER OF USER ELEMENT VARIABLES AND CURVES C------------------------------------------------- NUVAR = 0 NFUNC = 0 C C----------------------------------------------- C USED FOR SOLIDS C----------------------------------------------- C used for interface (solid+shell) STIFINT = A11 C C------------------------------------------------- C OUTPUT FILE PRINT C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU C 1000 FORMAT( & 5X,' ELASTIC USER LAW 29',/, & 5X,' ------------------ ',//) 1100 FORMAT( & 5X,'E . . . . . . . . . . . . . . . . . . .=',E12.4/ & 5X,'NU. . . . . . . . . . . . . . . . . . .=',E12.4//) C C------------------------------------------------- RETURN END

Page 26: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 11

2.3.3. Engine User’s Subroutine SIGEPSnn C================================================================= C This subroutine computes elastic stresses. C================================================================= SUBROUTINE SIGEPS29 ( 1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC ,NPF , 2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 ,RHO , 3 VOLUME ,EINT , 4 EPSPXX ,EPSPYY ,EPSPZZ ,EPSPXY ,EPSPYZ ,EPSPZX , 5 DEPSXX ,DEPSYY ,DEPSZZ ,DEPSXY ,DEPSYZ ,DEPSZX , 6 EPSXX ,EPSYY ,EPSZZ ,EPSXY ,EPSYZ ,EPSZX , 7 SIGOXX ,SIGOYY ,SIGOZZ ,SIGOXY ,SIGOYZ ,SIGOZX , 8 SIGNXX ,SIGNYY ,SIGNZZ ,SIGNXY ,SIGNYZ ,SIGNZX , 9 SIGVXX ,SIGVYY ,SIGVZZ ,SIGVXY ,SIGVYZ ,SIGVZX , A SOUNDSP,VISCMAX,UVAR ,OFF ) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C IMPLICIT NONE C----------------------------------------------- C I N P U T A r g u m e n t s C----------------------------------------------- C INTEGER NEL, NUPARAM, NUVAR DOUBLE PRECISION TIME,TIMESTEP,UPARAM(NUPARAM), . RHO(NEL),RHO0(NEL),VOLUME(NEL),EINT(NEL), . EPSPXX(NEL),EPSPYY(NEL),EPSPZZ(NEL), . EPSPXY(NEL),EPSPYZ(NEL),EPSPZX(NEL), . DEPSXX(NEL),DEPSYY(NEL),DEPSZZ(NEL), . DEPSXY(NEL),DEPSYZ(NEL),DEPSZX(NEL), . EPSXX(NEL) ,EPSYY(NEL) ,EPSZZ(NEL) , . EPSXY(NEL) ,EPSYZ(NEL) ,EPSZX(NEL) , . SIGOXX(NEL),SIGOYY(NEL),SIGOZZ(NEL), . SIGOXY(NEL),SIGOYZ(NEL),SIGOZX(NEL) C----------------------------------------------- C O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION . SIGNXX(NEL),SIGNYY(NEL),SIGNZZ(NEL), . SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL), . SIGVXX(NEL),SIGVYY(NEL),SIGVZZ(NEL), . SIGVXY(NEL),SIGVYZ(NEL),SIGVZX(NEL), . SOUNDSP(NEL),VISCMAX(NEL) C----------------------------------------------- C I N P U T O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION UVAR(NEL,NUVAR), OFF(NEL) C C----------------------------------------------- C VARIABLES FOR FUNCTION INTERPOLATION C----------------------------------------------- INTEGER NPF(*), NFUNC, IFUNC(NFUNC) DOUBLE PRECISION FINTER ,TF(*) EXTERNAL FINTER C Y = FINTER(IFUNC(J),X,NPF,TF,DYDX) C Y : y = f(x) C X : x C DYDX : f'(x) = dy/dx C IFUNC(J): FUNCTION INDEX

Page 27: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 12

C J : FIRST(J=1), SECOND(J=2) .. FUNCTION USED FOR THIS LAW C NPF,TF : FUNCTION PARAMETER C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER I,J DOUBLE PRECISION A11,A12,A44 C . YLD(NEL),PLA(NEL) C====================================== C C ELASTIC LAW FOR SOLID - PROGRAM C C====================================== C C----------------------------------------------- C ELASTIC SOLUTION C----------------------------------------------- DO I=1,NEL C A11 = UPARAM(1) A12 = UPARAM(2) A44 = UPARAM(3) C SIGNXX(I) = A11 * EPSXX(I) + A12 * EPSYY(I) + A12 * EPSZZ(I) SIGNYY(I) = A12 * EPSXX(I) + A11 * EPSYY(I) + A12 * EPSZZ(I) SIGNZZ(I) = A12 * EPSXX(I) + A12 * EPSYY(I) + A11 * EPSZZ(I) SIGNXY(I) = A44 * EPSXY(I) SIGNYZ(I) = A44 * EPSYZ(I) SIGNZX(I) = A44 * EPSZX(I) C SOUNDSP(I) = SQRT(A11/RHO0(I)) VISCMAX(I) = 0. ENDDO C C----------------------------------------------- C PLASTIC STRAIN C (for compatibility with HEPH elements) C----------------------------------------------- C DO I=1,NEL C YLD(I) = 1. E+20 C PLA(I)= 0. C ENDDO C CALL SET_U_SOLPLAS(NEL,YLD,PLA) C----------------------------------------------- RETURN END

Page 28: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 13

2.4. Engine Subroutine SIGEPSnnC for Shell Elements

This subroutine calculates the stress tensor versus the strain tensor, strain rate tensor, or user variables. The argument list of SIGEPSnnC and its individual arguments and descriptions are as follows:

C-----------------------------------------------------------------------------------------

SUBROUTINE SIGEPS29C(

1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC ,

2 NPF ,NPT ,IPT ,IFLAG ,

2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 ,

3 AREA ,EINT ,THKLY ,

4 EPSPXX ,EPSPYY ,EPSPXY ,EPSPYZ ,EPSPZX ,

5 DEPSXX ,DEPSYY ,DEPSXY ,DEPSYZ ,DEPSZX ,

6 EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX ,

7 SIGOXX ,SIGOYY ,SIGOXY ,SIGOYZ ,SIGOZX ,

8 SIGNXX ,SIGNYY ,SIGNXY ,SIGNYZ ,SIGNZX ,

9 SIGVXX ,SIGVYY ,SIGVXY ,SIGVYZ ,SIGVZX ,

A SOUNDSP,VISCMAX,THK ,PLA ,UVAR ,

B OFF ,NGL ,SHF)

C-----------------------------------------------------------------------------------------

The user’s material law can be used in isotropic mode with PID 1 or in orthotropic mode with PID 9, 10, or 11. The directions XX, YY,... are the shell local reference frame axis. Stress are computed at each integration point. You must use the Fortran float external function FINTER to get the value Y of the function for the abscissa X.

Y=FINTER(IFUNC(I),X,NPF,TF,DYDX The SOUNDSP array should always be set by you. It is used to calculate the stability time step and the hourglass forces. The sound speed value should be equal to the plane wave speed.

where: Variable Description

Y Interpolated value

X Abscissa value of the function

I The ith user’s function

DYDX Slope

NPF, TF Private function parameters

Page 29: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 14

For elastic or elastoplastic materials, the sound speed is given by the following equation.

021 ρυ

E=c

Use VISCMAX to calculate the time step stability when the material law formulation is viscous.

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

NUPARAM Integer read only scalar Size of the user parameter array.

NUVAR Integer read only scalar Number of user element variables.

NFUNC Integer read only scalar Number of functions used for material law.

IFUNC Integer array read only Array of size NFUNC with function indexes.

NPF Integer array private data Array used by FINTER (float external function).

NPT Integer read only scalar Number of layers or integration points.

IPT Integer read only scalar Current layer or interrogation point.

IFLAG Integer array read only scalar Array of size NEL with geometrical flags.

TF Integer array private data Array used by FINTER (float external function).

TIME Float read only Current time.

TIMESTEP Float read only Current time step.

UPARAM Float array read only User material parameter array of size NUPARAM.

RHO0 Float array read only Array of size NEL with initial densities.

AREA Float array read only Array of size NEL with current element surfaces.

EINT Float array read only Array of size 2*NEL with internal membrane and bending energy.

THKLY Float array write only Array of size NEL with the layer thickness at each integration point.

EPSPXX, EPSPYY, EPSPXY, EPSPYZ, EPSPZX

Float array read only Arrays of size NEL containing ε strain rates in directions XX and YY and γ strains in directions XY, YZ, and ZX.

DEPSXX, DEPSYY, DEPSXY, DEPSYZ, DEPSZX

Float array read only Arrays of size NEL containing ε strain increments in directions XX and YY and γ strain increments in directions XY, YZ, and ZX.

Page 30: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 15

Argument Format Description

EPSXX, EPSYY, EPSXY, EPSYZ, EPSZX

Float array read only Array of size NEL containing ε strains in directions XX and YY and γ strains in directions XY, YZ, and ZX.

SIGOXX, SIGOYY, SIGOZZ, SIGOXY, SIGOYZ, SIGOZX

Float array read only Array of size NEL containing old (previous time step) elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

SIGNXX, SIGNYY, SIGNXY, SIGNYZ, SIGNZX

Float array write only Array of size NEL containing new computed elastoplastic stresses in directions XX, YY, XY, YZ, and ZX.

SIGVXX, SIGVYY, SIGVZZ, SIGVXY, SIGVYZ, SIGVZX

Float array write only Array of size NEL containing viscous stresses in directions XX, YY, XY, YZ, and ZX.

SOUNDSP Float array write only Array of size NEL containing sound speed.

VISCMAX Float array write only Array of size NEL containing the maximum damping modulus.

THK Float array read write Array of size NEL containing total thickness.

PLA Float array read write Array of size NEL containing plastic strain.

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

OFF Float array read write Array of size NEL containing deleted element flags. The value is 0 if the element if OFF; the value is 1 if the element is ON.

NGL Integer array read only Array of size NEL containing the external element number.

2.4.1. Shell Element Law Output

Unlike solid elements, shell elements do not have any variables specific to user’s law that are saved in time-history and animation.

2.4.2. Additional Data Necessary for Compatibility with QEPH

With QEPH, you must provide Altair Radioss information relative to plasticity so that physical stabilization can be accurately calculated. Yield value and value Et/E (tangent modulus divided by Young’s modulus) must be given back to Altair Radioss in the user law (SIGEPS29C.F, SIGEPS30C.F, or SIGEPS31C.F) to be compatible with the QEPH element.

Page 31: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 16

This can be done through a call to routine SET_U_SHLPLAS. The prototype of this routine and the necessary data to provide are described below.

C------------------------------------------------------------------------- C New routine : SET_U_SHLPLAS allows to return to Altair Radioss, C Yield and Et/E for all elements. C C Description of the arguments to be given to C SET_U_SHLPLAS(NEL,YLD,ETSE) : C---------+-----------+---+---------------------------------------------- C VAR | SIZE |TYP| DEFINITION C---------+-----------+---+---------------------------------------------- C NEL | 1 | I | NUMBER OF ELEMENTS C YLD | NEL | F | YIELD VALUE FOR EACH ELEMENT, C (FOR THE CURRENT INTEGRATION POINT) C ETSE | NEL | F | VALUE FOR EACH ELEMENT, C AND THE CURRENT INTEGRATION POINT OF : C ETSE = 1 in case of an elastic increment C = H/(H+E) in case of a plastic increment C where H : plastic tangent modulus, C E : Young modulus C---------+---------+---+---+--------------------------------------------

The arrays YLD and ETSE, defined in the routine SET_U_SHLPLAS, have to be declared as local variables in the user material routines SIGEPS29C.F, SIGEPS30C.F, and SIGEPS30C.F with a sufficiently-long NEL.

Use the following statement in case these routines are compiled with a compiler that supports FORTRAN 90. DOUBLE PRECISION YLD(NEL), ETSE(NEL)

This statement is not possible if the compiler only supports FORTRAN 77, since NEL is set by Altair Radioss and given as an argument to the user routine. Therefore, the dynamic allocation is intended in this statement. In this case, use the following statement.

DOUBLE PRECISION YLD(4096), ETSE(4096)

The statement must be sufficient in all cases, meaning the value of NEL given from Altair Radioss to the user routine should be less than 4096.

Page 32: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 17

2.5. Example of User’s Material Law for Shell Elements

Example: A Johnson-Cook elasto-plastic material law is defined for shell elements. Input user data includes density, Young’s modulus, Poisson ratio, yield stress, hardening parameters, hardening modulus, maximum stress, and maximum strain.

The Johnson Cook model: Npσ= A+Bε

Maximum stress and plastic strain are taken into account. Shell thickness is variable. Two methods are available to compute plastically admissible stresses.

Projection by return radial Iterative projection with three Newton iterations

This mesh example is made of shell elements:

2.5.1. User’s Input Data (/MAT/USERn/ option) […] #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/MAT/USER1/1

user’s elasto-plastic material law

# RHO

0.0027

# E Nu

60400 0.33

# A B N EPSM SIGM

90.266 223.14 0.375 0 175

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

[…]

Page 33: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 18

2.5.2. Starter User’s Subroutine LECMnn C================================================================= C This subroutine reads the user material parameters. C================================================================= SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, . NUVAR,IFUNC,MAXFUNC,NFUNC ,PARMAT ) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- IMPLICIT NONE C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),PARMAT(*) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION E,NU,CA,CB,CN,EPSM,SIGM,G C C=============================================== C ELASTO-PLASTIC LAW (Y=A+B*PLA^N) C=============================================== C C----------------------------------------------- C INPUT FILE READING (USER DATA) C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU READ(IIN,'(5F20.0)')CA,CB,CN,EPSM,SIGM C C----------------------------------------------- C DATA CHECKING C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF IF(CN.EQ.0.0.OR.CN.EQ.1.) CN = 1.0001 IF(EPSM.EQ.0.) EPSM = 1.E+30 IF(SIGM.EQ.0.) SIGM = 1.E+30 NUPARAM = 10 IF(NUPARAM.GT.MAXUPARAM)THEN WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPARAM' WRITE(IOUT,*)' NUPARAM =',NUPARAM, . ' MAXUPARAM =',MAXUPARAM ELSE C----------------------------------------------- C USER MATERIAL PARAMETERS DEFINITION C----------------------------------------------- UPARAM(1) = E UPARAM(2) = NU G = 0.5*E/(1.+NU) UPARAM(3) = G UPARAM(4) = CA UPARAM(5) = CB UPARAM(6) = CN UPARAM(7) = EPSM UPARAM(8) = SIGM

Page 34: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 19

UPARAM(9) = E/(1.-NU*NU) UPARAM(10) = NU*E/(1.-NU*NU) ENDIF C C----------------------------------------------- C USED FOR SHELLS C----------------------------------------------- C PARMAT(1) = C1 (interface for solid) PARMAT(2) = E PARMAT(3) = NU C C------------------------------------------------- C NUMBER OF USER ELEMENT VARIABLES AND CURVES C------------------------------------------------- NUVAR = 4 NFUNC = 0 C C------------------------------------------------- C OUTPUT FILE PRINT C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU,G, . CA,CB,CN,EPSM,SIGM C 1000 FORMAT( & 5X,' ELASTO-PLASTIC LAW (SIG=A+B*EPSp^N) ',/, & 5X,' -------------------------------------',//) 1100 FORMAT( & 5X,'YOUNG MODULUS. . . . . . . . . . . . .=',E12.4/ & 5X,'POISSON RATIO. . . . . . . . . . . . .=',E12.4/ & 5X,'SHEAR MODULUS . . . . . . . . . . . . .=',E12.4/ & 5X,'YIELD COEFFICIENT A . . . . . . . . . .=',E12.4/ & 5X,'YIELD COEFFICIENT B . . . . . . . . . .=',E12.4/ & 5X,'YIELD COEFFICIENT N . . . . . . . . . .=',E12.4/ & 5X,'EPS-MAX . . . . . . . . . . . . . . . .=',E12.4/ & 5X,'SIG-MAX . . . . . . . . . . . . . . . =',E12.4//) C C------------------------------------------------- C END C------------------------------------------------- RETURN END

Page 35: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 20

2.5.3. Engine User’s Subroutine SIGEPSnnC SUBROUTINE SIGEPS29C( 1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC , 2 NPF ,NPT ,IPT ,IFLAG , 2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 , 3 AREA ,EINT ,THKLY , 4 EPSPXX ,EPSPYY ,EPSPXY ,EPSPYZ ,EPSPZX , 5 DEPSXX ,DEPSYY ,DEPSXY ,DEPSYZ ,DEPSZX , 6 EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX , 7 SIGOXX ,SIGOYY ,SIGOXY ,SIGOYZ ,SIGOZX , 8 SIGNXX ,SIGNYY ,SIGNXY ,SIGNYZ ,SIGNZX , 9 SIGVXX ,SIGVYY ,SIGVXY ,SIGVYZ ,SIGVZX , A SOUNDSP,VISCMAX,THK ,PLA ,UVAR , B OFF ,NGL , SHF) C C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- IMPLICIT NONE C----------------------------------------------- C I N P U T A r g u m e n t s C----------------------------------------------- C INTEGER NEL, NUPARAM, NUVAR, NPT, IPT,IFLAG(*), . NGL(NEL) DOUBLE PRECISION . TIME,TIMESTEP,UPARAM(NUPARAM), . AREA(NEL),RHO0(NEL),EINT(2,NEL), . THKLY(NEL),PLA(NEL),SHF(NEL), . EPSPXX(NEL),EPSPYY(NEL), . EPSPXY(NEL),EPSPYZ(NEL),EPSPZX(NEL), . DEPSXX(NEL),DEPSYY(NEL), . DEPSXY(NEL),DEPSYZ(NEL),DEPSZX(NEL), . EPSXX(NEL) ,EPSYY(NEL) , . EPSXY(NEL) ,EPSYZ(NEL) ,EPSZX(NEL) , . SIGOXX(NEL),SIGOYY(NEL), . SIGOXY(NEL),SIGOYZ(NEL),SIGOZX(NEL) C----------------------------------------------- C O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION . SIGNXX(NEL),SIGNYY(NEL), . SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL), . SIGVXX(NEL),SIGVYY(NEL), . SIGVXY(NEL),SIGVYZ(NEL),SIGVZX(NEL), . SOUNDSP(NEL),VISCMAX(NEL) C----------------------------------------------- C I N P U T O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION UVAR(NEL,NUVAR),OFF(NEL),THK(NEL) C----------------------------------------------- C VARIABLES FOR FUNCTION INTERPOLATION C----------------------------------------------- INTEGER NPF(*), NFUNC, IFUNC(NFUNC) DOUBLE PRECISION FINTER ,TF(*) EXTERNAL FINTER C Y = FINTER(IFUNC(J),X,NPF,TF,DYDX) C Y : y = f(x)

Page 36: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 21

C X : x C DYDX : f'(x) = dy/dx C IFUNC(J): FUNCTION INDEX C J : FIRST(J=1), SECOND(J=2) C NPF,TF : FUNCTION PARAMETER C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER I,J,INDEX(NEL),NMAX,N,NINDX,IPLAS DOUBLE PRECISION . E,NU,G,CA,CB,CN,EPSM,SIGM, . A1,A2,G3, . CH1,QH1, . NNU1,NU1,S1,S2,S3, . R,RR,UMR,DEZZ,UN,EM20,ZERO, . L,M, . S11,S22,P2,S1S2,S122,NNU2,NU4,NU6, . C,S12,F,DF,Q2,YLD_I,NU3,NU2 . DOUBLE PRECISION . SVM(NEL),AA(NEL),BB(NEL),PP(NEL),QQ(NEL), . DPLA_I(NEL),X1(NEL),Y1(NEL),Z1(NEL),SVM1(NEL), . A(NEL),VM2(NEL),DPLA_J(NEL),DR(NEL) C DATA ZERO/0.0/,UN/1.0/,NMAX/3/,EM20/1.E-20/ C C=============================================== C C ELASTO-PLASTIC LAW (Y=A+B*PLA^N) C C=============================================== C C----------------------------------------------- C PARAMETERS READING C----------------------------------------------- E = UPARAM(1) NU = UPARAM(2) G = UPARAM(3) CA = UPARAM(4) CB = UPARAM(5) CN = UPARAM(6) EPSM = UPARAM(7) SIGM = UPARAM(8) A1 = UPARAM(9) A2 = UPARAM(10) C C----------------------------------------------- C USER VARIABLES INITIALIZATION C----------------------------------------------- IF(TIME.EQ.0.0)THEN DO I=1,NEL UVAR(I,1)=0. UVAR(I,2)=0. UVAR(I,3)=0. UVAR(I,4)=0. ENDDO ENDIF C G3 = 3. * G NNU1 = NU / (1. - NU)

Page 37: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 22

NU1 = 1.-NNU1 NU2 = 1./(1.+NU) NU3 = 1./(1.-NU) C C Plastically admissible stresses computation: IF(IFLAG(1).EQ.0) THEN IPLAS = 0 ELSEIF(IFLAG(1).EQ.1) THEN IPLAS = 1 ELSEIF(IFLAG(1).EQ.2) THEN IPLAS = 2 ENDIF C C======================================================== C I - ELASTIC STRESSES COMPUTATION C======================================================== DO I=1,NEL C SIGNXX(I)=SIGOXX(I)+A1*DEPSXX(I)+A2*DEPSYY(I) SIGNYY(I)=SIGOYY(I)+A2*DEPSXX(I)+A1*DEPSYY(I) SIGNXY(I)=SIGOXY(I)+G *DEPSXY(I) SIGNYZ(I)=SIGOYZ(I)+G *DEPSYZ(I) SIGNZX(I)=SIGOZX(I)+G *DEPSZX(I) C SOUNDSP(I) = SQRT(A1/RHO0(I)) VISCMAX(I) = 0. C ENDDO C C======================================================== C II - ELASTO-PLASTIC COMPUTATION C======================================================== C C=============================================== C A - COMPUTE CURRENT YIELD STRESS C=============================================== DO I=1,NEL IF(UVAR(I,1).LE.0.) THEN CH1=CA ELSEIF(UVAR(I,1).GT.EPSM) THEN CH1=CA+CB*EPSM**CN ELSE CH1=CA+CB*UVAR(I,1)**CN ENDIF UVAR(I,2)=MIN(SIGM,CH1) ENDDO C C=============================================== C B- COMPUTE HARDENING MODULUS H C=============================================== DO I=1,NEL IF(UVAR(I,1).GT.0. AND .CN.GE.1) THEN QH1= CB*CN*UVAR(I,1)**(CN-1.) ELSEIF(UVAR(I,1).GT.0. AND .CN.LT.1)THEN QH1= CB*CN*UVAR(I,1)**(1.-CN) ELSE QH1=0. ENDIF UVAR(I,3)=QH1 ENDDO

Page 38: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 23

C C C============================================================= C C - STRESSES, PLASTIC STRAIN AND THICKNESS CALCULATION C C COMPUTE PLASTICALLY ADMISSIBLE STRESSES C Two available computations according to IPLAS flag C============================================================= C IF(IPLAS.EQ.0)THEN C============================================================= C 1 - PROJECTION by RADIAL RETURN (Iplas=0) C============================================================= C C print *, 'PROJECTION by RADIAL RETURN - Iplas=0' C C----------------------------------------------- C -> Plastic strain evaluation C----------------------------------------------- DO I=1,NEL UVAR(I,1) = 0.5*( EPSXX(I)+EPSYY(I) . + SQRT( (EPSXX(I)-EPSYY(I))*(EPSXX(I)-EPSYY(I)) . + EPSXY(I)*EPSXY(I) ) ) ENDDO C C----------------------------------------------- C -> Von Mises criterion (non principal stresses) C----------------------------------------------- DO I=1,NEL SVM(I)=SQRT(SIGNXX(I)*SIGNXX(I) . +SIGNYY(I)*SIGNYY(I) . -SIGNXX(I)*SIGNYY(I) . +3.*SIGNXY(I)*SIGNXY(I)) ENDDO C C----------------------------------------------- C -> Projection on criterion C----------------------------------------------- DO I=1,NEL R = MIN(UN,UVAR(I,2)/MAX(EM20,SVM(I))) SIGNXX(I)=SIGNXX(I)*R SIGNYY(I)=SIGNYY(I)*R SIGNXY(I)=SIGNXY(I)*R ENDDO C C----------------------------------------------- C -> Compute plastic strain C----------------------------------------------- DO I=1,NEL UMR = 1.-R DPLA_I(I) = OFF(I)*SVM(I)*UMR/E UVAR(I,1) = UVAR(I,1) + DPLA_I(I) PLA(I) = PLA(I) + DPLA_I(I) ENDDO C C----------------------------------------------- C -> Compute thickness C----------------------------------------------- DO I=1,NEL DEZZ = DPLA_I(I) * 0.5*(SIGNXX(I)+SIGNYY(I)) /UVAR(I,2)

Page 39: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 24

DEZZ=-(DEPSXX(I)+DEPSYY(I))*NNU1-NU1*DEZZ THK(I) = THK(I) + DEZZ*THKLY(I) ENDDO C C ELSEIF(IPLAS.EQ.1)THEN C============================================================= C 2 - ITERATIVE PROJECTION (Iplas =1 ) C with 3 Newton iterations C============================================================= C C print *, 'ITERATIVE PROJECTION - Iplas=1' C C----------------------------------------------- C -> Von Mises criterion (non principal stresses) C----------------------------------------------- DO I=1,NEL UVAR(I,3) = MAX(ZERO,UVAR(I,3)) S1=SIGNXX(I)+SIGNYY(I) S2=SIGNXX(I)-SIGNYY(I) S3=SIGNXY(I) AA(I)=0.25*S1*S1 BB(I)=0.75*S2*S2+3.*S3*S3 SVM(I)=SQRT(AA(I)+BB(I)) DEZZ = -(DEPSXX(I)+DEPSYY(I))*NNU1 THK(I) = THK(I) + DEZZ*THKLY(I) ENDDO C C----------------------------------------------- C -> Gather plastic flow - Plasticity check C----------------------------------------------- NINDX=0 DO I=1,NEL IF(SVM(I).GT.UVAR(I,2).AND.OFF(I).EQ.1.) THEN NINDX=NINDX+1 INDEX(NINDX)=I ENDIF ENDDO IF(NINDX.EQ.0) RETURN C C----------------------------------------------- C -> Plastic plane stress C----------------------------------------------- DO J=1,NINDX I=INDEX(J) DPLA_J(I)=(SVM(I)-UVAR(I,2))/(G3+UVAR(I,3)) C ENDDO C NMAX: number of iterations DO N=1,NMAX DO J=1,NINDX I=INDEX(J) DPLA_I(I) = DPLA_J(I) YLD_I = UVAR(I,2)+UVAR(I,3)*DPLA_I(I) DR(I) = 0.5*E*DPLA_I(I)/YLD_I PP(I) = 1./(1.+DR(I)*NU3) QQ(I) = 1./(1.+3.*DR(I)*NU2) P2 = PP(I)*PP(I) Q2 = QQ(I)*QQ(I) F = AA(I)*P2+BB(I)*Q2-YLD_I*YLD_I

Page 40: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 25

DF = -(AA(I)*NU3*P2*PP(I)+3.*BB(I)*NU2*Q2*QQ(I)) . *(E-2.*DR(I)*UVAR(I,3))/YLD_I . -2.*UVAR(I,3)*YLD_I IF(DPLA_I(I).GT.0.) THEN DPLA_J(I)=MAX(ZERO,DPLA_I(I)-F/DF) ELSE DPLA_J(I)=0. ENDIF C ENDDO C ENDDO C C------------------------------------------ C -> Plastic strain C -> Plastically admissible stresses C -> Thickness C------------------------------------------ C DO J=1,NINDX I=INDEX(J) UVAR(I,1) = UVAR(I,1) + DPLA_I(I) PLA(I) = UVAR(I,1) S1=(SIGNXX(I)+SIGNYY(I))*PP(I) S2=(SIGNXX(I)-SIGNYY(I))*QQ(I) SIGNXX(I)=0.5*(S1+S2) SIGNYY(I)=0.5*(S1-S2) SIGNXY(I)=SIGNXY(I)*QQ(I) DEZZ = - NU1*DR(I)*S1/E THK(I) = THK(I) + DEZZ*THKLY(I) ENDDO C C ELSEIF(IPLAS.EQ.2)THEN C============================================================= C 3 - PROJECTION by RADIAL RETURN with correction (Iplas=2) C============================================================= C C print *, 'PROJECTION by RADIAL RETURN - Iplas=2' DO I=1,NEL C PP(I) = -(SIGNXX(I)+SIGNYY(I))*0.33333333 S11 = SIGNXX(I)+PP(I) S22 = SIGNYY(I)+PP(I) S12 = SIGNXY(I) P2 = PP(I)*PP(I) S1S2 = S11*S22 S122 = S12*S12 C NNU2 = NNU1*NNU1 NU4 = 1 + NNU2 + NNU1 NU6 = 0.5 - NNU2 + 0.5*NNU1 C QQ(I) = (1.-NNU1)*PP(I) AA(I) = P2*NU4 + 3.*(S122 - S1S2) BB(I) = P2*NU6 C = QQ(I)*QQ(I) VM2(I)= AA(I)+BB(I)+BB(I)+C C = C - UVAR(I,2)*UVAR(I,2)

Page 41: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER’S MATERIAL LAWS

JAN 2019 26

C R = MAX(ZERO,BB(I)*BB(I)-AA(I)*C) R = MIN(UN,(-BB(I)+ SQRT(R))/MAX(AA(I) ,EM20)) C UMR = 1 - R QQ(I) = QQ(I)*UMR SIGNXX(I) = SIGNXX(I)*R - QQ(I) SIGNYY(I) = SIGNYY(I)*R - QQ(I) SIGNXY(I) = S12*R DPLA_I(I) = OFF(I)*SQRT(VM2(I))*UMR/(G3) S1=0.5*(SIGNXX(I)+SIGNYY(I)) UVAR(I,1) = UVAR(I,1) + DPLA_I(I) PLA(I) = UVAR(I,1) DEZZ = DPLA_I(I) * S1 /UVAR(I,2) DEZZ=-(DEPSXX(I)+DEPSYY(I))*NNU1-NU1*DEZZ THK(I) = THK(I) + DEZZ*THKLY(I) C C----------------------------------------------- ENDDO C ENDIF C C----------------------------------------------- C RETURN END

Page 42: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 Extended User Material Laws

Chapter 3

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA

Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 43: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 2

TABLE OF CONTENTS

3.0 Extended User Material Laws 3

3.1 Starter Subroutine lecmusernn 4

3.2 Engine Subroutine lusernn for Solid Elements 5

3.3 Example of User’s Material Law for Solid Elements 9

3.4 Engine Subroutine lusernnc for Shell Elements 14

3.5 Example of User’s Material Law for Shell Elements 19

Page 44: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 3

3.0 Extended User Material Laws

In Altair Radioss, 99 material user laws can be defined for 3D and 2D solid elements and 3D shell elements. User laws for beam or truss elements are not yet available.

To define a user law, two subroutines for each law must be provided. One must be linked with Altair Radioss Starter and the other with Altair Radioss Engine.

The Starter subroutine is called LECMUSERnn (where nn = 01, 02, 03, … 99) and reads material data and initializes material parameters.

The Engine subroutine for solids is called LUSERnn (where nn = 01, 02, 03, … 99) and computes the solid element stress tensor at the integration point. The corresponding shell subroutine is called LUSERnnC (where nn = 01, 02, 03, … 99).

Note: All communication between Altair Radioss and the User’s subroutines takes place within the argument list.

Page 45: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 4

3.1 Starter Subroutine LECMUSERnn This subroutine reads the user law input data. The first seven material cards (see Altair Radioss Starter Input Manual 3.1 to 4.1) are read before this subroutine is called. The numbers and formats of specific material cards are free.

The argument list of LECMUSERnn is:

C--------------------------------------------------------------------------

SUBROUTINE LECMUSERnn(IIN, IOUT, UPARAM, MAXUPARAM,NUPARAM, NUVAR,IFUNC,MAXFUNC,NFUNC,PARMAT, USERBUF )

C--------------------------------------------------------------------------

Argument Format Description

IIN Integer read only scalar Input file unit (ROOTD00, ROOT_nnnn.rad) on which the data are read.

IOUT Integer read only format Output file unit (ROOT_nnnn.lis).

UPARAM Float array Array with a size NUPARAM used to store failure material data.

MAXUPARAM Integer read only scalar Maximum possible size of UPARAM.

NUPARAM Integer scalar Effective size of UPARAM. (MAXUPARAM, NUPARAM, MAXUPARAM are set to 1000).

NUVAR Integer scalar Number of extra variables needed for each integration point of each elements.

IFUNC Integer array Array with a size of NFUNC containing the list of Altair Radioss functions used in failure model. The function numbers are stored in this array (not in UPARAM) due to a possible renumbering of the function’s numbers.

MAXFUNC Integer read only scalar Maximum possible size of IFUNC.

NFUNC Integer scalar Number of Altair Radioss functions.

STIFINT Float scalar Modulus needed to compute the interface stiffness. The Young’s or bulk modulus is used to define the value, which estimates the time step.

USERBUF Data structure read write Defined in LAW_USER.mod. This module is used inside LECMUSERnn.

This USERBUF data structure contains:

NAME Character array read only Array of size 100 containing material name.

ID Integer read only scalar Material ID defined in Starter input deck.

Page 46: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 5

3.2 Engine Subroutine LUSERnn for Solid Elements This subroutine calculates the stress tenor versus the strain tensor, strain rate tensor, density, volume, internal energy, or user variables.

The argument list of LUSERnn and its individual arguments and descriptions are:

C---------------------------------------------------------------------------

SUBROUTINE LUSERnn (

1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC ,NPF ,

2 TF ,TIME ,TIMESTEP,UPARAM ,RHO , VOLUME ,

3 EINT , NGL, SOUNDSP,VISCMAX,UVAR ,OFF ,

4 SIGY , PLA , USERBUF )

C---------------------------------------------------------------------------

The user’s material law can be used in isotropic or orthotropic modes.

With isotropic mode, the directions XX, YY, ... are the global reference frame axis. The old elastoplastic stresses (arrays SIGOXX, SIGOYY, ...) are already rotated to take into account the rigid body rotation.

With orthotropic mode, the directions are the orthotropic frame axis.

You must use the Fortran float external function FINTER (shown below) to get the

value Y of the function for the abscissa X.

Y=FINTER(IFUNC(I),X,NPF,TF,DYDX)

where: Variable Description

Y Interpolated value

X Abscissa value of the function

I The ith user’s function

DYDX Slope

NPF, TF Private function parameters

The SOUNDSP array is used in the calculation of the stability time step, the hourglass forces, and the artificial viscous pressure Q.

For isotropic materials, the sound speed value should be equal to the plane wave speed.

Page 47: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 6

For elastic or elastoplastic materials, the sound speed is given by the following equation.

00

2μ3/4G

ρ

+λ=

ρ

+K=c

Use VISCMAX to calculate the time step stability when the material law formulation is viscous.

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

NUPARAM Integer read only scalar Size of the user parameter array.

NUVAR Integer read only scalar Number of user element variables.

NFUNC Integer read only scalar Number of functions used for material law.

IFUNC Integer array read only Array of size NFUNC with function indexes.

NPF Integer array private data Array used by FINTER (float external function).

TF Integer array private data Array used by FINTER (float external function).

TIME Float read only Current time.

TIMESTEP Float read only Current time step.

UPARAM Float array read only User material parameter array of size NUPARAM.

RHO Float array read only Array of size NEL containing current densities.

VOLUME Float array read only Array of size NEL containing current element volumes.

EINT Float array read only Array of size NEL containing total internal energy.

where: Variable Description Equation

K Bulk modulus

2υ13 E

=K

G Shear modulus

υ+E

=μ=G12

λ and μ Lame parameters 2υ11

12μ

υ+

υE=+λ

Page 48: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 7

Argument Format Description

SOUNDSP Float array write only Array of size NEL containing sound speed.

VISCMAX Float array write only Array of size NEL containing the maximum damping modulus.

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

OFF Float array read write Array of size NEL containing deleted element flags. The value is 0 if the element if OFF; the value is 1 if the element is ON.

USERBUF Data structure read write Defined in LAW_USERSO.mod. This module is used inside LUSERnn.

This USERBUF data structure contains:

Argument Format Description

ID Integer read only scalar Material ID defined in Starter input deck.

NCYCLE Integer read only Cycle number. First cycle is equal to 0.

IPTR Integer read only Integration point (direction r).

IPTS Integer read only Integration point (direction r).

IPTT Integer read only Integration point (direction r).

EPSPXX, EPSPYY, EPSPZZ, EPSPXY, EPSPYZ, EPSPZX

Float array read only Arrays of size NEL containing ε strain rates in directions XX, YY, and ZZ and γ strain rates in directions XY, YZ, ZX.

DEPSXX, DEPSYY, DEPSZZ, DEPSXY, DEPSYZ, DEPSZX

Float array read only Arrays of size NEL containing ε strain increments in directions XX, YY, and ZZ and γ strain increments in directions XY, YZ, and ZX.

EPSXX, EPSYY, EPSZZ, EPSXY, EPSYZ, EPSZX

Float array read only Array of size NEL containing ε strains in directions XX, YY, and ZZ and γ strains in directions XY, YZ, and ZX.

SIGOXX, SIGOYY, SIGOZZ, SIGOXY, SIGOYZ, SIGOZX

Float array read only Array of size NEL with old (previous time step) elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

Page 49: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 8

R11, R12, R13, R21, R22, R23, R32, R33

Float array write only Array of size NEL containing rotation matrices from the global skew system to an element skew system.

SIGNXX, SIGNYY, SIGNZZ, SIGNXY, SIGNYZ, SIGNZX

Float array write only Array of size NEL with new computed elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

SIGVXX, SIGVYY, SIGVZZ, SIGVXY, SIGVYZ, SIGVZX

Float array write only Array of size NEL containing viscous stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

RHO0 Float array read only Array of size NEL containing initial densities.

DPLA Float array write only Array of size NEL containing incremental plastic strain.

TEMP Float array read only Array of size NEL containing temperature.

3.2.1 Additional Data Necessary for Compatibility with HEPH Argument Format Description

PLA Float array write only Array of size NEL containing plastic strain.

SIGY Float array read only Array of size NEL containing yield stress.

Page 50: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 9

3.3 Example of User Material Law for Solid Elements

Example: An elastic material law is defined for solid elements. Input user data includes density, Young’s modulus, and Poisson ratio. This model is made of solid elements:

3.3.1 User’s Input Data (/MAT/USERnn/ option) […]

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/MAT/USER01/2

user’s elastic material law

# RHO

0.0027

# E Nu

60400 0.33

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

[…]

3.3.2 Starter User’s Subroutine LECMUSER01

!=================================================================

!This subroutine reads the user material parameters.

!=================================================================

SUBROUTINE LECMUSER01(IIN,IOUT,UPARAM,MAXUPARAM,NUPARAM,NUVAR,

* IFUNC,MAXFUNC,NFUNC,PARMAT,USERBUF)

!-----------------------------------------------

!M o d u l e D e f i n i t i o n

!-----------------------------------------------

USE LAW_USER

!-----------------------------------------------

!I m p l i c i t D e f i n i t i o n

!-----------------------------------------------

Page 51: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 10

IMPLICIT NONE

!-----------------------------------------------

!D u m m y A r g u m e n t s

!-----------------------------------------------

INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC,IFUNC(MAXFUNC)

DOUBLE PRECISION UPARAM(MAXUPARAM),PARMAT(100)

!-----------------------------------------------

TYPE(ULAWBUF) :: USERBUF

!-----------------------------------------------

!L o c a l V a r i a b l e s

!-----------------------------------------------

DOUBLE PRECISION E,NU,A11,A12,A44

!

!======================================

!ELASTIC LAW WITH SOLIDS

!======================================

!

!-----------------------------------------------

!INPUT FILE READING (USER DATA)

!-----------------------------------------------

READ(IIN,'(2F20.0)')E,NU

A11 = E * (1.-NU) / (1.+NU) / (1.-2.*NU)

A12 = E * NU / (1.+NU) / (1.-2.*NU)

A44 = E / 2. / (1.+NU)

!

!-----------------------------------------------

!DATA CHECKING

!-----------------------------------------------

IF(NU.LT.0.0.OR.NU.GE.0.5)THEN

WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE'

ENDIF

NUPARAM = 3

IF(NUPARAM.GT.MAXUPARAM)THEN

WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPARAM'

WRITE(IOUT,*)'NUPARAM =',NUPARAM,' MAXUPARAM =',MAXUPARAM

ELSE

!-----------------------------------------------

!USER MATERIAL PARAMETERS DEFINITION

!-----------------------------------------------

! used in sigeps29 (solid 2d,3d)

UPARAM(1) = A11

UPARAM(2) = A12

UPARAM(3) = A44

ENDIF

!

Page 52: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 11

!-------------------------------------------------

!NUMBER OF USER ELEMENT VARIABLES AND CURVES

!-------------------------------------------------

NUVAR = 0

NFUNC = 0

!

!-----------------------------------------------

!USED FOR SOLIDS

!-----------------------------------------------

! used for interface (solid+shell)

PARMAT(1) = A11

PARMAT(2) = E

PARMAT(3) = NU

!

!-------------------------------------------------

!OUTPUT FILE PRINT

!-------------------------------------------------

WRITE(IOUT,1000)

WRITE(IOUT,1100)E,NU

!

1000 FORMAT(5X,' ELASTIC USER LAW 01',/,

& 5X,' -------------------',//)

1100 FORMAT(

& 5X,'E . . . . . . . . . . . . . . . . . . .=',E12.4/

& 5X,'NU. . . . . . . . . . . . . . . . . . .=',E12.4//)

!

!-------------------------------------------------

RETURN

END

3.3.3 Engine User’s Subroutine LUSER01

!=================================================================

!This subroutine computes elasti! stresses.

!=================================================================

SUBROUTINE LUSER01 (

1 NEL,NUPARAM,NUVAR,NFUNC,IFUNC,NPF,

2 TF,TIME,TIMESTEP,UPARAM ,RHO,VOLUME ,

3 EINT,NGL,SOUNDSP ,VISCMAX ,UVAR,OFF,

4 SIGY,PLA,USERBUF )

! -----------------------------------------------------------------

USE LAW_USERSO

!-----------------------------------------------

!I m p l i c i t D e f i n i t i o n

!-----------------------------------------------

Page 53: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 12

IMPLICIT NONE

!

! INPUT DATA

!

INTEGER NEL, NUPARAM, NUVAR,NGL(NEL)

DOUBLE PRECISION TIME,TIMESTEP,UPARAM(NUPARAM)

DOUBLE PRECISION RHO(NEL),VOLUME(NEL),EINT(NEL)

DOUBLE PRECISION EPSPXX(NEL),EPSPYY(NEL),EPSPZZ(NEL)

DOUBLE PRECISION EPSPXY(NEL),EPSPYZ(NEL),EPSPZX(NEL)

DOUBLE PRECISION DEPSXX(NEL),DEPSYY(NEL),DEPSZZ(NEL)

DOUBLE PRECISION DEPSXY(NEL),DEPSYZ(NEL),DEPSZX(NEL)

DOUBLE PRECISION EPSXX(NEL) ,EPSYY(NEL) ,EPSZZ(NEL)

DOUBLE PRECISION EPSXY(NEL) ,EPSYZ(NEL) ,EPSZX(NEL)

DOUBLE PRECISION SIGOXX(NEL),SIGOYY(NEL),SIGOZZ(NEL)

DOUBLE PRECISION SIGOXY(NEL),SIGOYZ(NEL),SIGOZX(NEL)

DOUBLE PRECISION RHO0(NEL)

!-----------------------------------------------

!O U T P U T DATA

!-----------------------------------------------

DOUBLE PRECISION SOUNDSP(NEL),VISCMAX(NEL)

DOUBLE PRECISION SIGNXX(NEL),SIGNYY(NEL),SIGNZZ(NEL)

DOUBLE PRECISION SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL)

DOUBLE PRECISION SIGVXX(NEL),SIGVYY(NEL),SIGVZZ(NEL)

DOUBLE PRECISION SIGVXY(NEL),SIGVYZ(NEL),SIGVZX(NEL)

DOUBLE PRECISION DPLA(NEL)

!-----------------------------------------------

! I N P U T O U T P U TA r g u m e n t s

!-----------------------------------------------

DOUBLE PRECISION UVAR(NEL,NUVAR), OFF(NEL),PLA(NEL), SIGY(NEL)

!-----------------------------------------------

TYPE(ULAWINTBUF) :: USERBUF

!-----------------------------------------------

INTEGER NPF(*), NFUNC, IFUNC(NFUNC)

DOUBLE PRECISION FINTER ,TF(*)

EXTERNAL FINTER

! !Y = FINTER(IFUNC(J),X,NPF,TF,DYDX)

! !Y: y = f(x)

! !X: x

! !DYDX: f’(x) = dy/dx

! !IFUNC(J): FUNCTION INDEX

! !J : FIRST(J=1), SECOND(J=2) .. FUNCTION USED FOR THIS LAW

! !NPF,TF : FUNCTION PARAMETER

!----------------------------------------------

!-----------------------------------------------

Page 54: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 13

! L o c a l V a r i a b l e s

!-----------------------------------------------

INTEGER I,J

DOUBLE PRECISION A11,A12,G

! -----------------------------------------------

! USER VARIABLES INITIALIZATION

! -----------------------------------------------

A11= UPARAM(1)

A12= UPARAM(2)

G= UPARAM(3)

! Input Data structure

SIGOXX(1:NEL) = USERBUF%SIGOXX(1:NEL)

SIGOYY(1:NEL) = USERBUF%SIGOYY(1:NEL)

SIGOZZ(1:NEL) = USERBUF%SIGOZZ(1:NEL)

SIGOXY(1:NEL) = USERBUF%SIGOXY(1:NEL)

SIGOYZ(1:NEL) = USERBUF%SIGOYZ(1:NEL)

SIGOZX(1:NEL) = USERBUF%SIGOZX(1:NEL)

!

EPSPXX(1:NEL) = USERBUF%EPSPXX(1:NEL)

EPSPYY(1:NEL) = USERBUF%EPSPYY(1:NEL)

EPSPZZ(1:NEL) = USERBUF%EPSPZZ(1:NEL)

EPSPXY(1:NEL) = USERBUF%EPSPXY(1:NEL)

EPSPYZ(1:NEL) = USERBUF%EPSPYZ(1:NEL)

EPSPZX(1:NEL) = USERBUF%EPSPZX(1:NEL)

!

EPSXX(1:NEL) = USERBUF%EPSXX(1:NEL)

EPSYY(1:NEL) = USERBUF%EPSYY(1:NEL)

EPSZZ(1:NEL) = USERBUF%EPSZZ(1:NEL)

EPSXY(1:NEL) = USERBUF%EPSXY(1:NEL)

EPSYZ(1:NEL) = USERBUF%EPSYZ(1:NEL)

EPSZX(1:NEL) = USERBUF%EPSZX(1:NEL)

!

DEPSXX(1:NEL) = USERBUF%DEPSXX(1:NEL)

DEPSYY(1:NEL) = USERBUF%DEPSYY(1:NEL)

DEPSZZ(1:NEL) = USERBUF%DEPSZZ(1:NEL)

DEPSXY(1:NEL) = USERBUF%DEPSXY(1:NEL)

DEPSYZ(1:NEL) = USERBUF%DEPSYZ(1:NEL)

DEPSZX(1:NEL) = USERBUF%DEPSZX(1:NEL)

!

SIGNXX(1:NEL) = USERBUF%SIGNXX(1:NEL)

SIGNYY(1:NEL) = USERBUF%SIGNYY(1:NEL)

SIGNZZ(1:NEL) = USERBUF%SIGNZZ(1:NEL)

SIGNXY(1:NEL) = USERBUF%SIGNXY(1:NEL)

SIGNYZ(1:NEL) = USERBUF%SIGNYZ(1:NEL)

SIGNZX(1:NEL) = USERBUF%SIGNZX(1:NEL)

Page 55: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 14

!

SIGVXX(1:NEL) = USERBUF%SIGVXX(1:NEL)

SIGVYY(1:NEL) = USERBUF%SIGVYY(1:NEL)

SIGVZZ(1:NEL) = USERBUF%SIGVZZ(1:NEL)

SIGVXY(1:NEL) = USERBUF%SIGVXY(1:NEL)

SIGVYZ(1:NEL) = USERBUF%SIGVYZ(1:NEL)

SIGVZX(1:NEL) = USERBUF%SIGVZX(1:NEL)

RHO0(1:NEL) = USERBUF%RHO0(1:NEL)

DPLA(1:NEL) = USERBUF%DPLA(1:NEL)

DO I=1,NEL

SIGNXX(I) = A11 * EPSXX(I) + A12 * EPSYY(I) + A12 * EPSZZ(I)

SIGNYY(I) = A12 * EPSXX(I) + A11 * EPSYY(I) + A12 * EPSZZ(I)

SIGNZZ(I) = A12 * EPSXX(I) + A12 * EPSYY(I) + A11 * EPSZZ(I)

SIGNXY(I) = G * EPSXY(I)

SIGNYZ(I) = G * EPSYZ(I)

SIGNZX(I) = G * EPSZX(I)

C

SOUNDSP(I) = SQRT(A11/RHO0(I))

VISCMAX(I) = 0.

PLA = 0.0

SIGY=1.E30

ENDDO

!Outp data structure

USERBUF%SIGNXX(1:NEL) = SIGNXX(1:NEL)

USERBUF%SIGNYY(1:NEL) = SIGNYY(1:NEL)

USERBUF%SIGNZZ(1:NEL) = SIGNZZ(1:NEL)

USERBUF%SIGNXY(1:NEL) = SIGNXY(1:NEL)

USERBUF%SIGNYZ(1:NEL) = SIGNYZ(1:NEL)

USERBUF%SIGNZX(1:NEL) = SIGNZX(1:NEL)

RETURN

END

3.4 Engine Subroutine LUSERnnC for Shell Elements

This subroutine calculates the stress tensor versus the strain tensor, strain rate tensor, or user variables. The argument list of LUSERnnC and its individual arguments and descriptions are as follows:

C------------------------------------------------------------------------------

SUBROUTINE LUSERnnC( 1 NEL,NUPARAM,NUVAR,NFUNC,IFUNC, 2 NPF,NGL,TF,TIME,TIMESTEP,

Page 56: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 15

3 UPARAM,RHO0,AREA,EINT,SHF, 4 SOUNDSP,VISCMAX,PLA,UVAR,OFF, 5 SIGY,USERBUF)

C----------------------------------------------------------------------------- The user’s material law can be used in isotropic mode with PID 1 or in orthotropic mode with PID 9, 10, or 11. The directions XX, YY, ... are the shell local reference frame axis. Stresses are computed at each integration point. Use the Fortran float external function FINTER to get the value Y of the function for the abscissa X.

Y=FINTER(IFUNC(I),X,NPF,TF,DYDX)

where: Variable Description

Y Interpolated value

X Abscissa value of the function

I The ith user’s function

DYDX Slope

NPF, TF Private function parameters

The SOUNDSP array should always be set by you. It is used to calculate the stability time step and the hourglass forces. The sound speed value should be equal to the plane wave speed. For elastic or elastoplastic materials, the sound speed is given by the following equation.

021 ρυ

E=c

Use VISCMAX to calculate the time step stability when the material law formulation is viscous.

Page 57: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 16

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

NUPARAM Integer read only scalar Size of the user parameter array.

NUVAR Integer read only scalar Number of user element variables.

NFUNC Integer read only scalar Number of functions used for material law.

IFUNC Integer array read only Array of size NFUNC with function indexes.

NPF Integer array private data Array used by FINTER (float external function).

TF Integer array private data Array used by FINTER (float external function).

IPT Integer read only scalar Current layer or interrogation point.

TIME Float read only Current time.

TIMESTEP Float read only Current time step.

UPARAM Float array read only User material parameter array of size NUPARAM.

RHO0 Float array read only Array of size NEL with initial densities.

AREA Float array read only Array of size NEL with current element surfaces.

EINT Float array read only Array of size 2*NEL with internal membrane and bending energy.

SOUNDSP Float array write only Array of size NEL containing sound speed.

VISCMAX Float array write only Array of size NEL containing the maximum damping modulus.

PLA Float array read write Array of size NEL containing plastic strain.

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

OFF Float array read write Array of size NEL containing deleted element flags. The value is 0 if the element if OFF; the value is 1 if the element is ON.

NGL Integer array read only Array of size NEL containing the external element number.

SIGY Float array read write Array of size NEL containing yield stress.

USERBUF Data structure read writer Defined in LAW_USERSH.mod. This module should be used to relink the executable inside LUSERnnC.

Page 58: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 17

This USERBUF module contains:

Argument Format Description

NCYCLE Integer read only scalar Current cycle.

ID Integer read only scalar User material ID.

ILAYER Integer read only scalar Current cycle.

IPG Integer read only scalar GAUSS Integration point (surface).

NPTA Integer read only scalar Number of layers or integration points.

IFLAG Integer array read only scalar

Array of size NEL containing geometric flags.

R11, R12, R13, R21, R22, R23, R31, R32, R33

Float arrays read only scalar

Rotational matrix Global ----- > local.

THKLYL Float array read only Array of size NEL containing the layer thickness at each integration point.

THKN Float array read write Array of size NEL containing total thickness.

EPSPXX, EPSPYY, EPSPXY, EPSPYZ, EPSPZX

Float array read only Arrays of size NEL containing ε strain rates in directions XX and YY and γ strains in directions XY, YZ, and ZX.

DEPSXX, DEPSYY, DEPSXY, DEPSYZ, DEPSZX

Float array read only Arrays of size NEL containing ε strain increments in directions XX and YY and γ strain increments in directions XY, YZ, and ZX.

EPSXX, EPSYY, EPSXY, EPSYZ, EPSZX

Float array read only Array of size NEL containing ε strains in directions XX and YY and γ strains in directions XY, YZ, and ZX.

SIGOXX, SIGOYY, SIGOZZ, SIGOXY, SIGOYZ, SIGOZX

Float array read only Array of size NEL containing old (previous time step) elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, and ZX.

SIGNXX, SIGNYY, SIGNXY, SIGNYZ, SIGNZX

Float array write only Array of size NEL containing new computed elastoplastic stresses in directions XX, YY, XY, YZ, and ZX.

SIGVXX, SIGVYY, SIGVZZ, SIGVXY, SIGVYZ, SIGVZX

Float array write only Array of size NEL containing viscous stresses in directions XX, YY, XY, YZ, and ZX.

Page 59: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 18

3.4.1 Shell Element Law Output

Unlike solid elements, shell elements do not have any variables specific to user’s law that are saved in time-history and animation.

3.4.2 Additional Data Necessary for Compatibility with QEPH

The Yield value and value Et/E (tangent modulus divided by Young modulus) must be given in order for this law to be compatible with QEPH element. The prototype of this routine and the necessary data to provide are described below.

DPLA Float array writ only Array of size NEL containing the plastic strain.

ETSE Float array write only Array of size NEL containing Et/E (tangent modulus divided by Young’s modulus).

TEMP Float array read only Array of size NEL containing the temperature.

Page 60: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 19

3.5 Example of User’s Material Law for Shell Elements Example: A Johnson-Cook elasto-plastic material law is defined for shell elements. Input user data includes density, Young’s modulus, Poisson ratio, yield stress, hardening parameters, hardening modulus, maximum stress, and maximum strain.

The Johnson Cook model: Npσ = A + B ε

Maximum stress and plastic strain are taken into account. Shell thickness is variable. Two methods are available to compute plastically admissible stresses.

Projection by return radial Iterative projection with three Newton iterations

This mesh example is made of shell elements:

3.5.1 User’s Input Data (/MAT/USERnn/ option) […]

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/MAT/USER01/1

user’s elasto-plastic material law

# RHO

0.0027

# E Nu

60400 0.33

# A B N EPSM SIGM

90.266 223.14 0.375 0 175

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

[…]

3.5.2 Starter User’s Subroutine LECMUSER01 C================================================================= C This subroutine reads the user material parameters. C================================================================= SUBROUTINE LECMUSER01(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, . NUVAR,IFUNC,MAXFUNC,NFUNC ,PARMAT ) C----------------------------------------------- C I m p l i c i t T y p e s

Page 61: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 20

C----------------------------------------------- IMPLICIT NONE C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),PARMAT(*) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION E,NU,CA,CB,CN,EPSM,SIGM,G C C=============================================== C ELASTO-PLASTIC LAW (Y=A+B*PLA^N) C=============================================== C C----------------------------------------------- C INPUT FILE READING (USER DATA) C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU READ(IIN,'(5F20.0)')CA,CB,CN,EPSM,SIGM C C----------------------------------------------- C DATA CHECKING C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF IF(CN.EQ.0.0.OR.CN.EQ.1.) CN = 1.0001 IF(EPSM.EQ.0.) EPSM = 1.E+30 IF(SIGM.EQ.0.) SIGM = 1.E+30 NUPARAM = 10 IF(NUPARAM.GT.MAXUPARAM)THEN WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPARAM' WRITE(IOUT,*)' NUPARAM =',NUPARAM, . ' MAXUPARAM =',MAXUPARAM ELSE C----------------------------------------------- C USER MATERIAL PARAMETERS DEFINITION C----------------------------------------------- UPARAM(1) = E UPARAM(2) = NU G = 0.5*E/(1.+NU) UPARAM(3) = G UPARAM(4) = CA UPARAM(5) = CB UPARAM(6) = CN UPARAM(7) = EPSM UPARAM(8) = SIGM UPARAM(9) = E/(1.-NU*NU) UPARAM(10) = NU*E/(1.-NU*NU) ENDIF C C----------------------------------------------- C USED FOR SHELLS C----------------------------------------------- C PARMAT(1) = C1 (interface for solid)

Page 62: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 21

PARMAT(2) = E PARMAT(3) = NU C C------------------------------------------------- C NUMBER OF USER ELEMENT VARIABLES AND CURVES C------------------------------------------------- NUVAR = 4 NFUNC = 0 C C------------------------------------------------- C OUTPUT FILE PRINT C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU,G, . CA,CB,CN,EPSM,SIGM C 1000 FORMAT( & 5X,' ELASTO-PLASTIC LAW (SIG=A+B*EPSp^N) ',/, & 5X,' -------------------------------------'//) 1100 FORMAT( & 5X,'YOUNG MODULUS. . . . . . . . . . . . .=',E12.4/ & 5X,'POISSON RATIO. . . . . . . . . . . . .=',E12.4/ & 5X,'SHEAR MODULUS . . . . . . . . . . . . .=',E12.4/ & 5X,'YIELD COEFFICIENT A . . . . . . . . . .=',E12.4/ & 5X,'YIELD COEFFICIENT B . . . . . . . . . .=',E12.4/ & 5X,'YIELD COEFFICIENT N . . . . . . . . . .=',E12.4/ & 5X,'EPS-MAX . . . . . . . . . . . . . . . .=',E12.4/ & 5X,'SIG-MAX . . . . . . . . . . . . . . . =',E12.4//) C C------------------------------------------------- C END C------------------------------------------------- RETURN END

3.5.3 Engine User’s Subroutine LUSER01C SUBROUTINE LUSER01C(

1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC ,

2 NPF , NGL , TF ,TIME ,TIMESTEP ,

3 UPARAM ,RHO0 , AREA ,EINT ,SHF ,

4 SOUNDSP,VISCMAX, PLA ,UVAR , OFF ,

5 SIGY ,USERBUF )

C

USE LAW_USERSH

C

C-----------------------------------------------

C I m p l i c i t T y p e s

C-----------------------------------------------

IMPLICIT NONE

C-----------------------------------------------

C I N P U T-OUTP DATA structure

C-----------------------------------------------

C

Page 63: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 22

TYPE(ULAWCINTBUF) :: USERBUF

C

C-----------------------------------------------

C I N P U T DATA

C-----------------------------------------------

INTEGER NEL, NUPARAM, NUVAR, NPT, IPT,IFLAG,

. NGL(NEL)

DOUBLE PRECISION

. TIME,TIMESTEP,UPARAM(NUPARAM),

. AREA(NEL),RHO0(NEL),EINT(2,NEL),

. THKLY(NEL),PLA(NEL),SHF(NEL),

. EPSPXX(NEL),EPSPYY(NEL),

. EPSPXY(NEL),EPSPYZ(NEL),EPSPZX(NEL),

. DEPSXX(NEL),DEPSYY(NEL),

. DEPSXY(NEL),DEPSYZ(NEL),DEPSZX(NEL),

. EPSXX(NEL) ,EPSYY(NEL) ,

. EPSXY(NEL) ,EPSYZ(NEL) ,EPSZX(NEL) ,

. SIGOXX(NEL),SIGOYY(NEL),

. SIGOXY(NEL),SIGOYZ(NEL),SIGOZX(NEL)

C-----------------------------------------------

C O U T P U T DATA

C-----------------------------------------------

DOUBLE PRECISION

. SIGNXX(NEL),SIGNYY(NEL),

. SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL),

. SIGVXX(NEL),SIGVYY(NEL),

. SIGVXY(NEL),SIGVYZ(NEL),SIGVZX(NEL),

. SOUNDSP(NEL),VISCMAX(NEL)

C-----------------------------------------------

C I N P U T O U T P U T A r g u m e n t s

C-----------------------------------------------

DOUBLE PRECISION UVAR(NEL,NUVAR),OFF(NEL),THK(NEL)

C-----------------------------------------------

C VARIABLES FOR FUNCTION INTERPOLATION

C-----------------------------------------------

INTEGER NPF(*), NFUNC, IFUNC(NFUNC)

DOUBLE PRECISION FINTER ,TF(*)

EXTERNAL FINTER

C Y = FINTER(IFUNC(J),X,NPF,TF,DYDX)

C Y : y = f(x)

C X : x

C DYDX : f’(x) = dy/dx

C IFUNC(J): FUNCTION INDEX

C J : FIRST(J=1), SECOND(J=2)

C NPF,TF : FUNCTION PARAMETER

Page 64: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 23

C-----------------------------------------------

C L o c a l V a r i a b l e s

C-----------------------------------------------

INTEGER I,J,INDEX(NEL),NMAX,N,NINDX,IPLAS

DOUBLE PRECISION

. E,NU,G,CA,CB,CN,EPSM,SIGM,

. A1,A2,G3,

. CH1,QH1,

. NNU1,NU1,S1,S2,S3,

. R,RR,UMR,DEZZ,UN,EM20,ZERO,

. L,M,

. S11,S22,P2,S1S2,S122,NNU2,NU4,NU6,

. C,S12,F,DF,Q2,YLD_I,NU3,NU2

DOUBLE PRECISION

. SVM(NEL),AA(NEL),BB(NEL),PP(NEL),QQ(NEL),DPLA(NEL),

. X1(NEL),Y1(NEL),Z1(NEL),SVM1(NEL),

. A(NEL),VM2(NEL),DPLA_J(NEL),DR(NEL),ETSE(NEL),SIGY(NEL)

C

DATA ZERO/0.0/,UN/1.0/,NMAX/3/,EM20/1.E-20/

C

C===============================================

C

C ELASTO-PLASTIC LAW (Y=A+B*PLA^N)

C

C===============================================

C

C-----------------------------------------------

C PARAMETERS READING

C-----------------------------------------------

E = UPARAM(1)

NU = UPARAM(2)

G = UPARAM(3)

CA = UPARAM(4)

CB = UPARAM(5)

CN = UPARAM(6)

EPSM = UPARAM(7)

SIGM = UPARAM(8)

A1 = UPARAM(9)

A2 = UPARAM(10)

C

C-----------------------------------------------

C USER VARIABLES INITIALIZATION

C-----------------------------------------------

IF(TIME.EQ.0.0)THEN

DO I=1,NEL

Page 65: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 24

UVAR(I,1)=0.

UVAR(I,2)=0.

UVAR(I,3)=0.

UVAR(I,4)=0.

ENDDO

ENDIF

C

G3 = 3. * G

NNU1 = NU / (1. - NU)

NU1 = 1.-NNU1

NU2 = 1./(1.+NU)

NU3 = 1./(1.-NU)

C

C input data structure

C

IPT= USERBUF%ILAYER

NPT = USERBUF%NPTA

IPLAS =USERBUF%IFLAG

C

SIGOXX(1:NEL) = USERBUF%SIGOXX(1:NEL)

SIGOYY(1:NEL) = USERBUF%SIGOYY(1:NEL)

SIGOXY(1:NEL) = USERBUF%SIGOXY(1:NEL)

SIGOYZ(1:NEL) = USERBUF%SIGOYZ(1:NEL)

SIGOZX(1:NEL) = USERBUF%SIGOZX(1:NEL)

C

EPSPXX(1:NEL) = USERBUF%EPSPXX(1:NEL)

EPSPYY(1:NEL) = USERBUF%EPSPYY(1:NEL)

EPSPXY(1:NEL) = USERBUF%EPSPXY(1:NEL)

EPSPYZ(1:NEL) = USERBUF%EPSPYZ(1:NEL)

EPSPZX(1:NEL) = USERBUF%EPSPZX(1:NEL)

C

EPSXX(1:NEL) = USERBUF%EPSXX(1:NEL)

EPSYY(1:NEL) = USERBUF%EPSYY(1:NEL)

EPSXY(1:NEL) = USERBUF%EPSXY(1:NEL)

EPSYZ(1:NEL) = USERBUF%EPSYZ(1:NEL)

EPSZX(1:NEL) = USERBUF%EPSZX(1:NEL)

C

DEPSXX(1:NEL) = USERBUF%DEPSXX(1:NEL)

DEPSYY(1:NEL) = USERBUF%DEPSYY(1:NEL)

DEPSXY(1:NEL) = USERBUF%DEPSXY(1:NEL)

DEPSYZ(1:NEL) = USERBUF%DEPSYZ(1:NEL)

DEPSZX(1:NEL) = USERBUF%DEPSZX(1:NEL)

THKLY(1:NEL) = USERBUF%THKLYL(1:NEL)

THK(1:NEL) = USERBUF%THKN(1:NEL)

C initialisation

Page 66: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 25

SIGNXX(1:NEL) = USERBUF%SIGNXX(1:NEL)

SIGNYY(1:NEL) = USERBUF%SIGNYY(1:NEL)

SIGNXY(1:NEL) = USERBUF%SIGNXY(1:NEL)

SIGNYZ(1:NEL) = USERBUF%SIGNYZ(1:NEL)

SIGNZX(1:NEL) = USERBUF%SIGNZX(1:NEL)

C

SIGVXX(1:NEL) = USERBUF%SIGVXX(1:NEL)

SIGVYY(1:NEL) = USERBUF%SIGVYY(1:NEL)

SIGVXY(1:NEL) = USERBUF%SIGVXY(1:NEL)

SIGVYZ(1:NEL) = USERBUF%SIGVYZ(1:NEL)

SIGVZX(1:NEL) = USERBUF%SIGVZX(1:NEL)

ETSE(1:NEL) = USERBUF%ETSE(1:NEL)

DPLA(1:NEL) = USERBUF%DPLA(1:NEL)

C========================================================

C I - ELASTIC STRESSES COMPUTATION

C========================================================

DO I=1,NEL

C

SIGNXX(I)=SIGOXX(I)+A1*DEPSXX(I)+A2*DEPSYY(I)

SIGNYY(I)=SIGOYY(I)+A2*DEPSXX(I)+A1*DEPSYY(I)

SIGNXY(I)=SIGOXY(I)+G *DEPSXY(I)

SIGNYZ(I)=SIGOYZ(I)+G *DEPSYZ(I)

SIGNZX(I)=SIGOZX(I)+G *DEPSZX(I)

C

SOUNDSP(I) = SQRT(A1/RHO0(I))

VISCMAX(I) = 0.

ENDDO

C

C========================================================

C II - ELASTO-PLASTIC COMPUTATION

C========================================================

C

C===============================================

C A - COMPUTE CURRENT YIELD STRESS

C===============================================

DO I=1,NEL

IF(UVAR(I,1).LE.0.) THEN

CH1=CA

ELSEIF(UVAR(I,1).GT.EPSM) THEN

CH1=CA+CB*EPSM**CN

ELSE

CH1=CA+CB*UVAR(I,1)**CN

ENDIF

UVAR(I,2)=MIN(SIGM,CH1)

ENDDO

Page 67: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 26

C

C===============================================

C B- COMPUTE HARDENING MODULUS H

C===============================================

DO I=1,NEL

IF(UVAR(I,1).GT.0. AND .CN.GE.1) THEN

QH1= CB*CN*UVAR(I,1)**(CN-1.)

ELSEIF(UVAR(I,1).GT.0. AND .CN.LT.1)THEN

QH1= CB*CN*UVAR(I,1)**(1.-CN)

ELSE

QH1=0.

ENDIF

UVAR(I,3)=QH1

ENDDO

C

C

C=============================================================

C C - STRESSES, PLASTIC STRAIN AND THICKNESS CALCULATION

C

C COMPUTE PLASTICALLY ADMISSIBLE STRESSES

C Two available computations according to IPLAS flag

C=============================================================

C

IF(IPLAS.EQ.0)THEN

C=============================================================

C 1 - PROJECTION by RADIAL RETURN (Iplas=0)

C=============================================================

C

C print *, ‘PROJECTION by RADIAL RETURN - Iplas=0’

C

C-----------------------------------------------

C -> Plastic strain evaluation

C-----------------------------------------------

DO I=1,NEL

UVAR(I,1) = 0.5*( EPSXX(I)+EPSYY(I)

. + SQRT( (EPSXX(I)-EPSYY(I))*(EPSXX(I)-EPSYY(I))

. + EPSXY(I)*EPSXY(I) ) )

ENDDO

C

C-----------------------------------------------

C -> Von Mises criterion (non principal stresses)

C-----------------------------------------------

DO I=1,NEL

SVM(I)=SQRT(SIGNXX(I)*SIGNXX(I)

. +SIGNYY(I)*SIGNYY(I)

Page 68: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 27

. -SIGNXX(I)*SIGNYY(I)

. +3.*SIGNXY(I)*SIGNXY(I))

ENDDO

C

C-----------------------------------------------

C -> Projection on criterion

C-----------------------------------------------

DO I=1,NEL

R = MIN(UN,UVAR(I,2)/MAX(EM20,SVM(I)))

SIGNXX(I)=SIGNXX(I)*R

SIGNYY(I)=SIGNYY(I)*R

SIGNXY(I)=SIGNXY(I)*R

ENDDO

C

C-----------------------------------------------

C -> Compute plastic strain

C-----------------------------------------------

DO I=1,NEL

UMR = 1.-R

DPLA(I) = OFF(I)*SVM(I)*UMR/E

UVAR(I,1) = UVAR(I,1) + DPLA(I)

PLA(I) = PLA(I) + DPLA(I)

ENDDO

C

C-----------------------------------------------

C -> Compute thickness

C-----------------------------------------------

DO I=1,NEL

DEZZ = DPLA(I) * 0.5*(SIGNXX(I)+SIGNYY(I)) /UVAR(I,2)

DEZZ=-(DEPSXX(I)+DEPSYY(I))*NNU1-NU1*DEZZ

THK(I) = THK(I) + DEZZ*THKLY(I)

ENDDO

C

C

ELSEIF(IPLAS.EQ.1)THEN

C=============================================================

C 2 - ITERATIVE PROJECTION (Iplas =1 )

C with 3 Newton iterations

C=============================================================

C

C print *, ‘ITERATIVE PROJECTION - Iplas=1’

C

C-----------------------------------------------

C -> Von Mises criterion (non principal stresses)

C-----------------------------------------------

Page 69: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 28

DO I=1,NEL

UVAR(I,3) = MAX(ZERO,UVAR(I,3))

S1=SIGNXX(I)+SIGNYY(I)

S2=SIGNXX(I)-SIGNYY(I)

S3=SIGNXY(I)

AA(I)=0.25*S1*S1

BB(I)=0.75*S2*S2+3.*S3*S3

SVM(I)=SQRT(AA(I)+BB(I))

DEZZ = -(DEPSXX(I)+DEPSYY(I))*NNU1

THK(I) = THK(I) + DEZZ*THKLY(I)

ENDDO

C

C-----------------------------------------------

C -> Gather plastic flow - Plasticity check

C-----------------------------------------------

NINDX=0

DO I=1,NEL

IF(SVM(I).GT.UVAR(I,2).AND.OFF(I).EQ.1.) THEN

NINDX=NINDX+1

INDEX(NINDX)=I

ENDIF

ENDDO

IF(NINDX.EQ.0) GOTO 100

C

C-----------------------------------------------

C -> Plastic plane stress

C-----------------------------------------------

DO J=1,NINDX

I=INDEX(J)

DPLA_J(I)=(SVM(I)-UVAR(I,2))/(G3+UVAR(I,3))

ENDDO

C NMAX: number of iterations = 3

DO N=1,NMAX

DO J=1,NINDX

I=INDEX(J)

DPLA(I) = DPLA_J(I)

YLD_I = UVAR(I,2)+UVAR(I,3)*DPLA(I)

DR(I) = 0.5*E*DPLA(I)/YLD_I

PP(I) = 1./(1.+DR(I)*NU3)

QQ(I) = 1./(1.+3.*DR(I)*NU2)

P2 = PP(I)*PP(I)

Q2 = QQ(I)*QQ(I)

F = AA(I)*P2+BB(I)*Q2-YLD_I*YLD_I

DF = -(AA(I)*NU3*P2*PP(I)+3.*BB(I)*NU2*Q2*QQ(I))

. *(E-2.*DR(I)*UVAR(I,3))/YLD_I

Page 70: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 29

. -2.*UVAR(I,3)*YLD_I

IF(DPLA(I).GT.0.) THEN

DPLA_J(I)=MAX(ZERO,DPLA(I)-F/DF)

ELSE

DPLA_J(I)=0.

ENDIF

C

ENDDO

C

ENDDO

C

C------------------------------------------

C -> Plastic strain

C -> Plastically admissible stresses

C -> Thickness

C------------------------------------------

C

DO J=1,NINDX

I=INDEX(J)

UVAR(I,1) = UVAR(I,1) + DPLA(I)

PLA(I) = UVAR(I,1)

S1=(SIGNXX(I)+SIGNYY(I))*PP(I)

S2=(SIGNXX(I)-SIGNYY(I))*QQ(I)

SIGNXX(I)=0.5*(S1+S2)

SIGNYY(I)=0.5*(S1-S2)

SIGNXY(I)=SIGNXY(I)*QQ(I)

DEZZ = - NU1*DR(I)*S1/E

THK(I) = THK(I) + DEZZ*THKLY(I)

ENDDO

C

ELSEIF(IPLAS.EQ.2)THEN

C=============================================================

C 3 - PROJECTION by RADIAL RETURN with correction (Iplas=2)

C=============================================================

C

C print *, ‘PROJECTION by RADIAL RETURN - Iplas=2’

DO I=1,NEL

C

PP(I) = -(SIGNXX(I)+SIGNYY(I))*0.33333333

S11 = SIGNXX(I)+PP(I)

S22 = SIGNYY(I)+PP(I)

S12 = SIGNXY(I)

P2 = PP(I)*PP(I)

S1S2 = S11*S22

Page 71: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 30

S122 = S12*S12

C

NNU2 = NNU1*NNU1

NU4 = 1 + NNU2 + NNU1

NU6 = 0.5 - NNU2 + 0.5*NNU1

C

QQ(I) = (1.-NNU1)*PP(I)

AA(I) = P2*NU4 + 3.*(S122 - S1S2)

BB(I) = P2*NU6

C = QQ(I)*QQ(I)

VM2(I)= AA(I)+BB(I)+BB(I)+C

C = C - UVAR(I,2)*UVAR(I,2)

C

R = MAX(ZERO,BB(I)*BB(I)-AA(I)*C)

R = MIN(UN,(-BB(I)+ SQRT(R))/MAX(AA(I) ,EM20))

C

UMR = 1 - R

QQ(I) = QQ(I)*UMR

SIGNXX(I) = SIGNXX(I)*R - QQ(I)

SIGNYY(I) = SIGNYY(I)*R - QQ(I)

SIGNXY(I) = S12*R

DPLA(I) = OFF(I)*SQRT(VM2(I))*UMR/(G3)

S1=0.5*(SIGNXX(I)+SIGNYY(I))

UVAR(I,1) = UVAR(I,1) + DPLA(I)

PLA(I) = UVAR(I,1)

DEZZ = DPLA(I) * S1 /UVAR(I,2)

DEZZ=-(DEPSXX(I)+DEPSYY(I))*NNU1-NU1*DEZZ

THK(I) = THK(I) + DEZZ*THKLY(I)

C

C-----------------------------------------------

ENDDO

ENDIF

100 CONTINUE

C

C outp data structure

USERBUF%SIGNXX(1:NEL) = SIGNXX(1:NEL)

USERBUF%SIGNYY(1:NEL) = SIGNYY(1:NEL)

USERBUF%SIGNXY(1:NEL) = SIGNXY(1:NEL)

USERBUF%SIGNYZ(1:NEL) = SIGNYZ(1:NEL)

USERBUF%SIGNZX(1:NEL) = SIGNZX(1:NEL)

c

Page 72: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | EXTENDED USER MATERIAL LAWS

JAN 2019 31

USERBUF%SIGVXX(1:NEL) = SIGVXX(1:NEL)

USERBUF%SIGVYY(1:NEL) = SIGVYY(1:NEL)

USERBUF%SIGVXY(1:NEL) = SIGVXY(1:NEL)

USERBUF%SIGVYZ(1:NEL) = SIGVYZ(1:NEL)

USERBUF%SIGVZX(1:NEL) = SIGVZX(1:NEL)

USERBUF%DPLA(1:NEL) = DPLA(1:NEL)

USERBUF%ETSE(1:NEL) = ETSE(1:NEL)

USERBUF%THKN(1:NEL) = THK(1:NEL)

C

C-----------------------------------------------

RETURN

END

Page 73: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 User Property Elements

Chapter 4

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA

Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 74: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 2

TABLE OF CONTENTS 4.0 User Property Elements 3

4.1 Starter Subroutine LECGnn for Spring and Solid Elements 4

4.2 Starter Subroutine Initialization for RINInn for Spring Elements 5

4.3 Starter Subroutine Initialization SINInn for Solid Elements 6

4.4 Engine Subroutine RUSERnn for Spring Elements 8

4.5 Engine Subroutine SUSERnn for Solid Elements 11

4.6 Functions to Access User Properties and Materials 14

4.7 Example of User Spring Element 20

4.8 Example of User Triangular Shell Elements Using Solid Property 32

Page 75: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 3

4.0 User Property Elements Up to 3 spring user properties (property number 29, 30, and 31) can be defined for spring and solid elements.

Property type 29 may be referenced as USER1 in Block Format input.

Property type 30 may be referenced as USER2 in Block Format input.

Property type 31 may be referenced as USER3 in Block Format input.

To define a user property, three subroutines for each property must be defined. Two must be linked with Altair Radioss Starter and the other with Altair Radioss Engine.

The Starter subroutine that reads the property data are called LECG29, LECG30, and LECG31. That which initializes spring parameters is called RINI29, RINI30, and RINI31.

The Engine subroutine is called RUSER29, RUSER30, and RUSER31 and computes the spring element forces and moments.

Note: All communication between Altair Radioss and the subroutines takes place within the argument list.

Page 76: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 4

4.1 Starter Subroutine LECGnn for Spring and Solid Elements This subroutine reads the user property input data. The number of specific property cards and their formats are fixed by the user.

The argument list of LECGnn and its individual arguments and descriptions are as follows:

C--------------------------------------------------------------------------

SUBROUTINE LECGnn(IIN ,IOUT ,NUVAR , PARGEO)

C--------------------------------------------------------------------------

Argument Format Description

IIN Integer read only scalar Input file unit (Starter input file) in which data are read.

IOUT Integer read only scalar Output file unit (Starter listing file).

NUVAR Integer scalar Number of extra variables needed for each spring element in RINInn and/or RUSERnn.

PARGEO Float scalar An array of size three:

PARGEO(1) is the skew frame ID that defines the local frame.

PARGEO(2) is a stiffness for the interface.

PARGEO(3) is not yet used.

These values are used in Altair Radioss Starter to make an estimation of the time step.

Page 77: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 5

4.2 Starter Subroutine Initialization RINInn for Spring Elements

This subroutine initializes the user’s spring element.

The argument list of RINInn is as follows:

C--------------------------------------------------------------------------

SUBROUTINE RINI30(NEL ,IOUT ,IPROP ,

3 IX ,XL ,MASS ,XINER ,STIFM ,

4 STIFR ,VISCM ,VISCR ,UVAR ,NUVAR )

C--------------------------------------------------------------------------

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

IOUT Integer read only scalar Output file unit (ROOTL00).

IPROP Integer read only scalar Property number.

IX Integer array read only Array of size 4*NEL containing spring connectivity.

IX(1,i) first node ID

IX(2,i) second node ID

IX(3,i) third node ID

IX(4,i) spring ID

XL Float array read only Array of size NEL containing current element length.

MASS Float array write only Array of size NEL containing element mass.

XINER Float array write only Array of size NEL containing element spherical inertia.

STIFM Float array write only Array of size NEL containing element translational stiffness in time step computation.

STIFR Float array write only Array of size NEL containing element rotational stiffness in time step computation.

VISCM Float array write only Array of size NEL containing element translational viscosity in time step computation.

VISCR Float array write only Array of size NEL containing element rotational viscosity in time step computation.

NUVAR Integer read only scalar Number of user element variables.

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

Page 78: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 6

4.3 Starter Subroutine Initialization SINInn for Solid Elements

This subroutine is used to initialize the user’s solid element (nodal mass and inertia).

The argument list of SINInn and its individual arguments and descriptions are as follows:

C--------------------------------------------------------------------------

SUBROUTINE SINInn(

1 NEL ,NUVAR,IOUT ,IPROP ,IMAT,SOLID_ID,

2 EINT ,VOL ,UVAR ,OFF,RHO ,SIG ,

3 XX1 ,XX2 ,XX3 ,XX4 ,XX5 ,XX6 ,XX7 ,XX8 ,

4 YY1 ,YY2 ,YY3 ,YY4 ,YY5 ,YY6 ,YY7 ,YY8 ,

5 ZZ1 ,ZZ2 ,ZZ3 ,ZZ4 ,ZZ5 ,ZZ6 ,ZZ7 ,ZZ8 ,

6 VX1 ,VX2 ,VX3 ,VX4 ,VX5 ,VX6 ,VX7 ,VX8 ,

7 VY1 ,VY2 ,VY3 ,VY4 ,VY5 ,VY6 ,VY7 ,VY8 ,

8 VZ1 ,VZ2 ,VZ3 ,VZ4 ,VZ5 ,VZ6 ,VZ7 ,VZ8 ,

9 VRX1 ,VRX2 ,VRX3 ,VRX4 ,VRX5 ,VRX6 ,VRX7 ,VRX8 ,

A VRY1 ,VRY2 ,VRY3 ,VRY4 ,VRY5 ,VRY6 ,VRY7 ,VRY8 ,

B VRZ1 ,VRZ2 ,VRZ3 ,VRZ4 ,VRZ5 ,VRZ6 ,VRZ7 ,VRZ8 ,

C MAS1 ,MAS2 ,MAS3 ,MAS4 ,MAS5 ,MAS6 ,MAS7 ,MAS8 ,

D INN1 ,INN2 ,INN3 ,INN4 ,INN5 ,INN6 ,INN7 ,INN8 ,

C STIFM,STIFR,VISCM,VISCR) C----------------------------------------------------------------------------

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

NUVAR Integer scalar Number of extra variables needed for each solid element in SINInn or SUSERnn.

IOUT Integer read only scalar Output file unit (L100 file).

IPROP Integer read only scalar Property number.

IMAT Integer read only scalar Material number.

SOLID_ID Integer read only scalar Array of size NEL containing solid element ID.

EINT Float array write only Array of size NEL containing initial total internal energy.

VOL Float array read write Array of size NEL containing initial element volumes. The incoming value is computed with one integration point, which can be recomputed.

Page 79: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 7

Argument Format Description

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

OFF Float array read write Array of size NEL containing deleted element flags. The value is 0 if the element if OFF; the value is 1 if the element is ON.

RHO Float array read write Array of size NEL containing initial densities.

SIG Float array read write Array of size 6*NEL containing initial stress tensors SX, SY, SZ, SXY, SYZ, and SZX.

XX1 Float array read only Array of size NEL containing initial X coordinate at node 1 in the global frame.

VX1 Float array read only Array of size NEL containing initial X velocity at node 1 in the global frame.

VRX1 Float array read only Array of size NEL containing initial X velocity at node 1 in the global frame.

MAS1 Float array read only Array of size NEL containing mass at node 1.

INN1 Float array read only Array of size NEL containing inertia at node 1.

STIFM Float array write only Array of size NEL containing element translational stiffness in time step computation.

STIFR Float array write only Array of size NEL containing element rotational stiffness in time step computation.

VISCM Float array write only Array of size NEL containing element translational viscosity in time step computation.

VISCR Float array write only Array of size NEL containing element rotational viscosity in time step computation.

Page 80: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 8

4.4 Engine Subroutine RUSERnn for Spring Elements

This subroutine calculates the internal forces and moment versus the velocity, old forces, moments, and user’s variables and parameters.

The argument list of RUSERnn and its individual arguments and descriptions are as follows:

C--------------------------------------------------------------------------

SUBROUTINE RUSERnn(NEL ,IOUT ,IPROP ,UVAR ,NUVAR ,

2 FX ,FY ,FZ ,XMOM ,YMOM ,

3 ZMOM ,E ,OFF ,STIFM ,STIFR ,

4 VISCM ,VISCR ,MASS ,XINER ,DT ,

5 XL ,VX ,RY1 ,RZ1 ,RX ,

6 RY2 ,RZ2 ,FR_WAVE)

C--------------------------------------------------------------------------

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

IOUT Integer read only scalar Output file unit (ROOTL00).

IPROP Integer read only scalar Property number.

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

NUVAR Integer read only scalar Number of user element variables.

FX Float array read write Array of size NEL containing an internal local X force as input and a new force as output.

Nodal X forces at nodes 1 and 2 in a local frame are defined as FX1 = FX and FX2 = -FX.

FY Float array read write Array of size NEL containing an internal local Y force as input and a new force as output.

Nodal X forces at nodes 1 and 2 in a local frame are defined as FY1 = FY and FY2 = -FY.

FZ Float array read write Array of size NEL containing an internal local Z force as input and a new force as output.

Nodal X forces at nodes 1 and 2 in a local frame are defined as FZ1 = FZ and FZ2 = -FZ.

Page 81: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 9

Argument Format Description

XMOM Float array read write Array of size NEL containing an old internal local X moment as input and a new moment as output.

Nodal X moments at nodes 1 and 2 in a local frame are defined as MX1 = MX and MX2 = -MX.

YMOM Float array read write Array of size NEL containing an old internal local Y moment as input and a new moment as output.

Nodal Y moments at nodes 1 and 2 in a local frame are defined as MY1 = MY – 1/2*XL*FZ and MY2 = -MY – 1/2*XL*FZ.

ZMOM Float array read write Array of size NEL containing an old internal local Z moment as input and a new moment as output.

Nodal Z moments at nodes 1 and 2 in a local frame are defined as MZ1 = MZ + 1/2*XL*FZ and MZ2 = -MZ – 1/2*XL*FZ.

EINT Float array read only Array of size NEL containing internal energy.

OFF Float array read write Array of size NEL containing deleted element flags. The value is 0 if the element if OFF; the value is 1 if the element is ON.

STIFM Float array write only Array of size NEL containing element translational stiffness in time step computation.

STIFR Float array write only Array of size NEL containing element rotational stiffness in time step computation.

VISCM Float array write only Array of size NEL containing element translational viscosity in time step computation.

VISCR Float array write only Array of size NEL containing element rotational viscosity in time step computation.

MASS Flat array write only Array of size NEL containing element mass in time step computation.

XINER Float array write only Array of size NEL containing element spherical inertia.

DT Float read only Current time step

XL Float array read only Array of size NEL containing element length

VX Float array read only Array of size NEL containing X velocity.

Nodal velocities at nodes 1 and 2 in a local frame are defined as VX1 = -VX/2 and VX2 = VX/2.

RY1 Float array read only Array of size NEL containing Y rotational velocity at node 1.

Page 82: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 10

Argument Format Description

RZ1 Float array read only Array of size NEL containing Z rotational velocity at node 1.

RX Float array read only Array of size NEL containing torsional velocity.

Nodal torsional velocities at nodes 1 and 2 in a local frame are defined as RX1 = -RX/2 and RX2 = RX/2.

RY2 Float array read only Array of size NEL containing Y rotational velocity at node 2.

RZ2 Float array read only Array of size NEL containing Z rotational velocity at node 2.

FR_WAVE Float array read only Array of size NEL not yet used.

Page 83: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 11

4.5 Engine Subroutine SUSERnn for Solid Elements

This subroutine calculates the internal forces and moments.

The argument list of RUSERnn is as follows: C--------------------------------------------------------------------------

SUBROUTINE SUSER29(

1 NEL ,NUVAR ,IOUT ,IPROP ,IMAT ,SOLID_ID,TIME ,TIMESTEP,

2 EINT ,VOL ,UVAR ,FR_WAVE,OFF ,RHO ,SIG ,

3 XX1 ,XX2 ,XX3 ,XX4 ,XX5 ,XX6 ,XX7 ,XX8 ,

4 YY1 ,YY2 ,YY3 ,YY4 ,YY5 ,YY6 ,YY7 ,YY8 ,

5 ZZ1 ,ZZ2 ,ZZ3 ,ZZ4 ,ZZ5 ,ZZ6 ,ZZ7 ,ZZ8 ,

6 UX1 ,UX2 ,UX3 ,UX4 ,UX5 ,UX6 ,UX7 ,UX8 ,

7 UY1 ,UY2 ,UY3 ,UY4 ,UY5 ,UY6 ,UY7 ,UY8 ,

8 UZ1 ,UZ2 ,UZ3 ,UZ4 ,UZ5 ,UZ6 ,UZ7 ,UZ8 ,

9 VX1 ,VX2 ,VX3 ,VX4 ,VX5 ,VX6 ,VX7 ,VX8 ,

A VY1 ,VY2 ,VY3 ,VY4 ,VY5 ,VY6 ,VY7 ,VY8 ,

B VZ1 ,VZ2 ,VZ3 ,VZ4 ,VZ5 ,VZ6 ,VZ7 ,VZ8 ,

C VRX1 ,VRX2 ,VRX3 ,VRX4 ,VRX5 ,VRX6 ,VRX7 ,VRX8 ,

D VRY1 ,VRY2 ,VRY3 ,VRY4 ,VRY5 ,VRY6 ,VRY7 ,VRY8 ,

E VRZ1 ,VRZ2 ,VRZ3 ,VRZ4 ,VRZ5 ,VRZ6 ,VRZ7 ,VRZ8 ,

F FX1 ,FX2 ,FX3 ,FX4 ,FX5 ,FX6 ,FX7 ,FX8 ,

G FY1 ,FY2 ,FY3 ,FY4 ,FY5 ,FY6 ,FY7 ,FY8 ,

H FZ1 ,FZ2 ,FZ3 ,FZ4 ,FZ5 ,FZ6 ,FZ7 ,FZ8 ,

I MX1 ,MX2 ,MX3 ,MX4 ,MX5 ,MX6 ,MX7 ,MX8 ,

J MY1 ,MY2 ,MY3 ,MY4 ,MY5 ,MY6 ,MY7 ,MY8 ,

K MZ1 ,MZ2 ,MZ3 ,MZ4 ,MZ5 ,MZ6 ,MZ7 ,MZ8 ,

L STIFM ,STIFR ,VISCM ,VISCR )

C-------------------------------------------------------------------------

Argument Format Description

NEL Integer read only scalar Number of elements per group. In Altair Radioss Engine subroutines, the element data are treated by groups for vectorization. This argument is machine-dependent and set by Altair Radioss.

NUVAR Integer scalar Number of extra variables needed for each solid element in SINInn or SUESERnn

IOUT Integer read only scalar Output file unit (L01 file)

IPROP Integer read only scalar Property number.

IMAT Integer read only scalar Material number.

SOLID_ID Integer read only scalar Array of size NEL containing solid element ID.

Page 84: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 12

Argument Format Description

Time Float read only Current time.

TIMESTEP Float read only Current time step.

EINT Float array read only Array of size NEL containing current total internal energy.

VOL Float array read only Array of size NEL containing initial element volumes. The incoming value is computed with one integration point, which can be recomputed.

UVAR Float array read write Array of size NEL*NUVAR containing user element variables.

OFF Float array read write Array of size NEL containing deleted element flags. The value is 0 if the element if OFF; the value is 1 if the element is ON.

RHO Float array read write Array of size NEL containing current densities.

SIG Float array read write Array of size 6*NEL containing current stress tensor SX, SY, SZ, SXY, SYZ, and SZX.

XX1 Float array read only Array of size NEL containing X coordinate at node 1 in the global frame at time TIME.

UX1 Float array read only Array of size NEL containing X displacement at node 1 in the global frame at time TIME.

VX1 Float array read only Array of size NEL containing initial X velocity at node 1 in the global frame at time TIME.

VRX1 Float array read only Array of size NEL containing initial X rotational velocity at node 1 in the global frame at time TIME.

FX1 Float array write only Array of size NEL containing X force at node 1 at time TIME.

MX1 Float array write only Array of size NEL containing X moment at node 1 at time TIME.

STIFM Float array write only Array of size NEL containing element translational stiffness in time step computation.

STIFR Float array write only Array of size NEL containing element rotational stiffness in time step computation.

VISCM Float array write only Array of size NEL containing element translational viscosity in time step computation.

VISCR Float array write only Array of size NEL containing element rotational viscosity in time step computation.

Page 85: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 13

Notes: STIFM, STIFR, VISCM, and VISCR compute the nodal or element time step. MASS and XINER compute

element time step. RHO and SIG are used for post-processing in time history and animation. The modification of these

variables effects only output. RHO and SIG retain initial values unless they are modified.

Page 86: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 14

4.6 Functions to Access User Properties and Materials

4.6.1 Store and Restore Functions for User Subroutines

The user property parameters are stored in Altair Radioss arrays through specialized functions. This method allows a hierarchical property reference, where one user’s property can refer to another user’s property or material. This may also be used in a user’s window interface.

Glossary of Function Arguments

mid Material identifier (Starter input number)

pid Property identifier

fun_id Function identifier

sens_id Sensor identifier

imat Material number (internal Altair Radioss material index)

iprop Property number

ifunc Function number

isens Sensor number

mat_index Material index in user property buffer

prop_index Property index in user property buffer

func_index Function index in user material or property buffer

KFUNC=29 Parameter, indicates access to function buffer in user property

KMAT=31 Parameter, indicates access to material buffer in user property

KFUNC=33 Parameter, indicates access to property buffer in user property

KTABLE Parameter, indicates access to property buffer in user property

Page 87: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 15

4.6.2 Storage Functions

integer ierror = SET_U_PNU (integer func_index, integer fun_id, KFUNC)

integer ierror = SET_U_PNU (integer func_index, integer fun_id, KTABLE)

integer ierror = SET_U_PNU (integer mat_index, integer mid, KMAT)

integer ierror = SET_U_PNU (integer prop_index, integer pid, KPROP)

The user property may relate to other properties, materials, or functions. The above routine stores relative property, material, and function identifiers in current user property. These identifiers are indexed independently for each category and are specified by func_index, mat_index, or prop_index, respectively. The access to different property buffers is distinguished by parameter values KFUNC, KMAT, KPROP, and KTABLE. The function returns integer flag ierror = 0 if there is no error. It returns ierror = maximum allowed index value if the index is larger than the maximum. This is called in Altair Radioss Starter.

Examples:

ierror = SET_U_PNU(2, 5, KFUNC) Stores a Altair Radioss function described by ID=5 as a second function in current property.

ierror = SET_U_PNU(2, 5, KTABLE) Stores a Altair Radioss table described by ID=5 as a second table in current property.

ierror = SET_U_PNU(1, 3, KMAT) Stores a Altair Radioss material property MID=3 as a first material in current property.

ierror = SET_U_PNU(2, 2,KPROP) Stores property PID = 2 as second property referenced by current property.

integer ierror = SET_U_GEO(integer value_index, float value)

Stores a value in current user property buffer at a position referenced by value_index.

It returns ierror = maximum allowed index value if the index is larger than the maximum. This is called in Altair Radioss Starter.

Page 88: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 16

4.6.3 Restore Functions for User Properties, Materials and Functions Function Description

float value = GET_U_GEO(integer

value_index, integer iprop)

Returns a parameter value stored in property buffer iprop at the position specified by value_index. It is called in Altair Radioss Engine and Starter initialization routines.

integer iprop = GET_U_P(integer prop_id)

Translates property ID into property number. Use this function only in Altair Radioss Starter and store the result in user array.

integer jprop = GET_U_PNU(integer prop_index, integer iprop, KPROP)

Retrieves an internal number of a property jprop referred by another user property iprop at the position specified by prop_index. This is a reverse function to SET_U_PNU function.

integer pid = GET_U_PID(integer iprop)

Obtains pid from property number iprop. This is a reverse function to GET_U_P.

float value = GET_U_MAT(integer

value_index, integer imat)

Returns a material parameter value stored in material imat at the position specified by integer value_index. Imat is material number that may be retrieved by following translation function:

integer imat = GET_U_M(integer mid)

If the material is referenced by a user property iprop, its number may be also restored using:

integer imat = GET_U_PNU(integer mat_index, integer iprop, KMAT)

KMAT is a parameter indicating material buffer of this property. Mat_index is the position at which the material is stored in this buffer.

integer mid =

GET_U_MID(integer imat)

Obtains mid from known material number imat. This is a reverse function to GET_U_M.

integer y = GET_U_FUNC(integer

ifunc, float x, float dydx)

Returns interpolated value of function ifunc, corresponding to abscissa x. Dxdy is function slope at x. Integer ifunc is the internal Altair Radioss function number.

integer ifunc = GET_U_NUMFUN(integer fun_id)

Restores the function number from function identifier.

integer fun_id = GET_U_FID(integer ifunc)

Restores the function ID from function number.

If a function is referenced by a user property iprop or by user material imat, its internal number may be also obtained using following functions.

integer ifunc = GET_U_MNU(integer mat_index, integer

imat, KFUNC)

integer ifunc = GET_U_PNU(integer prop_index, integer

iprop, KFUNC)

integer itable = GET_U_PNU(integer prop_index, integer

iprop, KTABLE)

Mat_index and prop_index are the function indexes stored in imat

material or iprop property, respectively.

KFUNC is a parameter indicating a function storage buffer in user property

or material. KTABLE is a parameter indicating a table storage buffer in user property

or material.

Page 89: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 17

4.6.4 Example of Storage and Retrieval Procedures for Altair Radioss Functions and

Tables

Direct Access via Function or Table ID Engine:

ifunc = GET_U_NUMFUN(fun_id)

y = GET_U_FUNC(ifunc, x, dydx)

itable = GET_U_NUMTABLE(table_id)

CALL GET_U_TABLE(itable, x, y)

Function and table IDs must be stored in Starter in a user buffer to be available in Engine subroutine. This is the simplest way to access Altair Radioss functions and tables but may be costly, if the model contains a large number of functions or tables. This is recommended only for small Altair Radioss models.

Direct Access via Function Number Starter: ifunc = GET_U_NUMFUN(fun_id)

itable = GET_U_NUMTABLE(table_id)

Engine:

y = GET_U_FUNC(ifunc, x, dydx)

CALL GET_U_TABLE(itable, x, y)

The function number is retrieved once in Starter and stored in user buffer. The Engine subroutine can access the function directly by its number.

Page 90: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 18

Function Access via User Property or User Material Index Starter: ifunc = GET_U_PNU(prop_index, iprop, KFUNC), or ifunc = GET_U_MNU(mat_index, imat, KFUNC) itable = GET_U_PNU(prop_index, iprop, KTABLE)

Engine: y = GET_U_FUNC(ifunc, x, dydx) CALL GET_U_TABLE(itable, x, y)

Prop_index or mat_index are independent for each user property (iprop or imat) and numerated from one to a maximum number of functions in related property. Engine routines access the function values directly by its stored number. This is the recommended manner for use with large Altair Radioss models if an old Altair Radioss version is used.

The function number is restored in Starter using internal function indexes in user property or material.

Note: Inside user material laws itable can be stored in UPARAM array

Note: The same principles apply to user property or material with the exception that storing property or material numbers is possible only in Starter initialization routines, not in lecture routines. For more details, see user property examples.

Page 91: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 19

Table 1: User Access Functions Call Range

Access Function User Routine

userwis userwi lecgxx rinixx ruserxx lecsen_usrx user_sensx

set_u_geo x

set_u_pnu x

set_u_sens_value x x X

set_u_sens_ipar x

set_u_sens_fpar x

set_u_sens_acti x x X

get_u_geo x x x x x X

get_u_mat x x x x x x X

get_u_pnu x x x x x X

get_u_mnu x x x x x x X

get_u_pid x x x x x X

get_u_mid x x x x x x X

get_u_m x x x x x x X

get_u_p x x x x x X

get_u_func x x x x x x X

get_u_table* x x x x x x X

get_u_numfun x x x x x x X

get_u_numtable* x x x x x x X

get_u_skew x x x x x x X

get_u_skew_num x x x x x x X

get_u_sens_ipar x x X

get_u_sens_ipar x x X

get_u_numsens x x X

get_u_idsens x x X

get_u_sens_value x x X

get_u_sens_acti x x X

get_u_numacc x x X

get_u_accel x x X

get_u_numnod x x X

get_u_nod_x x x X

get_u_nod_d x x x

get_u_nod_v x x x

get_u_nod_a

get_u_time

get_u_cycle

Note: An asterisk (*) denotes usage of get_u_numtable and get_u_table. For this, the Fortran module INTERFACE_UTABLE_MOD is needed, which is included either in your library or in your user module package (for Windows).

Page 92: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 20

4.7 Example of User Spring Element

Example: An elastic beam is defined with one user property (type 1) with reference to two user properties (type 2), one for each beam end. Each secondary user property defines beam geometry and refers to one user material.

Refer to the Predit Property option (PID36) described in the Starter Input Manual for more information about this spring property.)

4.7.1 User Input Data (/PROP/USERn/ option) […]

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/MAT/USER1/7

mat7 used by property 3

# Init. dens. Ref. dens.

0.0078 0.0078

# E Nu

200000 0.3

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/MAT/USER1/9

mat9 used by property 5

# Init. dens. Ref. dens.

0.0078 0.0078

# E Nu

200000 0.3

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/SPRING/1

# Id N1 N2 N3

1 1 2 100

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/PROP/USER1/1

pid1 using property 3 and 5

# Iutyp

1

# skew prop1 prop2

0 3 5

# xk

0

Spring elements:

Page 93: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 21

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/PROP/USER1/3

property 3 used by property 1

# Iutyp

2

# mat

7

# Area Ixx Iyy Izz

36 216 108 108

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/PROP/USER1/5

property 5 used by property 1

# Iutyp

2

# mat

9

# Area Ixx Iyy Izz

36 216 108 108

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

[…]

Page 94: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 22

4.7.2 Starter property user’s subroutine LECG29 C================================================================= C This subroutine reads the user geometry parameters. C================================================================= SUBROUTINE LECG29(IIN ,IOUT ,NUVAR ,PARGEO) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C#include "implicit_f.inc" C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,NUVAR DOUBLE PRECISION . PARGEO(*) INTEGER SET_U_PNU,SET_U_GEO, . KFUNC,KMAT,KPROP EXTERNAL SET_U_PNU,SET_U_GEO PARAMETER (KFUNC=29) PARAMETER (KMAT=31) PARAMETER (KPROP=33) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER ISK,IUTYP,PID1,PID2,MID1,IERROR DOUBLE PRECISION . XK,AREA,IXX,IYY,IZZ,AA C READ(IIN,'(I10)',ERR=999,END=999)IUTYP C IF(IUTYP.EQ.1)THEN C------------------------------------------------------- NUVAR = 10 AA = IUTYP IERROR = SET_U_GEO(1,AA) C C READ(IIN,ERR=999,END=999,FMT='(3I10)')ISK,PID1,PID2 C C PID1 and PID2 are USER property IDs IERROR = SET_U_PNU(1,PID1,KPROP) IERROR = SET_U_PNU(2,PID2,KPROP) C READ(IIN,ERR=999,END=999,FMT='(F20.0)')XK C PARGEO(1) = ISK PARGEO(2) = XK C WRITE(IOUT,1000)ISK,PID1,PID2,XK C ELSEIF(IUTYP.EQ.2)THEN C------------------------------------------------------- READ(IIN,ERR=999,END=999,FMT='(2I10)')MID1 C MID1 is a USER material ID IERROR = SET_U_PNU(1,MID1,KMAT) C READ(IIN,ERR=999,END=999,FMT='(4F20.0)')AREA,IXX,IYY,IZZ

Page 95: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 23

C NUVAR = 0 AA = IUTYP IERROR = SET_U_GEO(1,AA) IERROR = SET_U_GEO(2,AREA) IERROR = SET_U_GEO(3,IXX) IERROR = SET_U_GEO(4,IYY) IERROR = SET_U_GEO(5,IZZ) C WRITE(IOUT,2000)MID1,AREA,IXX,IYY,IZZ C ENDIF C RETURN 999 CONTINUE WRITE(IOUT,*)' **ERROR IN USER PROPERTY INPUT' RETURN 1000 FORMAT( & 5X,' USER PROPERTY TYPE 1 (used by spring elements) ',/, & 5X,' -------------------- ',//, & 5X,'SKEW ID . . . . . . . . . . . . . . . .=',I10/ & 5X,'FIRST END TYPE 2 USER PROPERTY ID . . .=',I10/ & 5X,'SECOND END TYPE 2 USER PROPERTY ID. . .=',I10/ & 5X,'STIFNESS FOR INTERFACE. . . . . . . . .=',E12.4//) 2000 FORMAT( & 5X,' USER PROPERTY TYPE 2 (used by property type 1) ',/, & 5X,' -------------------- ',//, & 5X,'USER MATERIAL ID. . . . . . . . . . . .=',I10/, & 5X,'AREA. . . . . . . . . . . . . . . . . .=',E12.4/, & 5X,'TORSION SECTION INERTIA . . . . . . . .=',E12.4/, & 5X,'BENDIG SECTION INERTIA IYY. . . . . . .=',E12.4/, & 5X,'BENDIG SECTION INERTIA IZZ. . . . . . .=',E12.4//) END

4.7.3 Starter Property Initialization User Subroutine RINI29 C------------------------------------------------------------------------- C This subroutine initialize springs using user properties. C------------------------------------------------------------------------- SUBROUTINE RINI29(NEL ,IOUT ,IPROP , 3 IX ,XL ,MASS ,XINER ,STIFM , 4 STIFR ,VISCM ,VISCR ,UVAR ,NUVAR ) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C#include "implicit_f.inc" C---------------------------------------------------------- C D u m m y A r g u m e n t s a n d F u n c t i o n C---------------------------------------------------------- INTEGER IOUT,NUVAR,NEL,IPROP, . IX(4,NEL) , . GET_U_PNU,GET_U_PID,GET_U_MID,GET_U_MNU, . KFUNC,KMAT,KPROP DOUBLE PRECISION . XL(NEL) ,MASS(NEL) ,XINER(NEL) ,STIFM(NEL) , . STIFR(NEL),VISCM(NEL) ,VISCR(NEL),UVAR(NUVAR,*), . GET_U_MAT,GET_U_GEO EXTERNAL GET_U_PNU,GET_U_MNU,GET_U_MAT,GET_U_GEO,GET_U_PID, . GET_U_MID

Page 96: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 24

PARAMETER (KFUNC=29) PARAMETER (KMAT=31) PARAMETER (KPROP=33) C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION . FAC,RHO,AREA,IXX,IYY,IZZ,IMYZ,YOUNG,G, . AREA1,IXX1,IYY1,IZZ1,RHO1,YOUNG1,G1, . AREA2,IXX2,IYY2,IZZ2,RHO2,YOUNG2,G2, . K11,K22,K26,K33,K35,K44,K55,K5B,K66,K6C INTEGER I,IUTYP, . IMAT1,IPROP1,IUTYP1, . IMAT2,IPROP2,IUTYP2 C----------------------------------------------- C Property number return C----------------------------------------------- IPROP1 = GET_U_PNU(1,IPROP,KPROP) IPROP2 = GET_U_PNU(2,IPROP,KPROP) IUTYP = NINT(GET_U_GEO(1,IPROP)) IF(IUTYP.NE.1)THEN WRITE(IOUT,*)' **ERROR IN SPRING USER PROPERTY', . GET_U_PID(IPROP) ENDIF C NOT USED IN THIS EXAMPLE C IMAT = GET_U_PNU(1,IPROP,KMAT) C IFUNC = GET_U_PNU(1,IPROP,KFUNC) C----------------------------------------------- C FIRST END: C----------------------------------------------- IUTYP1 = NINT(GET_U_GEO(1,IPROP1)) IF(IUTYP1.NE.2)THEN WRITE(IOUT,*)' **ERROR SPRING USER PROPERTY', . GET_U_PID(IPROP),' REFERS TO WRONG USER PROPERTY', . GET_U_PID(IPROP1) ENDIF AREA1 = GET_U_GEO(2,IPROP1) IXX1 = GET_U_GEO(3,IPROP1) IYY1 = GET_U_GEO(4,IPROP1) IZZ1 = GET_U_GEO(5,IPROP1) C NOT USED IN THIS EXAMPLE C IFUNC = GET_U_PNU(1,IPROP1,KFUNC) C IPROP = GET_U_PNU(1,IPROP1,KPROP) IMAT1 = GET_U_PNU(1,IPROP1,KMAT) YOUNG1 = GET_U_MAT(7,IMAT1) G1 = GET_U_MAT(6,IMAT1) RHO1 = GET_U_MAT(0,IMAT1) C----------------------------------------------- C SECOND END: C----------------------------------------------- IUTYP2 = NINT(GET_U_GEO(1,IPROP2)) IF(IUTYP2.NE.2)THEN WRITE(IOUT,*)' **ERROR SPRING USER PROPERTY', . GET_U_PID(IPROP),' REFERS TO WRONG USER PROPERTY', . GET_U_PID(IPROP2) ENDIF AREA2 = GET_U_GEO(2,IPROP2) IXX2 = GET_U_GEO(3,IPROP2) IYY2 = GET_U_GEO(4,IPROP2)

Page 97: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 25

IZZ2 = GET_U_GEO(5,IPROP2) C SEE LECM29 FOR USER MATERIAL PARAMETER STORAGE (RHO IS ALWAYS AT 0) IMAT2 = GET_U_PNU(1,IPROP2,KMAT) YOUNG2 = GET_U_MAT(7,IMAT2) G2 = GET_U_MAT(6,IMAT2) RHO2 = GET_U_MAT(0,IMAT2) C----------------------------------------------- C MEAN VALUES: C----------------------------------------------- FAC = 0.5*(AREA1*RHO1+AREA2*RHO2) AREA = 0.5*(AREA1+AREA2) RHO = 0.5*(RHO1+RHO2) FAC = AREA*RHO IXX = 0.5*(IXX1+IXX2) IYY = 0.5*(IYY1+IYY2) IZZ = 0.5*(IZZ1+IZZ2) IMYZ = MAX(IYY,IZZ) YOUNG = 0.5*(YOUNG1+YOUNG2) G = 0.5*(G1+G2) C-------------------------------------- C ELEMENT CHECK C-------------------------------------- DO I=1,NEL IF(XL(I).EQ.0.0)THEN WRITE(IOUT,*)' **ERROR ZERO LENGTH SPRING :' ENDIF ENDDO C-------------------------------------- C ELEMENT INITIALIZATION C-------------------------------------- DO I=1,NEL MASS(I) = XL(I)*FAC XINER(I) = XL(I)*RHO*MAX(IXX,IMYZ+AREA*XL(I)*XL(I)/12) K11 = YOUNG * AREA / XL(I) K22 = 12. * YOUNG * IZZ / (XL(I)*XL(I)*XL(I)) K26 = 0.5 * XL(I) * K22 K33 = 12. * YOUNG * IYY / (XL(I)*XL(I)*XL(I)) K35 = - 0.5 * XL(I) * K33 K44 = G * IXX / XL(I) K55 = 4. * YOUNG * IYY / XL(I) K5B = 0.5 * K55 K66 = 4. * YOUNG * IZZ / XL(I) K6C = 0.5 * K66 UVAR(1,I) = K11 UVAR(2,I) = K22 UVAR(3,I) = K26 UVAR(4,I) = K33 UVAR(5,I) = K35 UVAR(6,I) = K44 UVAR(7,I) = K55 UVAR(8,I) = K5B UVAR(9,I) = K66 UVAR(10,I)= K6C C-------------------------------------- C VALUES PRINT C-------------------------------------- print *, 'UVAR(1,2) =',UVAR(1,2) print *, 'UVAR(2,2) =',UVAR(2,2) print *, 'UVAR(3,2) =',UVAR(3,2)

Page 98: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 26

print *, 'UVAR(4,2) =',UVAR(4,2) print *, 'UVAR(5,2) =',UVAR(5,2) print *, 'UVAR(6,2) =',UVAR(6,2) print *, 'UVAR(7,2) =',UVAR(7,2) print *, 'UVAR(8,2) =',UVAR(8,2) print *, 'UVAR(9,2) =',UVAR(9,2) print *, 'UVAR(10,2) =',UVAR(10,2) print *, 'YOUNG1 =',YOUNG1 print *, 'YOUNG2 =',YOUNG2 print *, 'AREA =',AREA C-------------------------------------- C NODAL AND ELEMENT TIME STEP COMPUTATION C-------------------------------------- STIFM(I) = MAX(K11,K22,K33) STIFR(I) = MAX(K44,K55,K66) VISCM(I) = 0. VISCR(I) = 0. C-------------------------------------- ENDDO C-------------------------------------- RETURN END

4.7.4 Starter Material User Subroutine LECM29 C------------------------------------------------------------------------- C This subroutine reads user material parameters stored in /MAT/USER1 C-------------------------------------------------------------------------

SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, . NUVAR,IFUNC,MAXFUNC,NFUNC ,PARMAT ) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- IMPLICIT NONE C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),PARMAT(*) C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION E,NU,A11,A12,A44 C====================================== C C ELASTIC LAW WITH SHELLS C C====================================== C C----------------------------------------------- C INPUT FILE READING (USER DATA) C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU C A11 = E * (1.-NU) / (1.+NU) / (1.-2.*NU) A12 = E * NU / (1.+NU) / (1.-2.*NU) A44 = E / 2. / (1.+NU) C

Page 99: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 27

C----------------------------------------------- C DATA CHECKING C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF NUPARAM = 7 IF(NUPARAM.GT.MAXUPARAM)THEN WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPARAM' WRITE(IOUT,*)' NUPARAM =',NUPARAM, . ' MAXUPARAM =',MAXUPARAM ELSE C----------------------------------------------- C USER MATERIAL PARAMETERS DEFINITION C----------------------------------------------- C UPARAM(1) = A11 UPARAM(2) = A12 UPARAM(3) = A44 UPARAM(4) = E/(1.-NU*NU) UPARAM(5) = NU*E/(1.-NU*NU) UPARAM(6) = 0.5*E/(1.+NU) UPARAM(7) = E ENDIF C PARMAT(1) = A11 PARMAT(2) = E PARMAT(3) = NU C C------------------------------------------------- C NUMBER OF USER ELEMENT VARIABLES AND CURVES C------------------------------------------------- NUVAR = 10 NFUNC = 0 C C------------------------------------------------- C OUTPUT FILE PRINT C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU C 1000 FORMAT( & 5X,' ELASTIC USER LAW 29',/, & 5X,' used in property ',/, & 5X,' ------------------ ',//) 1100 FORMAT( & 5X,'E . . . . . . . . . . . . . . . . . . .=',E12.4/ & 5X,'NU. . . . . . . . . . . . . . . . . . .=',E12.4//) C C------------------------------------------------- C END C------------------------------------------------- RETURN END

Page 100: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 28

4.7.5 Engine Property User Subroutine RUSER29 C------------------------------------------------------------------------- C This subroutine computes springs forces and moments. C------------------------------------------------------------------------- SUBROUTINE RUSER29(NEL,IOUT ,IPROP ,UVAR ,NUVAR , 2 FX ,FY ,FZ ,XMOM ,YMOM , 3 ZMOM ,E ,OFF ,STIFM ,STIFR , 4 VISCM ,VISCR ,MASS ,XINER ,DT , 5 XL ,VX ,RY1 ,RZ1 ,RX , 6 RY2 ,RZ2 ,FR_WAVE) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C#include "implicit_f.inc" C---------------------------------------------------------- C D u m m y A r g u m e n t s a n d F u n c t i o n C---------------------------------------------------------- INTEGER IOUT,NEL,NUVAR,IPROP, . GET_U_PNU,GET_U_PID,GET_U_MID,GET_U_MNU, . KFUNC,KMAT,KPROP DOUBLE PRECISION . UVAR(NUVAR,*),DT , . FX(*), FY(*), FZ(*), E(*), VX(*),MASS(*) ,XINER(*), . RY1(*), RZ1(*), OFF(*), XMOM(*), YMOM(*), . ZMOM(*), RX(*), RY2(*), RZ2(*),XL(*), . STIFM(*) ,STIFR(*) , VISCM(*) ,VISCR(*) ,FR_WAVE(*) , . GET_U_MAT, GET_U_GEO, GET_U_FUNC EXTERNAL GET_U_MNU,GET_U_PNU,GET_U_MID,GET_U_PID, . GET_U_MAT,GET_U_GEO, GET_U_FUNC PARAMETER (KFUNC=29) PARAMETER (KMAT=31) PARAMETER (KPROP=33) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER I,KCST, . IMAT1,IPROP1,IUTYP1, . IMAT2,IPROP2,IUTYP2 DOUBLE PRECISION . RHO,AREA,IXX,IYY,IZZ,IMYZ,YOUNG,G, . AREA1,IXX1,IYY1,IZZ1,RHO1,YOUNG1,G1, . AREA2,IXX2,IYY2,IZZ2,RHO2,YOUNG2,G2, . K11,K22,K26,K33,K35,K44,K55,K5B,K66,K6C C----------------------------------------------- C KCST = 0 KCST = 1 C IPROP1 = GET_U_PNU(1,IPROP,KPROP) AREA1 = GET_U_GEO(2,IPROP1) IXX1 = GET_U_GEO(3,IPROP1) IYY1 = GET_U_GEO(4,IPROP1) IZZ1 = GET_U_GEO(5,IPROP1) IPROP2 = GET_U_PNU(2,IPROP,KPROP) AREA2 = GET_U_GEO(2,IPROP2) IXX2 = GET_U_GEO(3,IPROP2) IYY2 = GET_U_GEO(4,IPROP2) IZZ2 = GET_U_GEO(5,IPROP2)

Page 101: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 29

IMAT1 = GET_U_PNU(1,IPROP1,KMAT) YOUNG1 = GET_U_MAT(7,IMAT1) G1 = GET_U_MAT(6,IMAT1) RHO1 = GET_U_MAT(0,IMAT1) IMAT2 = GET_U_PNU(1,IPROP2,KMAT) YOUNG2 = GET_U_MAT(7,IMAT2) G2 = GET_U_MAT(6,IMAT2) RHO2 = GET_U_MAT(0,IMAT2) C RHO = 0.5*(RHO1+RHO2) AREA = 0.5*(AREA1+AREA2) IXX = 0.5*(IXX1+IXX2) IYY = 0.5*(IYY1+IYY2) IZZ = 0.5*(IZZ1+IZZ2) IMYZ = MAX(IYY,IZZ) YOUNG = 0.5*(YOUNG1+YOUNG2) G = 0.5*(G1+G2) C DO I=1,NEL IF(KCST.EQ.1)THEN K11 = UVAR(1,I) K22 = UVAR(2,I) K26 = UVAR(3,I) K33 = UVAR(4,I) K35 = UVAR(5,I) K44 = UVAR(6,I) K55 = UVAR(7,I) K5B = UVAR(8,I) K66 = UVAR(9,I) K6C = UVAR(10,I) ELSE K11 = YOUNG * AREA / XL(I) K22 = 12. * YOUNG * IZZ / (XL(I)*XL(I)*XL(I)) K26 = 0.5 * XL(I) * K22 K33 = 12. * YOUNG * IYY / (XL(I)*XL(I)*XL(I)) K35 = - 0.5 * XL(I) * K33 K44 = G * IXX / XL(I) K55 = 4. * YOUNG * IYY / XL(I) K5B = 0.5 * K55 K66 = 4. * YOUNG * IZZ / XL(I) K6C = 0.5 * K66 ENDIF C========================================== C NODAL VELOCITIES IN COROTATIONAL FRAME : C========================================== C VX1 = -VX(I)/2 (FRAME IS ATTACHED BETWEEN NODE 1 AND 2) C VX2 = VX(I)/2 C VY1 = VY2 = VZ1 = VZ2 = 0 C RX1 = -RX(I)/2 ( FRAME IS ATTACHED TO MEAN C RX2 = RX(I)/2 X ROTATION OF NODE 1 AND 2 ) C RY1(I), RY2(I), RZ1(I), RZ2(I) C C========================================================= C NODAL FORCES AND MOMENTS RATES VERSUS NODAL VELOCITIES: C========================================================= C -D(FX1)/DT = K11 * VX1 - K11 * VX2 C -D(FY1)/DT = K22 * VY1 + K26 * RZ1 - K22 * VY2 + K26 * RZ2 C -D(FZ1)/DT = K33 * VZ1 + K35 * RY1 - K33 * VZ2 + K35 * RY2 C -D(MX1)/DT = K44 * RX1 - K44 * RX2

Page 102: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 30

C -D(MY1)/DT = K35 * VZ1 + K55 * RY1 - K35 * VZ2 + K5B * RY2 C -D(MZ1)/DT = K26 * VY1 + K66 * RZ1 - K26 * VY2 + K6C * RZ2 C -D(FX2)/DT = - K11 * VX1 + K11 * VX2 C -D(FY2)/DT = - K22 * VY1 - K26 * RZ1 + K22 * VY2 - K26 * RZ2 C -D(FZ2)/DT = - K33 * VZ1 - K35 * RY1 + K33 * VZ2 - K35 * RY2 C -D(MX2)/DT = - K44 * RX1 + K44 * RX2 C -D(MY2)/DT = K35 * VZ1 + K5B * RY1 - K35 * VZ2 + K55 * RY2 C -D(MZ2)/DT = K26 * VY1 + K6C * RZ1 - K26 * VY2 + K66 * RZ2 C C============================================ C ELEMENT VERSUS NODAL FORCES AND MOMENTS : C============================================ C FX(I) = FX(I) - DT * D(FX2)/DT C FY(I) = FY(I) - DT * D(FY2)/DT C FZ(I) = FZ(I) - DT * D(FZ2)/DT C C XMOM(I) = XMOM(I) - 0.5*DT*(D(MX2)/DT - D(MX1)/DT) C YMOM(I) = YMOM(I) - 0.5*DT*(D(MY2)/DT - D(MY1)/DT) C ZMOM(I) = ZMOM(I) - 0.5*DT*(D(MZ2)/DT - D(MZ1)/DT) C============================================ FX(I) = FX(I) + DT * K11 * VX(I) FY(I) = FY(I) - DT * K26 * (RZ1(I) + RZ2(I)) FZ(I) = FZ(I) - DT * K35 * (RY1(I) + RY2(I)) C XMOM(I) = XMOM(I) + DT * K44 * RX(I) YMOM(I) = YMOM(I) + 0.5 * DT * (K55 - K5B) * (RY2(I) - RY1(I)) ZMOM(I) = ZMOM(I) + 0.5 * DT * (K66 - K6C) * (RZ2(I) - RZ1(I)) C print *, 'FX(2) =',FX(2) C print *, 'FY(2) =',FY(2) C print *, 'FZ(2) =',FZ(2) C print *, 'XMOM(2) =',XMOM(2) C print *, 'YMOM(2) =',YMOM(2) C print *, 'ZMOM(2) =',ZMOM(2) C print *, 'K11 =',K11 C print *, 'VX(2) =',VX(2) C print *, 'KCST =',KCST C print *, 'UVAR(1,2) =',UVAR(1,2) C============================================ C NODAL VERSUS ELEMENT FORCES AND MOMENTS : C ( COMPUTED BY Altair Radioss ) C============================================ C FX1 = FX(I) C FY1 = FY(I) C FZ1 = FZ(I) C FX2 = -FX(I) C FY2 = -FY(I) C FZ2 = -FZ(I) C MX1 = XMOM(I) C MY1 = YMOM(I)-0.5*XL(I)*FZ(I) C MZ1 = ZMOM(I)+0.5*XL(I)*FY(I) C MX2 = -XMOM(I) C MY2 = -YMOM(I)-0.5*XL(I)*FZ(I) C MZ2 = -ZMOM(I)+0.5*XL(I)*FY(I) C============================================ C TIME STEP C============================================ STIFM(I) = MAX(K11,K22,K33) STIFR(I) = MAX(K44,K55,K66)

Page 103: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 31

VISCM(I) = 0. VISCR(I) = 0. XINER(I) = XL(I)*RHO*MAX(IXX,IMYZ+AREA*XL(I)*XL(I)/12) ENDDO C------------------------------- RETURN END

Page 104: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 32

4.8 Example of User Triangular Shell Elements Using Solid Property Example: A triangular shell property is defined using a user solid property with rotational degrees of freedom at nodes. Bricks are degenerated to three node shells. Property reads stresses computed in a user’s material. Internal forces, internal moments, and strain increments are written.

Element degeneration:

Connectivity: 1 2 3 4 5 6 7 8 Connectivity: 1 2 3 1 1 2 3 1

4.8.1 User Input Data (/MAT/PROPn/ option) […]

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/MAT/USER1/1

user material used for property

# Init. dens. Ref. dens.

0.00785 0

# E Nu

3102.75 0.3

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/PROP/USER1/1

triangular shell element

# THICK

12.7

# MID1

1

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

/BRICK/1

# Id N1 N2 N3 N4 N5 N6 N7 N8

3-node-shell mesh is made up of two degenerated brick elements:

Page 105: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 33

1 1 2 3 1 1 2 3 1

2 2 4 3 2 2 4 3 2

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

[…]

4.8.2 Starter Property User Subroutine LECG29 C================================================================= C This subroutine reads the user geometry parameters. C================================================================= SUBROUTINE LECG29(IIN ,IOUT ,NUVAR ,PARGEO) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C#include "implicit_f.inc" C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,NUVAR DOUBLEPRECISION . PARGEO(*) INTEGER SET_U_PNU,SET_U_GEO, . KFUNC,KMAT,KPROP EXTERNAL SET_U_PNU,SET_U_GEO PARAMETER (KFUNC=29) PARAMETER (KMAT=31) PARAMETER (KPROP=33) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER MID1,IERROR DOUBLEPRECISION . THK C==================================================== C C ELASTIC TRIANGULAR SHELL ELEMENT C C==================================================== C NUVAR = 7 C READ(IIN,ERR=999,END=999,FMT='(F20.0)')THK C C THICK is stored in index value 1 IERROR = SET_U_GEO(1,THK) C READ(IIN,ERR=999,END=999,FMT='(2I10)')MID1 C MID1 is a USER material ID: IERROR = SET_U_PNU(1,MID1,KMAT) C C READ(IIN,ERR=999,END=999,FMT='(2I10)')NIP C C NIP is stored in index value 2 C IERROR = SET_U_GEO(2,NIP) C WRITE(IOUT,1000)THK,MID1 C

Page 106: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 34

C RETURN 999 CONTINUE WRITE(IOUT,*)' **ERROR IN USER PROPERTY INPUT' RETURN 1000 FORMAT( & 5X,' USER TRIANGULAR SHELL PROPERTY ',/, & 5X,' ------------------------------ ',//, & 5X,'THICKNESS . . . . . . . . . . . . . . .=',E12.4/, & 5X,'USER MATERIAL ID . . . . . . . . . . .=',I10//) C & 5X,'Integration points . . . . . . . . . .=',I10//) END

Page 107: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 35

4.8.3 Starter Property Initialization User Subroutine SINI29 C================================================================= C This subroutine initialize triangular shell properties C================================================================= SUBROUTINE SINI29( 1 NEL ,NUVAR,IOUT ,IPROP ,IMAT,SOLID_ID, 2 EINT ,VOL ,UVAR ,OFF,RHO ,SIG , 3 XX1 ,XX2 ,XX3 ,XX4 ,XX5 ,XX6 ,XX7 ,XX8 , 4 YY1 ,YY2 ,YY3 ,YY4 ,YY5 ,YY6 ,YY7 ,YY8 , 5 ZZ1 ,ZZ2 ,ZZ3 ,ZZ4 ,ZZ5 ,ZZ6 ,ZZ7 ,ZZ8 , 6 VX1 ,VX2 ,VX3 ,VX4 ,VX5 ,VX6 ,VX7 ,VX8 , 7 VY1 ,VY2 ,VY3 ,VY4 ,VY5 ,VY6 ,VY7 ,VY8 , 8 VZ1 ,VZ2 ,VZ3 ,VZ4 ,VZ5 ,VZ6 ,VZ7 ,VZ8 , 9 VRX1 ,VRX2 ,VRX3 ,VRX4 ,VRX5 ,VRX6 ,VRX7 ,VRX8 , A VRY1 ,VRY2 ,VRY3 ,VRY4 ,VRY5 ,VRY6 ,VRY7 ,VRY8 , B VRZ1 ,VRZ2 ,VRZ3 ,VRZ4 ,VRZ5 ,VRZ6 ,VRZ7 ,VRZ8 , C MAS1 ,MAS2 ,MAS3 ,MAS4 ,MAS5 ,MAS6 ,MAS7 ,MAS8 , D INN1 ,INN2 ,INN3 ,INN4 ,INN5 ,INN6 ,INN7 ,INN8 , C STIFM,STIFR,VISCM,VISCR) C---------------------------------------------------------- C I m p l i c i t T y p e s C---------------------------------------------------------- C#include "implicit_f.inc" C---------------------------------------------------------- C D u m m y A r g u m e n t s C---------------------------------------------------------- INTEGER NEL,NUVAR,IOUT,IPROP,IMAT,SOLID_ID(*) DOUBLEPRECISION . UVAR(NEL,NUVAR), . STIFM(*) ,STIFR(*) , VISCM(*) ,VISCR(*) , . OFF(*) ,EINT(*) , RHO(*) ,VOL(*) ,SIG(6,*), 2 XX1(*),XX2(*),XX3(*),XX4(*),XX5(*),XX6(*),XX7(*),XX8(*), 3 YY1(*),YY2(*),YY3(*),YY4(*),YY5(*),YY6(*),YY7(*),YY8(*), 4 ZZ1(*),ZZ2(*),ZZ3(*),ZZ4(*),ZZ5(*),ZZ6(*),ZZ7(*),ZZ8(*), 5 VX1(*),VX2(*),VX3(*),VX4(*),VX5(*),VX6(*),VX7(*),VX8(*), 6 VY1(*),VY2(*),VY3(*),VY4(*),VY5(*),VY6(*),VY7(*),VY8(*), 7 VZ1(*),VZ2(*),VZ3(*),VZ4(*),VZ5(*),VZ6(*),VZ7(*),VZ8(*), 8 VRX1(*),VRX2(*),VRX3(*),VRX4(*),VRX5(*),VRX6(*),VRX7(*),VRX8(*), 9 VRY1(*),VRY2(*),VRY3(*),VRY4(*),VRY5(*),VRY6(*),VRY7(*),VRY8(*), A VRZ1(*),VRZ2(*),VRZ3(*),VRZ4(*),VRZ5(*),VRZ6(*),VRZ7(*),VRZ8(*), C MAS1(*),MAS2(*),MAS3(*),MAS4(*),MAS5(*),MAS6(*),MAS7(*),MAS8(*), D INN1(*),INN2(*),INN3(*),INN4(*),INN5(*),INN6(*),INN7(*),INN8(*) C---------------------------------------------------------- C E x t e r n a l F u n c t i o n C---------------------------------------------------------- INTEGER GET_U_PNU,GET_U_PID,GET_U_MID,GET_U_MNU DOUBLEPRECISION . GET_U_MAT, GET_U_GEO, GET_U_FUNC EXTERNAL GET_U_MNU,GET_U_PNU,GET_U_MID,GET_U_PID, . GET_U_MAT,GET_U_GEO, GET_U_FUNC INTEGER KFUNC,KMAT,KPROP PARAMETER (KFUNC=29) PARAMETER (KMAT=31) PARAMETER (KPROP=33) C----------------------------------------------- C L o c a l V a r i a b l e s C-----------------------------------------------

Page 108: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 36

INTEGER I DOUBLEPRECISION . MASS(NEL),INER(NEL),ALMAX(NEL), . AREA(NEL),E,G,THK,NU, . P1(NEL),P2(NEL),P3(NEL), . L1(NEL),L2(NEL),L3(NEL), . A1(NEL),A2(NEL),A3(NEL), . AL1,AL2,AL3, . X21(NEL),Y21(NEL),Z21(NEL), . X31(NEL),Y31(NEL),Z31(NEL), . X32(NEL),Y32(NEL),Z32(NEL), . E1X(NEL),E1Y(NEL),E1Z(NEL), . E2X(NEL),E2Y(NEL),E2Z(NEL), . E3X(NEL),E3Y(NEL),E3Z(NEL), . LE1(NEL),LE2(NEL),LE3(NEL), . X3(NEL),Y3(NEL),X2(NEL),ALDT(NEL) C IMAT = GET_U_PNU(1,IPROP,KMAT) G = GET_U_MAT(3,IMAT) E = GET_U_MAT(4,IMAT) NU = GET_U_MAT(5,IMAT) THK = GET_U_GEO(1,IPROP) C C----------------------------------------------------------------------- DO I=1,NEL C----------------------------------------------------------------------- C C----------------------------------------------------------------------- C ELEMENT DEGENERATION - nodes distribution (tetra element) C-----------------------------------------------------------------------

XX4(I) = XX1(I)

YY4(I) = YY1(I)

ZZ4(I) = ZZ1(I)

XX5(I) = XX1(I)

YY5(I) = YY1(I)

ZZ5(I) = ZZ1(I)

XX6(I) = XX2(I)

YY6(I) = YY2(I)

ZZ6(I) = ZZ2(I)

XX7(I) = XX3(I)

YY7(I) = YY3(I)

ZZ7(I) = ZZ3(I)

XX8(I) = XX1(I)

YY8(I) = YY1(I)

ZZ8(I) = ZZ1(I)

C C----------------------------------------------------------------------- C SHAPE FUNCTION -> local reference frame definition C----------------------------------------------------------------------- C -> Components of edges X21(I)=XX2(I)-XX1(I) Y21(I)=YY2(I)-YY1(I) Z21(I)=ZZ2(I)-ZZ1(I) X31(I)=XX3(I)-XX1(I) Y31(I)=YY3(I)-YY1(I)

Page 109: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 37

Z31(I)=ZZ3(I)-ZZ1(I) X32(I)=XX3(I)-XX2(I) Y32(I)=YY3(I)-YY2(I) Z32(I)=ZZ3(I)-ZZ2(I) C C LOCAL FRAME: C (where E: vector component) C C -> Components of vector E1 defining local X direction (edge 1-2) E1X(I)= X21(I) E1Y(I)= Y21(I) E1Z(I)= Z21(I) LE1(I) = SQRT(E1X(I)*E1X(I)+E1Y(I)*E1Y(I)+E1Z(I)*E1Z(I)) E1X(I)=E1X(I)/LE1(I) E1Y(I)=E1Y(I)/LE1(I) E1Z(I)=E1Z(I)/LE1(I) C

C -> Components of vector E3 defining local Z direction (normal to the C plane) E3X(I)=Y31(I)*Z32(I)-Z31(I)*Y32(I) E3Y(I)=Z31(I)*X32(I)-X31(I)*Z32(I) E3Z(I)=X31(I)*Y32(I)-Y31(I)*X32(I) LE3(I) = SQRT(E3X(I)*E3X(I)+E3Y(I)*E3Y(I)+E3Z(I)*E3Z(I)) E3X(I)=E3X(I)/LE3(I) E3Y(I)=E3Y(I)/LE3(I) E3Z(I)=E3Z(I)/LE3(I) C C -> Components of vector E2 defining local Y direction (cross product) E2X(I)=E3Y(I)*E1Z(I)-E3Z(I)*E1Y(I) E2Y(I)=E3Z(I)*E1X(I)-E3X(I)*E1Z(I) E2Z(I)=E3X(I)*E1Y(I)-E3Y(I)*E1X(I) LE2(I) = SQRT(E2X(I)*E2X(I)+E2Y(I)*E2Y(I)+E2Z(I)*E2Z(I)) E2X(I)=E2X(I)/LE2(I) E2Y(I)=E2Y(I)/LE2(I) E2Z(I)=E2Z(I)/LE2(I) C C----------------------------------------------------------------------- C SIMPLIFIED MASS AND INERTIA COMPUTATION C----------------------------------------------------------------------- C Edge 1-2 length: L1(I) = SQRT(X21(I)*X21(I)+Y21(I)*Y21(I)+Z21(I)*Z21(I)) C Edge 1-3 length: L2(I) = SQRT(X31(I)*X31(I)+Y31(I)*Y31(I)+Z31(I)*Z31(I)) C Edge 2-3 length: L3(I) = SQRT(X32(I)*X32(I)+Y32(I)*Y32(I)+Z32(I)*Z32(I)) C C Angle node 1 : A1(I) = (L1(I)*L1(I)+ L2(I)*L2(I)-L3(I)*L3(I)) / (2*L1(I)*L2(I)) A1(I) = ACOS(A1(I)) C Angle node 2 : A2(I) = (L1(I)*L1(I)+L3(I)*L3(I)-L2(I)*L2(I))/(2*L1(I)*L3(I)) A2(I) = ACOS(A2(I)) C Angle node 3 : A3(I) = (L2(I)*L2(I)+L3(I)*L3(I)-L1(I)*L1(I))/(2*L2(I)*L3(I)) A3(I) = ACOS(A3(I)) C C Area of the shell element surface AREA(I) = LE3(I)/2 C C Element volume

Page 110: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 38

VOL(I)=AREA(I)*THK C C Element mass MASS(I) = RHO(I)*VOL(I) C C Mass moment of inertia (element) C INER(I) = MASS(I)*((2*AREA(I)/6)+(THK*THK/12)) C INER(I) = MASS(I)*((AREA(I)/9)+(THK*THK/12)) INER(I) = 0.0 C C Mass distribution at nodes MAS1(I) = MASS(I)/3 MAS2(I) = MASS(I)/3 MAS3(I) = MASS(I)/3 MAS4(I) = 0 MAS5(I) = 0 MAS6(I) = 0 MAS7(I) = 0 MAS8(I) = 0 C C Inertia distribution at nodes INN1(I) = A1(I)*INER(I)/3.14 INN2(I) = A2(I)*INER(I)/3.14 INN3(I) = A3(I)*INER(I)/3.14 INN4(I) = 0 INN5(I) = 0 INN6(I) = 0 INN7(I) = 0 INN8(I) = 0 C C----------------------------------------------------------------------- C TIME STEP CONTROL C----------------------------------------------------------------------- C C Characteristic length ALDT for computing the critical time step: Y3(I)=E2X(I)*X31(I)+E2Y(I)*Y31(I)+E2Z(I)*Z31(I) X3(I)=E1X(I)*X31(I)+E1Y(I)*Y31(I)+E1Z(I)*Z31(I) X2(I)=E1X(I)*X21(I)+E1Y(I)*Y21(I)+E1Z(I)*Z21(I) AL1 = X2(I)*X2(I) AL2 = (X3(I)-X2(I))*(X3(I)-X2(I))+(Y3(I)*Y3(I)) AL3 = X3(I)*X3(I)+Y3(I)*Y3(I) ALMAX(I) = MAX(AL1,AL2,AL3) ALMAX(I) = SQRT(ALMAX(I)) C ALDT(I) = MAX(L1(I),L2(I),L3(I)) ALDT(I)= 2*AREA(I) / ALMAX(I) C C Variables for element and nodal time step computation: STIFM(I) = 2*VOL(I) * E / (3*ALDT(I)*ALDT(I)) C STIFR(I) = 0 STIFR(I) = STIFM(I) * (THK * THK / 12 + AREA(I) /9.) C STIFR(I) = STIFM(I) * (THK * THK / 12 C . + SHF(I) * AREA(I) * G/(4*E)) VISCM(I) = 0 VISCR(I) = 0 C C----------------------------------------------------------------------- ENDDO C----------------------------------------------------------------------- C

Page 111: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 39

DO I=1,1 print *, 'Parameters CHECK:' print *, 'Angle 1 =',A1(I) print *, 'Angle 2 =',A2(I) print *, 'Angle 3 =',A3(I) print *, 'Area =',AREA(I) print *, 'volume =',VOL(I) print *, 'Global mass =',MASS(I) print *, 'mass 1 =',MAS1(I) print *, 'mass 2 =',MAS2(I) print *, 'mass 3 =',MAS3(I) print *, 'lC =',ALDT(I) ENDDO C C----------------------------------------------------------------------- C RETURN END

4.8.4 Starter Material User Subroutine LECM29 C================================================================= C This subroutine reads the user material parameters. C================================================================= SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, . NUVAR,IFUNC,MAXFUNC,NFUNC ,STIFINT) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C IMPLICIT NONE C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),STIFINT C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION E,NU,A11,A12,A44 C C----------------------------------------------- C INPUT FILE READING (USER DATA) C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU A11 = E * (1.-NU) / (1.+NU) / (1.-2.*NU) A12 = E * NU / (1.+NU) / (1.-2.*NU) A44 = E / 2. / (1.+NU) C C----------------------------------------------- C DATA CHECKING C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF NUPARAM = 5 IF(NUPARAM.GT.MAXUPARAM)THEN WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPARAM' WRITE(IOUT,*)' NUPARAM =',NUPARAM,

Page 112: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 40

. ' MAXUPARAM =',MAXUPARAM ELSE C----------------------------------------------- C USER MATERIAL PARAMETERS DEFINITION C----------------------------------------------- C UPARAM(1) = E/(1.-NU*NU) UPARAM(2) = NU*E/(1.-NU*NU) UPARAM(3) = 0.5*E/(1.+NU) UPARAM(4) = E UPARAM(5) = NU C ENDIF C C------------------------------------------------- C NUMBER OF USER ELEMENT VARIABLES AND CURVES C------------------------------------------------- NUVAR = 7 NFUNC = 0 C C----------------------------------------------- C USED FOR SOLIDS (interface) C----------------------------------------------- STIFINT = A11 C C------------------------------------------------- C OUTPUT FILE PRINT C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU C 1000 FORMAT( & 5X,' ELASTIC USER LAW 29',/, & 5X,' ------------------ ',//) 1100 FORMAT( & 5X,'E . . . . . . . . . . . . . . . . . . .=',E12.4/ & 5X,'NU. . . . . . . . . . . . . . . . . . .=',E12.4//) C C------------------------------------------------- C END C------------------------------------------------- RETURN END

Page 113: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 41

4.8.5 Engine Property User Subroutine SUSER29 C============================================================================= C This subroutine computes strain, forces and moments (triangular SHELL). C Solid elements are degenerated to triangular shells. C============================================================================= SUBROUTINE SUSER29( 1 NEL ,NUVAR ,IOUT ,IPROP ,IMAT ,SOLID_ID,TIME ,TIMESTEP, 2 EINT ,VOL ,UVAR ,FR_WAVE,OFF ,RHO ,SIG , 3 XX1 ,XX2 ,XX3 ,XX4 ,XX5 ,XX6 ,XX7 ,XX8 , 4 YY1 ,YY2 ,YY3 ,YY4 ,YY5 ,YY6 ,YY7 ,YY8 , 5 ZZ1 ,ZZ2 ,ZZ3 ,ZZ4 ,ZZ5 ,ZZ6 ,ZZ7 ,ZZ8 , 6 UX1 ,UX2 ,UX3 ,UX4 ,UX5 ,UX6 ,UX7 ,UX8 , 7 UY1 ,UY2 ,UY3 ,UY4 ,UY5 ,UY6 ,UY7 ,UY8 , 8 UZ1 ,UZ2 ,UZ3 ,UZ4 ,UZ5 ,UZ6 ,UZ7 ,UZ8 , 9 VX1 ,VX2 ,VX3 ,VX4 ,VX5 ,VX6 ,VX7 ,VX8 , A VY1 ,VY2 ,VY3 ,VY4 ,VY5 ,VY6 ,VY7 ,VY8 , B VZ1 ,VZ2 ,VZ3 ,VZ4 ,VZ5 ,VZ6 ,VZ7 ,VZ8 , C VRX1 ,VRX2 ,VRX3 ,VRX4 ,VRX5 ,VRX6 ,VRX7 ,VRX8 , D VRY1 ,VRY2 ,VRY3 ,VRY4 ,VRY5 ,VRY6 ,VRY7 ,VRY8 , E VRZ1 ,VRZ2 ,VRZ3 ,VRZ4 ,VRZ5 ,VRZ6 ,VRZ7 ,VRZ8 , F FX1 ,FX2 ,FX3 ,FX4 ,FX5 ,FX6 ,FX7 ,FX8 , G FY1 ,FY2 ,FY3 ,FY4 ,FY5 ,FY6 ,FY7 ,FY8 , H FZ1 ,FZ2 ,FZ3 ,FZ4 ,FZ5 ,FZ6 ,FZ7 ,FZ8 , I MX1 ,MX2 ,MX3 ,MX4 ,MX5 ,MX6 ,MX7 ,MX8 , J MY1 ,MY2 ,MY3 ,MY4 ,MY5 ,MY6 ,MY7 ,MY8 , K MZ1 ,MZ2 ,MZ3 ,MZ4 ,MZ5 ,MZ6 ,MZ7 ,MZ8 , L STIFM ,STIFR ,VISCM ,VISCR ) C C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C#include "implicit_f.inc" C---------------------------------------------------------- C D u m m y A r g u m e n t s C---------------------------------------------------------- INTEGER NEL,NUVAR,IOUT,IPROP,IMAT,SOLID_ID(*) DOUBLEPRECISION . TIME,TIMESTEP,UVAR(NEL,NUVAR), . STIFM(*) ,STIFR(*) , VISCM(*) ,VISCR(*) ,FR_WAVE(*), . OFF(*) ,EINT(*) , RHO(*) ,VOL(*) ,SIG(6,*), 2 XX1(*),XX2(*),XX3(*),XX4(*),XX5(*),XX6(*),XX7(*),XX8(*), 3 YY1(*),YY2(*),YY3(*),YY4(*),YY5(*),YY6(*),YY7(*),YY8(*), 4 ZZ1(*),ZZ2(*),ZZ3(*),ZZ4(*),ZZ5(*),ZZ6(*),ZZ7(*),ZZ8(*), 2 UX1(*),UX2(*),UX3(*),UX4(*),UX5(*),UX6(*),UX7(*),UX8(*), 3 UY1(*),UY2(*),UY3(*),UY4(*),UY5(*),UY6(*),UY7(*),UY8(*), 4 UZ1(*),UZ2(*),UZ3(*),UZ4(*),UZ5(*),UZ6(*),UZ7(*),UZ8(*), 5 VX1(*),VX2(*),VX3(*),VX4(*),VX5(*),VX6(*),VX7(*),VX8(*), 6 VY1(*),VY2(*),VY3(*),VY4(*),VY5(*),VY6(*),VY7(*),VY8(*), 7 VZ1(*),VZ2(*),VZ3(*),VZ4(*),VZ5(*),VZ6(*),VZ7(*),VZ8(*), 8 VRX1(*),VRX2(*),VRX3(*),VRX4(*),VRX5(*),VRX6(*),VRX7(*),VRX8(*), 9 VRY1(*),VRY2(*),VRY3(*),VRY4(*),VRY5(*),VRY6(*),VRY7(*),VRY8(*), A VRZ1(*),VRZ2(*),VRZ3(*),VRZ4(*),VRZ5(*),VRZ6(*),VRZ7(*),VRZ8(*), B FX1(*),FX2(*),FX3(*),FX4(*),FX5(*),FX6(*),FX7(*),FX8(*), C FY1(*),FY2(*),FY3(*),FY4(*),FY5(*),FY6(*),FY7(*),FY8(*), D FZ1(*),FZ2(*),FZ3(*),FZ4(*),FZ5(*),FZ6(*),FZ7(*),FZ8(*), E MX1(*),MX2(*),MX3(*),MX4(*),MX5(*),MX6(*),MX7(*),MX8(*), F MY1(*),MY2(*),MY3(*),MY4(*),MY5(*),MY6(*),MY7(*),MY8(*), G MZ1(*),MZ2(*),MZ3(*),MZ4(*),MZ5(*),MZ6(*),MZ7(*),MZ8(*)

Page 114: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 42

C---------------------------------------------------------- C E x t e r n a l F u n c t i o n C---------------------------------------------------------- INTEGER GET_U_PNU,GET_U_PID,GET_U_MID,GET_U_MNU DOUBLEPRECISION . GET_U_MAT, GET_U_GEO, GET_U_FUNC EXTERNAL GET_U_MNU,GET_U_PNU,GET_U_MID,GET_U_PID, . GET_U_MAT,GET_U_GEO, GET_U_FUNC INTEGER KFUNC,KMAT,KPROP PARAMETER (KFUNC=29) PARAMETER (KMAT=31) PARAMETER (KPROP=33) C----------------------------------------------- C L O C A L V A R I A B L E S C----------------------------------------------- INTEGER I,J,NUMARAM DOUBLEPRECISION THK(NEL),AREA(NEL),THK0,NU,NNU,X, . RHO0,UPARAM(3),A1,A2,G, . ALMAX(NEL),ALDT(NEL),AL1,AL2,AL3, . X21(NEL),Y21(NEL),Z21(NEL),X31(NEL),Y31(NEL),Z31(NEL), . X32(NEL),Y32(NEL),Z32(NEL), . E1X(NEL),E1Y(NEL),E1Z(NEL),LE1(NEL), . E2X(NEL),E2Y(NEL),E2Z(NEL),LE2(NEL), . E3X(NEL),E3Y(NEL),E3Z(NEL),LE3(NEL), . Y3(NEL),X3(NEL),X2(NEL),PX1(NEL),PY1(NEL),PX2(NEL),PY2(NEL), . PY3(NEL),DT1V4,DT1V4B, . TMP1,TMP2,TMP11,TMP22,VX10,VX20,VX30, . EXX(NEL),EYY(NEL),EXY(NEL),EZY(NEL),DEZZ,EZZ, . EZX(NEL),KXX(NEL),KYY(NEL),KXY(NEL),EXZ(NEL),EYZ(NEL), . VXE1(NEL),VXE2(NEL),VXE3(NEL), . VYE1(NEL),VYE2(NEL),VYE3(NEL), . VZE1(NEL),VZE2(NEL),VZE3(NEL), . VX12(NEL),VY12(NEL),VX13(NEL),VY13(NEL), . VX23(NEL),VY23(NEL),VZ12(NEL),VZ13(NEL),VZ23(NEL), . VRXE1(NEL),VRXE2(NEL),VRXE3(NEL), . VRYE1(NEL),VRYE2(NEL),VRYE3(NEL), . VRY12(NEL),VRY13(NEL),VRY23(NEL), . VRX12(NEL),VRX13(NEL),VRX23(NEL),RYAVT,RXAVT, . SIGNXX(NEL),SIGNYY(NEL),SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL), . SIGOXX(NEL),SIGOYY(NEL),SIGOXY(NEL),SIGOYZ(NEL),SIGOZX(NEL), . DEPSXX(NEL),DEPSYY(NEL),DEPSXY(NEL),DEPSYZ(NEL),DEPSZX(NEL), . EPSXX(NEL),EPSYY(NEL),EPSXY(NEL),EPSYZ(NEL),EPSZX(NEL), . FOR(5,NEL),MOM(3,NEL), . F1(NEL),F2(NEL),F3(NEL),F4(NEL),F5(NEL),TH2, . F11(NEL),F22(NEL), . FX11(NEL),FX22(NEL),FX33(NEL),FY11(NEL),FY22(NEL),FY33(NEL), . FZ11(NEL),FZ22(NEL),FZ33(NEL), . MX11(NEL),MX22(NEL),MX33(NEL),MY11(NEL),MY22(NEL),MY33(NEL), . M1,M2,M3,M4,M5 C C----------------------------------------------------------------------- DO I=1,NEL C----------------------------------------------------------------------- C C======================================================================= C ELEMENT DEGENERATION - nodes distribution initialization C======================================================================= XX4(I) = XX1(I) YY4(I) = YY1(I)

Page 115: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 43

ZZ4(I) = ZZ1(I) XX5(I) = XX1(I) YY5(I) = YY1(I) ZZ5(I) = ZZ1(I) XX6(I) = XX2(I) YY6(I) = YY2(I) ZZ6(I) = ZZ2(I) XX7(I) = XX3(I) YY7(I) = YY3(I) ZZ7(I) = ZZ3(I) XX8(I) = XX1(I) YY8(I) = YY1(I) ZZ8(I) = ZZ1(I) C C======================================================================= C SHAPE FUNCTION (linear: a+bx+cy) -> local coordinates C======================================================================= C -> Components of edges X21(I)=XX2(I)-XX1(I) Y21(I)=YY2(I)-YY1(I) Z21(I)=ZZ2(I)-ZZ1(I) X31(I)=XX3(I)-XX1(I) Y31(I)=YY3(I)-YY1(I) Z31(I)=ZZ3(I)-ZZ1(I) X32(I)=XX3(I)-XX2(I) Y32(I)=YY3(I)-YY2(I) Z32(I)=ZZ3(I)-ZZ2(I) C C 1) LOCAL FRAME DEFINITION: C C -> Components of vector E1 defining local X direction (edge 1-2) E1X(I)= X21(I) E1Y(I)= Y21(I) E1Z(I)= Z21(I) LE1(I) = SQRT(E1X(I)*E1X(I)+E1Y(I)*E1Y(I)+E1Z(I)*E1Z(I)) E1X(I)=E1X(I)/LE1(I) E1Y(I)=E1Y(I)/LE1(I) E1Z(I)=E1Z(I)/LE1(I) C C -> Components of vector E3 defining local Z direction (normal to the plane) E3X(I)=Y31(I)*Z32(I)-Z31(I)*Y32(I) E3Y(I)=Z31(I)*X32(I)-X31(I)*Z32(I) E3Z(I)=X31(I)*Y32(I)-Y31(I)*X32(I) LE3(I) = SQRT(E3X(I)*E3X(I)+E3Y(I)*E3Y(I)+E3Z(I)*E3Z(I)) E3X(I)=E3X(I)/LE3(I) E3Y(I)=E3Y(I)/LE3(I) E3Z(I)=E3Z(I)/LE3(I) C C -> Components of vector E2 defining local Y direction (cross product) E2X(I)=E3Y(I)*E1Z(I)-E3Z(I)*E1Y(I) E2Y(I)=E3Z(I)*E1X(I)-E3X(I)*E1Z(I) E2Z(I)=E3X(I)*E1Y(I)-E3Y(I)*E1X(I) LE2(I) = SQRT(E2X(I)*E2X(I)+E2Y(I)*E2Y(I)+E2Z(I)*E2Z(I)) E2X(I)=E2X(I)/LE2(I) E2Y(I)=E2Y(I)/LE2(I) E2Z(I)=E2Z(I)/LE2(I) C C 2) DERIVATIVES OF THE SHAPE FUNCTIONS (matrix B): C

Page 116: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 44

Y3(I)=E2X(I)*X31(I)+E2Y(I)*Y31(I)+E2Z(I)*Z31(I) X3(I)=E1X(I)*X31(I)+E1Y(I)*Y31(I)+E1Z(I)*Z31(I) X2(I)=E1X(I)*X21(I)+E1Y(I)*Y21(I)+E1Z(I)*Z21(I) C C AREA(I) = X2(I)*Y3(I)*0.5 AREA(I) = LE3(I)/2 C PX1(I) = -Y3(I)/(2*AREA(I)) PY1(I) = (X3(I)-X2(I))/(2*AREA(I)) PX2(I) = Y3(I)/(2*AREA(I)) PY2(I) = -X3(I)/(2*AREA(I)) PY3(I) = X3(I)/(2*AREA(I)) C C======================================================================= C STRAIN RATE CALCULATION (p108-109 and p140 Theory manual) C======================================================================= C C------------------------------------------------ C MEMBRANE STRAIN RATE: exx, eyy, exy (e=Bv) C------------------------------------------------ C C -> Element degeneration: VX4(I)= VX1(I) VY4(I)= VY1(I) VZ4(I)= VZ1(I) VX5(I)= VX1(I) VY5(I)= VY1(I) VZ5(I)= VZ1(I) VX6(I)= VX2(I) VY6(I)= VY2(I) VZ6(I)= VZ2(I) VX7(I)= VX3(I) VY7(I)= VY3(I) VZ7(I)= VZ3(I) VX8(I)= VX1(I) VY8(I)= VY1(I) VZ8(I)= VZ1(I) C C -> Velocity field in local frame: VXE1(I)=E1X(I)*VX1(I)+E1Y(I)*VY1(I)+E1Z(I)*VZ1(I) VXE2(I)=E1X(I)*VX2(I)+E1Y(I)*VY2(I)+E1Z(I)*VZ2(I) VXE3(I)=E1X(I)*VX3(I)+E1Y(I)*VY3(I)+E1Z(I)*VZ3(I) C VYE1(I)=E2X(I)*VX1(I)+E2Y(I)*VY1(I)+E2Z(I)*VZ1(I) VYE2(I)=E2X(I)*VX2(I)+E2Y(I)*VY2(I)+E2Z(I)*VZ2(I) VYE3(I)=E2X(I)*VX3(I)+E2Y(I)*VY3(I)+E2Z(I)*VZ3(I) C VZE1(I)=E3X(I)*VX1(I)+E3Y(I)*VY1(I)+E3Z(I)*VZ1(I) VZE2(I)=E3X(I)*VX2(I)+E3Y(I)*VY2(I)+E3Z(I)*VZ2(I) VZE3(I)=E3X(I)*VX3(I)+E3Y(I)*VY3(I)+E3Z(I)*VZ3(I) C C -> Membrane strain rate in local frame: EXX(I)=PX1(I)*VXE1(I) + PX2(I)*VXE2(I) EYY(I)=PY1(I)*VYE1(I) + PY2(I)*VYE2(I) EXY(I)=PY1(I)*VXE1(I) + PX1(I)*VYE1(I) + PY2(I)*VXE2(I) . + PX2(I)*VYE2(I) C C------------------------------------------------ C BENDING STRAIN RATE: kx, ky, 2kxy, 2ezx, 2eyz

Page 117: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 45

C------------------------------------------------ C C -> Element degeneration: VRX4(I)= VRX1(I) VRY4(I)= VRY1(I) VRZ4(I)= VRZ1(I) VRX5(I)= VRX1(I) VRY5(I)= VRY1(I) VRZ5(I)= VRZ1(I) VRX6(I)= VRX2(I) VRY6(I)= VRY2(I) VRZ6(I)= VRZ2(I) VRX7(I)= VRX3(I) VRY7(I)= VRY3(I) VRZ7(I)= VRZ3(I) VRX8(I)= VRX1(I) VRY8(I)= VRY1(I) VRZ8(I)= VRZ1(I) C C -> Rotational velocities in local frame: VRXE1(I)=E1X(I)*VRX1(I)+E1Y(I)*VRY1(I)+E1Z(I)*VRZ1(I) VRYE1(I)=E2X(I)*VRX1(I)+E2Y(I)*VRY1(I)+E2Z(I)*VRZ1(I) VRYE2(I)=E2X(I)*VRX2(I)+E2Y(I)*VRY2(I)+E2Z(I)*VRZ2(I) VRXE2(I)=E1X(I)*VRX2(I)+E1Y(I)*VRY2(I)+E1Z(I)*VRZ2(I) VRXE3(I)=E1X(I)*VRX3(I)+E1Y(I)*VRY3(I)+E1Z(I)*VRZ3(I) VRYE3(I)=E2X(I)*VRX3(I)+E2Y(I)*VRY3(I)+E2Z(I)*VRZ3(I) C C -> Bending strain rate in local frame: KXX(I)=PX1(I)*VRYE1(I) + PX2(I)*VRYE2(I) KYY(I)=-PY1(I)*VRXE1(I) - PY2(I)*VRXE2(I) KXY(I)=PY1(I)*VRYE1(I) - PX1(I)*VRXE1(I) + PY2(I)*VRYE2(I) . - PX2(I)*VRXE2(I) C EXZ(I) = (VRYE1(I)+VRYE2(I)+VRYE3(I))/3 . + PX1(I)*VZE1(I) + PX2(I)*VZE2(I) EYZ(I) = (VRX1(I)+VRXE2(I)+VRXE3(I))/3 . + PY1(I)*VZE1(I) + PY2(I)*VZE2(I) C C======================================================================= C STRAIN INCREMENT COMPUTATION C======================================================================= C DEPSXX(I) = EXX(I) * TIMESTEP DEPSYY(I) = EYY(I) * TIMESTEP DEPSXY(I) = EXY(I) * TIMESTEP DEPSYZ(I) = EYZ(I) * TIMESTEP DEPSZX(I) = EXZ(I) * TIMESTEP C C======================================================================= C STRESSES from material subroutine SIGEPS29 C======================================================================= C C Stresses initialization: IF (TIME.EQ.0.0) THEN SIGOXX(I) = 0 SIGOYY(I) = 0 SIGOXY(I) = 0 SIGOYZ(I) = 0 SIGOZX(I) = 0

Page 118: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 46

UVAR(I,1) = 0 UVAR(I,2) = 0 UVAR(I,3) = 0 UVAR(I,4) = 0 UVAR(I,5) = 0 ELSE SIGOXX(I) = UVAR(I,1) SIGOYY(I) = UVAR(I,2) SIGOXY(I) = UVAR(I,3) SIGOYZ(I) = UVAR(I,4) SIGOZX(I) = UVAR(I,5) ENDIF SIGNXX(I) = 0 SIGNYY(I) = 0 SIGNXY(I) = 0 SIGNYZ(I) = 0 SIGNZX(I) = 0 C C Sigeps29 variables initialization: X = 0 NUPARAM = 5 IMAT = GET_U_PNU(1,IPROP,KMAT) RHO0 = GET_U_MAT(0,IMAT) UPARAM(1) = GET_U_MAT(1,IMAT) UPARAM(2) = GET_U_MAT(2,IMAT) UPARAM(3) = GET_U_MAT(3,IMAT) C C----------------------------------------------------------------------- ENDDO C----------------------------------------------------------------------- C C Material SUBROUTINE SIGEPS29 call: C (X = not used variables -> set to zero) C CALL SIGEPS29( 1 NEL ,NUPARAM,X ,X ,X ,X , 2 X ,TIME ,TIMESTEP,UPARAM ,RHO0 ,X , 3 X ,X , 4 X ,X ,X ,X ,X ,X , 5 DEPSXX ,DEPSYY ,DEPSZZ ,DEPSXY ,DEPSYZ ,DEPSZX , 6 X ,X ,X ,X ,X ,X , 7 SIGOXX ,SIGOYY ,SIGOZZ ,SIGOXY ,SIGOYZ ,SIGOZX , 8 SIGNXX ,SIGNYY ,SIGNZZ ,SIGNXY ,SIGNYZ ,SIGNZX , 9 X ,X ,X ,X ,X ,X , A X ,X ,X ,X ) C C----------------------------------------------------------------------- DO I=1,NEL C----------------------------------------------------------------------- C C Updated "Old stresses" used in material law 29 (stored in user variables): UVAR(I,1) = SIGNXX(I) UVAR(I,2) = SIGNYY(I) UVAR(I,3) = SIGNXY(I) UVAR(I,4) = SIGNYZ(I) UVAR(I,5) = SIGNZX(I) C C Von Mises stress equivalent: UVAR(I,6) = SQRT(SIGNXX(I)*SIGNXX(I)

Page 119: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 47

. +SIGNYY(I)*SIGNYY(I) . -SIGNXX(I)*SIGNYY(I) . +3.*SIGNXY(I)*SIGNXY(I)) C C======================================================================= C INTERNAL FORCES COMPUTATION C======================================================================= C C Element without hourglass C See the Theory manual p140 for the matrix of shape function gradients C C------------------------------------------------ C -> Thickness change computation: C------------------------------------------------ C Functions to returns values stored in property and material: IMAT = GET_U_PNU(1,IPROP,KMAT) NU = GET_U_MAT(5,IMAT) THK0 = GET_U_GEO(1,IPROP) NNU = NU/(1.-NU) C C Increment of normal strain: DEZZ = -(DEPSXX(I)+DEPSYY(I))*NNU C C Thickness change calculation (using a user variable): IF (TIME.EQ.0.0) THEN UVAR(I,7) = THK0 ELSE UVAR(I,7) = UVAR(I,7) + DEZZ*UVAR(I,7) ENDIF THK(I) = UVAR(I,7) C C------------------------------------------------ C -> Global forces and moments computation: C------------------------------------------------ FOR(1,I) = THK(I) * SIGNXX(I) FOR(2,I) = THK(I) * SIGNYY(I) FOR(3,I) = THK(I) * SIGNXY(I) FOR(4,I) = THK(I) * SIGNYZ(I) FOR(5,I) = THK(I) * SIGNZX(I) MOM(1,I) = THK(I)*THK(I)*SIGNXX(I)/3 MOM(2,I) = THK(I)*THK(I)*SIGNYY(I)/3 MOM(3,I) = THK(I)*THK(I)*SIGNXY(I)/3 C C------------------------------------------------ C -> Nodal force vectors computation (Fint=Bt.SIG.V) C------------------------------------------------ C C F = stress * volume : F1(I) = FOR(1,I)*AREA(I) F2(I) = FOR(2,I)*AREA(I) F3(I) = FOR(3,I)*AREA(I) F4(I) = FOR(4,I)*AREA(I) F5(I) = FOR(5,I)*AREA(I) C C Nodal force = Matrix of shape function gradients * F : C C 1) Expressed in local frame: C C -> Force vector components - node 1:

Page 120: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 48

FX1(I)= F1(I)*PX1(I)+F3(I)*PY1(I) FY1(I)= F2(I)*PY1(I)+F3(I)*PX1(I) FZ1(I)= F5(I)*PX1(I)+F4(I)*PY1(I) C -> Force vector components - node 2: FX2(I)= F1(I)*PX2(I)+F3(I)*PY2(I) FY2(I)= F2(I)*PY2(I)+F3(I)*PX2(I) FZ2(I)= F5(I)*PX2(I)+F4(I)*PY2(I) C C 2) Expressed in global frame: C C -> Force vector components - node 1: FX11(I)=E1X(I)*FX1(I)+E2X(I)*FY1(I)+E3X(I)*FZ1(I) FY11(I)=E1Y(I)*FX1(I)+E2Y(I)*FY1(I)+E3Y(I)*FZ1(I) FZ11(I)=E1Z(I)*FX1(I)+E2Z(I)*FY1(I)+E3Z(I)*FZ1(I) FX1(I)= -FX11(I) FY1(I)= -FY11(I) FZ1(I)= -FZ11(I) C -> Force vector components - node 2: FX22(I)=E1X(I)*FX2(I)+E2X(I)*FY2(I)+E3X(I)*FZ2(I) FY22(I)=E1Y(I)*FX2(I)+E2Y(I)*FY2(I)+E3Y(I)*FZ2(I) FZ22(I)=E1Z(I)*FX2(I)+E2Z(I)*FY2(I)+E3Z(I)*FZ2(I) FX2(I)= -FX22(I) FY2(I)= -FY22(I) FZ2(I)= -FZ22(I) C -> Force vector components - node 3: FX3(I) = - FX1(I) - FX2(I) FY3(I) = - FY1(I) - FY2(I) FZ3(I) = - FZ1(I) - FZ2(I) C -> Force vector components - nodes >3: FX4(I) = 0 FX5(I) = 0 FX6(I) = 0 FX7(I) = 0 FX8(I) = 0 FY4(I) = 0 FY5(I) = 0 FY6(I) = 0 FY7(I) = 0 FY8(I) = 0 FZ4(I) = 0 FZ5(I) = 0 FZ6(I) = 0 FZ7(I) = 0 FZ8(I) = 0 C C------------------------------------------------ C -> Nodal moment computation C------------------------------------------------ TH2 = THK(I)*THK(I) C M1 = MOM(1,I)*TH2 M2 = MOM(2,I)*TH2 M3 = MOM(3,I)*TH2 M4 = F4(I) * AREA(I) M5 = F5(I) * AREA(I) C M4 = F4 / 3 C M5 = F5 / 3 C C 1) Nodal moment expressed in local frame:

Page 121: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 49

C C -> Moment vector components - node 1: MX1(I) = -M2 * PY1(I) - M3 * PX1(I) MY1(I) = M1 * PX1(I) + M3 * PY1(I) C -> Moment vector components - node 2: MX2(I) = -M2 * PY2(I) - M3 * PX2(I) MY2(I) = M1 * PX2(I) + M3 * PY2(I) C C 2) Nodal moment expressed in global frame: C C -> Moment vector components - node 1: MX11(I)=E1X(I)*MX1(I)+E2X(I)*MY1(I) MY11(I)=E1Y(I)*MX1(I)+E2Y(I)*MY1(I) MZ1(I)=E1Z(I)*MX1(I)+E2Z(I)*MY1(I) MX1(I)=MX11(I) MY1(I)=MY11(I) C -> Moment vector components - node 2: MX22(I)=E1X(I)*MX2(I)+E2X(I)*MY2(I) MY22(I)=E1Y(I)*MX2(I)+E2Y(I)*MY2(I) MZ2(I)=E1Z(I)*MX2(I)+E2Z(I)*MY2(I) MX2(I)=MX22(I) MY2(I)=MY22(I) C -> Moment vector components - node 3: MX3(I) = -MX1(I) - MX2(I) MY3(I) = -MY1(I) - MY2(I) MZ3(I) = -MZ1(I) - MZ2(I) C -> Moment vector components - nodes >3: MX4(I) = 0 MX5(I) = 0 MX6(I) = 0 MX7(I) = 0 MX8(I) = 0 MY4(I) = 0 MY5(I) = 0 MY6(I) = 0 MY7(I) = 0 MY8(I) = 0 MZ4(I) = 0 MZ5(I) = 0 MZ6(I) = 0 MZ7(I) = 0 MZ8(I) = 0 C C======================================================================= C TIME STEP C======================================================================= C C Element volume: AREA(I) = LE3(I)/2 VOL(I) = AREA(I)*THK(I) C C Characteristic length ALDT: AL1 = X2(I)*X2(I) AL2 = (X3(I)-X2(I))*(X3(I)-X2(I))+(Y3(I)*Y3(I)) AL3 = X3(I)*X3(I)+Y3(I)*Y3(I) ALMAX(I) = MAX(AL1,AL2,AL3) ALMAX(I) = SQRT(ALMAX(I)) ALDT(I)= 2*AREA(I) / ALMAX(I) C

Page 122: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 50

E = GET_U_MAT(4,IMAT) C C Parameters used in time step computation: STIFM(I) = 2*VOL(I) * E / (3*ALDT(I)*ALDT(I)) STIFR(I) = 1000 C STIFR(I) = STIFM(I) * (THK(I) * THK(I) / 12 + AREA(I) /9.) C . + 0.5 * SHF(I) * AREA(I) * G/A11(I)) VISCM(I) = 0 VISCR(I) = 0 C C----------------------------------------------------------------------- ENDDO C----------------------------------------------------------------------- C C======================================================================= C SAVE IN ANIMATIONS: Stresses, Von Mises stress and thickness are saved in C anim file as USERi keywords from user's variables UVAR(I,i). C C -> Stress X: User Var 1 /ANIM/ELEM/USER1 <-> UVAR(I,1) C -> Stress Y: User Var 2 /ANIM/ELEM/USER2 <-> UVAR(I,2) C -> Stress XY: User Var 3 /ANIM/ELEM/USER3 <-> UVAR(I,3) C -> Stress YZ: User Var 4 /ANIM/ELEM/USER4 <-> UVAR(I,4) C -> Stress ZX: User Var 5 /ANIM/ELEM/USER5 <-> UVAR(I,5) C -> Von Mises: User Var 6 /ANIM/ELEM/USER6 <-> UVAR(I,6) C -> Thickness: User Var 7 /ANIM/ELEM/USER7 <-> UVAR(I,7) C C======================================================================= C CHECK (first element): DO I=1,NEL print *, '******** ELEMENT',I,'********' print *, ' --> Results at',TIME ,'ms' print *, '( time step =',TIMESTEP,')' print *, 'volume =',VOL(I) print *, 'area =',AREA(I) print *, 'thickness =',THK(I) print *, 'FX1 =',FX1(I) print *, 'FX2 =',FX2(I) print *, 'FX3 =',FX3(I) print *, 'FY1 =',FY1(I) print *, 'FY2 =',FY2(I) print *, 'FY3 =',FY3(I) ENDDO C----------------------------------------------------------------------- C RETURN END

4.8.6 Engine Material User Subroutine SIGEPS29 C====================================== C ELASTIC LAW FOR SOLID ELEMENTS C Stresses computation C====================================== SUBROUTINE SIGEPS29 ( 1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC ,NPF , 2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 ,RHO , 3 VOLUME ,EINT , 4 EPSPXX ,EPSPYY ,EPSPZZ ,EPSPXY ,EPSPYZ ,EPSPZX , 5 DEPSXX ,DEPSYY ,DEPSZZ ,DEPSXY ,DEPSYZ ,DEPSZX ,

Page 123: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 51

6 EPSXX ,EPSYY ,EPSZZ ,EPSXY ,EPSYZ ,EPSZX , 7 SIGOXX ,SIGOYY ,SIGOZZ ,SIGOXY ,SIGOYZ ,SIGOZX , 8 SIGNXX ,SIGNYY ,SIGNZZ ,SIGNXY ,SIGNYZ ,SIGNZX , 9 SIGVXX ,SIGVYY ,SIGVZZ ,SIGVXY ,SIGVYZ ,SIGVZX , A SOUNDSP,VISCMAX,UVAR ,OFF ) C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- C IMPLICIT NONE C----------------------------------------------- C I N P U T A r g u m e n t s C----------------------------------------------- C INTEGER NEL, NUPARAM, NUVAR DOUBLE PRECISION TIME,TIMESTEP,UPARAM(NUPARAM), . RHO(NEL),RHO0(NEL),VOLUME(NEL),EINT(NEL), . EPSPXX(NEL),EPSPYY(NEL),EPSPZZ(NEL), . EPSPXY(NEL),EPSPYZ(NEL),EPSPZX(NEL), . DEPSXX(NEL),DEPSYY(NEL),DEPSZZ(NEL), . DEPSXY(NEL),DEPSYZ(NEL),DEPSZX(NEL), . EPSXX(NEL) ,EPSYY(NEL) ,EPSZZ(NEL) , . EPSXY(NEL) ,EPSYZ(NEL) ,EPSZX(NEL) , . SIGOXX(NEL),SIGOYY(NEL),SIGOZZ(NEL), . SIGOXY(NEL),SIGOYZ(NEL),SIGOZX(NEL) C----------------------------------------------- C O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION . SIGNXX(NEL),SIGNYY(NEL),SIGNZZ(NEL), . SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL), . SIGVXX(NEL),SIGVYY(NEL),SIGVZZ(NEL), . SIGVXY(NEL),SIGVYZ(NEL),SIGVZX(NEL), . SOUNDSP(NEL),VISCMAX(NEL) C----------------------------------------------- C I N P U T O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION UVAR(NEL,NUVAR), OFF(NEL) C----------------------------------------------- C VARIABLES FOR FUNCTION INTERPOLATION C----------------------------------------------- INTEGER NPF(*), NFUNC, IFUNC(NFUNC) DOUBLE PRECISION FINTER ,TF(*) EXTERNAL FINTER C Y = FINTER(IFUNC(J),X,NPF,TF,DYDX) C Y : y = f(x) C X : x C DYDX : f'(x) = dy/dx C IFUNC(J): FUNCTION INDEX C J : FIRST(J=1), SECOND(J=2) C NPF,TF : FUNCTION PARAMETER C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER I,J DOUBLE PRECISION A1,A2,G C . SIGNXX(NEL),SIGNYY(NEL),SIGNZZ(NEL), C . SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL) C C-----------------------------------------------

Page 124: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER PROPERTY ELEMENTS

JAN 2019 52

C ELASTIC SOLUTION C----------------------------------------------- DO I=1,NEL C A1 = UPARAM(1) A2 = UPARAM(2) G = UPARAM(3) C SIGNXX(I)=SIGOXX(I)+A1*DEPSXX(I)+A2*DEPSYY(I) SIGNYY(I)=SIGOYY(I)+A2*DEPSXX(I)+A1*DEPSYY(I) SIGNXY(I)=SIGOXY(I)+G *DEPSXY(I) SIGNYZ(I)=SIGOYZ(I)+G *DEPSYZ(I) SIGNZX(I)=SIGOZX(I)+G *DEPSZX(I) C SOUNDSP(I) = SQRT(A1/RHO0(I)) VISCMAX(I) = 0. C ENDDO C C----------------------------------------------- RETURN END

Page 125: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 User Sensors Chapter 5

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 126: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 2

TABLE OF CONTENTS

5.0 User Sensors 3

5.1 Starter Subroutine LECSEN_USRn 4

5.2 Engine Subroutine USER_SENSn 4

5.3 Functions for User Sensors 5

5.4 Example of a User Sensor 7

Page 127: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 3

5.0 User Sensors In Altair Radioss, up to three types of user sensors can be defined.

Two subroutines are needed to define a new sensor: one must be linked with Altair Radioss Starter and the other must be linked with Altair Radioss Engine.

The Starter subroutines are called LECSEN_USR1, LECSEN_USR2, or LECSEN_USR3. They are used to read sensor data and to initialize parameters.

The Engine subroutines are called USER_SENS1, USER_SENS2 or USER_SENS3 and they perform a user-defined action.

The only argument passed to the user routines in Altair Radioss Engine is the sensor identifier.

User sensors can be used in Altair Radioss in the same way as standard sensors. They may activate or deactivate other sensors, airbags, springs, boundary conditions, imposed velocities/displacements, concentrated loads, etc. They specify the user-defined activation condition and sensor action. User sensor may retrieve Altair Radioss variables using special access functions. All data may be stored in sensor buffer for user-defined processing or for passing information to other parts of user code.

Page 128: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 4

5.1 Starter Subroutine LECSEN_USRn

This subroutine read the user’s sensor input data. The number of cards and their formats are free. The argument list of LECSEN_USRn and its individual arguments and descriptions are as follows:

C-------------------------------------------------------------------------

SUBROUTINE LECSEN_USRn(IIN, IOUT)

C-------------------------------------------------------------------------

Argument Format Description IIN Integer read only scalar Input file unit (Starter input file) on which the data are read.

IOUT Integer read only scalar Output file unit (Starter listing file).

5.1.1 Storage Functions for Sensor Parameters (Starter Only) To store data in a sensor’s parameters buffers, use the following functions:

integer ierr = SET_U_SENS_IPAR(integer isens, integer sens_index, integer var)

integer ierr = SET_U_SENS_FPAR(integer isens, integer sens_index, float var)

These functions store an integer or float variable in respective buffers, at a position indicated by sens_index, which is independent in each buffer. The length of sensor parameter buffers is limited to 12 integer variables and 20 float variables.

5.2 Engine Subroutine USER_SENSn

This subroutine performs a user-defined action with a given sensor. C-------------------------------------------------------------------------

SUBROUTINE USER_SENS1(SENS_ID)

C-------------------------------------------------------------------------

Page 129: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 5

5.3 Functions for User Sensors 5.3.1 Restore Functions for Sensor Parameters

You can access the integer and float sensor parameter buffers using two functions, similar to those used in the Starter subroutine:

integer ierr = GET_U_SENS_IPAR(integer isens, sens_index, integer var)

integer ierr = GET_U_SENS_FPAR(integer isens, sens_index, float var)

The internal Altair Radioss sensor numbers isens are not sensor identifiers that can be used to access the parameter buffers. The additional function that translates a sensor ID into an internal sensor number is below.

integer isens = GET_U_NUMSENS(integer sens_id)

The function returns 0 if the sensor ID is not found in the Altair Radioss database. The value can be stored in a local variable for multiple access to parameter buffers, or call the buffer access functions directly with the sensor ID, using the GET_U_NUMSENS function:

ierr = GET_U_SENS_IPAR(GET_U_NUMSENS(sens_id),sens_index,var)

5.3.2 Read/Write Functions of Working Array Buffers

To store and read current information, use a user array (float). Its length is limited to 100 variables and can be accessed with the following functions.

integer ierr =SET_U_SENS_VALUE (integer isens,integer sens_index,float var)

integer ierr =GET_U_SENS_VALUE(integer isens,integer sens_index,float var)

The user variables are stored and retrieved from a buffer of sensor isens, using buffer index sens_index. Use the function inverse GET_U_NUMSENS to translate a sensor number into its ID, or if a sensor identifier is needed.

integer isens = GET_U_SENS_ID(integer sens_id)

5.3.3 Setting and Checking Global Activation Flags

The same mechanisms used to activate and deactivate standard Altair Radioss sensors can be used with user sensors. This way, they can activate springs, interfaces, rigid walls, or other sensors using a specific user condition. Additionally, the user sensor may form part of a hierarchy of Altair Radioss sensors (ex: logical sensors) or use standard sensors as input.

Page 130: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 6

Use the following functions with standard activation flags.

integer ierr = SET_U_SENS_ACTI(integer isens)

This function activates user sensors isens. The activation time is set as current time. The sensor activation will actually be delayed one cycle to preserve a hierarchical sensor activation order in parallel processing.

float dtime = GET_U_SENS_ACTI(integer isens)

This function returns a time delay sine the first activation of sensor number isens. If dtime > 0, the sensor is actif. Use this to check the state of standard sensors or other user sensors that were activated by GET_U_SENS_ACTI. User sensors may activate Altair Radioss variables only by specialized functions, which include:

o Access functions to Altair Radioss time and cycle variables.

float Time = GET_U_TIME() Returns the actual simulation time.

integer Ncyc = GET_U_CYCLE() Returns the actual cycle number.

o Accelerator access functions.

integer ierr = GET_U_ACCEL(integer iacc, float ax, float ay, float az)

Provides access to Altair Radioss accelerometer values.

Note: ax, ay, az are acceleration components.

iacc is the accelerometer number.

integer iacc = GET_U_NUMACC(integer acc_id)

Restores accelerometer number from its identifier.

o Nodal value access functions. These allow access to node coordinates (x, y, z); node displacement componentss (dx, dy, dz); node velocity components (vx, yx, vx); and node acceleration components (ax, ay, az). All use an internal node number (not a node identifier) as an argument.

integer ierr = GET_U_NOD_X(integer inode, float x, float y, float z)

integer ierr = GET_U_NOD_D(integer inode, float dx, float dy, float dz)

integer ierr = GET_U_NOD_V(integer inode, float vx, float vy, float vz)

integer ierr = GET_U_NOD_A(integer inode, float ax, float ay, float az)

Additionally, the function below restores an internal number inode from a node identifier node_id. Call this function once and store the result in a local variable.

integer inode = GET_U_NUMNOD(node_id)

Page 131: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 7

5.4 Example of a User Sensor A sensor stores a maximum Von Mises stress value (F). CR =1 sensor parameter (read in Starter by sensor user’s subroutine LECSEN_USRm) F = 1 sensor variable (written to sensor buffer by material user’s subroutine SIGESPnn) Sensor is activated in F > CR. The activation time of the sensor is displayed. Mesh example (4-node-shell element) Loading case: imposed velocities applied on two nodes. 5.4.1 User’s Input Data (/SENSOR/USERm_option)

[…] #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| #- 4. MATERIALS: #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| /MAT/USER1/1 User’s elastic material law # Init. dens. Ref. dens. 0.00785 0 # E Nu 3102.75 0.3 #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| #- 15. SENSOR: #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| /SENSOR/USER1/1 User's sensor 1 # Tdelay 0.0 # CR 5.1 #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| […]

5.4.2 Starter Sensor User’s Subroutine LECSEN_USR1 C========================================================== C This subroutine reads the user sensor parameters C========================================================== SUBROUTINE LECSEN_USR1(IIN,IOUT) C C---------------------------------------------------------- C D u m m y A r g u m e n t s C---------------------------------------------------------- INTEGER IIN, IOUT INTEGER SET_U_SENS_IPAR DOUBLE PRECISION SET_U_SENS_FPAR EXTERNAL SET_U_SENS_IPAR,SET_U_SENS_FPAR C C---------------------------------------------------------- C L o c a l V a r i a b l e s C---------------------------------------------------------- INTEGER IERROR DOUBLE PRECISION CR C

Page 132: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 8

C---------------------------------------------------------- C R e a d U s e r' s P a r a m e t e r s C---------------------------------------------------------- READ(IIN,ERR=999,FMT='(F20.0)') CR C C---------------------------------------------------------- C W r i t e in S e n s o r B u f f e r C---------------------------------------------------------- C Write float sensor parameter CR in sensor buffer 1: IERROR = SET_U_SENS_FPAR(1,CR) C C---------------------------------------------------------- C O u t p u t P r i n t C---------------------------------------------------------- WRITE(IOUT,1000) CR C RETURN C 999 CONTINUE WRITE(IOUT,*)' **ERROR IN USER SENSOR INPUT' C 1000 FORMAT(/' CHARGE CRITIQUE. . . . . . . . . . . ',E12.4/) C C---------------------------------------------------------- RETURN END

5.4.3 Starter Material User’s Subroutine LECm29 C========================================================== C This subroutine read the user material parameters. C========================================================== SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, . NUVAR,IFUNC,MAXFUNC,NFUNC ,PARMAT ) C C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- IMPLICIT NONE C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),PARMAT(*) C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION E,NU,A11,A12,A44 C C----------------------------------------------- C INPUT FILE READING (USER DATA) C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU A11 = E * (1.-NU) / (1.+NU) / (1.-2.*NU) A12 = E * NU / (1.+NU) / (1.-2.*NU) A44 = E / 2. / (1.+NU)

Page 133: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 9

C C----------------------------------------------- C DATA CHECKING C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF NUPARAM = 6 IF(NUPARAM.GT.MAXUPARAM)THEN WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPARAM' WRITE(IOUT,*)' NUPARAM =',NUPARAM, . ' MAXUPARAM =',MAXUPARAM ELSE C----------------------------------------------- C USER MATERIAL PARAMETERS DEFINITION C----------------------------------------------- C used in sigeps29c (shell 3n,4n) UPARAM(1) = E/(1.-NU*NU) UPARAM(2) = NU*E/(1.-NU*NU) UPARAM(3) = 0.5*E/(1.+NU) ENDIF C C------------------------------------------------- C NUMBER OF USER ELEMENT VARIABLES AND CURVES C------------------------------------------------- NUVAR = 0 NFUNC = 0 C C----------------------------------------------- C USED FOR SHELLS C----------------------------------------------- PARMAT(2) = E PARMAT(3) = NU C C------------------------------------------------- C OUTPUT FILE PRINT C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU C 1000 FORMAT( & 5X,' ELASTIC USER LAW 29',/, & 5X,' ------------------ ',//) 1100 FORMAT( & 5X,'E . . . . . . . . . . . . . . . . . . .=',E12.4/ & 5X,'NU. . . . . . . . . . . . . . . . . . .=',E12.4//) C C------------------------------------------------- RETURN END

Page 134: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 10

5.4.4 Engine Sensor User’s Subroutine USER_SENSm C========================================================== C This subroutine activates sensor C========================================================== SUBROUTINE USER_SENS1(ID) C C---------------------------------------------------------- C L o c a l V a r i a b l e s C---------------------------------------------------------- INTEGER IERR,NSENS DOUBLE PRECISION CR,F,DTIME,TIME,ACTI C C---------------------------------------------------------- C R e s t o r e F u n c t i o n s C---------------------------------------------------------- C Get the sensor number: NSENS = GET_U_NUMSENS(ID) C C Retrieve a float sensor parameter from sensor buffer 1: IERR = GET_U_SENS_FPAR(NSENS,1,CR) C C Read material variable F (see SIGEPS29) from sensor buffer 1: IERR = GET_U_SENS_VALUE(NSENS,1,F) C C---------------------------------------------------------- C S e n s o r A c t i v a t i o n C---------------------------------------------------------- IF (F.GT.CR) THEN C Activate sensor number nsens: IERR = SET_U_SENS_ACTI(NSENS) C Time delay since the first activation of sensor number nsens: DTIME = GET_U_SENS_ACTI(NSENS) C Current time: TIME = GET_U_TIME() C Activation time: ACTI = TIME - DTIME C C---------------------------------------------------------- C C h e c k S e n s o r S t a t e C---------------------------------------------------------- IF (TIME.EQ.ACTI) THEN print *,' --> Activation time of sensor id',NSENS,'=',ACTI print *,' [Critical Von Mises value reached =',F,'MPa]' ENDIF C C---------------------------------------------------------- ENDIF C---------------------------------------------------------- RETURN END

Page 135: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 11

5.4.5 Engine Material User’s Subroutine SIGEP29C for Shell Elements C========================================================== C This subroutine computes elastic stresses C A variable is stored in sensor buffer C========================================================== SUBROUTINE SIGEPS29C( 1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC , 2 NPF ,NPT ,IPT ,IFLAG , 2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 , 3 AREA ,EINT ,THKLY , 4 EPSPXX ,EPSPYY ,EPSPXY ,EPSPYZ ,EPSPZX , 5 DEPSXX ,DEPSYY ,DEPSXY ,DEPSYZ ,DEPSZX , 6 EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX , 7 SIGOXX ,SIGOYY ,SIGOXY ,SIGOYZ ,SIGOZX , 8 SIGNXX ,SIGNYY ,SIGNXY ,SIGNYZ ,SIGNZX , 9 SIGVXX ,SIGVYY ,SIGVXY ,SIGVYZ ,SIGVZX , A SOUNDSP,VISCMAX,THK ,PLA ,UVAR , B OFF ,NGL ,SHF) C C----------------------------------------------- C I m p l i c i t T y p e s C----------------------------------------------- IMPLICIT NONE C----------------------------------------------- C I N P U T A r g u m e n t s C----------------------------------------------- C INTEGER NEL, NUPARAM, NUVAR, NPT, IPT,IFLAG(*), . NGL(NEL) DOUBLE PRECISION TIME,TIMESTEP,UPARAM(NUPARAM), . AREA(NEL),RHO0(NEL),EINT(2,NEL), . THKLY(NEL),PLA(NEL),SHF(NEL), . EPSPXX(NEL),EPSPYY(NEL), . EPSPXY(NEL),EPSPYZ(NEL),EPSPZX(NEL), . DEPSXX(NEL),DEPSYY(NEL), . DEPSXY(NEL),DEPSYZ(NEL),DEPSZX(NEL), . EPSXX(NEL) ,EPSYY(NEL) , . EPSXY(NEL) ,EPSYZ(NEL) ,EPSZX(NEL) , . SIGOXX(NEL),SIGOYY(NEL), . SIGOXY(NEL),SIGOYZ(NEL),SIGOZX(NEL) C----------------------------------------------- C VARIABLES FOR FUNCTION INTERPOLATION C----------------------------------------------- INTEGER NPF(*), NFUNC, IFUNC(NFUNC) DOUBLE PRECISION FINTER ,TF(*) EXTERNAL FINTER C Y = FINTER(IFUNC(J),X,NPF,TF,DYDX) C Y : y = f(x) C X : x C DYDX : f'(x) = dy/dx C IFUNC(J): FUNCTION INDEX C J : FIRST(J=1), SECOND(J=2) .. C NPF,TF : FUNCTION PARAMETER

Page 136: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 12

C----------------------------------------------- C O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION . SIGNXX(NEL),SIGNYY(NEL), . SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL), . SIGVXX(NEL),SIGVYY(NEL), . SIGVXY(NEL),SIGVYZ(NEL),SIGVZX(NEL), . SOUNDSP(NEL),VISCMAX(NEL) C----------------------------------------------- C I N P U T O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION UVAR(NEL,NUVAR), OFF(NEL),THK(NEL) C C---------------------------------------------------------- C F u n c t i o n F o r U s e r' s S e n s o r C---------------------------------------------------------- INTEGER ID INTEGER GET_U_NUMSENS DOUBLE PRECISION SET_U_SENS_VALUE EXTERNAL SET_U_SENS_VALUE,GET_U_NUMSENS C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER I,IERR DOUBLE PRECISION A1,A2,G,F C C----------------------------------------------- C ELASTIC SOLUTION C----------------------------------------------- DO I=1,NEL C A1 = UPARAM(1) A2 = UPARAM(2) G = UPARAM(3) C SIGNXX(I)=SIGOXX(I)+A1*DEPSXX(I)+A2*DEPSYY(I) SIGNYY(I)=SIGOYY(I)+A2*DEPSXX(I)+A1*DEPSYY(I) SIGNXY(I)=SIGOXY(I)+G *DEPSXY(I) SIGNYZ(I)=SIGOYZ(I)+G *DEPSYZ(I) SIGNZX(I)=SIGOZX(I)+G *DEPSZX(I) C SOUNDSP(I) = SQRT(A1/RHO0(I)) VISCMAX(I) = 0. C C Von Mises stress (used in user's subroutine USER_SEN1): F = SQRT(SIGNXX(I)*SIGNXX(I) . +SIGNYY(I)*SIGNYY(I) . -SIGNXX(I)*SIGNYY(I) . +3.*SIGNXY(I)*SIGNXY(I)) C C----------------------------------------------- C S t o r e i n S e n s o r B u f f e r C-----------------------------------------------

Page 137: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER SENSORS

JAN 2019 13

C Write the variable F in the sensor buffer number 1: IERR = SET_U_SENS_VALUE(1,1,F) C ENDDO C----------------------------------------------- RETURN END

Page 138: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 User Failure Models

Chapter 6

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA

Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 139: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 2

TABLE OF CONTENTS 6.0 User Failure Models 3

6.1 Starter Subroutine LECRnn 4

6.2 Engine Subroutine for Solid Elements (FnnLAW) 5

6.3 Engine Subroutine for Shell Elements (FnnLAWC) 7

6.4 Example Subroutine of User Failure Model for Shell and Solid Elements for Altair Radioss Starter

9

Page 140: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 3

6.0 USER FAILURE MODELS In Altair Radioss up to 3 user’s failure models (USER1, USER2, and USER3) can be defined for shell and solid element. User’s failure model for beam and truss are not yet available.

To define a user’s failure model, two or three subroutines for each failure model has to be provided. One subroutine must be linked with Altair Radioss Starter and two subroutines (one for shell, and one for solid) linked with Altair Radioss Engine.

The Starter subroutine is called lecr04, lecr05, and lecr06 and is used to read the failure data model and to initialize failure material parameters.

The Engine subroutine for solids is called f04law, f05law, and f06 law and is used to compute failure criteria at an integration point. The corresponding shell subroutine is called f04lawc, f05lawc, and f06lawc.

Note: All communication between Altair Radioss and the subroutines takes place within the argument list.

Page 141: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 4

6.1 Starter Subroutine LECRnn This subroutine reads user failure model input data. The number of specific failure model cards and their formats are free.

The argument list of LECRnn and its individual arguments and descriptions are as follows:

C----------------------------------------------------------------------------

SUBROUTINE LECRnn (IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, NUVAR,IFUNC,MAXFUNC,NFUNC)

C----------------------------------------------------------------------------

Argument Format Description IIN

Integer read only scalar Input file unit (ROOT_nnn0.rad) on which the data are read.

IOUT Integer read only format Output file unit (ROOT_nnn0.out).

UPARAM Float array Array with a size NUPARAM used to store failure material data.

MAXUPARAM Integer read only scalar Maximum possible size of UPARAM.

NUPARAM Integer scalar Effective size of UPARAM. (MAXUPARAM, NUPARAM, MAXUPARAM are set to 1000).

NUVAR Integer scalar Number of extra variables needed for each integration point of each elements.

IFUNC Integer array Array with a size of NFUNC containing the list of Altair Radioss functions used in failure model. The function numbers are stored in this array (not in UPARAM) due to a possible renumbering of the function’s numbers.

MAXFUNC Integer read only scalar Maximum possible size of IFUNC.

NFUNC Integer scalar Number of Altair Radioss functions.

Page 142: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 5

6.2 Engine Subroutine for Solid Elements (FnnLAW)

This subroutine calculates the criteria of failure model.

Use the float external function FINTER (shown below) to get the value Y of the function for the abscissa X.

Y=FINTER(IFUNC(I),X,NPF,TF,DYDX)

where: Variable Description

Y Interpolated value

X Abscissa value of the function

I The ith user’s function

DYDX Slope

NPF, TF Private function parameters

The argument list of FnnLAW is as follows: C----------------------------------------------------------------------------

SUBROUTINE FnnLAW (

1 NEL ,NUPARAM ,NUVAR ,NFUNC ,IFUNC ,

2 NPF ,TF ,TIME ,TIMESTEP ,UPARAM ,

3 NGL ,NOT_USE_I1 ,NOT_USE_I2 ,NOT_USE_I3 ,NOT_USE_I4,

4 EPSPXX ,EPSPYY ,EPSPZZ ,EPSPXY ,EPSPYZ ,EPSPZX ,

5 EPSXX ,EPSYY ,EPSZZ ,EPSXY ,EPSYZ ,EPSZX ,

6 SIGNXX ,SIGNYY ,SIGNZZ ,SIGNXY ,SIGNYZ ,SIGNZX ,

7 PLA ,DPLA ,EPSP ,UVAR ,OFF ,

8 DELTAX, VOLN, UELR, NOT_USED4 ,NOT_USED5 )

C----------------------------------------------------------------------------

Argument Format Description NEL Integer read only scalar Number of elements per group. In the Engine

subroutine, the element data are treated by groups for vectorization purposes.

NUPARAM Integer read only scalar Size of user parameter array.

NUVAR Integer read only scalar Number of user integration point element variables.

NFUNC Integer read only scalar Number of functions used for failure model materials.

IFUNC Integer array read only Array of size NFUNC containing function indexes.

NPF Integer array private data

Array used by FINTER (float external functions).

TF Float array private data Array used by FINTER (float external functions).

Page 143: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 6

Argument Format Description TIME Float read only Current time.

TIMESTEP Float read only Current time step.

UPARAM Float array read only User failure parameter array of size NUPARAM.

NGL Integer array read only Array of size NEL containing the external element number.

EPSPXX, EPSPYY, EPSPZZ, EPSPXY, EPSPYZ, ESPPZX

Float array read only Array of size NEL containing ε strain rates in directions XX, YY, and ZZ and γ̇ strain rates in directions XY, YZ, and ZX.

EPSXX, EPSYY, EPSZZ, EPSXY, EPSYZ, EPSZX

Float array read only Array of size NEL containing strain in directions XX, YY, and ZZ and strain rates in directions XY, YZ,

and ZX. SIGNXX, SIGNYY, SIGNZZ, SIGNXY, SIGNYZ, SIGNZX

Float array read write Array of size NEL containing stress in directions XX, YY, ZZ, XY, YZ, and ZX.

PLA Float array read only Array of size NEL containing equivalent plastic strain.

DPLA Float array read only Array of size NEL containing incremental equivalent plastic strain.

EPSP Float array read only Array of size NEL, equivalent of strain rate.

UVAR Float array read write Array of size NEL*NUVAR containing integration point element variables.

OFF Float array read write Array of size NEL containing deleted element flags. The value is set to 0 if the element if OFF.

DELTAX Float array read only Array of size NEL containing characteristic element length.

VOLN Float array read only Array of size NEL containing current element volumes.

UELR Float array read write Array of size NEL, containing the number of IP’s in which the failure criteria is satisfied for all elements.

NOT_USE_I1, NOT_USE_I2, NOT_USE_I3, NOT_USE_I4

Integer scalar Not used. Can be used in the future.

NOT_USED4, NOT_USED5

Float scalar Not used. Can be used in future.

Page 144: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 7

6.3 Engine Subroutine for Shell Elements (FnnLAWC)

This subroutine calculates the criteria of the failure model.

Use the Fortran float external function FINTER (shown below) to get the value Y of the function for the abscissa X.

Y=FINTER(IFUNC(I),X,NPF,TF,DYDX)

where: Variable Description

Y Interpolated value

X Abscissa value of the function

I The ith user’s function

DYDX Slope

NPF, TF Private function parameters

The argument list of FnnLAWC and its individual arguments and descriptions are as follows:

C----------------------------------------------------------------------------

SUBROUTINE FnnLAWC (

1 NEL ,NUPARAM ,NUVAR ,NFUNC ,IFUNC , NPF ,

2 TF ,TIME ,TIMESTEP ,UPARAM , NGL , IPT

3 NPT0 ,NOT_USE_I1 ,NOT_USE_I2 , NOT_USE_I3 ,

4 SIGNXX ,SIGNYY ,SIGNXY ,SIGNYZ ,SIGNZX ,

5 EPSPXX ,EPSPYY ,EPSPXY ,EPSPYZ ,EPSPZX ,

5 EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX ,

7 PLA ,DPLA ,EPSP ,UVAR ,UEL ,

8 OFF ,LENGTH, AREA,NOT_USED3 ,NOT_USED4 ,NOT_USED5)

C----------------------------------------------------------------------------

Argument Format Description NEL Integer read only scalar Number of elements per group. In the Engine

subroutine, the element data are treated by groups for vectorization purposes.

NUPARAM Integer read only scalar Size of user parameter array.

NUVAR Integer read only scalar Number of user integration point element variables.

NFUNC Integer read only scalar Number of functions used for failure model materials.

IFUNC Integer array read only Array of size NFUNC containing function indexes.

NPF Integer array private data Array used by FINTER (float external functions).

TF Float array private data Array used by FINTER (float external functions).

Page 145: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 8

Argument Format Description TIME Float read only Current time.

TIMESTEP Float read only Current time step.

UPARAM Float array read only User failure parameter array of size NUPARAM.

IPT Integer scalar read only Current layer or integration points.

NPT0 Integer scalar read only Number of layers or integration points.

NGL Integer array read only Array of size NEL containing the external element number.

EPSPXX, EPSPYY, EPSPZZ, EPSPXY, EPSPYZ, ESPPZX

Float array read only Array of size NEL containing ε strain rates in directions XX, YY, and ZZ and γ̇ strain rates in directions XY, YZ, and ZX.

EPSXX, EPSYY, EPSZZ, EPSXY, EPSYZ, EPSZX

Float array read only Array of size NEL containing strain in directions XX, YY, and ZZ and strain rates in directions XY,

YZ, and ZX. SIGNXX, SIGNYY, SIGNZZ, SIGNXY, SIGNYZ, SIGNZX

Float array read write Array of size NEL containing stress in directions XX, YY, ZZ, XY, YZ, and ZX.

PLA Float array read only Array of size NEL containing equivalent plastic strain.

DPLA Float array read only Array of size NEL containing incremental equivalent plastic strain.

EPSP Float array read only Array of size NEL, equivalent of strain rate.

UVAR Float array read write Array of size NEL*NUVAR containing integration point element variables.

UEL Float array read write Array of size NEL, containing the number of layers in which the failure criteria is satisfied for all elements.

OFF Float array read write Array of size NEL containing deleted element flags. The value is set to 0 if the element if OFF.

LENGTH Float array read only Array of size NEL, characteristic length of the element

AREA Float array read only Array of size NEL, surface area of integration point

NOT_USE_I1, NOT_USE_I2, NOT_USE_I3, NOT_USE_I4

Integer scalar Not used. Can be used in the future.

NOT_USED3, NOT_USED4, NOT_USED5

Float scalar Not used. Can be used in the future.

Page 146: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 9

6.4 Example Subroutine of User Failure Model for Shell and Solid Elements for Altair Radioss Starter

SUBROUTINE LECR04(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, NUVAR,IFUNC,MAXFUNC,NFUNC)

C---------------------------------------------------------------------

C I m p l i c i t T y p e s

C---------------------------------------------------------------------

IMPLICIT NONE

C----------+--------+--+--+-------------------------------------------

C VAR | SIZE |TYP| RW| DEFINITION

C----------+--------+--+--+-------------------------------------------

C IIN | 1 | I | R | INPUT FILE UNIT (ROOT_nnn0.rad file)

C IOUT | 1 | I | R | OUTPUT FILE UNIT (ROOT_nnn0.out file)

C UPARAM | NUPARAM | F | W | USER FAILURE MODEL PARAMETER ARRAY

C MAXUPARAM| 1 | I | R | MAXIMUM SIZE OF UPARAM

C NUPARAM | 1 | I | W | SIZE OF UPARAM =< MAXUPARAM

C NUVAR | 1 | I | W | NUMBER OF USER VARIABLES

C----------+--------+--+--+-------------------------------------------

C IFUNC | NFUNC | I | W | FUNCTION NUMBER ARRAY

C MAXFUNC | 1 | I | R | MAXIMUM SIZE OF IFUNC

C NFUNC | 1 | I | W | SIZE OF IFUNC =< MAXFUNC

C----------+--------+--+--+-------------------------------------------

C-----------------------------------------------

C D u m m y A r g u m e n t s

C-----------------------------------------------

INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC,

. IFUNC(MAXFUNC)

DOUBLE PRECISION UPARAM(MAXUPARAM)

C-----------------------------------------------

C L o c a l V a r i a b l e s

C-----------------------------------------------

INTEGER ISHELL, ISOLID

DOUBLE PRECISION PLAMAX

C======================================

C

C EX : element is off if pla > plamax

C

C======================================

C

READ(IIN,'(F20.0)')PLAMAX

IF(PLAMAX.EQ.0)PLAMAX= 1E20

UPARAM(1) = PLAMAX

NUPARAM = 1

NUVAR = 0

C

Page 147: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 10

NFUNC = 0

WRITE(IOUT, 1000)PLAMAX

C for shell

WRITE(IOUT, 1100)

C for solid

WRITE(IOUT, 2100)

1000 FORMAT(

& 5X,40H PARAMETER ,/,

& 5X,40H ----------------------------- ,/,

& 5X,'MAXIMUM PLASTIC STRAIN .... .. =',E12.4//)

1100 FORMAT(

& 5X,' SHELL ELEMENT DELETION ')

2100 FORMAT(

& 5X,' SOLID ELEMENT DELETION ')

RETURN

END

6.4.1 Engine User Subroutine for Solid Elements SUBROUTINE F04LAW (

1 NEL ,NUPARAM ,NUVAR ,NFUNC ,IFUNC ,

2 NPF ,TF ,TIME ,TIMESTEP ,UPARAM ,

3 NGL ,NOT_USE_I1 ,NOT_USE_I2,NOT_USE_I3,NOT_USE_I4,

4 EPSPXX ,EPSPYY ,EPSPZZ ,EPSPXY ,EPSPYZ ,EPSPZX ,

5 EPSXX ,EPSYY ,EPSZZ ,EPSXY ,EPSYZ ,EPSZX ,

6 SIGNXX ,SIGNYY ,SIGNZZ ,SIGNXY ,SIGNYZ ,SIGNZX ,

7 PLA ,DPLA ,EPSP ,UVAR ,OFF ,

8 LENGTH,AREA,NOT_USED3,NOT_USED4,NOT_USED5 )

C--------------------------------------------------------------------

C I m p l i c i t T y p e s

C--------------------------------------------------------------------

IMPLICIT NONE

C---------+--------+--+--+-------------------------------------------

C VAR | SIZE |TYP| RW| DEFINITION

C---------+--------+--+--+-------------------------------------------

C NEL | 1 | I | R | SIZE OF THE ELEMENT GROUP NEL

C NUPARAM | 1 | I | R | SIZE OF THE USER PARAMETER ARRAY

C NUVAR | 1 | I | R | NUMBER OF FAILURE ELEMENT VARIABLES

C---------+--------+--+--+-------------------------------------------

C NFUNC | 1 | I | R | NUMBER FUNCTION USED FOR THIS USER LAW

C IFUNC | NFUNC | I | R | FUNCTION INDEX

C NPF | * | I | R | FUNCTION ARRAY

C TF | * | F | R | FUNCTION ARRAY

C---------+--------+--+--+-------------------------------------------

C TIME | 1 | F | R | CURRENT TIME

Page 148: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 11

C TIMESTEP| 1 | F | R | CURRENT TIME STEP

C UPARAM | NUPARAM | F | R | USER FAILURE PARAMETER ARRAY

C---------+--------+--+--+-------------------------------------------

C---------+--------+--+--+-------------------------------------------

C EPSPXX | NEL | F | R | STRAIN RATE XX

C EPSPYY | NEL | F | R | STRAIN RATE YY

C ... | | | |

C EPSXX | NEL | F | R | STRAIN XX

C EPSYY | NEL | F | R | STRAIN YY

C ... | | | |

C SIGNXX | NEL | F |R/W| NEW ELASTO PLASTIC STRESS XX

C SIGNYY | NEL | F |R/W| NEW ELASTO PLASTIC STRESS YY

C ... | | | |

C ... | | | |

C PLA | NEL | F | R | PLASTIC STRAIN

C DPLA | NEL | F | R | INCREMENTAL PLASTIC STRAIN

C EPSP | NEL | F | R | EQUIVALENT STRAIN RATE

C---------+--------+--+--+-------------------------------------------

C UVAR |NEL*NUVAR| F |R/W| USER ELEMENT VARIABLE ARRAY

C OFF | NEL | F |R/W| DELETED ELEMENT FLAG (=1. ON, =0. OFF)

C---------+--------+--+--+-------------------------------------------

C I N P U T A r g u m e n t s

C-----------------------------------------------

C

INTEGER NEL, NUPARAM,NPROPMI, NUVAR,NGL(NEL),NOT_USE_I1,

. NOT_USE_I2,NOT_USE_I3,NOT_USE_I4

DOUBLE PRECISION TIME,TIMESTEP,UPARAM(NUPARAM),

. DPLA(NEL),EPSP(NEL),PLA(NEL),

. EPSPXX(NEL),EPSPYY(NEL),EPSPZZ(NEL),

. EPSPXY(NEL),EPSPYZ(NEL),EPSPZX(NEL),

. EPSXX(NEL) ,EPSYY(NEL) ,EPSZZ(NEL) ,

. EPSXY(NEL) ,EPSYZ(NEL) ,EPSZX(NEL) ,

. LENGTH(NEL),AREA(NEL),

. NOT_USED3,NOT_USED4,NOT_USED5

C-----------------------------------------------

C I N P U T O U T P U T A r g u m e n t s

C-----------------------------------------------

DOUBLE PRECISION UVAR(NEL,NUVAR), OFF(NEL),

. SIGNXX(NEL),SIGNYY(NEL),SIGNZZ(NEL),

. SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL)

C-----------------------------------------------

C VARIABLES FOR FUNCTION INTERPOLATION

C-----------------------------------------------

INTEGER NPF(*), NFUNC, IFUNC(NFUNC)

DOUBLE PRECISION FINTER ,TF(*)

EXTERNAL FINTER

Page 149: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 12

C Y = FINTER(IFUNC(J),X,NPF,TF,DYDX)

C Y : y = f(x)

C X : x

C DYDX : f'(x) = dy/dx

C IFUNC(J): FUNCTION INDEX

C J : FIRST(J=1), SECOND(J=2) .. FUNCTION USED FOR THIS LAW

C NPF,TF : FUNCTION PARAMETER

C-----------------------------------------------

C L o c a l V a r i a b l e s

C-----------------------------------------------

INTEGER I,j

DOUBLE PRECISION PLAMAX,ZERO

C--------------------------------------------------------------

C ex : element is off if pla > plamax

C

PLAMAX = UPARAM(1)

C-----------------------------------------------

C USER VARIABLES INITIALIZATION

C-----------------------------------------------

IF(TIME.EQ.ZERO)THEN

DO I=1,NEL

DO J=1,NUVAR

UVAR(I,J)= ZERO

ENDDO

ENDDO

ENDIF

C...

DO I=1,NEL

IF(OFF(I).LT.0.1) OFF(I)=0.0

IF(OFF(I).LT.1.0) OFF(I)=OFF(I)*0.8

END DO

C

DO I=1,NEL

IF(OFF(I).EQ.1..AND.PLA(I).GE.PLAMAX)THEN

OFF(I)=0.8

ENDIF

ENDDO

C

RETURN

END

Page 150: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 13

6.4.2 Engine User Subroutine for Shell Elements        SUBROUTINE F04LAWC( 

     1     NEL ,NUPARAM ,NUVAR ,NFUNC ,IFUNC,NPF, 

     2     TF ,TIME ,TIMESTEP ,UPARAM ,NGL ,IPT, 

     3     NPT0 ,IPG,NOT_USE_I2 ,NOT_USE_I3, 

     4     SIGNXX ,SIGNYY ,SIGNXY ,SIGNYZ ,SIGNZX , 

     4     EPSPXX ,EPSPYY ,EPSPXY ,EPSPYZ ,EPSPZX , 

     6     EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX , 

     7     PLA ,DPLA ,EPSP ,UVAR ,UEL , 

     8     OFF ,NOT_USED1 ,NOT_USED2,NOT_USED3,NOT_USED4,NOT_USED5 ) 

 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C I m p l i c i t T y p e s 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

       IMPLICIT NONE 

C‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐+‐‐‐+‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C VAR     | SIZE   |TYP| RW| DEFINITION 

C‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐+‐‐‐+‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C NEL     | 1      | I | R | SIZE OF THE ELEMENT GROUP NEL 

C NUPARAM | 1      | I | R | SIZE OF THE USER PARAMETER ARRAY 

C NUVAR   | 1      | I | R | NUMBER OF USER ELEMENT VARIABLES 

C‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐+‐‐‐+‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C NFUNC   | 1      | I | R | NUMBER FUNCTION USED FOR THIS USER LAW 

C IFUNC   | NFUNC  | I | R | FUNCTION INDEX 

C NPF     | *      | I | R | FUNCTION ARRAY 

C NPT0    | 1      | I | R | NUMBER OF LAYERS OR INTEGRATION POINTS 

C IPT     | 1      | I | R | LAYER OR INTEGRATION POINT NUMBER 

C IPG     | 1      | I | R | GAUSS INTEGRAION POINT  

C TF      | *      | F | R | FUNCTION ARRAY 

C NGL     | NEL    | I | R | ELEMEMT NUMBER 

C‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐+‐‐‐+‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C TIME    | 1      | F | R | CURRENT TIME 

C TIMESTEP| 1      | F | R | CURRENT TIME STEP 

C UPARAM  | NUPARAM| F | R | USER MATERIAL PARAMETER ARRAY 

C EPSPXX  | NEL    | F | R | STRAIN RATE XX 

C EPSPYY  | NEL    | F | R | STRAIN RATE YY 

C ...     |        |   |   | 

C EPSXX   | NEL    | F | R | STRAIN XX 

C EPSYY   | NEL    | F | R | STRAIN YY 

C‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐+‐‐‐+‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C SIGNXX  | NEL    | F |R/W| NEW ELASTO PLASTIC STRESS XX 

C SIGNYY  | NEL    | F |R/W| NEW ELASTO PLASTIC STRESS YY 

C ...     |        |   |   | 

C‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐+‐‐‐+‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C PLA     | NEL    | F | R | PLASTIC STRAIN 

Page 151: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 14

C DPLA    | NEL    | F | R | INCREMENTAL PLASTIC STRAIN 

C EPSP    | NEL    | F | R | EQUIVALENT STRAIN RATE 

C UVAR    |NEL*NUVAR| F|R/W| USER ELEMENT VARIABLE ARRAY 

C OFF     | NEL    | F |R/W| DELETED ELEMENT FLAG (=1. ON, =0. OFF) 

C‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐+‐‐+‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C I N P U T A r g u m e n t s 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

       INTEGER NEL, NUPARAM, NUVAR, NGL(NEL),MAT(NEL), 

     .   IPT,NPT0,NOT_USE_I1,NOT_USE_I2,NOT_USE_I3 

       DOUBLE PRECISION TIME,TIMESTEP(NEL),UPARAM(NUPARAM),DPLA(NEL), 

     .   EPSP(NEL), PLA(NEL),EPSPXX(NEL),EPSPYY(NEL),EPSPXY(NEL), 

     .   EPSPYZ(NEL),EPSPZX(NEL),EPSXX(NEL) ,EPSYY(NEL) ,EPSXY(NEL), 

     .   EPSYZ(NEL) ,EPSZX(NEL), 

     .   NOT_USED1,NOT_USED2,NOT_USED3,NOT_USED4,NOT_USED5 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C I N P U T O U T P U T A r g u m e n t s 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

       DOUBLE PRECISION UVAR(NEL,NUVAR), OFF(NEL), 

     .   SIGNXX(NEL),SIGNYY(NEL),UEL(NEL), 

     .   SIGNXY(NEL),SIGNYZ(NEL),SIGNZX(NEL) 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C VARIABLES FOR FUNCTION INTERPOLATION 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

       INTEGER NPF(*), NFUNC, IFUNC(NFUNC) 

       DOUBLE PRECISION FINTER ,TF(*) 

       EXTERNAL FINTER 

C! Y = FINTER(IFUNC(J),X,NPF,TF,DYDX) 

C! Y : y = f(x) 

C! X : x 

C! DYDX : f'(x) = dy/dx 

C! IFUNC(J): FUNCTION INDEX 

C! J : FIRST(J=1), SECOND(J=2) .. FUNCTION USED FOR THIS LAW 

C! NPF,TF : FUNCTION PARAMETER 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C L o c a l V a r i a b l e s 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

       INTEGER I,J,NINDX 

       DOUBLE PRECISION PLAMAX,ZERO 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C Ex : ELEMENT IS OFF iF PLA > PLAMAX 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

       PLAMAX = UPARAM(1) 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

C USER VARIABLES INITIALIZATION

C-----------------------------------------------

Page 152: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | USER FAILURE

JAN 2019 15

       IF(TIME.EQ.ZERO)THEN 

         DO I=1,NEL 

             DO J=1,NUVAR 

             UVAR(I,1)=ZERO 

             ENDDO 

         ENDDO 

       ENDIF 

C‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

       DO I =1,NEL 

         IF(OFF(I).EQ.1..AND.PLA(I).GE.PLAMAX) THEN 

           SIGNXX(I) = 0. 

           SIGNYY(I) = 0. 

           SIGNXY(I) = 0. 

           SIGNYZ(I) = 0. 

           SIGNZX(I) = 0. 

           OFF(I) = 0.0 

         ENDIF 

       ENDDO 

       RETURN 

       END 

6.4.3 Example input dec #‐‐‐1‐‐‐‐|‐‐‐‐2‐‐‐‐|‐‐‐‐3‐‐‐‐|‐‐‐‐4‐‐‐‐|‐‐‐‐5‐‐‐‐|‐‐‐‐6‐‐‐‐|‐‐‐‐7‐‐‐‐|‐‐‐‐8‐‐‐‐|‐‐‐‐9‐‐‐‐|‐‐‐10‐‐‐‐| 

/MAT/PLAS_TAB/2 

Steel 

#        Init. dens.          Ref. dens. 

              7.8E‐6                   0 

#                  E                  Nu           Eps_p_max              Eps_t1              Eps_t2 

                 210                  .3                   0                   0                   0 

#    Nfunc   Fsmooth               Chard                Fcut               Eps_f 

         1         0                   0                   0                   0 

#    Ipfun             Fpscale 

         0                   0 

# Funtions 

         1 

# Scale factors 

                   1 

# Strain rates 

                   0 

#‐‐‐1‐‐‐‐|‐‐‐‐2‐‐‐‐|‐‐‐‐3‐‐‐‐|‐‐‐‐4‐‐‐‐|‐‐‐‐5‐‐‐‐|‐‐‐‐6‐‐‐‐|‐‐‐‐7‐‐‐‐|‐‐‐‐8‐‐‐‐|‐‐‐‐9‐‐‐‐|‐‐‐10‐‐‐‐| 

/FAIL/USER1/2 

#     max. pl_strain 

                0.50 

#‐‐‐1‐‐‐‐|‐‐‐‐2‐‐‐‐|‐‐‐‐3‐‐‐‐|‐‐‐‐4‐‐‐‐|‐‐‐‐5‐‐‐‐|‐‐‐‐6‐‐‐‐|‐‐‐‐7‐‐‐‐|‐‐‐‐8‐‐‐‐|‐‐‐‐9‐‐‐‐|‐‐‐10‐‐‐‐| 

Page 153: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | WRITING IN OUTPUT FILES

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 Writing in Output Files

Chapter 7

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA

Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 154: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | WRITING IN OUTPUT FILES

JAN 2019 2

7.0 Writing in Output Files Some user subroutines do not pass the IOUT file descriptor and, thus, do not permit writing in a Altair Radioss output file. In this case, the WRITE_IOUT function below can be used.

CALL WRITE_IOUT(LINE,LINE_LENGTH)

where: LINE Character string with the message.

LINE_LENGTH Integer that indicates the length of a character string.

Example:

CHARACTER*256 LINE

INTEGER LEN

WRITE(LINE,'(A)') 'THIS IS MY LINE IN OUTPUT FILE'

LEN = LEN_TRIM(LINE) ! Fortran Intrisics to compute line length

CALL WRITE_IOUT(LINE,LEN)

Page 155: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 Generating Altair Radioss User Libraries

Chapter 8

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 156: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 2

 

TABLE OF CONTENTS

8.0 Generating Altair Radioss User Libraries 3

8.1 Altair Radioss UserLib SDK Overview 3

8.2 Prerequisites 4

8.3 UserLib SDK Installation 5

8.4 Generating a Dynamic Library using the Build Script 6

8.5 Altair Radioss Starter and Engine Behavior 9

Page 157: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 3

8.0 Generating Altair Radioss User Libraries

8.1 Altair Radioss UserLib SDK Overview

Altair Radioss user libraries are built on Windows and Linux with two different compilers: Intel Fortran or Gfortran. The Altair Radioss UserLib SDK permits generating a dynamic library made of libraries and compiling scripts for a range of Linux and Windows versions.     userlib_sdk ├── linux64_i18.1 : Linux 64 Bit with Intel compiler 2018.1 ├── linux64 : Linux 64 Bit with Intel Compiler 12.1.3 or Higher ├── linux64_gfortran : Linux 64 Bit with GNU Gfortran 4.4.5 to 4.4.9 ├── linux64_sp_i18.1 : Linux 64 Bit Single Precision with Intel compiler 2018.1 ├── linux64_sp : Linux 64 Bit Single Precision with INTEL Compiler 12.1.3 or Higher ├── linux64_sp_gfortran : Linux 64 Bit Single Precision with GNU Gfortran 4.4.5 or Higher ├── win64_i18.1_vs2015 : Windows 64 Bits with INTEL Compiler 2018.1 / | Microsoft Visual Studio 2015 ├── win64 : Windows 64 Bits with INTEL Compiler 12.1.3 or higher ├── win64_gfortran_7.2 : Windows 64 Bits with GNU MinGW Fortran 7.2 ├── win64_gfortran : Windows 64 Bits with GNU MinGW Fortran 4.9.2 ├── win64_sp_i18.1_vs2015 : Windows 64 Bits Single Precision | with INTEL Compiler 2018.1 / Microsoft Visual Studio 2015 └── win64_sp : Windows 64 Bits Single Precision with INTEL Compiler 12.1.3 or higher

Each directory contains a static library and a build script.

   

Page 158: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 4

8.2 Prerequisites 8.2.1 OS Version The recommended operating system is the same as the recommended operating system for Altair HyperWorks.

8.2.2 Compiler Install the compiler that best fits your needs:

INTEL Compiler for Linux and Windows: o Install INTEL Compiler 12.1.2 or 2018.1. Refer to Intel installation

instructions. Intel Compiler 2018.1 requires Microsoft Visual Studio 2015.

o More information can be found at https://software.intel.com/en-us/fortran-compilers

Gfortran for Linux o Gfortran is embedded in the Linux distribution. Install it using Linux

Package installer. o Gfortran must be version 4.4.5 or higher.

MinGW Gfortran compiler for Windows o MinGW is a Windows port of the GNU gcc and Gfortran compiler. o Download MinGW Gfortran at

http://sourceforge.net/projects/mingw-w64/ and choose the following install options:

Version: 4.92 Architecture: X86_64 Thread: win32 Exception: seh Build Revision: Latest

MinGW Gfortran 7.2 compiler for Windows o MinGW is a Windows port of the GNU gcc and Gfortran compiler. o Download MinGW Gfortran at

http://sourceforge.net/projects/mingw-w64/ and choose the following install options:

Version: 7.2 Architecture: X86_64 Thread: win32 Exception: seh Build Revision: Latest

Page 159: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 5

8.3 UserLib SDK Installation 8.3.1 SDK Location The Altair Radioss UserLib SDK is shipped in Altair HyperWorks installation and located in %ALTAIR_HOME%/hwsolvers/radioss/userlib_sdk.

If you received the SDK in a separate package, copy it in your target directory.

8.3.2 Environment Variable Settings Set two environment variables:

1. RAD_USERLIB_SDK_PATH: PATH to SDK ROOT

The following examples were installed with Altair HyperWorks and ALTAIR_HOME environment variable set.

Linux (bash): export RAD_USERLIB_SDK_PATH=$ALTAIR_HOME/hwsolvers/radioss/userlib_sdk

Windows: set RAD_USERLIB_SDK_PATH=%ALTAIR_HOME%\hwsolvers\radioss\userlib_sdk

2. RAD_USERLIB_ARCH: The target Architecture Windows/Linux compiler flavor Linux (bash):

export RAD_USERLIB_ARCH=linux64  

 

Page 160: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 6

8.4 Generating a Dynamic Library Using the Build Script

Each UserLib version has its own script. userlib_sdk ├── linux64 : build_userlib_linux64.sh ├── linux64_i18.1 : build_userlib_linux64.sh ├── linux64_gfortran : build_userlib_linux64_gfortran.sh ├── linux64_sp : build_userlib_linux64_sp.sh ├── linux64_sp_i18.1 : build_userlib_linux64_sp.sh ├── linux64_sp_gfortran_7.2 : build_userlib_linux64_sp_gfortran_7.2.sh ├── linux64_sp_gfortran : build_userlib_linux64_sp_gfortran.sh ├── win64_i18.1_vs2015 : build_userlib_win64.bat ├── win64 : build_userlib_win64.bat ├── win64_gfortran : build_userlib_win64_gfortran.bat ├── win64_sp_i18.1_vs2015 : build_userlib_win64_sp.bat └── win64_sp : build_userlib_win64_sp.bat

8.4.1 Script Arguments

All scripts have command line arguments to permit the library generation. Their functionality are same. The syntax between the Linux and Windows scripts are different, though.

Execute the script without any argument to see all available options.

8.4.1.1 Windows Scripts

********************************************* ** Generating Radioss Dynamic User Library ** ********************************************* build_userlib_win64.bat /STARTER "Starter source files" /ENGINE "Engine Source files" /LIBRARY "additional static Library" /OUTFILE Library_name [Optional Argument] [Optional Argument] /FREE : Source code is in Fortran 90 Free Format /ADDFLAG "Additional compiler Flags" : Additional compiler flags to set

Script Description

/STARTER Starter source files. Add these files in quotation marks.

/ENGINE Engine source files. Add these files in quotation marks.

/LIBRARY Optional. Additional static library for link.

/OUTFILE Optional. A specified library name other than the default.

/FREE Optional. Use this if source code is written in Fortran 95 Free Format.

/ADDFLAG Optional. Use this to set additional compiler flags. Add flags in quotation marks.

Page 161: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 7

Example: Compiling law 29 for shells: LECM29.F and SIGEPS29C.F and generating a library with the default name.

F:\>%RAD_USERLIB_SDK_PATH%\%RAD_USERLIB_ARCH%\build_userlib_win64.bat /STARTER "lecm29.F" /ENGINE "sigeps29c.F" F:\>echo off ********************************************* ** Generating Radioss Dynamic User Library ** ********************************************* Preparing Library ----------------- Compiling: lecm29.F ---------- lecm29.F Compiling: sigeps29c.F ---------- sigeps29c.F Creating library: libraduser_win64.dll ----------------

Creating library libraduser_win64.lib

Creating object libraduser_win64.dll

Done ---- F:\>

8.4.1.2 Linux scripts

********************************************* ** Generating Radioss Dynamic user library ** ********************************************* Script Usage build_userlib_linux64.sh starter="Starter source files" engine="Engine Source files" library="Additional static Library" outfile="Optional library name" [Optional Arguments] [Optional Arguments] -free : Source files are in Fortran 90 Free Format -addflag "Additional Compiling Arguments" - Advanced Users Only

   

Page 162: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 8

Script Description

starter Starter source files. Add quotation marks if more than one file is set.

Engine Engine source files. Add quotation marks if more than one file is set.

library Optional. Additional static library for link.

outfile Optional. A specified library name other than the default.

-free Use this option if source code is written in Fortran 95 Free Format.

-addflag”” Advanced user only. Use this to set additional compiler flags. Add flags in quotation marks.

Example: Compiling law 29 for shells: LECM29.F and SIGEPS29C.F and generating a library with the default name.

neo DDS/LOI29> $RAD_USERLIB_SDK_PATH/$RAD_USERLIB_ARCH/build_userlib_linux64.sh starter="lecm29.F" engine="sigeps29c.F"

*********************************************

** Generating Radioss Dynamic user library **

*********************************************

Compiling: lecm29.F

-----------

Compiling: sigeps29c.F

----------

Creating library: libraduser_linux64.so

-----------------

Done

----

8.4.2 Generated Library Name  

In Windows, the default generated library is named libraduser_win64.dll if /OUTFILE “Alternate library name” is not set.  

In Linux, the default generated library is named libraduser_linux64.so if outfile=”Alternate library name” is not set. 

Page 163: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | GENERATING Altair Radioss USER LIBRARIES

   

JAN 2019 9

8.5 Altair Radioss Starter and Engine Behavior 8.5.1 Altair Radioss Starter and Engine Load Sequence When using the alternate library name option, use –dylib [library name] command line argument in Starter or Engine subroutines to load the library.

The library load sequence below in Starter and Engine subroutines is in order of priority.

1. -dylib [alternate library name] command line argument 2. If RAD_USERLIB_LIBPATH is set, load libraduser_win64.dll or

libraduser_linux64.so in the directory defined in this environment variable. 3. Load libraduser_win64.dll or libraduser_linux64.so in the local execution

directory. 4. Load libraduser_win64.dll or libraduser_linux64.so using the %PATH%

environment variable (Windows) or $LD_LIBRARY_PATH environment variable (Linux).

8.5.2 Starter and Engine Behave A message is printed in the output files when the library is successfully loaded.

Windows 64 example:

EXTERNAL LIBRARY FOR USERS CODE INTERFACE ----------------------------------------- LIBRARY NAME . . . . . . . . . . . . . . . . . . . . libraduser_win64.dll Altair Radioss USERS CODE INTERFACE VERSION . . . . . . . .1301504220

When user options are used in the Altair Radioss Input Deck, the code in the user library is used.

Page 164: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 1

Altair Radioss User’s Code Interface

2019 version – January 2019 Appendix

Chapter 9

Altair Engineering, Inc., World Headquarters: 1820 E. Big Beaver Rd., Troy MI 48083-2031 USA Phone: +1.248.614.2400 • Fax: +1.248.614.2411 • www.altair.com • [email protected]

Page 165: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 2

TABLE OF CONTENTS

9.0 Appendix

9.1 Appendix 1 – Available User’s Arguments 3

9.2 Appendix 2 – Communication between User’s Subroutines and Altair Radioss Code

9

9.3 Appendix 3 – General User’s Subroutine Format with Material Laws 29, 30, and 31

14

9.4 Appendix 4 – General User’s Subroutine Format with Extended User Material Laws

16

Page 166: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 3

9.1 – Appendix 1 – Available User’s Arguments

9.1.1 Available Starter User’s Arguments

Starter User’s Arguments – Material Law for Shells

Variable Size Type Write/read Definition

IIN 1 Integer R Input file unit (Starter input file) IOUT 1 Integer R Output file unit (Starter output file) UPARAM NUPARAM Float W User’s parameter MAXNUPARAM 1 Integer R Maximum size of UPARAM NUPARAM 1 Integer W Size of UPARAM NUVAR 1 Integer W Number of user’s variables IFUNC NFUNCT Integer W Function number array MAXNFUNC 1 Integer R Maximum size of IFUNC NFUNCT 1 Integer W Size of IFUNC

PARMAT 3 Float W (1) Stiffness modulus for interface (2) Young modulus (for shell) (3) Poisson’s ratio (for shell)

Starter User’s Arguments – Material Law for Bricks

Variable Size Type Write/read Definition

IIN 1 Integer R Input file unit (Starter input file) IOUT 1 Integer R Output file unit (Starter output file) UPARAM NUPARAM Float W User’s parameter MAXNUPARAM 1 Integer R Maximum size of UPARAM NUPARAM 1 Integer W Size of UPARAM NUVAR 1 Integer W Number of user’s variables IFUNC NFUNCT Integer W Function number array MAXNFUNC 1 Integer R Maximum size of IFUNC NFUNCT 1 Integer W Size of IFUNC STIFINT 1 Integer W Stiffness modulus for interface

Starter User’s Arguments – Spring Property

Variable Size Type Write/read Definition IIN 1 Integer R Input file unit (Starter input file) IOUT 1 Integer R Output file unit (Starter output file) NUVAR 1 Integer W Number of user’s variables UVAR NUVAR* NEL Float R/W User’s variable

PARGEO * Float W (1) Skew number (2) Stiffness for interface (3) Front wave option

NEL 1 Integer R Number of elements IPROP 1 Integer R Property number IX 3* NEL Float R Spring connectivity XL NEL Float R Element length

Page 167: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 4

Starter User’s Arguments – Spring Property

Variable Size Type Write/read Definition MASS NEL Float W Element mass XINER NEL Float W Element inertia (spherical) STIFM NEL Float W Element stiffness (time step) STIFR NEL Float W Element rotation stiffness (time step) VISCM NEL Float W Element viscosity (time step) VISCR NEL Float W Element rotation viscosity (time step)

Starter User’s Arguments – Solid Property

Variable Size Type Write/read Definition

NEL 1 Integer R Number of elements IIN 1 Integer R Input file unit (Starter input file) IOUT 1 Integer R Output file unit (Starter output file) NUVAR 1 Integer W Number of user’s variables UVAR NUVAR* NEL Float R/W User’s variable

PARGEO * Float W (1) Skew number (2) Stiffness for interface (3) Front wave option

IPROP 1 Integer R Property number IMAT 1 Integer R Material number SOLID_ID NEL Integer R Solid Element id t=0 EINT NEL Float W Total internal energy t=0 VOL NEL Float R/W Initial volume OFF NEL Float R/W Delete flag RHO NEL Float R/W Density SIG 6*NEL Float R/W Stress tensor XX1 NEL Float R X coordinate node 1 YY1 NEL Float R Y coordinate node 1 ZZ1 NEL Float R Z coordinate node 1 XX2 . . ZZ8 NEL Float R Same for node 2 to 8 VX1 NEL Float R X velocity node 1 VY1 NEL Float R Y velocity node 1 VZ1 NEL Float R Z velocity node 1 VRX1 NEL Float R X rotational velocity node 1 VRY1 NEL Float R Y rotational velocity node 1 VRZ1 NEL Float R Z rotational velocity node 1 MAS1 NEL Float W Mass node 1 MAS2 . . MAS8 NEL Float W Same for node 2 to 8 INN1 NEL Float W Inertia node 1 INN2 . . INN8 NEL Float W Same for node 2 to 8 STIFM NEL Float W Element stiffness (time step) STIFR NEL Float W Element rotation stiffness (time step) VISCM NEL Float W Element viscosity (time step) VISCR NEL Float W Element rotation viscosity (time step)

Page 168: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 5

Starter User’s Arguments – Sensor

Variable Size Type Write/read Definition

IIN 1 Integer R Input file unit (Starter input file) IOUT 1 Integer R Output file unit (Starter output file)

9.1.2 Available Engine User’s Arguments

Engine User’s Arguments – Material Law for Shells

Variable Size Type Write/read Definition NEL 1 Integer R Number of elements UVAR NUVAR* NEL Float R/W User’s variable UPARAM NUPARAM Float W User’s parameter NUPARAM 1 Integer W Size of UPARAM NUVAR 1 Integer W Number of user’s variables NFUNCT 1 Integer W Size of IFUNC IFUNC NFUNCT Integer W Function number array NPF * Integer R Function array NPT 1 Integer R Number of layers or integration points IPT 1 Integer R Layer or integration point number IFLAG * Integer R Geometrical flags TF * Float R Function array NGL NEL Integer R Element number TIME 1 Float R Current time TIMESTEP 1 Float R Current time step RHO0 NEL Float R Initial density AREA NEL Float R Area EINT NEL Float R Total internal energy THKLY NEL Float R Layer thickness EPSPXX NEL Float W Strain rate XX DEPSXX NEL Float W Strain increment XX EPSXX NEL Float W Strain XX SIGOXX NEL Float W Old elasto-plastic stress XX SIGNXX NEL Float W New elasto-plastic stress XX SIGVXX NEL Float W Viscous stress XX SOUNDSP NEL Float W Sound speed (time step) VISCMAX NEL Float W Max damping modulus (time step) THK NEL Float R/W Thickness PLA NEL Float R/W Plastic strain OFF NEL Float R/W Delete flag

Page 169: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 6

Engine User’s Arguments – Material Law for Bricks

Variable Size Type Write/read Definition

NEL 1 Integer R Number of elements UVAR NUVAR* NEL Float R/W User’s variable UPARAM NUPARAM Float W User’s parameter NUPARAM 1 Integer W Size of UPARAM NUVAR 1 Integer W Number of user’s variables NFUNCT 1 Integer W Size of IFUNC IFUNC NFUNCT Integer W Function number array NPF * Integer R Function array TF * Float R Function array NGL NEL Integer R Element number TIME 1 Float R Current time TIMESTEP 1 Float R Current time step RHO0 NEL Float R Initial density RHO NEL Float R Density VOLUME NEL Float R Volume EINT NEL Float R Total internal energy EPSPXX NEL Float W Strain rate XX DEPSXX NEL Float W Strain increment XX EPSXX NEL Float W Strain XX SIGOXX NEL Float W Old elasto-plastic stress XX SIGNXX NEL Float W New elasto-plastic stress XX SIGVXX NEL Float W Viscous stress XX SOUNDSP NEL Float W Sound speed (time step) VISCMAX NEL Float W Max damping modulus (time step) OFF NEL Float R/W Delete flag

Engine User’s Arguments – Spring Property

Variable Size Type Write/read Definition

NEL 1 Integer R Number of elements IPROP 1 Integer R Property number UVAR NUVAR* NEL Float R/W User’s variable NUVAR 1 Integer W Number of user’s variables FX NEL Float R/W Tension force FY NEL Float R/W Y shear force FZ NEL Float R/W Z shear force XMOM NEL Float R/W Torsion moment YMOM NEL Float R/W Y bending moment ZMOM NEL Float R/W Z bending moment EINT NEL Float R/W Total internal energy OFF NEL Float R/W Delete flag STIFM NEL Float W Element stiffness (time step) STIFR NEL Float W Element rotation stiffness (time step)

Page 170: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 7

Engine User’s Arguments – Spring Property

Variable Size Type Write/read Definition VISCM NEL Float W Element viscosity (time step) VISCR NEL Float W Element rotation viscosity (time step) MASS NEL Float W Element mass XINER NEL Float W Element inertia (spherical) DT 1 Integer R Time step XL NEL Float R Element length XL NEL Float R Element length VX NEL Float R Tension velocity RY1 NEL Float R Node 1 Y bending rotational velocity RZ1 NEL Float R Node 1 Z bending rotational velocity RX NEL Float R Torsional velocity RY2 NEL Float R Node 2 Y bending rotational velocity RZ2 NEL Float R Node 2 Z bending rotational velocity

Engine User’s Arguments

Variable Size Type Write/read Definition NEL 1 Integer R Number of elements IOUT 1 Integer R Output file unit (Engine output file) UVAR NUVAR* NEL Float R/W User’s variable IPROP 1 Integer R Property number IMAT 1 Integer R Material number SOLID_ID NEL Integer R Solid Element ID EINT NEL Float R Total internal energy VOL NEL Float R Initial volume OFF NEL Float R/W Delete flag RHO NEL Float R/W Density SIG 6* NEL Float R/W Stress tensor XX1 NEL Float R X coordinate node 1 YY1 NEL Float R Y coordinate node 1 ZZ1 NEL Float R Z coordinate node 1 XX2 . . ZZ8 NEL Float R Same for node 2 to 8 VX1 NEL Float R X velocity node 1 VY1 NEL Float R Y velocity node 1 VZ1 NEL Float R Z velocity node 1 VRX1 NEL Float R X rotational velocity node 1 VRY1 NEL Float R Y rotational velocity node 1 VRZ1 NEL Float R Z rotational velocity node 1 FX1 NEL Float W X force node 1 FY1 NEL Float W Y force node 1 FZ1 NEL Float W Z force node 1 MX1 NEL Float W X moment node 1 MY1 NEL Float W Y moment node 1 MZ1 NEL Float W Z moment node 1

Page 171: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 8

Engine User’s Arguments

Variable Size Type Write/read Definition STIFM NEL Float W Element stiffness (time step) STIFR NEL Float W Element rotation stiffness (time step) VISCM NEL Float W Element viscosity (time step) VISCR NEL Float W Element rotation viscosity (time step)

Engine User’s Arguments – Sensor

Variable Size Type Write/read Definition

ID NEL Integer R Sensor ID

Page 172: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 9

9.2 – Appendix 2 – Communication between User’s Subroutines and Altair Radioss Code

The main functions to access user’s properties and materials are return functions and storage functions. Return Function Variables Description

INTEGER IP = GET_U_P(PID) PID Integer property ID Returns a property number.

INTEGER PID = GET_U_PID(IP) IP Property number Returns the user property ID corresponding to the user property number IP.

FLOAT PARAMI = GET U GEO (I,IP) I Parameter index (1 for the first parameter, …)

Returns the user geometry parameters.

IP Property number

INTEGER II = GET U PNU (I,IP,KK)

IFUNCI = GET_U_PNU (I,IP,KFUNC)

IPROPI = GET_U_PNU(I,IP,KPROP)

IMATI = GET_U_PNU(I,IP,KMAT)

I Parameter index Returns the user-stored function (if KK=KFUNC), material (if KK=KMAT), or property (if KK=KPROP) numbers.

See Starter subroutine for corresponding ID storage.

IP Property number

KK Parameters KFUNC, KMAT, KPROP

INTEGER IM = GET_U_M(MID) MID Material ID Returns a material number.

INTEGER MID = GET_U_MID(IM) IM Material number Returns the user material ID corresponding to user material number IM.

FLOAT PARAMI = GET_U_MAT(I,IM) I Parameter index Returns the user material parameters. Note: GET_U_MAT(0,IMAT) returns the density.

IM Material number

INTEGER IFUNCI = GET_U_MNU (I,IM,KFUNC)

I Variable index Returns the user-stored function numbers (function referred by user’s materials). See the Starter material user’s subroutine for corresponding ID storage.

IM Material number

KFUNC Only functions are yet available

FLOAT Y = GET_U_FUNC(IFUNC,X,DYDX)

IFUNC Function numbered obtained by IFUNC = GET_U_MNU(I,IM, KFUNC) or IFUNC = GET_U_PNU(I,IP,KFUNC)

Returns Y(X).

X X value

DYDX Slope dY/dX GET_TABLE_VALUE(NSENS, XX0,XDIM, tmp)

Page 173: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 10

Storage Function Description

INTEGER ierror = SET_U_PNU(func_index, fun_id, KFUNC)

Stores Altair Radioss function fun_id in the current user property buffer at a position referenced by func_index.

INTEGER ierror = SET_U_PNU(mat_index, mid, KMAT)

Stores Altair Radioss material mid in the current user property buffer at a position referenced by mat_index.

INTEGER ierror = SET_U_PNU(prop_index, pid, KPROP)

Stores Altair Radioss property pid in the current user property buffer at a position referenced by prop_index.

INTEGER ierror = SET_U_GEO(value_index, value) Stores a value in the current user property buffer at a position referenced by value_index.

Notes: The geometry data (property) must be stored in Altair Radioss storage with function

SET_U_GEO(value_index,value).

If some standard Altair Radioss functions (time or x,y) are used, function IDs must be stored with function SET_U_PNU(func_index,func_id,KFUNC).

If the property refers to user material, material IDs must be stored with function SET_U_PNU(mat_index,mat_id,KMAT).

If the property refers to user property, sub-property IDs must be stored with function SET_U_PNU(sub_prop_index,sub_prop_id,KPROP).

SET_U_GEO and SET_U_PNU return 0 if there are no errors.

SET_U_GEO and SET_U_PNU return the maximum allowed index if the index is larger than this maximum.

For TABLES use the subroutine: GET_TABLE_VALUE

INTEGER: TABLE_id = GET_NUMTABLE(TableID)

           GET_TABLE_VALUE(TABLE_id, XX, X_DIM,YY), where XX is the input vector of dimension X_DIM and YY is the returned value.

Page 174: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 11

Specific functions for user’s subroutines type sensor include those below.

Function Variables Description INTEGER NUM = GET_U_NUMSENS(ID) ID Sensor ID Allows you to get a

sensor number. NUM Sensor number

INTEGER ierror = GET_U_SENS_FPAR(IVAR, VAR)

IVAR Float variable index Allows you to retrieve a float sensor parameter.

VAR Integer value

INTEGER ierror = GET_U_SENS_IPAR(IVAR, VAR)

IVAR Integer variable index Allows you to retrieve an integer sensor parameter. VAR Integer value

INTEGER ierror = SET_U_SENS_VALUE(NSENS,IVAR,VAR)

NSENS Integer sensor number Allows you to write a variable to a sensor buffer (float). IVAR Integer buffer index

VAR Float value

INTEGER ierror = GET_U_SENS_VALUE(NSENS,IVAR,VAR)

NSENS Integer sensor number Allows you to read a variable from a sensor buffer (float). IVAR Integer buffer index

VAR Float value

INTEGER ierror = SET_U_SENS_ACTI(NSENS)

NSENS Integer sensor number Allows you to activate a sensor using Altair Radioss flag.

FLOAT DTIME = GET_U_SENS_ACTI(NSENS)

DTIME Float time delay since first activation. (actif < = > DTIME > 0)

Allows you to check Altair Radioss activation status of a sensor.

NSENS Integer sensor number

FLOAT TIME = GET_U_TIME() Allows you to check the current time.

INTEGER NCYC = GET_U_CYCLE() Allows you to check the current cycle.

INTEGER IERR = GET_U_ACCEL(NACC, AX,AY,AZ)

AX, AY, AZ Float acceleration components

Allows you to access accelerometer values.

NACC Integer accelerator number

IDACC Integer accelerator ID

NACC GET_U_NUMACC(IDACC)

INTEGER IERR = GET_U_NOD_X(NOD, X,Y,Z)

INTEGER IERR = GET_U_NOD_D(NOD, DX,DY,DZ)

INTEGER IERR = GET_U_NOD_V(NOD, VX,VY,VZ)

X, Y, Z Float nodal coordinates Allows you access to nodal values.

DX, DY, DZ Float nodal displacements

VX, VY, VZ Float nodal velocities

AX, AY, AZ Float nodal accelerations

NOD Integer node number

Page 175: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 12

Function Variables Description INTEGER IERR = GET_U_NOD_A(NOD, AX,AY,AZ)

NID Integer node ID

NOD GET_U_NUMNOD(ID)

FLOAT Y = GET_U_FUNC(IFUNC, X, DERI)

X Float ordinate Allows you to access Altair Radioss functions.

Y Float abscissa

DERI Float Y/X

IFUNC Integer function number

IDFUN Integer function ID, where INTEGER IFUNC = GET_U_NUMFUN(IDFUN)

Page 176: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 13

Figure 2: Communication between user’s modules and Altair Radioss database

STARTER USER’S SUBROUTINE PROPERTY (pid)

User’s arguments list

STARTER USER’S SUBROUTINE INITIALIZATION PROPERTY

Altair Radioss STARTER

GENERAL OPTIONS

FUNCTIONS (fun_id)

User’s arguments list

STARTER USER’S SUBROUTINE MATERIAL LAW (mid)

User’s arguments list

STARTER USER’S SUBROUTINE WINDOWS

User’s arguments list

STARTER USER’S SUBROUTINE SENSOR (sens_id)

User’s arguments list

PROPERTY BUFFER (iprop)

Altair Radioss arguments

Property parameters stored in the values_index

(prop_index)

MATERIAL BUFFER (imat)

Material parameters stored in the values_index

FUNCTION BUFFER (ifunc)

Function values stored in the values_index (func_index)

USER’S ARRAY

User’s parameters stored in UPARAM(value_index)

ENGINE USER’S SUBROUTINE PROPERTY (pid)

User’s arguments list

ENGINE USER’S SUBROUTINE MATERIAL LAW (mid)

User’s arguments list

ENGINE USER’S SUBROUTINE SENSOR (sens_id)

User’s arguments list

Altair Radioss ENGINE

GENERAL OPTIONS

Altair Radioss arguments lists

Shared arguments

Storage functions (SET_U)

Return functions (GET_U)

Shared arguments

and/or

Subroutine(s)

CALL

Altair Radioss storage

Page 177: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 14

9.3 – Appendix 3 – General User’s Subroutine Format with Material Laws 29, 30, and 31

9.3.1 Example Starter Format SUBROUTINE LECM29(IIN,IOUT,UPARAM,MAXUPARAM,NUPARAM, . NUVAR,IFUNC,MAXFUNC,NFUNC,PARMAT) C C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),PARMAT(*) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION E,NU,G,A11 C C----------------------------------------------- C U s e r’ s D a t a R e a d i n g C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU A11 = E * (1.-NU) / (1.+NU) / (1.-2.*NU) A12 = E * NU / (1.+NU) / (1.-2.*NU) C C----------------------------------------------- C C h e c k C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF C C----------------------------------------------- C U s e r’s A r g u m e n e n t s D e f i n i t i o n C----------------------------------------------- NUVAR = 2 NFUNC = 0 NUPARAM = 3 UPARAM(1) = E UPARAM(2) = A11 UPARAM(3) = A12 C C------------------------------------------------- C O u t p u t F i l e P r i n t C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU 1000 FORMAT( & 5X,' MATERIAL LAW 29',/, 1100 FORMAT( & 5X,'E . . . . . . . . . . . . . . . .=',E12.4/ & 5X,'NU. . . . . . . . . . . . . . .=',E12.4//) C RETURN END

Standardized headers: User’s arguments list (read, written or read/written)

Arguments: Used in communications between Altair Radioss database and user’s subroutines

Local variables: Used in current user’s subroutine

User’s data reading: Reads input user’s data specified in Altair Radioss Starter input file (user’s options: /MAT/USER1/)

Check: Write message

Argument definition: Stores user’s arguments values as user’s parameters There can be returned by a restore function in the Engine user’s subroutine

File print: Prints user’s values in Starter output file

Page 178: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 15

9.3.2 Example Engine Format SUBROUTINE SIGEPS29C( 1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC , 2 NPF ,NPT ,IPT ,IFLAG , 2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 , 3 AREA ,EINT ,THKLY , 4 EPSPXX ,EPSPYY ,EPSPXY ,EPSPYZ ,EPSPZX , 5 DEPSXX ,DEPSYY ,DEPSXY ,DEPSYZ ,DEPSZX , 6 EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX , 7 SIGOXX ,SIGOYY ,SIGOXY ,SIGOYZ ,SIGOZX , 8 SIGNXX ,SIGNYY ,SIGNXY ,SIGNYZ ,SIGNZX , 9 SIGVXX ,SIGVYY ,SIGVXY ,SIGVYZ ,SIGVZX , A SOUNDSP,VISCMAX,THK ,PLA ,UVAR , B OFF ,NGL ,SHF) C C----------------------------------------------- C I N P U T A r g u m e n t s C----------------------------------------------- INTEGER NEL,NUPARAM,NUVAR DOUBLE PRECISION UPARAM(NUPARAM), . DEPSXX(NEL),DEPSYY(NEL), . SIGOXX(NEL),SIGOYY(NEL) C C----------------------------------------------- C O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION SIGNXX(NEL),SIGNYY(NEL) C C----------------------------------------------- C I N P U T O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION UVAR(NEL,NUVAR) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER I DOUBLE PRECISION A1,A2 C C----------------------------------------------- C U s e r ’s P r o g r a m C----------------------------------------------- DO I=1,NEL A1 = UPARAM(2) A2 = UPARAM(3) SIGNXX(I)=SIGOXX(I)+A1*DEPSXX(I)+A2*DEPSYY(I) SIGNYY(I)=SIGOYY(I)+A2*DEPSXX(I)+A1*DEPSYY(I) UVAR(I,1) = SIGNXX(I) UVAR(I,2) = SIGNYY(I) ENDDO C RETURN

END

Standardized headers: User’s arguments list (read, written or read/written)

Input arguments: Used in current routine (user’s program)

Output arguments: Computes in current routine

User’s variable: Used in communications between user’s subroutines

User’s program (on elements: NEL): Reads input arguments and writes output arguments The user’s variables UVAR can be saved in animations file: UVAR(I,1) saved as User Var 1 in animations using /ANIM/ELEM/USER1option in Engine input file.

Local variables: Used in current user’s subroutine

Page 179: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 16

9.4 – Appendix 4 – General User’s Subroutine Format with Extended User Material Laws

9.4.1 Example Starter Format SUBROUTINE LECMUSERnn(IIN IOUT,UPARAM,MAXUPARAM,NUPARAM,

.NUVAR,IFUNC,MAXFUNC,NFUNC,PARMAT) C C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXFUNC,NFUNC, . IFUNC(MAXFUNC) DOUBLE PRECISION UPARAM(MAXUPARAM),PARMAT(*) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- DOUBLE PRECISION E,NU,G,A11 C C----------------------------------------------- C U s e r’ s D a t a R e a d i n g C----------------------------------------------- READ(IIN,'(2F20.0)')E,NU A11 = E * (1.-NU) / (1.+NU) / (1.-2.*NU) A12 = E * NU / (1.+NU) / (1.-2.*NU) C C----------------------------------------------- C C h e c k C----------------------------------------------- IF(NU.LT.0.0.OR.NU.GE.0.5)THEN WRITE(IOUT,*)' ** ERROR : WRONG NU VALUE' ENDIF C C----------------------------------------------- C U s e r’s A r g u m e n e n t s D e f i n i t i o n C----------------------------------------------- NUVAR = 2 NFUNC = 0 NUPARAM = 3 UPARAM(1) = E UPARAM(2) = A11 UPARAM(3) = A12 C C------------------------------------------------- C O u t p u t F i l e P r i n t C------------------------------------------------- WRITE(IOUT,1000) WRITE(IOUT,1100)E,NU 1000 FORMAT( & 5X,' MATERIAL LAW 12',/) 1100 FORMAT( & 5X,'E . . . . . . . . . . . . . . .=',E12.4/ & 5X,'NU. . . . . . . . . . . . .=',E12.4//)C RETURN END

Standardized headers: User’s arguments list (read, written or read/written)

Arguments: Used in communications between Altair Radioss database and user’s subroutines

Local variables: Used in current user’s subroutine

User’s data reading: Reads input user’s data specified in Altair Radioss Starter input file (user’s options: /MAT/USER1/)

Argument definition: Stores user’s arguments values as user’s parameters There can be returned by a restore function in the Engine user’s subroutine

File print: Prints user’s values in Starter output file

Check: Write message

Page 180: Altair Radioss User’s Code Interface

Altair Radioss USER’S CODE | APPENDIX

JAN 2019 17

9.4.2 Example Engine Format SUBROUTINE LUSERnnC( 1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC , 2 NPF ,NGL 2 TF ,TIME ,TIMESTEP,UPARAM ,RHO0 , 3 AREA ,EINT ,SHF , 4 SOUNDSP,VISCMAX ,PLA ,UVAR , 5 OFF ,SIGY ,USERBUF) C C----------------------------------------------- C I N P U T A r g u m e n t s C----------------------------------------------- INTEGER NEL,NUPARAM,NUVAR DOUBLE PRECISION UPARAM(NUPARAM), . DEPSXX(NEL),DEPSYY(NEL), . SIGOXX(NEL),SIGOYY(NEL) C C----------------------------------------------- C O U T P U T A r g u m e n t s C----------------------------------------------- DOUBLE PRECISION SIGNXX(NEL),SIGNYY(NEL) C C----------------------------------------------- C I N P U T O U T P U T A r g u m e n t s C------------------------------------------------ DOUBLE PRECISION UVAR(NEL,NUVAR) C C----------------------------------------------- C L o c a l V a r i a b l e s C----------------------------------------------- INTEGER I DOUBLE PRECISION A1,A2 C C----------------------------------------------- C U s e r ’s P r o g r a m C----------------------------------------------- DO I=1,NEL A1 = UPARAM(2) A2 = UPARAM(3) SIGNXX(I)=SIGOXX(I)+A1*DEPSXX(I)+A2*DEPSYY(I) SIGNYY(I)=SIGOYY(I)+A2*DEPSXX(I)+A1*DEPSYY(I) UVAR(I,1) = SIGNXX(I) UVAR(I,2) = SIGNYY(I) ENDDO C RETURN

Input arguments: Used in current routine (user’s program)

User’s program (on elements: NEL): Reads input arguments and writes output arguments The user’s variables UVAR can be saved in animations file: UVAR(I,1) saved as User Var 1 in animations using /ANIM/ELEM/USER1 option in 0001.rad.

Standardized headers: User’s arguments list (read, written or read/written)

Output arguments: Computes in current routine

User’s variable: Used in communications between user’s subroutines.

Local variables: Used in current user’s subroutine

END