radioss user’s code interface - altair university user’s code contents october, 2011 1 table of...

143
RADIOSS USER’S CODE INTERFACE Octobre 2011 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]

Upload: lyminh

Post on 14-Mar-2018

269 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE INTERFACE

Octobre 2011

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: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE CONTENTS

October, 2011 1

TABLE OF CONTENTS

TABLE OF CONTENTS ......................................................................................................................... 1

INTRODUCTION .................................................................................................................................... 3

1 GLOBAL USER WINDOW............................................................................................................ 7

1.1 STARTER SUBROUTINE USERWIS ............................................................................................................ 7 1.2 ENGINE SUBROUTINE USERWI ................................................................................................................. 8 1.3 EXAMPLE of user window ............................................................................................................................ 10

1.3.1 Starter user’s subroutine USERWIS ........................................................................................................ 10 1.3.2 Engine user’s subroutine USERWI .......................................................................................................... 11

2 USER MATERIAL LAWS 29, 30, 31 .......................................................................................... 12

2.1. STARTER SUBROUTINE LECMnn .................................................................................................... 12 2.2. ENGINE SUBROUTINE SIGEPSnn for SOLID elements ................................................................... 13

2.2.1. Additional necessary data for compatibility with HEPH ................................................................... 16 2.3. EXAMPLE of user’s material law for SOLID elements ........................................................................ 17

2.3.1. User’s input data (/MAT/USERn/ option) ........................................................................................ 17 2.3.2. Starter user’s subroutine LECMnn .................................................................................................... 17 2.3.3. Engine user’s subroutine SIGEPSnn ................................................................................................. 19

2.4. ENGINE SUBROUTINE SIGEPSnnC for SHELL elements ................................................................ 20 2.4.1. Shell element law output ................................................................................................................... 23 2.4.2. Additional data necessary for compatibility with QEPH ................................................................... 24

2.5. EXAMPLE of user’s material law for SHELL elements ........................................................................ 25 2.5.1. User’s input data (/MAT/USERn/ option) ......................................................................................... 25 2.5.2. Starter user’s subroutine LECMnn .................................................................................................... 25 2.5.3. Engine user’s subroutine SIGEPSnnC ............................................................................................... 27

3 EXTENDED USER MATERIAL LAWS ......................................................................................... 35

3.1 STARTER SUBROUTINE LECMUSERnn .............................................................................................. 35 3.2 ENGINE SUBROUTINE LUSERnn for SOLID elements ......................................................................... 36

3.2.1 Additional necessary data for compatibility with HEPH ................................................................... 39 3.3 EXAMPLE of user’s material law for SOLID elements ............................................................................. 39

3.3.1 User’s input data (/MAT/USERnn/ option) ...................................................................................... 40 3.3.2 Starter user’s subroutine LECMUSERnn .......................................................................................... 40 3.3.3 Engine user’s subroutine LUSERnn .................................................................................................. 41

3.4 ENGINE SUBROUTINE LUSERnnC for SHELL elements ..................................................................... 44 3.4.1 Shell element law output ................................................................................................................... 47 3.4.2 Additional data necessary for compatibility with QEPH ................................................................... 48

3.5 EXAMPLE of user’s material law for SHELL elements ............................................................................ 48 3.5.1 User’s input data (/MAT/USERnn/ option) ....................................................................................... 48 3.5.2 Starter user’s subroutine LECMUSERnn .......................................................................................... 49 3.5.3 Engine user’s subroutine LUSERnnC ............................................................................................... 50

4. USER PROPERTY ELEMENTS ..................................................................................................... 59

4.1 STARTER SUBROUTINE LECGnn for SPRING and SOLID elements .................................................. 59 4.2 STARTER SUBROUTINE initialization RINInn for SPRING elements ................................................... 60 4.3 STARTER SUBROUTINE initialization SINInn for SOLID elements ...................................................... 61 4.4 ENGINE SUBROUTINE RUSERnn for SPRING elements ...................................................................... 63 4.5 ENGINE SUBROUTINE SUSERnn for SOLID elements ......................................................................... 65 4.6 Functions to access user’s properties and materials .................................................................................... 68

4.6.1 Store and restore functions for user subroutines ................................................................................ 68 4.6.2 The storage functions : ...................................................................................................................... 68 4.6.3 The restore functions for user properties, materials and functions: ................................................... 69 4.6.4 Example of storage / retrieve procedures for RADIOSS functions and tables .................................. 71

Page 3: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE CONTENTS

October, 2011 2

4.7 EXAMPLE of user’s SPRING element ...................................................................................................... 74 4.7.1 User’s input data (/PROP/USERn/ option) ....................................................................................... 74 4.7.2 Starter property user’s subroutine LECGnn ...................................................................................... 75 4.7.3 Starter property initialization user’s subroutine RINInn.................................................................... 76 4.7.4 Starter material user’s subroutine LECMnn ...................................................................................... 79 4.7.5 Engine property user’s subroutine RUSERnn ................................................................................... 81

4.8 EXAMPLE of user’s triangular SHELL elements (using solid property) ................................................... 85 4.8.1 User’s input data (/MAT/PROPn/ option) ......................................................................................... 85 4.8.2 Starter property user’s subroutine LECGnn ...................................................................................... 85 4.8.3 Starter property initialization user’s subroutine SINInn .................................................................... 87 4.8.4 Starter material user’s subroutine LECMnn ...................................................................................... 91 4.8.5 Engine property user’s subroutine SUSERnn .................................................................................... 92 4.8.6 Engine material user’s subroutine SIGEPSnn ................................................................................. 101

5 USER SENSORS .......................................................................................................................... 103

5.1 STARTER SUBROUTINE LECSEN_USRn ............................................................................................... 103 5.1.1 Storage functions for sensor parameters (starter only) .................................................................... 103

5.2 ENGINE SUBROUTINE USER_SENSn ................................................................................................ 104 5.3 Functions for user’s sensors ...................................................................................................................... 104

5.3.1 Restore functions for sensor parameters: ......................................................................................... 104 5.3.2 Read / write functions of working array buffer:.............................................................................. 104 5.3.3 Setting/ checking global activation flag .......................................................................................... 105 5.3.4 Access functions to RADIOSS time/cycle variables. ...................................................................... 105 5.3.5 Nodal value access : ........................................................................................................................ 105 5.3.6 Accelerator access functions ........................................................................................................... 106

5.4 EXAMPLE of user’s sensor ...................................................................................................................... 107 5.4.1 User’s input data (/SENSOR/USERm option) ................................................................................ 107 5.4.2 Starter sensor user’s subroutine LECSEN_USRm .......................................................................... 107 5.4.3 Starter material user’s subroutine LECMnn .................................................................................... 108 5.4.4 Engine sensor user’s subroutine USER_SENSm............................................................................. 110 5.4.5 Engine material user’s subroutine SIGEPSnnC for shell elements .................................................. 111

6. USER FAILURE MODELS ............................................................................................................ 113

6.2 ENGINE Subroutine for solid elements (FnnLAW): .................................................................................... 114 6.4 EXAMPLE SUBROUTINE OF USER FAILURE MODEL FOR SHELL and SOLID elements for RADIOSS STARTER ......................................................................................................................................... 118

6.4.1 Engine user’s subroutine for SOLID elements ....................................................................................... 119 6.4.2 Engine user’s subroutine for SHELL elements ................................................................................ 120

APPENDIX ........................................................................................................................................... 123

APPENDIX 1 – Creating user’s executables ..................................................................................... 124

APPENDIX 2 – Available user’s arguments ..................................................................................... 128

1. Available starter user’s arguments ............................................................................................................ 128 2. Available engine user’s arguments ............................................................................................................ 130

APPENDIX 3 – Communication between user’s subroutines and RADIOSS code ...................... 134

APPENDIX 4 – General user’s subroutine format with material laws 29, 30, 31 ......................... 139

1. Starter format (example) ........................................................................................................................... 139 2. Engine format (example) .......................................................................................................................... 140

APPENDIX 5 – General user’s subroutine format with extended user material laws ................. 141

1. Starter format (example) ................................................................................................................................. 141 2. Engine format (example) ................................................................................................................................. 142

Page 4: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE INTRODUCTION

October, 2011 3

INTRODUCTION

This document describes the interface between RADIOSS and user’s subroutines.

RADIOSS allows user to define a private code of five different categories:

- 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

To link to RADIOSS a user module of each category, one has to provide two subroutines ; one linked with RADIOSS STARTER and the other with RADIOSS ENGINE. The STARTER subroutines are only used to read user data and initialise specified parameters. The ENGINE subroutines define and execute user programs. Storage arrays are provided for each type of application. The communication between RADIOSS and the User’s subroutines is done by passing function arguments and 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 on workstation (DEC, HP, SGI, SUN, IBM...) and REAL on CRAY.

Otherwise, all user subroutines may use special access functions to retrieve information from RADIOSS database.

In next chapters we will describe the standarized headers for each user subroutine, the access functions and link procedures. Example program codes for each category will also be provided.

Page 5: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE INTRODUCTION

October, 2011 4

Table 1: RADIOSS STARTER/ 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)

RADIOSS STARTER RADIOSS ENGINE

USER’S INPUT OPTIONS ENGINE FILE OPTIONS

(specify user data and storrage arrays) (save user variables in animations)

User material /MAT/USERn

/ANIM/ keyword/USRi /ANIM/ keyword/USRj/k

User property /PROP/USERn

User sensor /SENSOR/USERm

USER’S SUBROUTINES

Read and initialise user data: Define and execute user programs:

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 sensor LECSEN_USERm.f USER_SENm.f

OBJECT FILES (compile user’s subroutines to get object files)

User window USERWIS.o USERWI.o

User material

laws 29, 30, 31

shell LECMnn.o SIGEPSnnC.o

solid LECMnn.o SIGEPSnn.o

User property

spring LECGnn.o and RINInn.o RUSERnn.o

solid LECGnn.o and SINInn.o SUSERnn.o

User sensor LECSEN_USERm.o USER_SENm.o

OBJECT LIBRARY (link object files to get new executables)

"RADIOSS_engine_library".a "RADIOSS_starter_library".a

USER’S EXECUTABLES

"user_engine_executable" "user_starter_executable"

Page 6: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE INTRODUCTION

October, 2011 5

Figure 1: STARTER and ENGINE procedures including user’s options.

Save user’s variable in the animation file:

The user’s variables UVAR(element_number,i) defined in the user’s material law can be saved in animation file using the output USERi as keyword3 in the engine option /ANIM/ keyword2/ keyword3. The number of saved variables is limited to 18 ( 181 ≤≤ i ). Results is 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).

Starter INPUT file

Starter LISTING file

Engine file D01

Engine OUTPUT 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

RADIOSS STARTER CODE (database)

STARTER USER’S SUBROUTNE(S)

Compile

Compile

Link

Link

STARTER library

ENGINE library

���� Materials ���� Properties ���� Sensors � Read user’s data stored in user’s options (starter input file) � Initialize user’s variables

RADIOSS ENGINE CODE (database)

ENGINE USER’S SUBROUTNE(S)

Communication by:

- user’s arguments (defined in headers)

Communication by:

- user’s arguments (defined in headers)

Return user’s input data using:

- starter user’s arguments

- access functions (GET_U)

RADIOSS STARTER

RADIOSS ENGINE

���� Materials ���� Properties ���� Sensors

� Define and execute user’s program(s)

RESTART file

Page 7: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SUBROUTINES DESCRIPTION

October, 2011 6

USER’S SUBROUTINES DESCRIPTION

Page 8: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE GLOBAL USER’S WINDOW

October, 2011 7

1 GLOBAL USER WINDOW

Since version 4.4 of RADIOSS, it is possible to define a global user window. This is the most general interface between Rasioss and external code.

To define a user’s window, one has to provide two subroutines. One of them must be linked with RADIOSS STARTER and the other with RADIOSS ENGINE.

The STARTER subroutine is called USERWIS 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.

� All communications between RADIOSS and the User’s subroutines are done through the argument list.

1.1 STARTER SUBROUTINE USERWIS

This subroutine is used to read the User’s input data. The number of specific cards and the format of these cards is fixed by the user.

The argument list of USERWIS is as follows:

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

SUBROUTINE USERWIS(

1 IIN ,IOUT ,MAXNUVAR,NUVAR ,MAXNUVARI ,NUVARI ,

2 NUMNOD,IUPARAM,IUVAR ,ITAB ,

3 UVAR ,X ,V ,VR ,MASS ,INER )

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

Where:

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

MAXNUVAR (integer scalar): maximum possible size of global user float array. This is the maximum memory size available for float. If MAXNUVAR is smaller than what you need, you have to increase the memory request in /MEMORY option.

NUVAR (integer scalar): needed size of global user float array

MAXNUVARI (integer scalar): maximum possible size of global user integer array. This is the maximum memory size available for integer. If MAXNUVARI is smaller than what you need, you have to increase the memory request in /MEMORY option.

Page 9: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE GLOBAL USER’S WINDOW

October, 2011 8

NUVARI (integer scalar): needed size of global user integer array.

NUMNOD (integer scalar): number of nodes (defined with /NODE option)

IUPARAM(*) (integer array): parameters to be transferred to RADIOSS. This array is not yet used.

IUVAR(MAXNUVARI) (integer array): is an array of size MAXNUVARI in RADIOSS Starter. This array is transmitted versus restart file to RADIOSS Engine. In RADIOSS Engine this array has a size of NUVARI.

ITAB(NUMNOD) (integer array): is an array of size NUMNOD. This array define the node ID versus RADIOSS internal node number.

UVAR(MAXNUVAR) (float array): is an array of size MAXNUVAR in RADIOSS Starter. This array is transmitted versus restart file to RADIOSS Engine. In RADIOSS Engine this array has a size of NUVAR.

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.

1.2 ENGINE SUBROUTINE USERWI

