OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_fail_visual.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_visual ../starter/source/materials/fail/visual/hm_read_fail_visual.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_fail ../starter/source/materials/fail/hm_read_fail.F
27!||--- calls -----------------------------------------------------
28!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
29!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
30!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
31!||--- uses -----------------------------------------------------
32!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
33!|| submodel_mod ../starter/share/modules1/submodel_mod.F
34!||====================================================================
36 . FAIL ,MAT_ID ,FAIL_ID ,IRUPT ,
37 . LSUBMODEL,UNITAB )
38C-----------------------------------------------
39c ROUTINE DESCRIPTION :
40c Read Visual failure estimation model parameters
41C Only visualization by damage of stress or strain is between to limited values
42C (no element deletion)
43c ! User variable # 1, to store the previous damage value
44c ! User variable # 2, to store the previous stress or strain value (for EMA filtering)
45 ! What it should be is like this:
46 ! Value = USER_INPUT * 2 * Pi * DT1
47 ! Alpha = Value / (Value + 1)
48 ! Actual_filtered_stress = Alpha * actual_Stress + (1-Alpha) * previous_filtered_stress
49 ! UPARAM(4) = EMA * TWO * 3.14159265
50C-----------------------------------------------
51C M o d u l e s
52C-----------------------------------------------
53 USE fail_param_mod
54 USE unitab_mod
55 USE submodel_mod
57C---------------------------------------------------------------------
58C I m p l i c i t T y p e s
59C---------------------------------------------------------------------
60#include "implicit_f.inc"
61#include "units_c.inc"
62C-----------------------------------------------
63C D u m m y A r g u m e n t s
64C-----------------------------------------------
65 INTEGER ,INTENT(IN) :: FAIL_ID ! failure model ID
66 INTEGER ,INTENT(IN) :: MAT_ID ! material law ID
67 INTEGER ,INTENT(IN) :: IRUPT ! failure model type number
68 TYPE(unit_type_) ,INTENT(IN) :: UNITAB ! table of input units
69 TYPE(submodel_data),INTENT(IN) :: LSUBMODEL(*) ! submodel table
70 TYPE(fail_param_) ,INTENT(INOUT) :: FAIL ! failure model data structure
71C-----------------------------------------------
72C L o c a l V a r i a b l e s
73C-----------------------------------------------
74 INTEGER TYPE_MAX,F_FLAG,STRDEF,NUVAR
75 my_real C_MIN , C_MAX,EMA,BUTTER
76 LOGICAL :: IS_AVAILABLE,IS_ENCRYPTED
77C=======================================================================
78 is_encrypted = .false.
79 is_available = .false.
80
81 CALL hm_option_is_encrypted(is_encrypted)
82C--------------------------------------------------
83 type_max = 0
84 c_min = zero
85 c_max = zero
86 butter = zero
87c!CARD1
88 CALL hm_get_intv ('Type' ,type_max ,is_available,lsubmodel)
89 CALL hm_get_floatv ('C_min' ,c_min ,is_available,lsubmodel,unitab)
90 CALL hm_get_floatv ('C_max' ,c_max ,is_available,lsubmodel,unitab)
91 CALL hm_get_floatv ('Alpha_Exp_Avg_Filter',ema ,is_available,lsubmodel,unitab)
92 CALL hm_get_floatv ('f_cutoff' ,ema ,is_available,lsubmodel,unitab)
93 CALL hm_get_intv ('f_flag' ,f_flag ,is_available,lsubmodel)
94 CALL hm_get_intv ('Strdef' ,strdef ,is_available,lsubmodel)
95c-----------------------------------------------------------------------
96 IF (f_flag == 0 .OR. f_flag == 1 ) THEN
97 f_flag = 1
98 IF (ema == zero) ema = one
99 nuvar = 5
100 ! User variable # 1: damage value
101 ! User variable # 2: stress or strain value in the previous step
102 ! User variable # 3-5: Exx, Exy, Exz for the failure of beam elements type3
103 ELSE
104 butter = ema
105 ema = one
106 nuvar = 14
107 ! User variable # 1: damage value
108 ! User variable # 2: stress or strain value in the previous step
109 ! User variable # 3-11: Storage values for the Butterworth filter
110 ! User variable # 12-14: Exx, Exy, Exz for the failure of beam elements type3
111 ENDIF
112
113 IF (type_max == 0) type_max = 1
114 IF (strdef == 0) strdef = 1
115c-----------------------------------------------------------------------
116 fail%KEYWORD = 'VISUAL'
117 fail%IRUPT = irupt
118 fail%FAIL_ID = fail_id
119 fail%NUPARAM = 7
120 fail%NIPARAM = 0
121 fail%NUVAR = nuvar
122 fail%NFUNC = 0
123 fail%NTABLE = 0
124 fail%NMOD = 0
125c
126 ALLOCATE (fail%UPARAM(fail%NUPARAM))
127 ALLOCATE (fail%IPARAM(fail%NIPARAM))
128 ALLOCATE (fail%IFUNC (fail%NFUNC))
129 ALLOCATE (fail%TABLE (fail%NTABLE))
130c
131 fail%UPARAM(1) = real(type_max) + 1e-4
132 fail%UPARAM(2) = c_min
133 fail%UPARAM(3) = c_max
134 fail%UPARAM(4) = ema
135 fail%UPARAM(5) = butter
136 fail%UPARAM(6) = real(f_flag) +0.00001
137 fail%UPARAM(7) = real(strdef)
138c-----------------------------------------------------------------------
139 IF (is_encrypted) THEN
140 WRITE (iout,'(5X,A,//)') 'CONFIDENTIAL DATA'
141 ELSE
142 IF (type_max == 1) THEN
143 WRITE(iout, 1000) c_min, c_max
144 IF (f_flag ==1 .AND. ema /= one) THEN
145 WRITE(iout, 2010) ema
146 ELSEIF(f_flag ==2)THEN
147 WRITE(iout, 2020) butter
148 ELSE
149 WRITE(iout, 2030)
150 ENDIF
151 ENDIF
152 IF (type_max == 2) THEN
153 WRITE(iout, 2000) c_min, c_max, strdef
154 IF (f_flag ==1 .AND. ema /= one) THEN
155 WRITE(iout, 2010) ema
156 ELSEIF(f_flag ==2)THEN
157 WRITE(iout, 2020) butter
158 ELSE
159 WRITE(iout, 2030)
160 ENDIF
161 ENDIF
162 ENDIF
163c-----------------------------------------------------------------------
164 1000 FORMAT(
165 & 5x,' VISUAL FAILURE MODEL ',/
166 & 5x,' -------------------------------------- ',/
167 & 5x,' TYPE IS STRESS ',/
168 & 5x,' MINIMUM 1st PRINCIPAL STRESS. . . . . =',e12.4,/
169 & 5x,' MAXIMUM 1st PRINCIPAL STRESS. . . . . =',e12.4,/)
170
171
172 2000 FORMAT(
173 & 5x,' VISUAL FAILURE MODEL ',/
174 & 5x,' -------------------------------------- ',/
175 & 5x,' TYPE IS STRAIN ',/
176 & 5x,' MINIMUM 1st PRINCIPAL STRAIN. . . . . =',e12.4/
177 & 5x,' MAXIMUM 1st PRINCIPAL STRAIN. . . . . =',e12.4/
178 & 5x,' FAILURE STRAIN INPUT TYPE . . . . . . =',i10/
179 & 5x,' =1 (STRAIN MEASURE DEFINED IN PROPERTY)',/
180 & 5x,' =2 (ENGINEERING STRAIN) . . . . . . . .',/
181 & 5x,' =3 (TRUE STRAIN). . . . . . . . . . . .')
182
183 2010 FORMAT(
184 & 5x,' EXPONENTIAL MOVING AVERAGE FILTER USED:',/
185 & 5x,' F-COEFFICIENT . . . . . . . . . . . . =',e12.4,/)
186 2020 FORMAT(
187 & 5x,' 4-POLE BUTTERWORTH FILTER USED:',/
188 & 5x,' F-COEFFICIENT . . . . . . . . . . . . =',e12.4,/)
189
190 2030 FORMAT(
191 & 5x,' NO FILTERING USED:',/)
192
193 RETURN
194 END
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_fail_visual(fail, mat_id, fail_id, irupt, lsubmodel, unitab)