OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_fail_energy.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| hm_read_fail_energy ../starter/source/materials/fail/energy/hm_read_fail_energy.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_fail ../starter/source/materials/fail/hm_read_fail.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
30!|| hm_get_floatv_dim ../starter/source/devtools/hm_reader/hm_get_floatv_dim.F
31!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
32!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
33!||--- uses -----------------------------------------------------
34!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
35!|| message_mod ../starter/share/message_module/message_mod.F
36!|| submodel_mod ../starter/share/modules1/submodel_mod.F
37!||====================================================================
38 SUBROUTINE hm_read_fail_energy(FAIL ,
39 . MAT_ID ,FAIL_ID ,IRUPT ,LSUBMODEL,UNITAB )
40C-----------------------------------------------
41c ROUTINE DESCRIPTION :
42c Read Energy based failure model parameters
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE fail_param_mod
47 USE unitab_mod
48 USE message_mod
49 USE submodel_mod
51C-----------------------------------------------
52C I m p l i c i t T y p e s
53C-----------------------------------------------
54#include "implicit_f.inc"
55C-----------------------------------------------
56C C o m m o n B l o c k s
57C-----------------------------------------------
58#include "units_c.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 INTEGER ,INTENT(IN) :: FAIL_ID ! failure model ID
63 INTEGER ,INTENT(IN) :: MAT_ID ! material law ID
64 INTEGER ,INTENT(IN) :: IRUPT ! failure model number
65 TYPE (UNIT_TYPE_) ,INTENT(IN) :: UNITAB ! table of input units
66 TYPE (SUBMODEL_DATA),INTENT(IN) :: LSUBMODEL(*)
67 TYPE (FAIL_PARAM_) ,INTENT(INOUT) :: FAIL
68C-----------------------------------------------
69C L o c a l V a r i a b l e s
70C-----------------------------------------------
71 INTEGER :: IRFUN,DMG_FLAG,FAILIP
72 my_real :: rf1,rf2,rief1,rief2,scale_epsp,pthk
73C----------------------------------------
74 LOGICAL :: IS_AVAILABLE,IS_ENCRYPTED
75C=======================================================================
76 is_encrypted = .false.
77 is_available = .false.
78C--------------------------------------------------
79C EXTRACT DATA (IS OPTION CRYPTED)
80C--------------------------------------------------
81 CALL hm_option_is_encrypted(is_encrypted)
82C=======================================================================
83c ENERGY Rupture Criterion
84C=======================================================================
85Card1
86 CALL hm_get_floatv ('E1' ,rief1 ,is_available,lsubmodel,unitab)
87 CALL hm_get_floatv ('E2' ,rief2 ,is_available,lsubmodel,unitab)
88 CALL hm_get_intv ('fct_ID' ,irfun ,is_available,lsubmodel)
89 CALL hm_get_floatv ('xscale' ,scale_epsp ,is_available,lsubmodel,unitab)
90 CALL hm_get_intv ('I_Dam' ,dmg_flag ,is_available,lsubmodel)
91 CALL hm_get_intv ('FAILIP' ,failip ,is_available,lsubmodel)
92 IF (failip == 0) failip = 1
93C=======================================================================
94 IF (rief1 <= zero) rief1 = ep30
95 IF (rief2 <= zero) rief2 = two*ep30
96 IF (dmg_flag == 0) dmg_flag = 1 ! DMG_FLAG = 1 => damage reduces forces after criteria is met
97 IF (dmg_flag == 2) dmg_flag = 0 ! DMG_FLAG = 2->0 => damage reduces saved stress (old method)
98C=======================================================================
99 IF (rief1 > rief2) THEN
100 CALL ancmsg(msgid=618, msgtype=msgerror, anmode=aninfo_blind_1,
101 . i1=mat_id)
102 ENDIF
103C
104 pthk = em06
105 IF(scale_epsp == zero) THEN
106 CALL hm_get_floatv_dim('xscale' ,scale_epsp ,is_available, lsubmodel, unitab)
107 scale_epsp = one * scale_epsp
108 ENDIF
109c---------------------------
110 fail%KEYWORD = 'ENERGY'
111 fail%IRUPT = irupt
112 fail%FAIL_ID = fail_id
113 fail%NUPARAM = 6
114 fail%NIPARAM = 0
115 fail%NUVAR = 1
116 fail%NFUNC = 1
117 fail%NTABLE = 0
118 fail%NMOD = 0
119c
120 fail%PTHK = pthk
121c
122 ALLOCATE (fail%UPARAM(fail%NUPARAM))
123 ALLOCATE (fail%IPARAM(fail%NIPARAM))
124 ALLOCATE (fail%IFUNC (fail%NFUNC))
125 ALLOCATE (fail%TABLE (fail%NTABLE))
126
127 fail%UPARAM(1) = rief1
128 fail%UPARAM(2) = rief2
129 fail%UPARAM(3) = pthk
130 fail%UPARAM(4) = one/scale_epsp
131 fail%UPARAM(5) = dmg_flag
132 fail%UPARAM(6)= failip
133C
134 fail%IFUNC(1) = irfun
135C=============================================
136 IF(is_encrypted)THEN
137 WRITE(iout, 1000)
138 ELSE
139 WRITE(iout, 2000) rief1,rief2,irfun,scale_epsp,failip
140 ENDIF
141 RETURN
142C=============================================
143 1000 FORMAT(
144 & 5x,40h crypted DATA in failure model /,
145 & 5x,40h ----------------------------- /)
146 2000 FORMAT(
147 & 5x,40h energy failure model /,
148 & 5x,40h ------------------------ /,
149 & 5x,'MAXIMUM SPECIFIC ENERGY 1. . . . . . . =',e12.4/
150 & 5x,'MAXIMUM SPECIFIC ENERGY 2. . . . . . . =',e12.4/
151 & 5x,'MAXIMUM ENERGIES SCALING FUNCTION. . . =',i8/
152 & 5x,'ABSCISSA SCALE FACTOR FOR FUNCTION . . =',e12.4/,
153 & 5x,'NUMBER OF FAILED INTG. POINTS PRIOR TO ELEM DELETION .=',i10/)
154c-----------
155 RETURN
156 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_floatv_dim(name, dim_fac, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_fail_energy(fail, mat_id, fail_id, irupt, lsubmodel, unitab)
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889