This subroutine calculates the internal forces and moments versus the velocity, the old

forces and moments and user’s variables and parameters.

The argument list of USERWI is as follows:

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

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 )

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

Page 10: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE GLOBAL USER’S WINDOW

October, 2011 9

where:

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): is an array of size NUVARI. This array contain user data and variables and is saved on restart file.

ITAB(NUMNOD) (integer read only array): is an array of size NUMNOD. This array define 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 has to be increased if needed..

UVAR(NUVAR) (float read-write array): is an array of size NUVAR . This array contain 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 initial rotational velocities.

MASS(NUMNOD) (float read only array): Nodal mass.

INER(NUMNOD) (float read only array): Nodal spherical inertia.

Page 11: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE GLOBAL USER’S WINDOW

October, 2011 10

STIFN(NUMNOD) (float read write array): Nodal stiffness for nodal time step formulation. The added user stiffness has to be added to STIFN.

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.

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.3 EXAMPLE of user window

1.3.1 Starter user’s subroutine USERWIS

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

C This subroutine initialize global user’s wind ow

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

SUBROUTINE USERWIS(

1 IIN ,IOUT ,MAXNUVAR,NUVAR ,MAXNUVARI ,NUVARI ,

2 NUMNOD,IUPARAM,IUVAR ,ITAB ,

3 UVAR ,X ,V ,VR ,MASS ,INER )

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

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

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

C#include "implicit_f.inc"

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

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

C IUVAR for integers

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

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

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

DOUBLE PRECISION

. UVAR(MAXNUVAR) ,X(3,NUMNOD) ,V(3,NUMNOD) , VR(3,NUMNOD) ,

. MASS(NUMNOD) ,INER(NUMNOD)

INTEGER

1 IIN ,IOUT ,MAXNUVAR ,NUVAR ,MAXNUVARI ,N UVARI ,

2 NUMNOD,IUVAR(MAXNUVARI),ITAB(NUMNOD),IUPARA M(*)

C

Page 12: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE GLOBAL USER’S WINDOW

October, 2011 11

RETURN

END

1.3.2 Engine user’s subroutine USERWI

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

C Global user window subroutine

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

SUBROUTINE USERWI(

1 IIN ,IOUT ,NUVAR ,NUVARI ,NUMNOD ,NCY CLE ,

2 LENWA ,IUVAR ,ITAB ,

3 TT ,DT1 ,DT2 ,USREINT,EXWORK ,

4 UVAR ,D ,X ,V ,VR ,MAS S ,

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,NCYC LE ,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) ,MA SS(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 13: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 12

2 USER MATERIAL LAWS 29, 30, 31

From version 2.3 of RADIOSS, it is possible to define up to 3 material user’s laws (law number 29, 30 and 31) for 3D and 2D solid elements, and for 3D shell elements. User’s law for beam or truss elements are not yet available.

To define a user’s law, one has to provide two subroutines for each law. One of this subroutine must be linked with RADIOSS STARTER and the other with RADIOSS ENGINE.

The STARTER subroutine is called LECM29 , LECM30 or LECM31 and is used to read the 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.

� All communications between RADIOSS and the User’s subroutines are done through the argument list.

2.1. STARTER SUBROUTINE LECMnn

This subroutine is used to read the User’s law input data. The seven first material cards (see RADIOSS STARTER Input manual 3.1 to 4.1) are read before this subroutine is called. The number of specific material cards and the format of these cards is free.

The argument list of LECMnn is as follows:

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

SUBROUTINE LECMnn(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM,

. NUVAR,IFUNC,MAXFUNC,NFUNC,PARMAT )

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

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 the material data.

MAXNUPARAM (integer read only scalar): maximum possible size of UPARAM.

NUPARAM (integer scalar): effective size of UPARAM (MAXNUPARAMŠNUPARAM, MAXNUPARAM is set to 1000)

NUVAR (integer scalar): number of extra variables needed for each element in SIGEPSnn

Page 14: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 13

IFUNC (integer array): Array with a size of NFUNC containing the list of 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 the function numbers.

MAXFUNC (integer read only scalar): maximum possible size of IFUNC.

NFUNC (integer scalar): number of RADIOSS functions. (MAXFUNCŠNFUNC, MAXFUNC is set to 100)

STIFINT (float scalar): modulus needed to compute the interface stiffness. The Young’s or the bulk modulus can be used to define this value. This value is also used in RADIOSS STARTER to make an estimation of the time step.

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

The argument list of SIGEPSnn is as follows:

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

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 )

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

The user’s material law can be used in isotropic or orthotropic mode. In isotropic mode the directions XX, YY,... are the global reference frame axis. In isotropic mode the old elastoplastic stresses (arrays SIGOXX, SIGOYY,...) are already rotated to take into account the rigid body rotation.

In orthotropic mode the directions are the orthotropic frame axis.

One must use the Fortran float external function FINTER to get the value Y of the function for the abscissa X.

Page 15: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 14

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

Y the interpolated value

X the abscissa value of the function

I the ith user’s function

DYDX is the slope

NPF and TF are private function parameters.

The SOUNDSP array should always be set by the user. It is used in the calculation of the stability time step, of the hourglass forces and of the artificial viscous pressure Q. In isotropic material the sound speed value should be equal to the plane wave speed.

For an elastic or elastoplastic material the sound speed is given by:

00

23/4

ρµλ

ρ+=+= GK

c

with K the bulk modulus, G the shear modulus and� λ and µ the Lame parameters.

( )υ213 −= E

K

( )υµ

+==

12

EG

( )( )( )υυ

υµλ211

12

−+−=+ E

The VISCMAX is used when the material law formulation is viscous and is used in the calculation of the time step stability.

Argument description:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by 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 this material law.

IFUNC (integer array read only): array of size NFUNC containing 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.

Page 16: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 15

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.

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, 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, ZZ and γ strain increments in directions XY, YZ, ZX.

EPSXX, EPSYY, EPSZZ, EPSXY, EPSYZ, EPSZX (float array read only): array of size NEL containing ε strains in directions XX, YY, ZZ and γ strains in directions XY, YZ, 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, ZX.

SIGNXX , SIGNYY , SIGNZZ , SIGNXY , SIGNYZ, SIGNZX (float array write only): array of size NEL containing new computed elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, 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, 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 values should be 0 if the element is OFF and 1 if the element is ON.

Page 17: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 16

2.2.1. Additional necessary data for compatibility with HEPH

Since version 44q : an addition has been made so that user material routines can be compatibled with HEPH solid elements.

A way has been introduced for the user material routines to send back to RADIOSS additional information relative to plasticity, which is necessary for HEPH. The arguments of sigeps29.F, sigeps30.F, sigeps31.F remain the same.

Yield value and Plastic strain value must be given back to RADIOSS in the user law (sigeps29.F, sigeps30.F, or sigeps31.F) in order this law to be compatible with HEPH element. This can be done through a call to routine SET_U_SOLPLAS, since version 44q.

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 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 which are defined in the routine SET_U_SOLPLAS have to be declared as local variables in the user material routines sigeps29.F, sigeps30.F, sigeps31.F with a sufficient length NEL.

It is recommanded to use the following statement in case of these routines are compiled with a compiler which supports FORTRAN 90 :

DOUBLE PRECISION YLD(NEL), PLA(NEL)

But this statement is not possible if the compiler only supports FORTRAN 77 since NEL is set by RADIOSS and given as an argument to the user routine. Therefore, the dynamic allocation is intended in this statement. In such a case, one can state :

DOUBLE PRECISION YLD(4096), PLA(4096)

which must be sufficient in all cases (the value of NEL given from RADIOSS to the user routine is less than 4096).

Page 18: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 17

2.3. EXAMPLE of user’s material law for SOLID elements

EXAMPLE: An elastic material law is defined for solid elements. Input user’s data are: - density, - Young’s modulus, - Poisson ratio.

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

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

SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPAR AM,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,MAXF UNC,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

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

C

Model is made up with solid elements:

Page 19: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 18

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

C INPUT FILE READING (USER DATA)

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

READ(IIN,'(2F16.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 MAXUPA RAM'

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 20: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 19

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)

Page 21: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 20

C X : x

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

C IFUNC(J): FUNCTION INDEX

C J : FIRST(J=1), SECOND(J=2) .. FUNCT ION 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

2.4. ENGINE SUBROUTINE SIGEPSnnC for SHELL elements

This subroutine calculates the stress tensor versus the strain tensor, strain rate tensor, or

user variables.

Page 22: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 21

The argument list of SIGEPSnnC is as follows:

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

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)

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

The user’s material law can be used in isotropic mode with PID 1 or in orthotropic mode with PID 9,10,11. The directions XX, YY,... are the shell local reference frame axis. Stress are computed at each integration point.

One 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) with:

Y the interpolated value

X the abscissa value of the function

I the ith user’s function

DYDX is the slope

NPF and TF are private function parameters.

The SOUNDSP array should always be set by the user. It is used in the calculation of the stability time step, of the hourglass forces. The sound speed value should be equal to the plane wave speed.

For an elastic or elastoplastic material the sound speed is given by:

( ) 021 ρυ−

= Ec

The VISCMAX is used when the material law formulation is viscous and is used in the calculation of the time step stability.

Page 23: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 22

Arguments description:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by 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 this material law.

IFUNC (integer array read only): array of size NFUNC containing 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 integration point.

IFLAG (integer array read only scalar) : array of size NEL containing the 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 containing initial densities.

AREA (float array read only): array of size NEL containing current element surfaces.

EINT (float array read only): array of size 2*NEL containing internal membrane and bending energy.

THKLY (float array write only): array of size NEL containing 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, YY and γ strain rates in directions XY, YZ, ZX.

Page 24: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 23

DEPSXX, DEPSYY, DEPSXY, DEPSYZ, DEPSZX (float array read only): arrays of size NEL containing ε strain increments in directions XX, YY and γ strain increments in directions XY, YZ, ZX.

EPSXX, EPSYY, EPSXY, EPSYZ, EPSZX (float array read only): array of size NEL containing ε strains in directions XX, YY and γ strains in directions XY, YZ, 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, 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, ZX.

SIGVXX , SIGVYY , SIGVZZ , SIGVXY , SIGVYZ , SIGVZX (float array write only): array of size NEL containing viscous stresses in directions XX, YY, XY, YZ, 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 values should be 0 if the element is OFF and 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, no variable specific to user’s law for shell elements are saved in time-history and animation.

Page 25: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 24

2.4.2. Additional data necessary for compatibility with QEPH

Since version 44q : an addition has been made so that user material routines can be compatibled with QEPH shell elements.

A way has been introduced for the user material routines to send back to RADIOSS additional information relative to plasticity, which is necessary for QEPH. The arguments of sigeps29c.F, sigeps30c.F, sigeps31c.F remain the same.

Yield value and value Et/E (tangent modulus divided by Young modulus) must be given back to RADIOSS in the user law (sigeps29c.F, sigeps30c.F, or sigeps31c.F) in order this law to be compatible with QEPH element. This can be done through a call to routine SET_U_SHLPLAS, since version 44q.

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 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 which are defined in the routine SET_U_SHLPLAS have to be declared as local variables in the user material routines sigeps29c.F, sigeps30c.F, sigeps31c.F with a sufficient length NEL.

It is recommanded to use the following statement in case of these routines are compiled with a compiler which supports FORTRAN 90 :

DOUBLE PRECISION YLD(NEL), ETSE(NEL)

But this statement is not possible if the compiler only supports FORTRAN 77 since NEL is set by RADIOSS and given as an argument to the user routine. Therefore, the dynamic allocation is intended in this statement. In such a case, one can state :

Page 26: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 25

DOUBLE PRECISION YLD(4096), ETSE(4096)

which must be sufficient in all cases (the value of NEL given from RADIOSS to the user routine is less than 4096).

2.5. EXAMPLE of user’s material law for SHELL elements

EXAMPLE: A Johnson-Cook elasto-plastic material law is defined for shell elements. The user’s input data are: - density, - Young’s modulus, - Poisson ratio, - Yield stress, - hardening parameter, - hardening modulus, - maximum stress, - maximum strain.

The used Johnson Cook model is: NplBA εσ += .

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

- Projection by return radial, - Iterative projection with three Newton iterations.

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

[…]

2.5.2. Starter user’s subroutine LECMnn

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

Mesh example made up with shell elements:

Page 27: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 26

C This subroutine reads the user material param eters.

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

SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPAR AM,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,MAXF UNC,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,'(2F16.0)')E,NU

READ(IIN,'(5F16.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 MAXUPA RAM'

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)

Page 28: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 27

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

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 ,

Page 29: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 28

A SOUNDSP,VISCMAX,THK ,PLA ,UVAR ,

B OFF ,NGL )

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)

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,

Page 30: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 29

. 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,NU,S12,F,DF,Q2,YLD_I,NU3,NU2

.

DOUBLE PRECISION

. SVM(NEL),AA(NEL),BB(NEL),PP(NEL),QQ(N EL),

. DPLA_I(NEL),X1(NEL),Y1(NEL),Z1(NEL),S VM1(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)

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

Page 31: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 30

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

C

C

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

C C - STRESSES, PLASTIC STRAIN AND THICKNESS CA LCULATION

C

C COMPUTE PLASTICALLY ADMISSIBLE STRESSES

C Two available computations according to IPLAS flag

Page 32: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 31

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

C

IF(IPLAS.EQ.0)THEN

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

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

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

C

C print *, 'PROJECTION by RADIAL RETURN - Ipla s=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))*(E PSXX(I)-EPSYY(I))

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

ENDDO

C

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

C -> Von Mises criterion (non principal stresse s)

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)

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

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

ENDDO

Page 33: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 32

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 stresse s)

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)

Page 34: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 33

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

. -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 correcti on (Iplas=2)

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

C

C print *, 'PROJECTION by RADIAL RETURN - Ipla s=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

