user options introduction - altair forum
TRANSCRIPT
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options introduction
RADIOSS allows user to define a user private code for :
User window (general interface for external code)
User material laws for solid and shell elements
User spring elements
User solid elements (may be degenerated to shell or beam elements)
User sensors
User failure models
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Radioss Calculation
STARTER
ENGINE
00.rad 00.lis
R00
nn.rst Ann
nn.lis
Tnn
nn.rad
Post-Processor
Pre-Processor
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
File formats
Extension Type Format Read by Written by
Runname_ 0000.rad Starter
input
ASCII STARTER Hypermesh /
hypercrash
Runname_ run#.rad Engine
input
ASCII ENGINE Hypermesh /
hypercrash
Runname_0000.out
Runname_run#.out
Output ASCII _______ STARTER
ENGINE
RunnameAnnn Animation IEEE
binary
HELIOSS ENGINE
RunnameT01 Time
history
Any HELIOSS ENGINE
Runname_run#.ctl Control file ASCII ENGINE USER
run#: RADIOSS run number (4 digits) from 0000 to 9999
cpu #: number of processors (4 digits)
cpu # = 0000 = SMP RADIOSS VERSION
cpu # = 0001 to 9999 = SPMD RADIOSS VERSION
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
MID and PID:
Material and Property Identification Data
PART:
Set of elements based on PID-MID coupling
Each part is made of a single PID and a single MID
SUBSET:
Bunch of parts (The ‘DOORS’ subset would consist of all Parts belonging to the right and left doors)
Groups :
Nodes or elements grouped by user (independently from part or subset)
Radioss Nomenclature
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Formatted lines of 100 characters divided into 10 fields of 10 characters
Each field is dedicated to a specific option : parameter, flag, Id number…
Each input deck must start with the header card
Comment lines must start with a $ or a #
RADIOSS 00.rad file Formats
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Block format in 00.rad Files
Each block defines one feature : a set of nodes or elements, materials, properties, interfaces…
Each block starts with a “/” (slash) followed by a keyword and ends at the beginning of the next block
The input deck finishes with the « /END » keyword in Bloc format
Blank lines at the end of each block are ignored
The content of each block is entered in “fixed format” : formatted lines of 100 characters divided in 10
fields of 10 characters.
/RBODY/4773/RIGID BODY for the RIM
#--1---|---2---|---3---|---4---|---5---|---6---|---7---|---8---|---9---|--10---|
#-RBID | | nskew | Ispher| Mass | grnod | IKREM | ICOG | Surf |
2594 0 0 0 5 0 0 0
#- Jxx | Jyy | Jzz |
0 0 0
#- Jxy | Jyz | Jxz |
0 0 0
#-
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Input deck:
Each input deck must start with the header card:
Each input deck must finish with the “/END” keyword
The order in which the blocks are entered is completely free (except for the
header card and the /END card)
Comment lines must start with a $ or a #
0 ROOTNAME 110 STARTER #RADIOSS
1- Header card
2- Materials
3- Nodes
4- Shell elements
5- Properties
6- Interfaces
7- Rigid bodies
8- /END
1- Header card
2- Rigid bodies
3- Properties
4- Interfaces
5- Materials
6- Shell elements
7- Nodes
8- /END
OR
1- Header card
2- Materials
3- Nodes
4- Shell elements
5- Materials
6- Properties
7- Nodes
8- Interfaces
9- Rigid bodies
10- Materials
11- /END
OR OR…
Block format in 00.rad Files
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options in input files
RADIOSS STARTER RADIOSS ENGINE
USER’S INPUT OPTIONS ENGINE FILE OPTIONS
(specify user data and storage arrays) (save user variables in animations)
User material /MAT/USERn /ANIM/keyword/USRi
/ANIM/keyword/USRj/k
Extended User material /MAT/USERk /ANIM/keyword/USRi
/ANIM/keyword/USRj/k
User property /PROP/USERn
User sensor /SENSOR/USERm
User Failure /FAIL/USERn
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options subroutine names
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
Extended User
material 00 to 99 shell LECMUSERk.f LUSERkk.f
solid LECMUSERk.f LUSERkC.f
User property spring LECGnn.f and RINInn.f RUSERnn.f
solid LECGnn.f and SINInn.f SUSERnn.f
User Failure
01,02,04 shell LECRll.f flllawC.f
solid LECRll.f flllaw.f
User sensor LECSEN_USERm.f USER_SENm.f
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options compilation (win64)
Dll general presentations / installation
First example compilation
Material laws
Failure models
Access functions
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options compilation (win64)
Dll general presentations / installation
First example compilation
Material laws
Failure models
Access functions
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Lagrangian solids
B8,HA8,P6,T4,T10,B20,
User Pids
Thick Shell
HA8,B16
ALE Euler
B8 SPH
Failure model
Max strain
Tuler Butcher
Chang Chang
Wilkins
Bao-Xue-Wierzbicki
…
MMAIN Material Law
User materials
Code organisation
EOS Gruneisen
Polynomial
Sesame
Tillotson
PUFF
…
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Available for user windows, user laws, user failure criteria, user props
Compilation procedure is easy and independent from version
No need to recompile for each version
Dll are “small” and can be delivered easily to partners (clients, sub-
contractors …)
Very easy to manipulate
User options : dll system
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User Subroutines in dynamic library
Workflow with dynamic libraries
User law Development Production
libraduser_win64.dll
libraduser_linux64.so
linux64 linux64_impi linux64_plmpi
win64 win64_impi win64_msmpi win64_plmpi
userlib_sdk INTEL Compiler
linux64
win64
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
The USERLIB_SDK : creating the library with User code Distributed in HyperWorks : hwsolvers/radioss/userlib_sdk
contains : 4 directories with different architectures :
linux64, linux64_sp, win64 and win64_sp
Each architecture has :
➔A Static library
with objects needed to generate the dynamical library.
➔Fortran Module definition file
for the user modules
➔Build scrips to simplify the library generation
sh Shell script for Linux, Batch script for Windows:
build_userlib_[arch].[sh|bat]
User Subroutines in dynamic library
userlib_sdk ├── linux64 │ ├── build_userlib_linux64.sh │ ├── law_user.mod │ ├── law_usersh.mod │ ├── law_userso.mod │ ├── libraduser_linux64.a │ └── uintbuf_mod.mod ├── linux64_sp │ ├── build_userlib_linux64_sp.sh │ ├── law_user.mod │ ├── law_usersh.mod │ ├── law_userso.mod │ ├── libraduser_linux64_sp.a │ └── uintbuf_mod.mod ├── win64 │ ├── build_userlib_win64.bat │ ├── law_user.mod │ ├── law_usersh.mod │ ├── law_userso.mod │ ├── libraduser_win64.lib │ └── uintbuf_mod.mod └── win64_sp ├── build_userlib_win64_sp.bat ├── law_user.mod ├── law_usersh.mod ├── law_userso.mod ├── libraduser_win64_sp.lib └── uintbuf_mod.mod
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
The USERLIB_SDK : creating the library with User code
To generate a library :
Use the INTEL compiler,
recommended version: INTEL 12.1 or newer.
Note : Microsoft Visual Studio 9.0 is required as part of the compiler install
Define 2 environments variables :
RAD_USERLIB_SDK_PATH : Userlib SDK Root directory
RAD_USERLIB_ARCH : Userlib SDK arch
(linux64, linux64_sp, win64, win64_sp)
Run the proper compilation command:
Windows: %RAD_USERLIB_SDK_PATH%\%RAD_USERLIB_ARCH%\build_userlib_win64.bat
/STARTER "starter user routines" /ENGINE "engine user routines"
Linux: $RAD_USERLIB_SDK_PATH/$RAD_USERLIB_ARCH/build_userlib_linux64.sh
starter="starter user routines" engine="engine user routines"
libraduser_ [arch].[so/dll] is created.
User Subroutines in dynamic library
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User Subroutines in dynamic library
Radioss Starter & Engine loads the user library when available
Look for libraduser_[arch] presence early in Starter & Engine initialization
phase:
Linux search directory is defined with LD_LIBRARY_PATH environment variable.
Windows search directory is the PATH environment variable
When found :
Loads the library and perform some initialization
Prints some info in the output files
When USER options are found in the cards: the calls are going in the library.
EXTERNAL LIBRARY FOR USERS CODE INTERFACE ----------------------------------------- LIBRARY NAME . . . . . . . . . . . . . . . . . . . . libraduser_linux64.so RADIOSS USERS CODE INTERFACE VERSION . . . . . . . . 130131121
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User Subroutines in dynamic library
Language = Fortran 95 or more
Most variable are “protected”
Use “IMPLICIT NONE”
Always check variables initialization
Only necessary variables can be overwritten by the user
In input files :
• Max line length is 100 characters
• Integers are written over 10 characters (I10)
• Reals are written over 20 characters (F20)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options compilation (win64)
Dll general presentations / installation
First example compilation :
Description of a simple material law (Orthotropic Hooke)
Compilation
User Material laws
Failure models
Access functions
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Classic / extended
For “classic” :
3 material laws are available
/MAT/LAW29
/MAT/LAW30
/MAT/LAW31
3 subroutines / law :
Lecm29 : starter, law 29
Sigeps29 : solver calculation solids (law29)
Sigeps29c : solver calculation for shell (law 29)
Lecm30, lecm31, sigeps30; sigeps31, sigeps30c, sigeps31c for laws 30 and 31
Simple Material user law
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Classic / extended
For “extended” :
Use when more than 3 material laws are needed (up to 100)
Same as “classic” except variables are transferred through a structure
Check chapter 3 for more information
Extended Material user law
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
SUBROUTINE LECMnn
(IIN,IOUT,UPARAM,MAXUPARAM,NUPARAM,NUVAR,IFUNC,MAXFUNC,NFUNC,PARMAT )
Starter : lecm29
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)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
READ(IIN,'(3F20.0)')E11,E22,N12
READ(IIN,'(3F20.0)')G12,G23,G31
Input is :
/MAT/LAW29/1
example material : do not use !!!
# RHO_I
.0015 0
# E11 E22 NU12
56275 24868 .042
# G12 G23 G31
4000 4000 4000
Starter : lecm29 : read input file
The lines /MAT, material name and densities are automatically
read by Radioss « main »
Note : comment lines (starting with the # sign) are automatically discarded : the developper
does not have to make any special treatment
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Starter : lecm29 : material parameters definition
NUPARAM = 7
N21 = N12*E22/E11
SCALE = 1.0-N12*N21
Q11= E11/SCALE
Q22= E22/SCALE
Q12=N21*Q11
UPARAM(1) = E11
UPARAM(2) = E22
UPARAM(3) = N12
UPARAM(4) = G12
UPARAM(5) = G23
UPARAM(6) = G31
UPARAM(7) = N21
PARMAT(1) = MAXVAL((/Q11,Q22/))
PARMAT(2) = MAXVAL((/E22,E11/))
PARMAT(3) = N12
IFUNC = 0
NUVAR = 0
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Starter : lecm29 : print parameters in 0.out
WRITE(IOUT,1000)
WRITE(IOUT,1100)E11,E22,N12
WRITE(IOUT,1300)G12,G23,G31,Q11,Q22,Q12
1000 FORMAT(
& 5X,' User orthotropic law',/,
& 5X,' ------------------ ',//)
1100 FORMAT(
& 5X,'YOUNG MODULUS E11 . . . . . . . . . .=',E12.4/,
& 5X,'YOUNG MODULUS E22 . . . . . . . . . .=',E12.4/,
& 5X,'POISSON RATIO N12 . . . . . . . . . .=',E12.4/)
1300 FORMAT(
& 5X,'SHEAR MODULUS G12 . . . . . . . . . .=',E12.4/,
& 5X,'SHEAR MODULUS G23 . . . . . . . . . .=',E12.4/,
& 5X,'SHEAR MODULUS G31 . . . . . . . . . .=',E12.4/,
& 5X,' Hooke Matrix',/,
& 5X,'Q11 coefficient. . . . . . . . . . .=',E12.4/,
& 5X,'Q22 coefficient. . . . . . . . . . .=',E12.4/,
& 5X,'Q12 coefficient. . . . . . . . . . .=',E12.4/)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for shell elements) : sigeps29c
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)
Purpose :
Calculate stress and viscous stress, failure as a function of strain, strain rates, user specific variables, material parameters …
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for shell elements) : sigeps29c
ENGINE USER’S ARGUMENTS – MATERIAL LAW FOR SHELLS
Variable Size Type Write /read Definition
NEL 1 Integer R Number of elements
UVAR NUVAR* NEL Float R/W User’s variable
UPARAM NUPARAM Float W User’s parameter
NUPARAM 1 Integer W Size of UPARAM
NUVAR 1 Integer W Number of user’s variables
NFUNCT 1 Integer W Size of IFUNC
IFUNC NFUNCT Integer W Function number array
NPF * Integer R Function array
NPT 1 Integer R Number of layers or integration points
IPT 1 Integer R Layer or integration point number
IFLAG * Integer R Geometrical flags
TF * Float R Function array
NGL NEL Integer R Element number
TIME 1 Float R Current time
TIMESTEP 1 Float R Current time step
RHO0 NEL Float R Initial density
AREA NEL Float R Area
EINT NEL Float R Total internal energy
THKLY NEL Float R Layer thickness
EPSPXX NEL Float W Strain rate XX
DEPSXX NEL Float W Strain increment XX
EPSXX NEL Float W Strain XX
SIGOXX NEL Float W Old elasto-plastic stress XX
SIGNXX NEL Float W New elasto-plastic stress XX
SIGVXX NEL Float W Viscous stress XX
SOUNDSP NEL Float W Sound speed (time step)
VISCMAX NEL Float W Max damping modulus (time step)
THK NEL Float R/W Thickness
PLA NEL Float R/W Plastic strain
OFF NEL Float R/W Delete flag
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for solid elements) : sigeps29
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 )
Purpose :
Calculate stress and viscous stress, failure as a function of strain, strain rates, user specific variables, material parameters …
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for solid elements) : sigeps29
ENGINE USER’S ARGUMENTS – MATERIAL LAW FOR BRICKS
Variable Size Type Write /read Definition
NEL 1 Integer R Number of elements
UVAR NUVAR* NEL Float R/W User’s variable
UPARAM NUPARAM Float W User’s parameter
NUPARAM 1 Integer W Size of UPARAM
NUVAR 1 Integer W Number of user’s variables
NFUNCT 1 Integer W Size of IFUNC
IFUNC NFUNCT Integer W Function number array
NPF * Integer R Function array
TF * Float R Function array
NGL NEL Integer R Element number
TIME 1 Float R Current time
TIMESTEP 1 Float R Current time step
RHO0 NEL Float R Initial density
RHO NEL Float R Density
VOLUME NEL Float R Volume
EINT NEL Float R Total internal energy
EPSPXX NEL Float W Strain rate XX
DEPSXX NEL Float W Strain increment XX
EPSXX NEL Float W Strain XX
SIGOXX NEL Float W Old elasto-plastic stress XX
SIGNXX NEL Float W New elasto-plastic stress XX
SIGVXX NEL Float W Viscous stress XX
SOUNDSP NEL Float W Sound speed (time step)
VISCMAX NEL Float W Max damping modulus (time step)
OFF NEL Float R/W Delete flag
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for shell elements) : sigeps29c
E11 = UPARAM(1)
E22 = UPARAM(2)
N12 = UPARAM(3)
G12 = UPARAM(4)
G23 = UPARAM(5)
G31 = UPARAM(6)
N21 = UPARAM(7)
DO I=1, NEL
SIGNXX(I)=Q11*EPSXX(I)+Q12*EPSYY(I)
SIGNYY(I)=Q12*EPSXX(I)+Q22*EPSYY(I)
SIGNXY(I)=G12*EPSXY(I)
SIGNYZ(I)=G23*EPSYZ(I)
SIGNZX(I)=G31*EPSZX(I)
ENDDDO
General note :
Integration points are treated by groups of NEL elements
NEL is defined by Radioss for optimization purpose
If necessary, IPT is the integration point number and NGL is an array giving the user element number as a function of the treated element number
A Loop on NEL elements must be done to treat all elements
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Compilation under win64(1/2)
Open a command shell from the compiler environment :
If the compiler is properly installed, open :
Fortran Build Environment for applications running on Intel(R) 64
Initialize visual studio 9 :
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat "
Check the following variables are defined :
Path to the compiler licence file :
set INTEL_LICENSE_FILE=
Path for Radioss user libraries :
RAD_USERLIB_PATH : Userlib SDK Root directory
Warning : if the path contains special characters (“ “) don’t forget to
define the path between “”
RAD_USERLIB_ARCH : Userlib SDK arch (linux64, linux64_sp, win64, win64_sp)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Compilation (2/2)
Go to the user options source file directory :
cd "sdk\test"
Compile with the following command :
%RAD_USERLIB_SDK_PATH%\%RAD_USERLIB_ARCH%\build_use
rlib_win64.bat /STARTER "lecm29.f " /ENGINE "sigeps29c.f "
For several user options, the list of user options must be inside “”
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
How to make the dll work ? Dll Installation
Move the dll in the model directory
Or copy your dll to your radioss install directory:
HW_Installation_directory\hwsolvers\bin\win64
Note : if there are dll in both directories, the radioss install directory dlls have priority
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options compilation (win64)
Dll general presentations / installation
First example compilation
Material laws :
Using user functions
Using user variables
User variables post-treatment
Element deletions
Write messages during solver process
Advance user laws
Failure models
Access functions
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
1. Read material law parameters except density : Young’s modulus, Poisson’s ratio ….
2. Assign those parameters to array UPARAM
3. Assign user functions to array NFUNCT (if the material law requires user function)
4. Dimension the law
a) Number of user parameters : NUPARAM
b) Number of user variables : NUVAR
c) Number of functions : NFUNCT
5. Write in 0.out the material parameters
6. Define various parameters to compute an estimate of the time step in the starter (array PARMAT)
Purpose of user subroutines in starter
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)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
1. At time 0.0, initialize user variables and other necessary variables
2. Calculate the full stress (SIGN) and full viscous stress (SIGV) as a function of :
a. Strain (EPS)
b. Incremental strain (DEPS)
c. Strain rate (EPSP)
d. Stress at previous time step (SIGO)
e. Time / timestep
f. Material properties :
• Material parameters PARAM
• User variables UVAR
• User functions IFUNCT
Note : pressure is calculated from the trace of the stress tensor
All tensors in input / output are full tensor (not deviatoric)
Purpose of user subroutines in engine (1/2)
𝑝 = −𝑡𝑟 𝜎
3
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
3. Calculate possible element deletion : IOFF
4. Calculate element internal specific energy EINT
5. For shell elements : calculate layer thickness variation (THKLY)
6. Define various variables needed for Radioss calculations :
a. Plastic variable PLA for physical hourglass stabilization elements only (HEPH, QEPH
…)
b. Define time step variables (SOUND_SP, VISCMAX)
c. Define interface stiffness parameters
Purpose of user subroutines in engine (2/2)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User laws compatibility
Shell elements : use sigepsnnc
Isotropic shell elements : PID1
Orthotropic shell elements :
PID11 (SH_SANDWICH)
PID19 (PLY)
Solid elements : use sigpesnn
Isotropic : PID14
Orthotropic : PID6
Thick shell elements : use sigepsnn
Isotropic : PID20
Orthotropic : PID21
Orthotropic multilayer : PID22
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for solid elements) : sigeps29
ENGINE USER’S ARGUMENTS – MATERIAL LAW FOR SHELLS
Variable Size Type Write /read Definition
NEL 1 Integer R Number of elements
UVAR NUVAR* NEL Float R/W User’s variable
UPARAM NUPARAM Float W User’s parameter
NUPARAM 1 Integer W Size of UPARAM
NUVAR 1 Integer W Number of user’s variables
NFUNCT 1 Integer W Size of IFUNC
IFUNC NFUNCT Integer W Function number array
NPF * Integer R Function array
NPT 1 Integer R Number of layers or integration points
IPT 1 Integer R Layer or integration point number
IFLAG * Integer R Geometrical flags
TF * Float R Function array
NGL NEL Integer R Element number
TIME 1 Float R Current time
TIMESTEP 1 Float R Current time step
RHO0 NEL Float R Initial density
AREA NEL Float R Area
EINT NEL Float R Total internal energy
THKLY NEL Float R Layer thickness
EPSPXX NEL Float W Strain rate XX
DEPSXX NEL Float W Strain increment XX
EPSXX NEL Float W Strain XX
SIGOXX NEL Float W Old elasto-plastic stress XX
SIGNXX NEL Float W New elasto-plastic stress XX
SIGVXX NEL Float W Viscous stress XX
SOUNDSP NEL Float W Sound speed (time step)
VISCMAX NEL Float W Max damping modulus (time step)
THK NEL Float R/W Thickness
PLA NEL Float R/W Plastic strain
OFF NEL Float R/W Delete flag
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Skews for stress and strain
If the PID is isotropic (PID1, 14, 20 …)
Skew is element skew (directions r,s,t)
If the PID is orthotropic (PID11, 21, 22)
Skew is orthotropy directions (directions 1, 2 and 3)
Co-rotationnal or global formulations are defined in PIDs
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Specific output variables: sigeps29c / sigeps29
In addition, the following variables must be defined :
SOUNDSP = celerity of the sound for time step (= c/l)
For an elastic or elasto-plastic material :
VISCMAX = Max damping for time step
PLA = plastic strain (used for QEPH / HEPH elements)
OFF = delete flag
OFF(I) = 1.0 : element is undamaged
OFF(I) = 0.0 : element is deleted
00
2μ3/4G
ρ
+λ=
ρ
+K=c
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Shell element thickness changes
Thickness changes in layer are the results of Poisson’s effects
Plasticity :
The plastic strain is assumed to be incompressible (n = 0.5)
DEZZ=-(DEPSXX(I)+DEPSYY(I))*NU
THK(I) = THK(I) + DEZZ*THKLY(I)
DEZZ = DPLA(I) * 0.5*(SIGNXX(I)+SIGNYY(I)) /VONMISES(I)
DEZZ=-(DEPSXX(I)+DEPSYY(I))*NU-NU*DEZZ
THK(I) = THK(I) + DEZZ*THKLY(I)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User laws and ALE
Use laws are compatible with ALE:
Solid user subroutine are used (sigep29 …)
Among user variables only the first (UVAR(1,I)) is transported
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Functions
Functions are defined in the starter :
If the routine requires functions, the following operations must be performed in the starter :
Define the number of functions used by the law via NFUNC
Affect all function numbers in array IFUNC
If necessary the number of functions can be read in the input file :
/FUNCT/1000
damage
# X Y
0 0
.01 0.0
.02 1.0
NFUNC = 1
READ(IIN,'(I10)')IFUNC(1)
READ(IIN,'(I10)')NFUNC
DO I=1, NFUNC
READ(IIN,'(I10)')IFUNC(I)
ENDDO
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Functions
Calling functions in engine:
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.
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User variables
The number of user variables must be defined in the starter
Always the consistency between starter and engine :
Waste memory or risk of array overwritten !
Always initialize user variable at Time = 0:
NUVAR = 10
IF(TIME == 0.0)THEN
DO I=1,NEL
DO J=1,NUVAR
UVAR(I,J)= 0.0
ENDDO
UVAR(I,7) = 1.0
UVAR(I,8) = 1.0
ENDDO
ENDIF
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User variables
The number of user variables must be defined in the starter
Always the consistency between starter and engine :
Waste memory or risk of array overwritten !
Always initialize user variable at Time = 0:
NUVAR = 10
IF(TIME == 0.0)THEN
DO I=1,NEL
DO J=1,NUVAR
UVAR(I,J)= 0.0
ENDDO
UVAR(I,7) = 1.0
UVAR(I,8) = 1.0
ENDDO
ENDIF
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User variables post-treatment
Hyperview
/ANIM/USERI => average of values if the element has several integration points
/ANIM/USERI/jj => value for IP jj
Hypergraph :
By convention USER1 (user(1,…)) is the plastic strain and equivalent to EPSP
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Element deletions
Use OFF(I) : the deletion is performed in several cycles to stabilize the simulation.
If OFF(I) = 1.0, the element is not deleted
If 0.0 < OFF(I) < 1.0, the element is in the process of being deleted
If OFF(I) = 0.0, the element is deleted
Typical procedure is
Hypergraph :
DO I=1, NEL
IF ((OFF(I).GT.0.8).AND.(deletiontest == True)) THEN
OFF(I) = 0.8
ELSE IF (OFF(I).LT.1.0) THEN
OFF(I) = 0.8*OFF(I)
IF (OFF(I).LT.0.1) THEN
OFF(I) = 0.0
ENDIF
ENDIF
SIGNXX(I)=SIGNXX(I)*OFF(I)
SIGNYY(I)=SIGNYY(I)*OFF(I)
SIGNXY(I)=SIGNXY(I)*OFF(I)
SIGNYZ(I)=SIGNYZ(I)*OFF(I)
SIGNZX(I)=SIGNZX(I)*OFF(I)
ENDDO
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Element damages
Element deletion is purely numerical
For physical failure, it is advised to use user variables (UVAR)
IF ((OFF(I).GT.0.8).AND.(deletiontest == True)) THEN
OFF(I) = 0.8
ELSE IF (OFF(I).LT.1.0) THEN
OFF(I) = 0.8*OFF(I)
IF (OFF(I).LT.0.1) THEN
OFF(I) = 0.0
ENDIF
ENDIF
* Insert damage calculation method (UVAR(I,1))
SIGNXX(I)= (1.0-UVAR(I,1))* SIGNXX(I)*OFF(I)
SIGNYY(I)= (1.0-UVAR(I,1))* SIGNYY(I)*OFF(I)
SIGNXY(I)= (1.0-UVAR(I,1))* SIGNXY(I)*OFF(I)
SIGNYZ(I)= (1.0-UVAR(I,1))* SIGNYZ(I)*OFF(I)
SIGNZX(I)= (1.0-UVAR(I,1))* SIGNZX(I)*OFF(I)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Write messages in .out files during the engine
Internally, element numbering is from 1 to n (n being the total number of elements), the array NGL(I) gives the external (= as defined by the user) of node I
Use subroutine WRITE_IOUT
Typical use :
Internal write in char variable MY_LINE
WRITE(MY_LINE, 1100) NGL(I)
1100 FORMAT('ELEMENT DELETED: ',I10)
LEN = LEN_TRIM(MY_LINE)
CALL WRITE_IOUT(MY_LINE, LEN)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options compilation (win64)
Dll general presentations / installation
First example compilation
Material laws
Failure models
Access Functions
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Lagrangian solids
B8,HA8,P6,T4,T10,B20
Thick Shell
HA8,B16
ALE Euler
B8 SPH
User Failure
Max strain
Tuler Butcher
Chang Chang
Wilkins
Bao-Xue-Wierzbicki
…
MMAIN
Failure model
Material Law
Failure / EOS
EOS Gruneisen
Polynomial
Sesame
Tillotson
PUFF
…
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
3 user failure criteria are available
/FAIL/USER1
/FAIL/USER2
/FAIL/USER3
3 subroutines / failure criteria :
Lecr04 : starter, USER1
f04law : solver calculation solids (USER1)
f04lawc : solver calculation for shell (USER1)
05 for USER2, 06 for USER3
Very similar to user laws (variable names …)
Failure criteria
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Starter: lecr04
SUBROUTINE LECRnn (IIN ,IOUT ,UPARAM ,MAXUPARAM,NUPARAM,
1 NUVAR,IFUNC,MAXFUNC,NFUNC)
Purpose :
Degradation and possible deletion of element I as a function of several variables (stress, strain, user variables …)
STARTER USER’S ARGUMENTS – FAILURE CRITERIA
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
MAXNUPARA
M 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
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for solid elements) : f04law
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 )
Purpose :
Degradation and possible deletion of element I as a function of several variables (stress, strain, user variables …)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for solid elements) : f04law
ENGINE USER’S ARGUMENTS – FAILURE CRITERIA 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
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
OFF NEL Float R/W Delete flag
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for shell elements) : f04lawc
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)
Purpose :
Degradation and possible deletion of element I as a function of several variables (stress, strain, user variables …)
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Engine (for shell elements) : f04lawc
ENGINE USER’S ARGUMENTS FAILURE CRITERIA FOR SHELLS
Variable Size Type Write /read Definition
NEL 1 Integer R Number of elements
UVAR NUVAR* NEL Float R/W User’s variable
UPARAM NUPARAM Float W User’s parameter
NUPARAM 1 Integer W Size of UPARAM
NUVAR 1 Integer W Number of user’s variables
NFUNCT 1 Integer W Size of IFUNC
IFUNC NFUNCT Integer W Function number array
NPF * Integer R Function array
NPT 1 Integer R Number of layers or integration points
IPT 1 Integer R Layer or integration point number
IFLAG * Integer R Geometrical flags
TF * Float R Function array
NGL NEL Integer R Element number
TIME 1 Float R Current time
TIMESTEP 1 Float R Current time step
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
THK NEL Float R/W Thickness
PLA NEL Float R/W Plastic strain
OFF NEL Float R/W Delete flag
UEL NEL Float R/W Number of layers for which the criteria is satisfied
NOT_USE_I1,NOT_USE_I2
,NOT_USE_I3 1 Integer R Not used, may be used later
NOT_USED1,NOT_USED2
,NOT_USED3,NOT_USED,
NOT_USED5
1 Float Not used, may be used later
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
User options compilation (win64)
Dll general presentations / installation
First example compilation
Material laws
Failure models
Access Functions
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Communication between user subroutine and Radioss
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
MATERIAL BUFFER (imat)
Material parameters stored in the
values_index (mat_index)
FUNCTION BUFFER (ifunc)
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
Communication through :
User subroutine parameters
(as seen before)
Specific subroutines :
Get_U_*** to read a parameter
SET_U*** to write a parameter
Copyright © 2014 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved.
Access functions for user material laws
Access function User routine
userwis userwi lecgxx rinixx ruserxx lecsen_usrx user_sensx
User material
laws
set_u_geo x x
set_u_pnu x x
get_u_geo x x x x x x x
get_u_mat x x x x x x x x
get_u_pnu x x x x x x x
get_u_mnu x x x x x x x x
get_u_pid x x x x x x x
get_u_mid x x x x x x x x
get_u_m x x x x x x x x
get_u_p x x x x x x x
get_u_func x x x x x x x x
get_u_table* x x x x x x x x
get_u_numfun x x x x x x x x
get_u_numtable* x x x x x x x x
* usage of get_u_numtable and get_u_table requires fortran module INTERFACE_UTABLE_MOD : USE INTERFACE_UTABLE_MOD included either in library either in user module package(windows)