Page 35: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 34

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(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 36: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 35

3 EXTENDED USER MATERIAL LAWS

From version 5.2 of RADIOSS, it is possible to define 99 material user’s laws for 3D and 2D solid elements, and for 3D shell elements. User’s law for beam or truss elements are not yet available.

To define a user’s law, one has to provide two subroutines for each law. One of this subroutine must be linked with RADIOSS STARTER and the other with RADIOSS ENGINE.

The STARTER subroutine is called LECMUSERnn where nn = 01, 02, 03, … 99 and is used to read the material data and to initialize material parameters.

The ENGINE subroutine for solids is called LUSERnn where nn = 01, 02, 03, … 99 and is used to compute the solid element stress tensor at the integration point. The corresponding shell subroutines are LUSERnnC, nn = 01, 02, 03, … 99.

� All communications between RADIOSS and the User’s subroutines are done through the argument list.

3.1 STARTER SUBROUTINE LECMUSERnn

This subroutine is used to read the User’s law input data. The seven first material cards (see RADIOSS STARTER Input manual 3.1 to 4.1) are read before this subroutine is called. The number of specific material cards and the format of these cards is free.

The argument list of LECMUSERnn is as follows:

SUBROUTINE LECMUSERnn(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM,

. NUVAR,IFUNC,MAXFUNC,NFUNC,PARMAT, USERBUF )

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 the material data.

MAXNUPARAM (integer read only scalar): maximum possible size of UPARAM.

NUPARAM (integer scalar): effective size of UPARAM (MAXNUPARAMŠNUPARAM, MAXNUPARAM is set to 1000)

NUVAR (integer scalar): number of extra variables needed for each element in SIGEPSnn

IFUNC (integer array): Array with a size of NFUNC containing the list of RADIOSS functions used for this law. The function numbers have to be stored in

Page 37: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 36

this array and not in UPARAM because of a possible renumbering of the function numbers.

MAXFUNC (integer read only scalar): maximum possible size of IFUNC.

NFUNC (integer scalar): number of RADIOSS functions. (MAXFUNCŠNFUNC, MAXFUNC is set to 100)

STIFINT (float scalar): modulus needed to compute the interface stiffness. The Young’s or the bulk modulus can be used to define this value. This value is also used in RADIOSS STARTER to make an estimation of the time step.

USERBUF (data structure read-write) is defined in LAW_USER.mod Inside LECMUSERnn this module has to be used.

This 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

3.2 ENGINE SUBROUTINE LUSERnn for SOLID elements

This subroutine calculates the stress tensor versus the strain tensor, strain rate tensor,

density, volume, internal energy or user variables.

The argument list of LUSERnn is as follows:

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 )

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

The user’s material law can be used in isotropic or orthotropic mode. In isotropic mode the directions XX, YY,... are the global reference frame axis. In isotropic mode the old elastoplastic stresses (arrays SIGOXX, SIGOYY,...) are already rotated to take into account the rigid body rotation.

In orthotropic mode the directions are the orthotropic frame axis.

One 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) with:

Page 38: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 37

Y the interpolated value

X the abscissa value of the function

I the ith user’s function

DYDX is the slope

NPF and TF are private function parameters.

The SOUNDSP array should always be set by the user. It is used in the calculation of the stability time step, of the hourglass forces and of the artificial viscous pressure Q. In isotropic material the sound speed value should be equal to the plane wave speed.

For an elastic or elastoplastic material the sound speed is given by:

00

23/4

ρµλ

ρ+=+= GK

c

with K the bulk modulus, G the shear modulus and� λ and µ the Lame parameters.

( )υ213 −= E

K

( )υµ

+==

12

EG

( )( )( )υυ

υµλ211

12

−+−=+ E

The VISCMAX is used when the material law formulation is viscous and is used in the calculation of the time step stability.

Argument description:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by 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 this material law.

IFUNC (integer array read only): array of size NFUNC containing 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.

Page 39: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 38

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.

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 values should be 0 if the element is OFF and 1 if the element is ON.

USERBUF (data structure read-write) is defined in LAW_USERSO.mod Inside LUSERnn this module has to be used.

This data structure contains:

ID (Integer read only): material ID defined in starter input deck.

NCYCLE (Integer read only): cycle number, first cycle is equal to zero.

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

Page 40: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 39

directions XX, YY, ZZ and γ strain increments in directions XY, YZ, ZX.

EPSXX, EPSYY, EPSZZ, EPSXY, EPSYZ, EPSZX (float array read only): array of size NEL containing ε strains in directions XX, YY, ZZ and γ strains in directions XY, YZ, 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, ZX.

R11, R12, R13, R21, R22, R23, R31, R32, R33 (float array write only): array of size NEL containing rotation matrix from global skew system to element skew system.

SIGNXX , SIGNYY , SIGNZZ , SIGNXY , SIGNYZ, SIGNZX (float array write only): array of size NEL containing new computed elastoplastic stresses in directions XX, YY, ZZ, XY, YZ, 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, 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.

3.2.1 Additional necessary data for compatibility with HEPH

PLA (float array write only): array of size NEL containing plastic strain.

SIGY (float array read only): array of size NEL containing yield stress.

3.3 EXAMPLE of user’s material law for SOLID elements

EXAMPLE: An elastic material law is defined for solid elements. Input user’s data are: - density, • Young’s modulus, • Poisson ratio.

Page 41: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 40

3.3.1 User’s input data (/MAT/USERnn/ 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---|

[…]

3.3.2 Starter user’s subroutine LECMUSERnn

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

C This subroutine reads the user material param eters.

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

SUBROUTINE LECMUSERnn(IIN,IOUT,UPARAM,MAXUPARAM,NUPARAM,

. NUVAR,IFUNC,MAXFUNC,NFUNC,STI FINT,

. USERBUF)

USE LAW_USER

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,MAXF UNC,NFUNC,

. IFUNC(MAXFUNC)

DOUBLE PRECISION UPARAM(MAXUPARAM),STIFINT

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

TYPE(ULAWBUF) :: USERBUF

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

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

C

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

Model is made up with solid elements:

Page 42: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 41

C INPUT FILE READING (USER DATA)

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

READ(IIN,’(2F16.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 MAXUPARA M’

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

3.3.3 Engine user’s subroutine LUSERnn

Page 43: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 42

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

C This subroutine computes elastic stresses.

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

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)

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

USE LAW_USERSO

C

C INPUT DATA

C

INTEGER NEL, NUPARAM, NUVAR,NGL(NEL)

DOUBLE PRECISION

. TIME,TIMESTEP,UPARAM(NUPARAM),

. RHO(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),

. RHO0(NEL)

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

C O U T P U T DATA

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

DOUBLE PRECISION

. SOUNDSP(NEL),VISCMAX(NEL),

. SIGNXX(NEL),SIGNYY(NEL),SIGNZZ(NEL),

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

. SIGVXX(NEL),SIGVYY(NEL),SIGVZZ(NEL),

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

. DPLA(NEL)

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

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

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

DOUBLE PRECISION

. UVAR(NEL,NUVAR), OFF(NEL),PLA(NEL), SIGY(NE L)

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

TYPE(ULAWINTBUF) :: USERBUF

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) .. FUNCT ION USED FOR THIS LAW

C NPF,TF : FUNCTION PARAMETER

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

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

Page 44: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 43

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

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

INTEGER I,J

DOUBLE PRECISION

. A11,A12,G

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

C USER VARIABLES INITIALIZATION

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

A11 = UPARAM(1)

A12 = UPARAM(2)

G = UPARAM(3)

C Input Data structure

SIGOXX = USERBUF%SIGOXX

SIGOYY = USERBUF%SIGOYY

SIGOZZ = USERBUF%SIGOZZ

SIGOXY = USERBUF%SIGOXY

SIGOYZ = USERBUF%SIGOYZ

SIGOZX = USERBUF%SIGOZX

C

EPSPXX = USERBUF%EPSPXX

EPSPYY = USERBUF%EPSPYY

EPSPZZ = USERBUF%EPSPZZ

EPSPXY = USERBUF%EPSPXY

EPSPYZ = USERBUF%EPSPYZ

EPSPZX = USERBUF%EPSPZX

C

EPSXX = USERBUF%EPSXX

EPSYY = USERBUF%EPSYY

EPSZZ = USERBUF%EPSZZ

EPSXY = USERBUF%EPSXY

EPSYZ = USERBUF%EPSYZ

EPSZX = USERBUF%EPSZX

C

DEPSXX = USERBUF%DEPSXX

DEPSYY = USERBUF%DEPSYY

DEPSZZ = USERBUF%DEPSZZ

DEPSXY = USERBUF%DEPSXY

DEPSYZ = USERBUF%DEPSYZ

DEPSZX = USERBUF%DEPSZX

C

SIGNXX = USERBUF%SIGNXX

SIGNYY = USERBUF%SIGNYY

SIGNZZ = USERBUF%SIGNZZ

SIGNXY = USERBUF%SIGNXY

SIGNYZ = USERBUF%SIGNYZ

SIGNZX = USERBUF%SIGNZX

C

SIGVXX = USERBUF%SIGVXX

SIGVYY = USERBUF%SIGVYY

SIGVZZ = USERBUF%SIGVZZ

SIGVXY = USERBUF%SIGVXY

SIGVYZ = USERBUF%SIGVYZ

SIGVZX = USERBUF%SIGVZX

RHO0 = USERBUF%RHO0

DPLA = USERBUF%DPLA

C

C --- Trial stress

Page 45: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 44

C

DO I = 1,NEL

SIGNXX(I)=SIGOXX(I) + A11*DEPSXX(I)

.+ A12*(DEPSYY(I) + DEPSZZ(I))

SIGNYY(I)=SIGOYY(I) + A11*DEPSYY(I)

.+ A12*(DEPSXX(I) + DEPSZZ(I))

SIGNZZ(I)=SIGOZZ(I) + A11*DEPSZZ(I)

.+ A12*(DEPSYY(I) + DEPSXX(I))

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

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

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

C sound velocity

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

VISCMAX(I) = ZERO

ENDDO

C Outp data structure

USERBUF%SIGNXX = SIGNXX

USERBUF%SIGNYY = SIGNYY

USERBUF%SIGNZZ = SIGNZZ

USERBUF%SIGNXY = SIGNXY

USERBUF%SIGNYZ = SIGNYZ

USERBUF%SIGNZX = SIGNZX

C

USERBUF%SIGVXX = SIGVXX

USERBUF%SIGVYY = SIGVYY

USERBUF%SIGVZZ = SIGVZZ

USERBUF%SIGVXY = SIGVXY

USERBUF%SIGVYZ = SIGVYZ

USERBUF%SIGVZX = SIGVZX

USERBUF%DPLA = DPLA

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 is as follows:

SUBROUTINE LUSERnnC(

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)

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

----------

The user’s material law can be used in isotropic mode with PID 1 or in orthotropic mode with PID 9,10,11. The directions XX, YY,... are the shell local reference frame axis. Stress are computed at each integration point.

One 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) with:

Page 46: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 45

Y the interpolated value

X the abscissa value of the function

I the ith user’s function

DYDX is the slope

NPF and TF are private function parameters.

The SOUNDSP array should always be set by the user. It is used in the calculation of the stability time step, of the hourglass forces. The sound speed value should be equal to the plane wave speed.

For an elastic or elastoplastic material the sound speed is given by:

( ) 021 ρυ−

= Ec

The VISCMAX is used when the material law formulation is viscous and is used in the calculation of the time step stability.

Arguments description:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by 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 this material law.

IFUNC (integer array read only): array of size NFUNC containing 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.

Page 47: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 46

AREA (float array read only): array of size NEL containing current element surfaces.

EINT (float array read only): array of size 2*NEL containing 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 values should be 0 if the element is OFF and 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-write) is defined in LAW_USERSH.mod Inside LUSERnnC this module should be used to relink the executable.

This module contains :

INTEGER NCYCLE

INTEGER ID

INTEGER ILAYER

INTEGER IG

NCYCLE (integer read only scalar): current cycle.

ID (integer read only scalar): user material ID.

ILAYER (integer read only scalar): current cycle.

IG (integer read only scalar): integration point (surface)..

NPTA (integer read only scalar): number of layers or integration points.

Page 48: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 47

IFLAG (integer array read only scalar) : array of size NEL containing the geometrical 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, YY and γ strain rates in directions XY, YZ, ZX.

DEPSXX, DEPSYY, DEPSXY, DEPSYZ, DEPSZX (float array read only): arrays of size NEL containing ε strain increments in directions XX, YY and γ strain increments in directions XY, YZ, ZX.

EPSXX, EPSYY, EPSXY, EPSYZ, EPSZX (float array read only): array of size NEL containing ε strains in directions XX, YY and γ strains in directions XY, YZ, 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, 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, ZX.

SIGVXX , SIGVYY , SIGVZZ , SIGVXY , SIGVYZ , SIGVZX (float array write only): array of size NEL containing viscous stresses in directions XX, YY, XY, YZ, ZX.

DPLA (float array write 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 modulus).

3.4.1 Shell element law output

Contrary to solid elements, no specific user’s law variable law for shell elements are saved in time-history and animation.

Page 49: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 48

3.4.2 Additional data necessary for compatibility with QEPH

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

3.5 EXAMPLE of user’s material law for SHELL elements

EXAMPLE: A Johnson-Cook elasto-plastic material law is defined for shell elements. The user’s input data are: • Density • Young’s modulus, • Poisson ratio, • Yield stress, • Hardening parameter, • Hardening modulus, • Maximum stress, • Maximum strain.

The used Johnson Cook model is: NplBA εσ += .

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

- Projection by return radial, - Iterative projection with three Newton iterations.

3.5.1 User’s input data (/MAT/USERnn/ option)

[…]

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

/MAT/USER1/1/user’s elasto-plastic material law

# RHO

Mesh example made up with shell elements:

Page 50: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 49

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 LECMUSERnn

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

C This subroutine reads the user material param eters.

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

SUBROUTINE LECMUSER01(IIN ,IOUT ,UPARAM ,MAX UPARAM,NUPARAM,

. NUVAR,IFUNC,MAXFUNC,NFU NC ,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,MAXF UNC,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,’(2F16.0)’)E,NU

READ(IIN,’(5F16.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 MAXUPA RAM’

WRITE(IOUT,*)’ NUPARAM =’,NUPARAM,

. ‘ MAXUPARAM =’,MAXUPARAM

ELSE

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

Page 51: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 50

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)

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 LUSERnnC

SUBROUTINE LUSER01C(

Page 52: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 51

1 NEL ,NUPARAM,NUVAR ,NFUNC ,IFUNC ,

2 NPF , NGL , TF ,TIME ,TIMESTE P ,

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 strcture

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

C

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(NE L) ,

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

Page 53: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 52

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,NU,S12,F,DF,Q2,YLD_I,NU3,NU2

DOUBLE PRECISION

. SVM(NEL),AA(NEL),BB(NEL),PP(NEL),QQ(N EL),

. DPLA_I(NEL),X1(NEL),Y1(NEL),Z1(NEL),S VM1(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

Page 54: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 53

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 = USERBUF%SIGOXX

SIGOYY = USERBUF%SIGOYY

SIGOXY = USERBUF%SIGOXY

SIGOYZ = USERBUF%SIGOYZ

SIGOZX = USERBUF%SIGOZX

C

EPSPXX = USERBUF%EPSPXX

EPSPYY = USERBUF%EPSPYY

EPSPXY = USERBUF%EPSPXY

EPSPYZ = USERBUF%EPSPYZ

EPSPZX = USERBUF%EPSPZX

C

EPSXX = USERBUF%EPSXX

EPSYY = USERBUF%EPSYY

EPSXY = USERBUF%EPSXY

EPSYZ = USERBUF%EPSYZ

EPSZX = USERBUF%EPSZX

C

DEPSXX = USERBUF%DEPSXX

DEPSYY = USERBUF%DEPSYY

DEPSXY = USERBUF%DEPSXY

DEPSYZ = USERBUF%DEPSYZ

DEPSZX = USERBUF%DEPSZX

THKLY =USERBUF%THKLYL

THK = USERBUF%THKN

C initialisation

SIGNXX = USERBUF%SIGNXX

SIGNYY = USERBUF%SIGNYY

SIGNXY = USERBUF%SIGNXY

SIGNYZ = USERBUF%SIGNYZ

SIGNZX = USERBUF%SIGNZX

C

SIGVXX = USERBUF%SIGVXX

SIGVYY = USERBUF%SIGVYY

SIGVXY = USERBUF%SIGVXY

SIGVYZ = USERBUF%SIGVYZ

SIGVZX = USERBUF%SIGVZX

ETSE = USERBUF%ETSE

DPLA = USERBUF%DPLA

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)

Page 55: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 54

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

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 CA LCULATION

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 - Ipla s=0’

C

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

C -> Plastic strain evaluation

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

Page 56: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 55

DO I=1,NEL

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

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

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

ENDDO

C

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

C -> Von Mises criterion (non principal stresse s)

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) = 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(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 stresse s)

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

Page 57: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 56

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.) TH EN

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

ENDDO

C NMAX: number of iterations

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

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

IF(DPLA_I(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

Page 58: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 57

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 correcti on (Iplas=2)

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

C

C print *, ‘PROJECTION by RADIAL RETURN - Ipla s=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)

C

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

R = MIN(UN,(-BB(I)+ SQRT®)/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(I) * S1 /UVAR(I,2)

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

Page 59: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S MATERIAL LAWS

October, 2011 58

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

C

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

ENDDO

ENDIF

C

C outp data structure

USERBUF%SIGNXX = SIGNXX

USERBUF%SIGNYY = SIGNYY

USERBUF%SIGNXY = SIGNXY

USERBUF%SIGNYZ = SIGNYZ

USERBUF%SIGNZX = SIGNZX

c

USERBUF%SIGVXX = SIGVXX

USERBUF%SIGVYY = SIGVYY

USERBUF%SIGVXY = SIGVXY

USERBUF%SIGVYZ = SIGVYZ

USERBUF%SIGVZX = SIGVZX

USERBUF%DPLA = DPLA

USERBUF%ETSE = ETSE

USERBUF%THKN = THK

C

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

RETURN

Page 60: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 59

4. USER PROPERTY ELEMENTS

Since version 4.1 of RADIOSS, it is possible to define up to 3 spring user’s properties (property number 29, 30 and 31) for spring elements.

Property type 29 may be referenced as USER1 in block format input, 30 as USER2, and 31 as USER3.

To define a user’s property, one has to provide three subroutines for each property. Two of them must be linked with RADIOSS STARTER and the other with RADIOSS ENGINE.

The STARTER subroutines are called LECG29, LECG30 or LECG31 used to read the property data and RINI29 , RINI30 , RINI31 to initialize spring parameters.

The ENGINE subroutine is called RUSER29, RUSER30 or RUSER31 and is used to compute the spring element forces and moments.

� The communication between RADIOSS and the User’s subroutines are done through the argument list or through specialized functions.

4.1 STARTER SUBROUTINE LECGnn for SPRING and SOLID elements

This subroutine is used to read the User’s property input data. The number of sp

ecific property cards and the format of these cards is fixed by the user.

The argument list of LECGnn is as follows:

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

SUBROUTINE LECGnn(IIN ,IOUT ,NUVAR , PARGEO)

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

where:

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)

NUVAR (integer scalar): number of extra variables needed for each spring element in RINInn and/or RUSERnn

PARGEO (float scalar): is an array of size 3. PARGEO(1) is the skew frame ID to define local frame(optional). PARGEO(2) is a stiffness for interface, and PARGEO(3) is not yet used. Those values are used in RADIOSS STARTER to make an estimation of the time step.

Page 61: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 60

4.2 STARTER SUBROUTINE initialization RINInn for SPRIN G elements

This subroutine is used to initialize the User’s spring element.

The argument list of RINInn is as follows:

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

SUBROUTINE RINI30(NEL ,IOUT ,IPROP ,

3 IX ,XL ,MASS ,XINER ,STIFM ,

4 STIFR ,VISCM ,VISCR ,UVAR ,NUVAR )

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

where:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by 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(optional), 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(time step computation).

STIFR (float array write only): array of size NEL containing element rotational stiffness(time step computation).

VISCM (float array write only): array of size NEL containing element translational viscosity(time step computation).

VISCR (float array write only): array of size NEL containing element rotational viscosity(time step computation).

NUVAR (integer read only scalar): number of user element variables.

Page 62: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 61

UVAR (float array read-write): array of size NEL*NUVAR containing user element variables.

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 is as follows:

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

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)

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

where:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by RADIOSS.

NUVAR (integer scalar): number of extra variables needed for each solid element in SINInn and/or SUSERnn

IOUT (integer read only scalar): output file unit (L00 file)

IPROP (integer read only scalar): property number.

Page 63: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 62

IMAT (integer read only scalar): material number.

IPROP (integer read only scalar): property 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. Incoming value is computed with one integration point, this value 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 values should be 0 if the element is OFF and 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 tensor SX, SY, SZ, SXY, SYZ, SZX.

XX1 (float array read only): array of size NEL containing initial X coordinate at node 1 in global frame.

VX1 (float array read only): array of size NEL containing initial X velocity at node 1 in global frame.

VRX1 (float array read only): array of size NEL containing initial X rotational velocity at node 1 in 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(time step computation).

STIFR (float array write only): array of size NEL containing element rotational stiffness(time step computation).

VISCM (float array write only): array of size NEL containing element translational viscosity(time step computation).

VISCR (float array write only): array of size NEL containing element rotational viscosity(time step computation).

Page 64: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 63

4.4 ENGINE SUBROUTINE RUSERnn for SPRING elements

This subroutine calculates the internal forces and moments versus the velocity, the old

forces and moments and user’s variables and parameters.

The argument list of RUSERnn is as follows:

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

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)

------------------------------------------------------------------------------------------ where:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by 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 old internal local X force as input and new one as output. Nodal X forces at node 1 and 2 in local frame are defined as FX1 = FX and FX2 = -FX.

FY (float array read write): array of size NEL containing old internal local Y force as input and new one as output. Nodal Y forces at node 1 and 2 in local frame are defined as FY1 = FY and FY2 = -FY.

FZ (float array read write): array of size NEL containing old internal local Z force as input and new one as output. Nodal Z forces at node 1 and 2 in local frame are defined as FZ1 = FZ and FZ2 = -FZ.

XMOM (float array read write): array of size NEL containing old internal local X moment as input and new one as output. Nodal X moments at node 1 and 2 in local frame are defined as MX1 = MX and MX2 = -MX.

Page 65: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 64

YMOM (float array read write): array of size NEL containing old internal local Y moment as input and new one as output. Nodal Y moments at node 1 and 2 in 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 old internal local Z moment as input and new one as output. Nodal Z moments at node 1 and 2 in local frame are defined as MZ1 = MZ + 1/2*XL*FY and MZ2 = -MZ + 1/2*XL*FY.

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 values should be 0 if the element is OFF and 1 if the element is ON.

STIFM (float array write only): array of size NEL containing element translational stiffness(time step computation).

STIFR (float array write only): array of size NEL containing element rotational stiffness(time step computation).

VISCM (float array write only): array of size NEL containing element translational viscosity(time step computation).

VISCR (float array write only): array of size NEL containing element rotational viscosity(time step computation).

MASS (float array write only): this array of size NEL should contain element mass until RADIOSS release 4.1d (included); it is no more used by RADIOSS ENGINE since RADIOSS release 4.1e, for which the element mass which is considered for time step computation is the one which was returned by the initialization routine RINInn into RADIOSS STARTER.

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 current element length.

VX (float array read only): array of size NEL containing X velocity. Nodal velocities at node 1 and 2 in 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.

RZ1 (float array read only): array of size NEL containing Z rotational velocity at node 1.

Page 66: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 65

RX (float array read only): array of size NEL containing torsional velocity. Nodal torsional velocities at node 1 and 2 in 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.

STIFM, STIFR, VISCM, VISCR are used by RADIOSS to compute the nodal or the element time step. MASS and XINER are needed to compute element time step.

4.5 ENGINE SUBROUTINE SUSERnn for SOLID elements

This subroutine calculates the internal forces and moments.

The argument list of RUSERnn is as follows:

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

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 ,

Page 67: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 66

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 )

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

where:

NEL (integer read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for vectorization purpose). NEL is machine dependent and is set by RADIOSS.

NUVAR (integer scalar): number of extra variables needed for each solid element in SINInn and/or SUSERnn

IOUT (integer read only scalar): output file unit (L01 file)

IPROP (integer read only scalar): property number.

IMAT (integer read only scalar): material number.

IPROP (integer read only scalar): property number.

SOLID_ID (integer read only scalar): array of size NEL containing solid element ID

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 current element volumes. Incoming value is computed with one integration point, this value 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 values should be 0 if the element is OFF and 1 if the element is ON.

RHO (float array read-write): array of size NEL containing current densities.

Page 68: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 67

SIG (float array read-write): array of size 6*NEL containing current stress tensor SX, SY, SZ, SXY, SYZ, SZX.

XX1 (float array read only): array of size NEL containing X coordinate at node 1 in global frame at time TIME.

UX1 (float array read only): array of size NEL containing X displacement at node 1 in global frame at time TIME.

VX1 (float array read only): array of size NEL containing initial X velocity at node 1 in global frame at time TIME.

VRX1 (float array read only): array of size NEL containing initial X rotational velocity at node 1 in 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(time step computation).

STIFR (float array write only): array of size NEL containing element rotational stiffness(time step computation).

VISCM (float array write only): array of size NEL containing element translational viscosity(time step computation).

VISCR (float array write only): array of size NEL containing element rotational viscosity(time step computation).

STIFM, STIFR, VISCM, VISCR are used by RADIOSS to compute the nodal or the element time step. MASS and XINER are needed to compute element time step.

RHO and SIG can be used for post processing in Time History and Animation. The modification of these variables has only effect on output. If these value are not modified RHO and SIG are initial values.

Page 69: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 68

4.6 Functions to access user’s properties and materials

4.6.1 Store and restore functions for user subroutines

The user’s property parameters are stored in RADIOSS arrays through specialized functions. This method allows a hierarchical property reference (one user’s property can refer to another user’s property or an user’s material). They may be also used in user 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 RADIOSS marerial 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=37 parameter, indicates access to property buffer in user property

4.6.2 The 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 proprties, materials, or functions.The above routine stores relative function, material and property 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 are distinguished by parameter values KFUNC, KMAT, KPROP, KTABLE.

Page 70: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 69

The function returns integer flag ierror = 0 if no error, ierror = maximum allowed index value if index larger than maximum. It is called in RADIOSS Starter.

Examples:

ierror = SET_U_PNU(2, 5, KFUNC) store a RADIOSS function decsribed by ID=5 as a second function in current property.

ierror = SET_U_PNU(2, 5, KTABLE) store a RADIOSS table decsribed by ID=5 as a second table in current property.

ierror = SET_U_PNU(1, 3, KMAT) store a RADIOSS material property MID=3 as a first material in current property.

ierror = SET_U_PNU(2, 2,KPROP) store property PID = 2 as second property referenced by current property.

integer ierror = SET_U_GEO(integer value_index, float value) This function stores a value in current user property buffer at a position referenced by value_index. It returns a flag ierror = 0 if no error, ierror = maximum allowed index value if index larger than maximum. It is called in RADIOSS Starter.

4.6.3 The restore functions for user properties, materials and functions:

float value = GET_U_GEO(integer value_index, integer iprop)

This function returns a parameter value stored in property buffer iprop at the position specified by value_index. It is called in RADIOSS Engine and Starter intialisation routines.

example: MASS = GET_U_GEO(2, iprop) restore MASS from second parameter of current property.

Since iprop is not the PID, but the property number, it must be retrieved using one of the following functions:

integer iprop = GET_U_P(integer prop_id) This function simply translates property ID into proprty number. To reduce CPU cost it is recommended to use this function only in RADIOSS Starter and store the result in user array.

integer jprop = GET_U_PNU(integer prop_index, integer iprop, KPROP). This function retrieves an internal number of a property (jprop ) referred by another user property iprop at the position specified by prop_index. Iprop is a property number which refers to jprop. This is reverse function to SET_U_PNU function. Note that SET_U_PNU need a PID as input and that GET_U_PNU returns a property number.

Page 71: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 70

integer pid = GET_U_PID(integer iprop) This is a reverse function to GET_U_P. If pid number is needed, it may be obtained from property number iprop using this function.

float value = GET_U_MAT(integer value_index, integer imat)

This function is very similar to described GET_U_GEO. It 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)

Iprop is the “master” property number, KMAT is a parameter indicating material buffer of this property, and mat_index is the position at which the material is stored in this buffer.

integer mid = GET_U_MID( integer imat) This is a reverse function to GET_U_M. If mid number is needed, it may be obtained from known material number imat using this function.

integer y = GET_U_FUNC(integer ifunc, float x, float dydx)

This function returns an interpolated value of a function ifunc, corresponding to abscissa x. Dxdy is function slope at x. Integer ifunc is the internal RADIOSS function number.

integer ifunc = GET_U_NUMFUN(integer fun_id),

This function restores the function number from function identifier.

integer fun_id = GET_U_FID(integer ifunc),

This function 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)

Page 72: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 71

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

4.6.4 Example of storage / retrieve procedures for RADIOSS functions and tables

a) Direct access via function/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 ID (resp. table ID) must be stored in starter in user buffer to be available in engine routine. This is the simplest manner to access RADIOSS functions (resp. tables), but may be costly if the model contains a large number of functions (resp. tables) (GET_U_NUMFUN is called at each cycle to find a function number out of its ID number). It is recommended for small RADIOSS models.

a) 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. Engine subroutine access the function directly by its number.

Page 73: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 72

Note: GET_U_NUMFUN may be called in starter version 44 or higher, with block input format.

a) 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)

(inside user material laws itable can be stored in UPARAM array).

Engine:

y = GET_U_FUNC(ifunc, x, dydx)

CALL GET_U_TABLE(itable, x, y)

The function number is restored in starter using internal function indexes in user property or material.

Note: prop_index, or mat_index are independent for each user property (iprop or imat) and numerotated from one to max number of functions in related property. Engine routines access the function values directly by its stored number, as previous. This is the recommended manner for big RADIOSS models if an old RADIOSS version is used.

Note: The same principles apply to user property or material, with the exception that storing property or material numbers are possible only in Starter initialisation routines, and not lecture routines (for details, see user property examples).

Page 74: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 73

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

* usage of get_u_numtable and get_u_table need the use of fortran module INTERFACE_UTABLE_MOD : USE INTERFACE_UTABLE_MOD included either in library either in user module package(windows)

Page 75: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 74

4.7 EXAMPLE of user’s SPRING element

EXAMPLE: An elastic beam is defined with one user property (type 1) refering two user properties (one for each beam end, type 2). 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 explanation about this spring property)

4.7.1 User’s 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 #--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---|

[…]

Spring elements:

Page 76: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 75

4.7.2 Starter property user’s subroutine LECGnn

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

C This subroutine reads the user geometry param eters.

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,'(I8)',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='(3I8)')ISK,PI D1,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='(F16.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='(2I8)')MID1

C MID1 is a USER material ID

IERROR = SET_U_PNU(1,MID1,KMAT)

C

Page 77: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 76

READ(IIN,ERR=999,END=999,FMT='(4F16.0)')ARE A,IXX,IYY,IZZ

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 INP UT'

RETURN

1000 FORMAT(

& 5X,' USER PROPERTY TYPE 1 (used by spring e lements) ',/,

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

& 5X,'SKEW ID . . . . . . . . . . . . . . . .= ',I8/

& 5X,'FIRST END TYPE 2 USER PROPERTY ID . . .= ',I8/

& 5X,'SECOND END TYPE 2 USER PROPERTY ID. . .= ',I8/

& 5X,'STIFNESS FOR INTERFACE. . . . . . . . .= ',E12.4//)

2000 FORMAT(

& 5X,' USER PROPERTY TYPE 2 (used by property type 1) ',/,

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

& 5X,'USER MATERIAL ID. . . . . . . . . . . .= ',I8/,

& 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’s subroutine RINInn

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_M NU,

. KFUNC,KMAT,KPROP

DOUBLE PRECISION

Page 78: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 77

. XL(NEL) ,MASS(NEL) ,XINER(NEL) ,STIFM (NEL) ,

. STIFR(NEL),VISCM(NEL) ,VISCR(NEL),UVA R(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

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,K 6C

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 PRO PERTY',

. 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 PROPER TY',

. GET_U_PID(IPROP),' REFERS TO WRONG USE R 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 PROPER TY',

Page 79: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 78

. GET_U_PID(IPROP),' REFERS TO WRONG USE R PROPERTY',

. GET_U_PID(IPROP2)

ENDIF

AREA2 = GET_U_GEO(2,IPROP2)

IXX2 = GET_U_GEO(3,IPROP2)

IYY2 = GET_U_GEO(4,IPROP2)

IZZ2 = GET_U_GEO(5,IPROP2)

C SEE LECM29 FOR USER MATERIAL PARAMETER STORAGE (RHO IS ALLWAYS 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 SPRI NG :'

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*X L(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

Page 80: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 79

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)

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’s subroutine LECMnn

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

C This subroutine reads user material parameter s stored in /MAT/USER1

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

SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUP ARAM,

. 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,MAXF UNC,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======================================

Page 81: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 80

C

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

C INPUT FILE READING (USER DATA)

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

READ(IIN,'(2F16.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

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 MAXUPA RAM'

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//)

Page 82: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 81

C

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

C END

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

RETURN

END

4.7.5 Engine property user’s subroutine RUSERnn

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

C This subroutine computes springs forces and m oments.

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_M NU,

. 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(*) ,F R_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,K 6C

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

C KCST = 0

KCST = 1

C

Page 83: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 82

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)

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

Page 84: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 83

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

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 RADIOSS )

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

C FX1 = FX(I)

C FY1 = FY(I)

C FZ1 = FZ(I)

C FX2 = -FX(I)

Page 85: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 84

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)

VISCM(I) = 0.

VISCR(I) = 0.

XINER(I) = XL(I)*RHO*MAX(IXX,IMYZ+AREA*X L(I)*XL(I)/12)

ENDDO

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

RETURN

END

Page 86: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 85

4.8 EXAMPLE of user’s triangular SHELL elements (using solid property)

EXAMPLE: A triangular shell property is defined using a user’s solid property with rotational degrees of freedom at nodes. Bricks are degenerated to 3 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’s 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 N 5 N6 N7 N8 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’s subroutine LECGnn

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

C This subroutine reads the user geometry param eters.

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"

3-node-shell mesh is made up with two degenarated brick elements:

1 2

3 4

5 6

7 8

1-4-5-8 2-6

3-7

Page 87: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 86

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='(F16.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='(2I8)')MID1

C MID1 is a USER material ID:

IERROR = SET_U_PNU(1,MID1,KMAT)

C

C READ(IIN,ERR=999,END=999,FMT='(2I8)')NIP

C

C NIP is stored in index value 2

C IERROR = SET_U_GEO(2,NIP)

C

WRITE(IOUT,1000)THK,MID1

C

C

RETURN

999 CONTINUE

WRITE(IOUT,*)' **ERROR IN USER PROPERTY INP UT'

RETURN

1000 FORMAT(

& 5X,' USER TRIANGULAR SHELL PROPERTY ',/,

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

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

& 5X,'USER MATERIAL ID . . . . . . . . . . .= ',I8//)

C & 5X,'Integration points . . . . . . . . . . =',I8//)

END

Page 88: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 87

4.8.3 Starter property initialization user’s subroutine SINInn

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

C This subroutine initialize triangular shell p roperties

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 ,XX 8 ,

4 YY1 ,YY2 ,YY3 ,YY4 ,YY5 ,YY6 ,YY7 ,YY 8 ,

5 ZZ1 ,ZZ2 ,ZZ3 ,ZZ4 ,ZZ5 ,ZZ6 ,ZZ7 ,ZZ 8 ,

6 VX1 ,VX2 ,VX3 ,VX4 ,VX5 ,VX6 ,VX7 ,VX 8 ,

7 VY1 ,VY2 ,VY3 ,VY4 ,VY5 ,VY6 ,VY7 ,VY 8 ,

8 VZ1 ,VZ2 ,VZ3 ,VZ4 ,VZ5 ,VZ6 ,VZ7 ,VZ 8 ,

9 VRX1 ,VRX2 ,VRX3 ,VRX4 ,VRX5 ,VRX6 ,VRX7 ,VR X8 ,

A VRY1 ,VRY2 ,VRY3 ,VRY4 ,VRY5 ,VRY6 ,VRY7 ,VR Y8 ,

B VRZ1 ,VRZ2 ,VRZ3 ,VRZ4 ,VRZ5 ,VRZ6 ,VRZ7 ,VR Z8 ,

C MAS1 ,MAS2 ,MAS3 ,MAS4 ,MAS5 ,MAS6 ,MAS7 ,MA S8 ,

D INN1 ,INN2 ,INN3 ,INN4 ,INN5 ,INN6 ,INN7 ,IN N8 ,

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(*),XX 7(*),XX8(*),

3 YY1(*),YY2(*),YY3(*),YY4(*),YY5(*),YY6(*),YY 7(*),YY8(*),

4 ZZ1(*),ZZ2(*),ZZ3(*),ZZ4(*),ZZ5(*),ZZ6(*),ZZ 7(*),ZZ8(*),

5 VX1(*),VX2(*),VX3(*),VX4(*),VX5(*),VX6(*),VX 7(*),VX8(*),

6 VY1(*),VY2(*),VY3(*),VY4(*),VY5(*),VY6(*),VY 7(*),VY8(*),

7 VZ1(*),VZ2(*),VZ3(*),VZ4(*),VZ5(*),VZ6(*),VZ 7(*),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)

Page 89: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 88

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

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

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

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 (te tra 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 defin ition

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)

Page 90: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 89

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)+E 1Z(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)+E 3Z(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)+E 2Z(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)+Z2 1(I)*Z21(I))

C Edge 1-3 length:

L2(I) = SQRT(X31(I)*X31(I)+Y31(I)*Y31(I)+Z3 1(I)*Z31(I))

C Edge 2-3 length:

L3(I) = SQRT(X32(I)*X32(I)+Y32(I)*Y32(I)+Z3 2(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

VOL(I)=AREA(I)*THK

Page 91: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 90

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 th e critical time step:

Y3(I)=E2X(I)*X31(I)+E2Y(I)*Y31(I)+E2Z(I)*Z3 1(I)

X3(I)=E1X(I)*X31(I)+E1Y(I)*Y31(I)+E1Z(I)*Z3 1(I)

X2(I)=E1X(I)*X21(I)+E1Y(I)*Y21(I)+E1Z(I)*Z2 1(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 computa tion:

STIFM(I) = 2*VOL(I) * E / (3*ALDT(I)*ALDT (I))

C STIFR(I) = 0

STIFR(I) = STIFM(I) * (THK * THK / 12 + A REA(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 92: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 91

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’s subroutine LECMnn

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

C This subroutine reads the user material param eters.

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

SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPAR AM,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,MAXF UNC,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,'(2F16.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

Page 93: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 92

NUPARAM = 5

IF(NUPARAM.GT.MAXUPARAM)THEN

WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPA RAM'

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

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

4.8.5 Engine property user’s subroutine SUSERnn

C================================================== =========================== C This subroutine computes strain, forces and m oments (triangular SHELL). C Solid elements are degenarated to triangular shells. C================================================== =========================== SUBROUTINE SUSER29( 1 NEL ,NUVAR ,IOUT ,IPROP ,IMAT ,SOLID _ID,TIME ,TIMESTEP,

Page 94: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 93

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(*) ,F R_WAVE(*), . OFF(*) ,EINT(*) , RHO(*) ,VOL(*) ,SIG(6,*) , 2 XX1(*),XX2(*),XX3(*),XX4(*),XX5(*),XX6(*),XX 7(*),XX8(*), 3 YY1(*),YY2(*),YY3(*),YY4(*),YY5(*),YY6(*),YY 7(*),YY8(*), 4 ZZ1(*),ZZ2(*),ZZ3(*),ZZ4(*),ZZ5(*),ZZ6(*),ZZ 7(*),ZZ8(*), 2 UX1(*),UX2(*),UX3(*),UX4(*),UX5(*),UX6(*),UX 7(*),UX8(*), 3 UY1(*),UY2(*),UY3(*),UY4(*),UY5(*),UY6(*),UY 7(*),UY8(*), 4 UZ1(*),UZ2(*),UZ3(*),UZ4(*),UZ5(*),UZ6(*),UZ 7(*),UZ8(*), 5 VX1(*),VX2(*),VX3(*),VX4(*),VX5(*),VX6(*),VX 7(*),VX8(*), 6 VY1(*),VY2(*),VY3(*),VY4(*),VY5(*),VY6(*),VY 7(*),VY8(*), 7 VZ1(*),VZ2(*),VZ3(*),VZ4(*),VZ5(*),VZ6(*),VZ 7(*),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(*),FX 7(*),FX8(*), C FY1(*),FY2(*),FY3(*),FY4(*),FY5(*),FY6(*),FY 7(*),FY8(*), D FZ1(*),FZ2(*),FZ3(*),FZ4(*),FZ5(*),FZ6(*),FZ 7(*),FZ8(*), E MX1(*),MX2(*),MX3(*),MX4(*),MX5(*),MX6(*),MX 7(*),MX8(*), F MY1(*),MY2(*),MY3(*),MY4(*),MY5(*),MY6(*),MY 7(*),MY8(*), G MZ1(*),MZ2(*),MZ3(*),MZ4(*),MZ5(*),MZ6(*),MZ 7(*),MZ8(*) 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,NN U,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),

Page 95: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 94

. 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),P X2(NEL),PY2(NEL), . PY3(NEL),DT1V4,DT1V4B, . TMP1,TMP2,TMP11,TMP22,VX10,VX20,VX30, . EXX(NEL),EYY(NEL),EXY(NEL),EZY(NEL),DEZZ,EZ Z, . 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),VZ2 3(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,RXAV T, . 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),FY2 2(NEL),FY33(NEL), . FZ11(NEL),FZ22(NEL),FZ33(NEL), . MX11(NEL),MX22(NEL),MX33(NEL),MY11(NEL),MY2 2(NEL),MY33(NEL), . M1,M2,M3,M4,M5 C C-------------------------------------------------- --------------------- DO I=1,NEL C-------------------------------------------------- --------------------- C C================================================== ===================== C ELEMENT DEGENERATION - nodes distribution ini tialization 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 (linear: a+bx+cy) -> local coo rdinates 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)

Page 96: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 95

LE1(I) = SQRT(E1X(I)*E1X(I)+E1Y(I)*E1Y(I)+E1 Z(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)+E3 Z(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)+E2 Z(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 (matr ix B): C 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 T heory manual) C================================================== ===================== C C------------------------------------------------ C MEMBRANE STRAIN RATE: exx, eyy, exy (e=Bv) C------------------------------------------------ C C -> Element degenaration: 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)*VZ 1(I) VXE2(I)=E1X(I)*VX2(I)+E1Y(I)*VY2(I)+E1Z(I)*VZ 2(I) VXE3(I)=E1X(I)*VX3(I)+E1Y(I)*VY3(I)+E1Z(I)*VZ 3(I) C VYE1(I)=E2X(I)*VX1(I)+E2Y(I)*VY1(I)+E2Z(I)*VZ 1(I) VYE2(I)=E2X(I)*VX2(I)+E2Y(I)*VY2(I)+E2Z(I)*VZ 2(I) VYE3(I)=E2X(I)*VX3(I)+E2Y(I)*VY3(I)+E2Z(I)*VZ 3(I) C

Page 97: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 96

VZE1(I)=E3X(I)*VX1(I)+E3Y(I)*VY1(I)+E3Z(I)*VZ 1(I) VZE2(I)=E3X(I)*VX2(I)+E3Y(I)*VY2(I)+E3Z(I)*VZ 2(I) VZE3(I)=E3X(I)*VX3(I)+E3Y(I)*VY3(I)+E3Z(I)*VZ 3(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 C------------------------------------------------ C C -> Element degenaration: 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) + PY 2(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 UVAR(I,1) = 0

Page 98: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 97

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

Page 99: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 98

C Functions to returns values stored in property an d 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 variab le): 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.S IG.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 gradie nts * F : C C 1) Expressed in local frame: C C -> Force vector components - node 1: 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)*F Z1(I) FY11(I)=E1Y(I)*FX1(I)+E2Y(I)*FY1(I)+E3Y(I)*F Z1(I) FZ11(I)=E1Z(I)*FX1(I)+E2Z(I)*FY1(I)+E3Z(I)*F Z1(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)*F Z2(I) FY22(I)=E1Y(I)*FX2(I)+E2Y(I)*FY2(I)+E3Y(I)*F Z2(I) FZ22(I)=E1Z(I)*FX2(I)+E2Z(I)*FY2(I)+E3Z(I)*F Z2(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)

Page 100: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 99

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

Page 101: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 100

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 E = GET_U_MAT(4,IMAT) C C Parametrers 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) / 1 2 + 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 an d thikness 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 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

Page 102: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 101

4.8.6 Engine material user’s subroutine SIGEPSnn

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 ,

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)

Page 103: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S ELEMENTS

October, 2011 102

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,

. SIGNXX(NEL),SIGNYY(NEL),SIGNZZ(NEL),

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

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

ENDDO

C

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

RETURN

END

Page 104: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 103

5 USER SENSORS

From version 4.4 of RADIOSS it is possible to define up to 3 types of user sensors.

Two subroutines are needed to define a new sensor. One must be linked with RADIOSS STARTER and the other with 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 perform a user defined action.

The only argument passed to the user routines in RADIOSS engine is the sensor identifier.

User sensors can be used in RADIOSS in the same way as standard sensors. They may activate or desactivate other sensors, airbags, springs, boundary conditions, imposed velocities / displacements, concentrated loads, etc. Their specificity is the user defined activation condition and sensor action. User sensor may retrieve 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.

5.1 STARTER SUBROUTINE LECSEN_USRn

This subroutine is used to read the User’s sensor input data. The number of cards and the

format of these cards is free.

The argument list of LECSEN_USRn is as follows:

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

SUBROUTINE LECSEN_USRn(IIN, IOUT)

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

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 a data in sensor’s parameter buffers, one may 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 allows to store an integer or a float variable in respective buffers, at a position indicated by sens_index (independent in each buffer). The length of sensor parameter buffers are limited to 12 integer variables and 20 float variables.

Page 105: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 104

5.2 ENGINE SUBROUTINE USER_SENSn

This subroutine performs an user defined action with a given sensor.

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

SUBROUTINE USER_SENS1(SENS_ID)

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

where SENS_ID is a sensor identifier (integer).

5.3 Functions for user’s sensors

5.3.1 Restore functions for sensor parameters:

The user can access to the integer and float sensor parameter buffers, using two functions, symmetric to those used in starter:

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 sensor parameter buffers are read only in engine.

Note: For the reason of performance, the internal RADIOSS sensor numbers isens, not sensor identifiers are used to acces the parameter buffers. The additional function is provided to translate a sensor Id into internal sensor number:

integer isens = GET_U_NUMSENS(integer sens_id)

The function returns 0 if the sensor Id is not found in RADIOSS database. The user can store the value in a local variable for multiple acces to parameter buffers, or call the buffer acces 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 buffer:

To store and read current information one can use a user array (float). Its length is limited to 100 variables, and is accessed by 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.

A function inverse to GET_U_NUMSENS is also provided in case if a sensor identifier is needed. It translates a sensor number into its ID:

integer isens = GET_U_SENS_ID(integer sens_id)

Page 106: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 105

5.3.3 Setting/ checking global activation flag

For user sensor it is possible to use the same mechanism of activation/ deactivation as standard RADIOSS sensors. This way, they may be used to activate springs, interfaces, rigid walls or other sensors using a specific user condition. In the same manner, the user sensor may form a part of a hierarchy of RADIOSS sensors (ex logical sensors), or use standard sensors as input. To standard activation flags, we will use the following functions:

integer ierr = SET_U_SENS_ACTI(integer isens)

This function activates user sensor isens. The activation time is set as current time.

Note: the sensor activation will be actually 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 since the first activation of sensor number isens. If dtime > 0, the sensor is actif. This function may be used to check state of standard sensors, or other user sensors, if the ACTI_U_SENS function was used to activate them.

User sensors may access RADIOSS variables only by specialized fuctions. The list of these fuctions is open ended. Actually, the available functions are:

5.3.4 Access functions to RADIOSS time/cycle variables.

float Time = GET_U_TIME()

This function returns the actual simulation time

integer Ncyc = GET_U_CYCLE() This function returns the actual cycle number

5.3.5 Nodal value access :

These functions allow access to node coordinates, displacements, velocities and accelerations. All use an internal node number as an argument, not a node identifier as an argument, for the sake of performance. Integer function :

integer inode = GET_U_NUMNOD(node_id) may be used to restore an internal node number inode from a node identifier node_id. It is recommended to call this function once and store the result in local variable, if multiple access is needed. The nodal access functions are:

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)

where:

x, y, z are node coordinates

dx, dy, dz are node displacement components

Page 107: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 106

vx, vy, vz are node velocity components

ax, ay, az are node acceleration components

5.3.6 Accelerator access functions

The following function gives access to RADIOSS accelerometer values:

integer ierr = GET_U_ACCEL( integer iacc, float ax, float ay, float az) ax, ay, az are acceleration components

iacc is the accelerometer number

Accelerometer number may be restored from its identifier using function:

integer iacc = GET_U_NUMACC(integer acc_id)

Note: Sensor may also use RADIOSS functions and user properties/materials (see previous chapters of general storage/restore functions).

Page 108: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 107

5.4 EXAMPLE of user’s sensor

EXAMPLE: 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 the material user’s subroutine SIGESPnn) Sensor is activated if F > CR The activation time of 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_USRm

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

Page 109: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 108

INTEGER IERROR

DOUBLE PRECISION CR

C

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='(F16.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 buf fer 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 LECMnn

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

C This subroutine read the user material parame ters.

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

SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPAR AM,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,MAXF UNC,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,'(2F16.0)')E,NU

Page 110: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 109

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 = 6

IF(NUPARAM.GT.MAXUPARAM)THEN

WRITE(IOUT,*)' ** ERROR : NUPARAM GT MAXUPA RAM'

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 111: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 110

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 sens or 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 reache d =',F,'MPa]'

ENDIF

C

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

ENDIF

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

RETURN

END

Page 112: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 111

5.4.5 Engine material user’s subroutine SIGEPSnnC 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

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

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

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

DOUBLE PRECISION

Page 113: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 112

. 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),TH K(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-----------------------------------------------

C Write the variable F in the sensor buffer n umber 1:

IERR = SET_U_SENS_VALUE(1,1,F)

C

ENDDO

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

RETURN

END

Page 114: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 113

6. USER FAILURE MODELS

From Version 5.1 of Radioss it is possible to define up to 3 user’s failure models (USER1, USER2, USER3 ) for shell and solid element. User’s failure model for beam and truss are not yet available. To define a user’s failure model, one has to provide two or three subroutines for each failure model. One of this subroutine must linked with RADIOSS STARTER and two other (one for shell, one for solid) with RADIOSS ENGINE. The STARTER subroutine is called lecr04, lecr05, 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 f06law and is used to compute failure criteria at integration point. The corresponding shell subroutine are f04lawc, f05lawc, f06lawc. All communication between RADIOSS and User’s subroutine is done through the argument list.

6.1 STARTER Subroutine LECRnn ---------------------------------------------------------------------------------------- SUBROUTINE LECRnn (IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM, NUVAR,IFUNC,MAXFUNC,NFUNC) ------------------------------------------------------------------------------------------------------ This subroutine is used to read User’s failure model input data. The number of specific failure model card and the format of these cards is free. The argument list of lecfnn is on follows: IIN (Integer read only scalar) : input file unit (ROOTD00, ROOT_nnnn.rad) on wich the data are read. IOUT (Integer read only format) : outp file unit (ROOT_nnnn.lis). UPARAM (float array) : array with a size NUPARAM used to store the failure material data. MAXUPARAM (Integer read only scalar) : maximum possible size of UPARAM. NUPARAM (Integer scalar): effective size UPARAM. (MAXUPARAM, NUPARAM, MAXUPARAM is set to 1000). NUVAR (integer scalar) : number of extra variables needed for each integration point of each element.

Page 115: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 114

IFUNC (integer array) : Array with a size of NFUNC containing the list of RADIOSS functions used for this failure model. The function numbers have to be stored in this array and not in UPARAM because of a possible renumbering of the functions numbers. MAXFUNC (Integer read only scalar): maximum possible size of IFUNC. NFUNC (Integer scalar) : number of RADIOSS functions. 6.2 ENGINE Subroutine for solid elements (FnnLAW):

--------------------------------------------------------------------------------------------- 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 NOT_USED1, NOT_USED2 ,NOT_USED3 ,NOT_USED4 ,NOT_USED5 )

This subroutine calculates the criteria of failure model. We can use the float external function FINTER to get the value Y of the function for the abscissa X. Y = FINTER(IFUNC(1), X, NPF, TF, DYDX) with : Y the interpolated value. X the abscissa value of the function. I the ith user’s function. DYDX is the slope. NPF and TF are private function parameters. The arguments list of Fnnlaw is as follows: NEL (interger read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for victorisation purpose) NEL is machine dependent and is set by RADIOSS NUPARAM(integer read only scalar) : size of the user parameter array. NUVAR (integer read only scalar) : number of user integration point element variables. NFUNC(integer read only scalar) : number of function used for this failure model Materials.

Page 116: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 115

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). TIME(float read only) : current time. TIMESTEP(float read only) : current time step. UPARAM(float array read only) : user ailurematerial parameter array of size NUPARAM. NGL(integer array read only) : array of size NEL containing the external element number. EPSPXX ,EPSPYY ,EPSPZZ ,EPSPXY ,EPSPYZ ,EPSPZX ) (flaot array read only) :array of size NEL containing ε& strain rates in directions XX, YY, ZZ, and γ& strain rates in directions XY, YZ,ZX. EPSXX ,EPSYY,EPSZZ,EPSXY,EPSYZ ,EPSZX ) (flaot array read only) : array of size NEL containing ε strain in directions XX, YY, ZZ, and γ strain in directions XY, YZ,ZX. SIGNXX ,SIGNYY ,SIGNZZ,SIGNXY,SIGNYZ ,SIGNZX ) (float array read-write) : array of size NEL containing stress in directions XX, YY, ZZ, XY, YZ,ZX. PLA (float array read only) : array of size NEL contaning equivalent plastic strain. DPLA(float array read only) : array of size NEL containing incremental equivalent platic strain. EPSP (flaot 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 contining deleted element flags. The value set to 0 if the element is OFF (By default OFF = 1). NOT_USE_I1,NOT_USE_I2,NOT_USE_I3,NOT_USE_I4 ( integer scalar) : is not used. Can be used in the future. NOT_USED1,NOT_USED2,NOT_USED3,NOT_USED,NOT_USED5 (float scalar): are not used. Can be used in the future.

Page 117: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 116

6.3 ENGINE Subroutine for shell elements (FnnLAWC):

--------------------------------------------------------------------------------------------- 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 ,NOT_USED1, NOT_USED2,NOT_USED3 ,NOT_USED4 ,NOT_USED5) --------------------------------------------------------------------------------------------------------------- This subroutine calculates the criteria of failure model. We can use the fortran float external function FINTER to get the value Y of the function for the abscissa X. Y = FINTER(IFUNC(1), X, NPF, TF, DYDX) with : Y the interpolated value. X the abscissa value of the function. I the ith user’s function. DYDX is the slope. NPF and TF are private function parameters. The arguments list of Fnnlawc is as follows: NEL (interger read only scalar): number of element per group. In RADIOSS ENGINE the element data are treated by groups (for visctorisation purpose) NEL is machine dependent and is set by RADIOSS NUPARAM(integer read only scalar) : size of the user parameter array. NUVAR (integer read only scalar) : number of user integration point element variables. NFUNC(integer read only scalar) : number of function used for this failure model Materials. INFUNC(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 118: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 117

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. IPT (integer scalar read only ) : current layer or integration points. NPT0 (integer scalar read only) : numbers of layers or integration points NGL(integer array read only) : array of size NEL containing the external element number.. EPSPXX ,EPSPYY,EPSPXY,EPSPYZ ,EPSPZX (flaot array read only) : array of size NEL containing ε& strain rates in directions XX, YY, and γ& strain rates in directions XY, YZ,ZX,EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX (flaot array read only) : array of size NEL containing ε strain in directions XX, YY, and γ strain in directions XY, YZ,ZX. SIGNXX ,SIGNYY,SIGNXY,SIGNYZ ,SIGNZX (float array read-write) : array of size NEL containing stress in directions XX, YY, XY, YZ,ZX. PLA (float array read only) : array of size NEL contaning equivalent plastic strain. DPLA(float array read only) :array of size NEL containing incremental equivalent plastic strain. EPSP (flaot array read only) : array of size NEL, equivalent of strain rate. UVAR(float array read-write) : array of size NEL*NUVAR containing user 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 contining deleted element flags. The value is set to 0 if the element is OFF( by default OFF = 1) NOT_USE_I1,NOT_USE_I2,NOT_USE_I3 ( integer scalar) : is not used. Can be used in the future. NOT_USED1,NOT_USED2,NOT_USED3,NOT_USED,NOT_USED5 (float scalar): are not used. Can be used in the future.

Page 119: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 118

6.4 EXAMPLE SUBROUTINE OF USER FAILURE MODEL FOR SHELL

and SOLID elements for RADIOSS STARTER

SUBROUTINE LECR04(IIN ,IOUT ,UPARAM ,MAXUPAR AM,NUPARAM, . NUVAR,IFUNC,MAXFUN C,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 (D00 file) C IOUT | 1 | I | R | OUTPUT FILE UNIT (L0 0 file) C UPARAM | NUPARAM | F | W | USER FAILURE MODEL P ARAMETER ARRAY C MAXUPARAM| 1 | I | R | MAXIMUM SIZE OF UPAR AM C NUPARAM | 1 | I | W | SIZE OF UPARAM =< MA XUPARAM C NUVAR | 1 | I | W | NUMBER OF USER VARI ABLES C----------+--------+--+--+------------------------ ------------------- C IFUNC | NFUNC | I | W | FUNCTION NUMBER ARRA Y C MAXFUNC | 1 | I | R | MAXIMUM SIZE OF IFUN C C NFUNC | 1 | I | W | SIZE OF IFUNC =< MAX FUNC C----------+--------+--+--+------------------------ ------------------- C----------------------------------------------- C D u m m y A r g u m e n t s C----------------------------------------------- INTEGER IIN,IOUT,MAXUPARAM,NUPARAM,NUVAR,MAXF UNC,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,F16.0)PLAMAX IF(PLA_MAX.EQ.0)LLA_MAX= 1E20 UPARAM(1) = PLAMAX NUPARAM = 1 NUVAR = 0 C 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 ')

Page 120: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 119

RETURN END

6.4.1 Engine user’s 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_I 3,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 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 G ROUP NEL C NUPARAM | 1 | I | R | SIZE OF THE USER PARA METER ARRAY C NUVAR | 1 | I | R | NUMBER OF FAILURE ELE MENT 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 C TIMESTEP| 1 | F | R | CURRENT TIME STEP C UPARAM | NUPARAM | F | R | USER FAILURE PARAMETE R 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 ST RESS XX C SIGNYY | NEL | F |R/W| NEW ELASTO PLASTIC ST RESS 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 RA TE 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) ,

Page 121: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 120

. 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),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 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) .. FUNCT ION 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 DOUBLE PRECISION PLAMAX 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 ENDIF RETURN END

6.4.2 Engine user’s subroutine for SHELL elements

SUBROUTINE F04LAWC( 1 NEL ,NUPARAM ,NUVAR ,NFUNC ,IFUNC,NPF, 2 TF ,TIME ,TIMESTEP ,UPARAM ,NGL ,IPT, 3 NPT0 ,NOT_USE_I1,NOT_USE_I2 ,NOT_USE_I 3, 4 SIGNXX ,SIGNYY ,SIGNXY ,SIGNYZ ,SIGNZX , 4 EPSPXX ,EPSPYY ,EPSPXY ,EPSPYZ ,EPSPZX ,

Page 122: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 121

6 EPSXX ,EPSYY ,EPSXY ,EPSYZ ,EPSZX , 7 PLA ,DPLA ,EPSP ,UVAR ,UEL , 8 OFF ,NOT_USED1 ,NOT_USED2,NOT_USED3,N OT_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 G ROUP NEL C NUPARAM | 1 | I | R | SIZE OF THE USER PARA METER ARRAY C NUVAR | 1 | I | R | NUMBER OF USER ELEMEN T 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 I NTEGRATION POINTS C IPT | 1 | I | R | LAYER OR INTEGRATION POINT NUMBER 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 PARAMET ER 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 ST RESS XX C SIGNYY | NEL | F |R/W| NEW ELASTO PLASTIC ST RESS YY C ... | | | | C---------+--------+--+--+------------------------- ------------------ C PLA | NEL | F | R | PLASTIC STRAIN C DPLA | NEL | F | R | INCREMENTAL PLASTIC S TRAIN C EPSP | NEL | F | R | EQUIVALENT STRAIN RAT E 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(NU PARAM),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,NO T_USED5 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), 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

Page 123: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE USER’S SENSORS

October, 2011 122

C DYDX : f'(x) = dy/dx C IFUNC(J): FUNCTION INDEX C J : FIRST(J=1), SECOND(J=2) .. FUNCT ION 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,IFLAG(MVSIZ),INDX(MVSIZ),IADBUF,NIN DX, DOUBLE PRECISION PLAMAX 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,1)=ZERO ENDDO ENDIF C 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. ENDIF ENDDO C RETURN END

Page 124: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX

October, 2011 123

APPENDIX APPENDIX

Page 125: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 124

APPENDIX 1 – Creating user’s executables

In order to create a new RADIOSS executable with your user property law, it is necessary to get from Altair an object library for the RADIOSS STARTER and another for the RADIOSS ENGINE. The same type of machine must be used for compiling with the same compiler version as the given libraries.

To generate new RADIOSS STARTER executable which includes the user’s option, follow these steps:

- compile the user’s Starter subroutine to get an object file.

- link to get a new RADIOSS STARTER executable.

For RADIOSS ENGINE the procedure is:

- compile the user’s Engine subroutine to get an object file.

- link to get a new RADIOSS ENGINE executable.

Procedure flags for usual versions are given as examples.

� Please contact Altair support to get the updated compilation options for a given machine.

1. Procedure for linux64_impi :

With compiler Intel Fortran Version 11.0, Build 20090609 (Math Kernel Libraries installation is required) With INTEL MPI version : 3.2.2 � Compilation for starter:

ifort -axsse3 -O2 -fp-model precise -heap-arrays -c [starter_user_routine].f

� Links edition for starter:

• If the user law is an extendend user law (See Chapter 3) ar –xv [starter_library].a law_user.mod ar -xv [starter_library].a starter.o ifort -axsse3 -O2 -fp-model precise -heap-arrays -i-static -o [user_starter_executable]

starter.o [starter_user_routine].o [starter_library].a Since version 11.0.201 -openmp is resquested : ifort -axsse3 -O2 -fp-model precise -heap-arrays -i-static -openmp -o

[user_starter_executable] starter.o [starter_user_routine].o [starter_library].a

� Compilation for engine:

Page 126: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 125

• If the user law is a 29-30-31 user law type (See Chapter2) ifort -axsse3 –O3 -fp-model precise -heap-arrays -c [engine_user_routine].f

• If the user law is an extendend user law (See Chapter 3) ar –xv [engine_library].a law_usersh.mod law_userso.mod ifort -axsse3 –O3 -fp-model precise -heap-arrays -c [engine_user_routine].f

� Links edition for engine:

ar -xv [engine_library].a RADIOSS.o ifort -axsse3 –O3 -fp-model precise -heap-arrays -i-static -DMPI -L/opt/intel/mpi/3.2.2/lib64/ -o [user_engine_executable] RADIOSS.o [engine_user_routine].o [engine_library].a -L[path_to_intel_compiler]/mkl/lib/em64t -I[path_to_intel_compiler]/mkl/includes -Wl,--start-group [path_to_intel_compiler]/mkl/lib/em64t/libmkl_intel_lp64.a [path_to_intel_compiler]/mkl/lib/em64t/libmkl_sequential.a [path_to_intel_compiler]/mkl/lib/em64t/libmkl_core.a -Wl,--end-group -lm -lmpiif -lmpi -lrt -ldl

2. Procedure for linux64_plmpi:

With compiler Intel Fortran Version 11.0, Build 20090609 (Math Kernel Libraries installation is required) With HP-MPI version : HPMPI 2.2.7 or higher. � Compilation for starter:

• If the user law is an extendend user law (See Chapter 3) ar –xv [starter_library].a law_user.mod ifort -axsse3 -O2 -fp-model precise -heap-arrays -c [starter_user_routine].f

� Links edition for starter:

ar -xv [starter_library].a starter.o ifort -axsse3 -O2 -fp-model precise -heap-arrays -i-static -o [user_starter_executable] starter.o [starter_user_routine].o [starter_library].a Since version 11.0.201 -openmp is resquested : ifort -axsse3 -O2 -fp-model precise -heap-arrays -i-static -openmp -o [user_starter_executable] starter.o [starter_user_routine].o [starter_library].a

� Compilation for engine:

• If the user law is a 29-30-31 user law type (See Chapter2) ifort -axsse3 –O3 -fp-model precise -c [engine_user_routine].f

• If the user law is an extendend user law (See Chapter 3) ar –xv [engine_library].a law_usersh.mod law_userso.mod ifort -axsse3 –O3 -fp-model precise -c [engine_user_routine].f

� Links edition for engine:

ar -xv [engine_library].a RADIOSS.o

Page 127: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 126

ifort -axsse3 –O3 -fp-model precise -i-static -DMPI -L/opt/intel/mpi/2.0/lib64/ -o [user_engine_executable] RADIOSS.o [engine_user_routine].o [engine_library].a -L[path_to_intel_compiler]/mkl/lib/em64t -I[path_to_intel_compiler]/mkl/includes -Wl,--start-group [path_to_intel_compiler]/mkl/lib/em64t/libmkl_intel_lp64.a [path_to_intel_compiler]/mkl/lib/em64t/libmkl_sequential.a [path_to_intel_compiler]/mkl/lib/em64t/libmkl_core.a -Wl,--end-group -lm -lmpi -lpmpi -ldl -lrt

3. Procedure for linux64:

With compiler Intel Fortran Version 11.0, Build 20090609 (Math Kernel Libraries installation is required) � Compilation for starter:

• If the user law is an extendend user law (See Chapter 3) ar –xv [starter_library].a law_user.mod ifort -axsse3 -O2 -fp-model precise -heap-arrays -c [starter_user_routine].f

� Links edition for starter:

ar -xv [starter_library].a starter.o ifort -axsse3 -O2 -fp-model precise -heap-arrays -o [user_starter_executable] starter.o

[starter_user_routine].o [starter_library].a Since version 11.0.201 -openmp is resquested : ifort -axsse3 -O2 -fp-model precise -heap-arrays -openmp -o [user_starter_executable]

starter.o [starter_user_routine].o [starter_library].a

� Compilation for engine:

• If the user law is a 29-30-31 user law type (See Chapter2) ifort -axsse3 –O3 -fp-model precise -heap-arrays -openmp -c [engine_user_routine].f

• If the user law is an extendend user law (See Chapter 3) ar –xv [engine_library].a law_usersh.mod law_userso.mod ifort -axsse3 –O3 -fp-model precise -heap-arrays -openmp -c [engine_user_routine].f

� Links edition for engine:

ar -xv [engine_library].a RADIOSS.o ifort -axsse3 –O3 -fp-model precise -heap-arrays -openmp -i-static -o [user_engine_executable] RADIOSS.o [engine_user_routine].o [engine_library].a -L[path_to_intel_compiler]/mkl/lib/em64t -I[path_to_intel_compiler]/mkl/includes -Wl,--start-group [path_to_intel_compiler]/mkl/lib/em64t/libmkl_intel_lp64.a [path_to_intel_compiler]/mkl/lib/em64t/libmkl_sequential.a [path_to_intel_compiler]/mkl/lib/em64t/libmkl_core.a -Wl,--end-group

4. Procedure for Windows 32 bit:

With compiler INTEL Fortran compiler 11.0, build 20090609 :

Page 128: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 127

(Math Kernel Libraries installation is required) Extended user law requires additional Radioss packages : [starter]_fortran_usermodules.zip [engine]_fortran_usermodules.zip � Compilation for starter:

• If the user law is an extendend user law (See Chapter 3) unzip [starter]_fortran_usermodules.zip ifort /nologo /Qcpp /Qaxsse2 /O2 /fp:precise /heap-arrays –c [starter_user_routine].f

� Links edition for starter:

LIB /EXTRACT:_obj_win32/starter.obj [starter_library].a ifort /nologo /Qaxsse2 /O2 /fp:precise /heap-arrays -o [user_starter_executable] starter.o [starter_user_routine].o [starter_library].a advapi32.lib Psapi.lib

� Compilation for engine:

• If the user law is a 29-30-31 user law type (See Chapter2) ifort /nologo /Qcpp /Qaxsse2 /Qopenmp /O3 /fp:precise /heap-arrays -c [engine_user_routine].f

• If the user law is an extendend user law (See Chapter 3) unzip [engine]_fortran_usermodules.zip ifort /nologo /Qcpp /Qaxsse2 /Qopenmp /O3 /fp:precise /heap-arrays -c [engine_user_routine].f

� Links edition for engine:

LIB /EXTRACT:_obj_win32/radioss.obj [engine_library].a ifort /nologo /Qaxsse2 /Qopenmp /O3 /fp:precise /heap-arrays /F150000000 -o [user_engine_executable] radioss.obj [engine_user_routine].obj [engine_library].a mkl_intel_c.lib mkl_sequential.lib mkl_core.lib /MT /Qopenmp-link:static libiomp5mt.lib advapi32.lib Psapi.lib

5. Procedure for Windows 64 Bit

With compiler INTEL Fortran compiler 11.0, build 20090609 : (Math Kernel Libraries installation is required) Extended user law requires additional Radioss packages : [starter]_fortran_usermodules.zip [engine]_fortran_usermodules.zip � Compilation for starter:

• If the user law is an extendend user law (See Chapter 3) unzip [starter]_fortran_usermodules.zip ifort /nologo /Qcpp /Qaxsse3 /O2 /fp:precise /heap-arrays –c [starter_user_routine].f

� Links edition for starter:

Page 129: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 128

LIB /EXTRACT:_obj_win64/starter.obj [starter_library].a ifort /nologo /Qaxsse3 /O2 /fp:precise /heap-arrays -o [user_starter_executable] starter.o [starter_user_routine].o [starter_library].a advapi32.lib Psapi.lib

� Compilation for engine:

• If the user law is a 29-30-31 user law type (See Chapter2) ifort /nologo /Qcpp /Qaxsse3 /Qopenmp /O3 /fp:precise /heap-arrays -c [engine_user_routine].f

• If the user law is an extendend user law (See Chapter 3) unzip [engine]_fortran_usermodules.zip ifort /nologo /Qcpp /Qaxsse3 /Qopenmp /O3 /fp:precise /heap-arrays -c [engine_user_routine].f

� Links edition for engine:

LIB /EXTRACT:_obj_win64/radioss.obj [engine_library].a ifort /Qaxsse3 /Qopenmp /O3 /fp:precise /heap-arrays /F150000000 -o [user_engine_executable] radioss.obj [engine_user_routine].obj [engine_library].a /Qopenmp-link:static advapi32.lib Psapi.lib mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib

APPENDIX 2 – Available user’s arguments

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 listing 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) Stifness modulus for interface (2)Young modulus (for shell) (3)Poissson’s ratio (for shell)

(defined in the headers of subroutines)

Page 130: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 129

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 listing 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 Stifness modulus for interface

STARTER USER’S ARGUMENTS – SPING 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 listing 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) Stifness 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

MASS NEL Float W Element mass

XINER NEL Float W Element inertia (spherical)

STIFM NEL Float W Element stifness (time step)

STIFR NEL Float W Element rotation stifness (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 listing 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) Stifness for interface (3) Front wave option

IPROP 1 Integer R Property number

IMAT 1 Integer R Material number

Page 131: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 130

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 stifness (time step)

STIFR NEL Float W Element rotation stifness (time step)

VISCM NEL Float W Element viscosity (time step)

VISCR NEL Float W Element rotation viscosity (time step)

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 listing file)

2. Available engine user’s arguments

a.

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

(defined in the headers of subroutines)

Page 132: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 131

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

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

Page 133: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 132

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 – SPING 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 stifness (time step)

STIFR NEL Float W Element rotation stifness (time step)

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

Page 134: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 2 – Available arguments

October, 2011 133

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

STIFM NEL Float W Element stifness (time step)

STIFR NEL Float W Element rotation stifness (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 135: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 3 – Access functions

October, 2011 134

APPENDIX 3 – Communication between user’s subroutines and RADIOSS code

� The main functions to access user’s properties and materials are:

Storage functions: INTEGER ierror = SET_U_PNU(func_index, fun_id, KFUNC)

This function stores a RADIOSS function fun_id in current user property buffer at a position referenced by func_index.

INTEGER ierror = SET_U_PNU(mat_index, mid, KMAT) This function stores a RADIOSS material mid in current user property buffer at a position referenced by mat_index.

INTEGER ierror = SET_U_PNU(prop_index, pid, KPROP) This function stores a RADIOSS property pid in current user property buffer at a position referenced by prop_index.

INTEGER ierror = SET_U_GEO(value_index, value) This function stores a value in current user property buffer at a position referenced by value_index.

Return functions:

INTEGER IP = GET_U_P(PID) PID : integer property ID This function return property number.

INTEGER PID = GET_U_PID(IP) IP : property number This function return the user property ID corresponding to user property number IP. FLOAT PARAMI = GET_U_GEO(I,IP)

I : parameter index (1 for first parameter,...) IP : property number This function return the user geometry parameters.

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 : varible index (1 for first variable,...) IP : property number

Page 136: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 3 – Access functions

October, 2011 135

KK : parameter KFUNC,KMAT,KPROP This function return the user stored function (if KK=KFUNC), material (if KK=KMAT) or property (if KK=KPROP) numbers. See starter subroutine for corresponding ID storage.

INTEGER IM = GET_U_M(MID) MID : material ID This function return material number

INTEGER MID = GET_U_MID (IM)

IM : material number This function return the user material ID corresponding to user material number IM.

FLOAT PARAMI = GET_U_MAT (I,IM)

I : parameter index (1 for first parameter,...) IM : material number This function return the user material parameters. NOTE: GET_U_MAT(0,IMAT) return the density

INTEGER IFUNCI = GET_U_MNU(I,IM,KFUNC)

I : variable index (1 for first function) IM : material number KFUNC : only functions are yet available. This function return the user stored function numbers (function refered by users materials).

INTEGER IFUNCI = GET_U_MNU(I,IM,KFUNC) I : variable index (1 for first function) IM : material number

KFUNC : only functions are yet available. This function return the user stored function numbers (function refered by users materials).

See starter material user’s subroutine for corresponding ID storage. FLOAT Y = GET_U_FUNC(IFUNC,X,DYDX) IFUNC : function number obtained by IFUNC = GET_U_MNU(I,IM,KFUNC) or IFUNC = GET_U_PNU(I,IP,KFUNC) X : X value DYDX : slope dY/dX This function return Y(X).

The geometry datas (property) has to bee stored in RADIOSS storage with the function SET_U_GEO(value_index,value).

Page 137: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 3 – Access functions

October, 2011 136

If some standard RADIOSS functions (time function or x,y function) are used, this function IDs has to bee stored with the function SET_U_PNU(func_index,func_id,KFUNC).

If the property refers to a user material, this material IDs has to bee stored with the function SET_U_PNU(mat_index,mat_id,KMAT).

If the property refers to a user property, this sub-property IDs has to bee stored with the function SET_U_PNU(sub_prop_index,sub_prop_id,KPROP).

SET_U_GEO and SET_U_PNU return 0 if no error. SET_U_GEO and SET_U_PNU return the maximum allowed index if index is larger than this maximum.

� The specific functions for user’s subroutines type sensor are:

INTEGER NUM = GET_U_NUMSENS(ID) ID : sensor ID NUM : sensor number This function allows user to get a sensor number.

INTEGER ierror = GET_U_SENS_FPAR(IVAR, VAR)

IVAR : float variable index VAR : integer value This function allows user to retrieve a float sensor parameter.

INTEGER ierror = GET_U_SENS_IPAR(IVAR, VAR) IVAR : integer variable index VAR : integer value This function allows user to retrieve an intenger sensor parameter.

INTEGER ierror = SET_U_SENS_VALUE(NSENS,IVAR,VAR) NSENS : integer sensor number IVAR : integer buffer index VAR : float value This function allows user to write a variable to a sensor buffer (float).

INTEGER ierror = GET_U_SENS_VALUE(NSENS,IVAR,VAR) NSENS : integer sensor number IVAR : integer buffer index VAR : float value This function allows user to read a variable from a sensor buffer (float).

INTEGER ierror = SET_U_SENS_ACTI(NSENS)

NSENS : integer sensor number This function allows user to activate a sensor using RADIOSS flag.

FLOAT DTIME = GET_U_SENS_ACTI(NSENS)

DTIME : float time delay since first activation

Page 138: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 3 – Access functions

October, 2011 137

(actif <=> DTIME > 0) NSENS : integer sensor number This function allows user to check RADIOSS activation status of a sensor.

FLOAT TIME = GET_U_TIME()

This function allows user to check current time.

INTEGER NCYC = GET_U_CYCLE() This function allows user to check current cycle.

INTEGER IERR = GET_U_ACCEL (NACC, AX,AY,AZ)

AX,AY,AZ : float acceleration components NACC : integer accelerator number, IDACC : integer accelerator ID, and NACC : GET_U_NUMACC(IDACC) This function allows user to access accelerometer values

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) INTEGER IERR = GET_U_NOD_A(NOD, AX,AY,AZ)

X, Y, Z : float nodal coordinates DX,DY,DZ : float nodal displacements AX,AY,AZ : float nodal velocities AX,AY,AZ : float nodal accelerations NOD : integer node number NID : integer node ID, and NOD : GET_U_NUMNOD(ID) This function allows user to access nodal values

FLOAT Y = GET_U_FUNC(IFUNC, X, DERI)

Y : float ordinate X : float abscissa DERI : float Y/X IFUNC : integer function number IDFUN : integer function ID, where

INTEGER IFUNC = GET_U_NUMFUN(IDFUN) This function allows user to access RADIOSS functions.

� Refer to the user’s subroutines descriptions for more explanation about access functions.

Page 139: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 3 – Access functions

October, 2011 138

Figure 2: Communication between user’s modules and RADIOSS database

STARTER USER’S SUBROUTINE PROPERTY (pid)

User’s arguments list

STARTER USER’S SUBROUTINE INITIALIZATION PROPERTY

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)

RADIOSS arguments lists

Property parameters stored in the values_index (prop_index)

MATERIAL BUFFER (imat)

Material parameters stored in the values_index (mat_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

RADIOSS ENGINE

GENERAL OPTIONS

RADIOSS arguments lists

Shared arguments

Storage functions (SET_U)

Return functions (GET_U)

Shared arguments

and/or

Subroutne(s) CALL

RADIOSS storage

Page 140: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 4 – General subroutine format

October, 2011 139

APPENDIX 4 – General user’s subroutine format with material laws 29, 30, 31

1. Starter format (example)

SUBROUTINE LECM29(IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM,

. NUVAR,IFUNC,MAXFUNC,NFUNC ,PA RMAT)

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, '(2F16.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

Standarized headers: User’s arguments list (read, written or read/written)

Arguments definition (size, type) Used in communications between RADIOSS database and user’s subroutines

Local variables definition Used in current user’s subroutine

Read input user’s data specified in RADIOSS starter input file (user’s options: /MAT/USER1/)

Store user’s arguments values as user’s parameters (can be returned by a restore function in the engine user’s subroutine)

User’s values print in starter listing

Write message

Page 141: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 4 – General subroutine format

October, 2011 140

RETURN

END

2. Engine format (example)

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

Input arguments definition. Used in current routine (user’s program)

User’s program (on elements: NEL) Read input arguments and write 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 D01.

Standarized headers: User’s arguments list (read, written or read/written)

Output arguments definition. Computed in current routine

User’s variable definition. Used in communications between user’s subroutines.

Local variables definition Used in current user’s subroutine

END

Page 142: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 4 – General subroutine format

October, 2011 141

APPENDIX 5 – General user’s subroutine format with extended user material laws

1. Starter format (example)

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, '(2F16.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

Standarized headers: User’s arguments list (read, written or read/written)

Arguments definition (size, type) Used in communications between RADIOSS database and user’s subroutines

Local variables definition Used in current user’s subroutine

Read input user’s data specified in RADIOSS starter input file (user’s options: /MAT/USER1/)

Store user’s arguments values as user’s parameters (can be returned by a restore function in the engine user’s subroutine)

User’s values print in starter listing

Write message

Page 143: RADIOSS USER’S CODE INTERFACE - Altair University user’s code contents october, 2011 1 table of contents table of contents

RADIOSS USER’S CODE APPENDIX 4 – General subroutine format

October, 2011 142

2. Engine format (example)

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 definition. Used in current routine (user’s program)

User’s program (on elements: NEL) Read input arguments and write 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.

Standarized headers: User’s arguments list (read, written or read/written)

Output arguments definition. Computed in current routine

User’s variable definition. Used in communications between user’s subroutines.

Local variables definition Used in current user’s subroutine

END