OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
check_mat_elem_prop_compatibility.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!|| check_mat_elem_prop_compatibility ../starter/source/materials/mat/check_mat_elem_prop_compatibility.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!||--- uses -----------------------------------------------------
30!|| message_mod ../starter/share/message_module/message_mod.F
31!|| stack_mod ../starter/share/modules1/stack_mod.F
32!||====================================================================
34 . ELBUF_STR,IPARG ,IPM ,IGEO ,NUMMAT ,NUMGEO ,
35 . NGROUP ,NPARG ,NPROPMI ,NPROPGI ,MAT_PARAM,N2D ,
36 . IXT ,NUMELT ,IXP ,NUMELP ,IXR ,NUMELR ,
37 . KXX ,NUMELX )
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE elbufdef_mod
42 USE stack_mod
43 USE message_mod
44 USE matparam_def_mod
45 use element_mod , only : nixt,nixp,nixr
46C-----------------------------------------------
47C I m p l i c i t T y p e s
48C-----------------------------------------------
49#include "implicit_f.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 INTEGER, INTENT(IN) :: IPARG(NPARG,NGROUP),N2D,
54 . IPM(NPROPMI,NUMMAT),IGEO(NPROPGI,NUMGEO),
55 . NUMMAT,NUMGEO,NGROUP,NPARG,NPROPMI,NPROPGI,
56 . IXT(NIXT,NUMELT),IXP(NIXP,NUMELP),
57 . ixr(nixr,numelr),kxx(5,numelx),numelt,numelp,
58 . numelr,numelx
59 TYPE(elbuf_struct_),DIMENSION(NGROUP),INTENT(IN) :: ELBUF_STR
60 TYPE(MATPARAM_STRUCT_), DIMENSION(NUMMAT), INTENT(IN) :: MAT_PARAM
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 INTEGER :: NG,IGTYP,PID,PROP_ID,NLAY,IL,IMAT,ILAW,IEOS,MAT_ID,ITY,ISNOD,NFT,IVISC,MLW
65 LOGICAL :: COMPAT_ELEM,COMPAT_PROP,COMPAT_EOS,COMPAT_VISC
66 CHARACTER (LEN = 10) :: ELTYP
67 PID = -huge(pid)
68 imat = -huge(imat)
69c
70 !===============================================================================
71 ! CHECK MATERIAL AND PROPERTY COMPATIBILITY
72 !===============================================================================
73 ! Loop over groups
74 DO ng = 1,ngroup
75c
76 ! Group parameters
77 ity = iparg(5,ng) ! -> Type element
78 igtyp = elbuf_str(ng)%IGTYP ! -> Property type
79 nlay = elbuf_str(ng)%NLAY ! -> Number of layers
80 mlw = iparg(1,ng) ! -> Material law type
81c
82 !-----------------------------------------------------------------
83 ! Solid, Shell, Integrated Beam and SPH
84 !-----------------------------------------------------------------
85 IF (nlay > 0) THEN
86c
87 ! Loop over layers
88 DO il = 1,nlay
89
90 ! Property parameters
91 pid = iparg(62,ng) ! -> Property internal ID
92 prop_id = igeo(1,pid) ! -> Property user ID
93c
94 ! Layer parameters
95 imat = elbuf_str(ng)%BUFLY(il)%IMAT ! -> Material internal ID
96 ilaw = elbuf_str(ng)%BUFLY(il)%ILAW ! -> Material law type (or submaterial law type for MULTIMAT-ALE)
97 ieos = mat_param(imat)%IEOS
98 ivisc = mat_param(imat)%IVISC ! -> for viscosity
99 mat_id = ipm(1,imat) ! -> Material user ID
100c
101 ! ==============================================================
102 ! CHECK MATERIAL LAW AND ELEMENT COMPATIBILITY
103 ! ==============================================================
104 compat_elem = .true.
105 compat_eos = .true.
106 compat_visc = .true.
107c
108 SELECT CASE (ity)
109 ! ------------------------------------------------------------
110 ! SOLID ELEMENTS
111 ! ------------------------------------------------------------
112 CASE (1)
113 IF (mat_param(imat)%PROP_SOLID == 0) compat_elem = .false.
114 isnod = iparg(28,ng) ! -> Number of solid nodes
115 IF (isnod == 4) THEN
116 eltyp = 'TETRA4'
117 ELSEIF (isnod == 6) THEN
118 eltyp = 'PENTA6'
119 ELSEIF (isnod == 10) THEN
120 eltyp = 'TETRA10'
121 ELSEIF (isnod == 16) THEN
122 eltyp = 'SHEL16'
123 ELSEIF (isnod == 20) THEN
124 eltyp = 'BRIC20'
125 ELSE
126 eltyp = 'BRICK'
127 ENDIF
128 ! ------------------------------------------------------------
129 ! QUAD
130 ! ------------------------------------------------------------
131 CASE (2)
132 IF (mat_param(imat)%PROP_SOLID == 0) compat_elem = .false.
133 eltyp = 'QUAD'
134 ! ------------------------------------------------------------
135 ! SHELLS
136 ! ------------------------------------------------------------
137 ! 4 nodes shell elements
138 CASE (3)
139 IF (mat_param(imat)%PROP_SHELL == 0) compat_elem = .false.
140 eltyp = 'SHELL'
141 ! 3 nodes shell elements or triangles
142 CASE (7,8)
143 IF (n2d > 0) THEN
144 IF (mlw /= 151) compat_elem = .false.
145 eltyp = 'TRIA'
146 ELSE
147 IF (mat_param(imat)%PROP_SHELL == 0) compat_elem = .false.
148 eltyp = 'SH3N'
149 ENDIF
150 ! ------------------------------------------------------------
151 ! BEAMS
152 ! ------------------------------------------------------------
153 CASE (5)
154 IF (mat_param(imat)%PROP_BEAM == 0) compat_elem = .false.
155 eltyp = 'BEAM'
156 ! ------------------------------------------------------------
157 ! SPH
158 ! ------------------------------------------------------------
159 CASE (51)
160 IF (mat_param(imat)%PROP_SPH == 0) compat_elem = .false.
161 eltyp = 'SPH'
162 END SELECT
163 ! ==============================================================
164c
165 ! ==============================================================
166 ! CHECK MATERIAL LAW AND PROPERTY COMPATIBILITY
167 ! ==============================================================
168 compat_prop = .true.
169 SELECT CASE (igtyp)
170 ! ------------------------------------------------------------
171 ! SHELL PROPERTIES
172 ! ------------------------------------------------------------
173 ! Isotropic shells property
174 CASE (1)
175 IF (mat_param(imat)%PROP_SHELL /= 1 .AND.
176 . mat_param(imat)%PROP_SHELL /= 5) compat_prop = .false.
177 ! Orthotropic shells property
178 CASE (9)
179 IF (mat_param(imat)%PROP_SHELL /= 1 .AND.
180 . mat_param(imat)%PROP_SHELL /= 2 .AND.
181 . mat_param(imat)%PROP_SHELL /= 5) compat_prop = .false.
182 ! Composite shells property
183 CASE (10,11,17,19,51,52)
184 IF (mat_param(imat)%PROP_SHELL /= 1 .AND.
185 . mat_param(imat)%PROP_SHELL /= 2 .AND.
186 . mat_param(imat)%PROP_SHELL /= 3 .AND.
187 . mat_param(imat)%PROP_SHELL /= 4 .AND.
188 . mat_param(imat)%PROP_SHELL /= 5) compat_prop = .false.
189 ! Anisotropic shells property
190 CASE (16)
191 IF (mat_param(imat)%PROP_SHELL /= 4 .AND.
192 . mat_param(imat)%PROP_SHELL /= 5) compat_prop = .false.
193 ! ------------------------------------------------------------
194 ! SOLID PROPERTIES
195 ! ------------------------------------------------------------
196 ! Isotropic solids property
197 CASE (14,20)
198 IF (mat_param(imat)%PROP_SOLID /= 1 .AND.
199 . mat_param(imat)%PROP_SOLID /= 5 .AND.
200 . mat_param(imat)%PROP_SOLID /= 6) compat_prop = .false.
201 ! Orthotropic solids property
202 CASE (6,21)
203 IF (mat_param(imat)%PROP_SOLID /= 1 .AND.
204 . mat_param(imat)%PROP_SOLID /= 2 .AND.
205 . mat_param(imat)%PROP_SOLID /= 6) compat_prop = .false.
206 ! Composite solids property
207 CASE (22)
208 IF (mat_param(imat)%PROP_SOLID /= 1 .AND.
209 . mat_param(imat)%PROP_SOLID /= 2 .AND.
210 . mat_param(imat)%PROP_SOLID /= 3 .AND.
211 . mat_param(imat)%PROP_SOLID /= 6) compat_prop = .false.
212 ! Cohesive solids property
213 CASE (43)
214 IF (mat_param(imat)%PROP_SOLID /= 4 .AND.
215 . mat_param(imat)%PROP_SOLID /= 6) compat_prop = .false.
216 ! Porous solids property
217 CASE (15)
218 IF (mat_param(imat)%PROP_SOLID /= 5) compat_prop = .false.
219 ! ------------------------------------------------------------
220 ! BEAM PROPERTY
221 ! ------------------------------------------------------------
222 ! Integrated beams property
223 CASE (18)
224 IF (mat_param(imat)%PROP_BEAM /= 2 .AND.
225 . mat_param(imat)%PROP_BEAM /= 3) compat_prop = .false.
226 ! ------------------------------------------------------------
227 ! SPH PROPERTY
228 ! ------------------------------------------------------------
229 ! SPH property
230 CASE (34)
231 IF (mat_param(imat)%PROP_SPH /= 1) compat_prop = .false.
232 END SELECT
233c
234 ! ==============================================================
235 ! check material law compatibility with /eos option
236 ! ==============================================================
237 IF (ieos > 0 .and. mat_param(imat)%COMPATIBILITY_EOS == 0) THEN
238 compat_eos = .false.
239 END IF
240 ! ==============================================================
241 ! CHECK MATERIAL LAW COMPATIBILITY AND PROPERTY COMPATIBILITY
242 ! WITH /VISC option
243 ! ==============================================================
244 IF (ivisc > 0 .AND. mat_param(imat)%COMPATIBILITY_VISC == 1 .AND.
245 . (mat_param(imat)%PROP_SHELL == 2 .OR.
246 . mat_param(imat)%PROP_SHELL == 3 .OR.
247 . mat_param(imat)%PROP_SHELL == 4 ).AND.
248 . ilaw /= 25 ) THEN
249 compat_visc = .false.
250 END IF
251c
252 ! ==============================================================
253 ! ==============================================================
254 ! SAVE ERROR MESSAGES IF NOT COMPATIBLE
255 ! ==============================================================
256 ! -> Not compatible with element type
257 IF (.NOT. compat_elem) THEN
258 CALL ancmsg(msgid=3046,
259 . msgtype=msgerror,
260 . anmode=aninfo_blind_1,
261 . c1=eltyp,
262 . i1=mat_id,
263 . i2=ilaw,
264 . prmod=msg_cumu)
265 ! -> Not compatible with property type
266 ELSEIF ((compat_elem).AND.(.NOT. compat_prop)) THEN
267 CALL ancmsg(msgid=3047,
268 . msgtype=msgerror,
269 . anmode=aninfo_blind_1,
270 . i1=prop_id,
271 . i2=igtyp,
272 . i3=mat_id,
273 . i4=ilaw,
274 . prmod=msg_cumu)
275 ENDIF
276 ! -> Not compatible with /EOS option
277 IF (.NOT. compat_eos) THEN
278 CALL ancmsg(msgid=824,
279 . msgtype=msgerror,
280 . anmode=aninfo,
281 . i1=mat_id,
282 . c1=' ',i2=ilaw,
283 . prmod=msg_cumu)
284 ENDIF
285 ! -> Not compatible with /VISC option
286 IF (.NOT. compat_visc) THEN
287 CALL ancmsg(msgid=3054,
288 . msgtype=msgerror,
289 . anmode=aninfo_blind_1,
290 . i1=prop_id,
291 . i2=igtyp,
292 . i3=mat_id,
293 . i4=ilaw,
294 . prmod=msg_cumu)
295 ENDIF
296 ! ==============================================================
297 ENDDO
298c
299 !-----------------------------------------------------------------
300 ! Truss et Beam type 3
301 !-----------------------------------------------------------------
302 ELSE
303c
304 ! First node of the group
305 nft = iparg(3,ng)
306c
307 ! ==============================================================
308 ! CHECK MATERIAL LAW AND ELEMENT COMPATIBILITY
309 ! ==============================================================
310 compat_elem = .true.
311 SELECT CASE (ity)
312 ! ------------------------------------------------------------
313 ! TRUSS
314 ! ------------------------------------------------------------
315 CASE (4)
316 imat = ixt(1,nft+1) ! -> Material internal ID
317 pid = ixt(4,nft+1) ! -> Property internal ID
318 IF (mat_param(imat)%PROP_TRUSS == 0) compat_elem = .false.
319 eltyp = 'TRUSS'
320 ! ------------------------------------------------------------
321 ! BEAM
322 ! ------------------------------------------------------------
323 CASE (5)
324 imat = ixp(1,nft+1) ! -> Material internal ID
325 pid = ixp(5,nft+1) ! -> Property internal ID
326 IF (mat_param(imat)%PROP_BEAM == 0) compat_elem = .false.
327 eltyp = 'BEAM'
328 ! ------------------------------------------------------------
329 ! SPRING
330 ! ------------------------------------------------------------
331 CASE (6)
332 imat = ixr(5,nft+1) ! -> Material internal ID
333 pid = ixr(1,nft+1) ! -> Property internal ID
334 IF (imat > 0) THEN
335 IF (mat_param(imat)%PROP_SPRING == 0) compat_elem = .false.
336 ENDIF
337 eltyp = 'SPRING'
338 ! ------------------------------------------------------------
339 ! XELEM
340 ! ------------------------------------------------------------
341 CASE (100)
342 imat = kxx(1,nft+1) ! -> Material internal ID
343 pid = kxx(2,nft+1) ! -> Property internal ID
344 eltyp = 'XELEM'
345 END SELECT
346 ! ==============================================================
347c
348 ! ==============================================================
349 ! CHECK MATERIAL LAW AND PROPERTY COMPATIBILITY
350 ! ==============================================================
351 compat_prop = .true.
352 SELECT CASE (igtyp)
353 ! ------------------------------------------------------------
354 ! TRUSS PROPERTY
355 ! ------------------------------------------------------------
356 ! Truss property
357 CASE (2)
358 IF (mat_param(imat)%PROP_TRUSS /= 1) compat_prop = .false.
359 ! ------------------------------------------------------------
360 ! BEAM PROPERTY
361 ! ------------------------------------------------------------
362 ! Classic beams property
363 CASE (3)
364 IF (mat_param(imat)%PROP_BEAM /= 1 .AND.
365 . mat_param(imat)%PROP_BEAM /= 3) compat_prop = .false.
366 ! ------------------------------------------------------------
367 ! SPRING PROPERTIES
368 ! ------------------------------------------------------------
369 ! Predit springs property
370 CASE (36)
371 IF (imat > 0) THEN
372 IF (mat_param(imat)%PROP_SPRING /= 1 .AND.
373 . mat_param(imat)%PROP_SPRING /= 3) compat_prop = .false.
374 ENDIF
375 ! Material springs property
376 CASE (23)
377 IF (mat_param(imat)%PROP_SPRING /= 2 .AND.
378 . mat_param(imat)%PROP_SPRING /= 3) compat_prop = .false.
379 ! ------------------------------------------------------------
380 ! OTHER PROPERTIES WITH NO MATERIAL
381 ! ------------------------------------------------------------
382 CASE DEFAULT
383 compat_elem = .true.
384 END SELECT ! IGTYP
385c
386 ! Property parameters
387 prop_id = igeo(1,pid) ! -> Property user ID
388 IF (imat > 0) THEN
389 mat_id = ipm(1,imat) ! -> Material user ID
390 ilaw = ipm(2,imat) ! -> Material law type
391 ELSE
392 mat_id = 0
393 ilaw = 0
394 ENDIF
395c
396 ! ==============================================================
397 ! SAVE ERROR MESSAGES IF NOT COMPATIBLE
398 ! ==============================================================
399 ! -> Not compatible with element type
400 IF (.NOT. compat_elem) THEN
401 CALL ancmsg(msgid=3046,
402 . msgtype=msgerror,
403 . anmode=aninfo_blind_1,
404 . c1=eltyp,
405 . i1=mat_id,
406 . i2=ilaw,
407 . prmod=msg_cumu)
408 ! -> Not compatible with property type
409 ELSE IF ((compat_elem).AND.(.NOT. compat_prop)) THEN
410 CALL ancmsg(msgid=3047,
411 . msgtype=msgerror,
412 . anmode=aninfo_blind_1,
413 . i1=prop_id,
414 . i2=igtyp,
415 . i3=mat_id,
416 . i4=ilaw,
417 . prmod=msg_cumu)
418 ENDIF
419 ! ==============================================================
420 ENDIF
421c
422 ENDDO
423c
424 ! ==============================================================
425 ! PRINTING OUT ERROR MESSAGES
426 ! ==============================================================
427 CALL ancmsg(msgid=3046,
428 . msgtype=msgerror,
429 . anmode=aninfo_blind_1,
430 . prmod=msg_print)
431 CALL ancmsg(msgid=3047,
432 . msgtype=msgerror,
433 . anmode=aninfo_blind_1,
434 . prmod=msg_print)
435 CALL ancmsg(msgid=824,
436 . msgtype=msgerror,
437 . anmode=aninfo_blind_1,
438 . prmod=msg_print)
439 CALL ancmsg(msgid=3054,
440 . msgtype=msgerror,
441 . anmode=aninfo_blind_1,
442 . prmod=msg_print)
443 !================================
444 !===============================================
445c
446 END
subroutine check_mat_elem_prop_compatibility(elbuf_str, iparg, ipm, igeo, nummat, numgeo, ngroup, nparg, npropmi, npropgi, mat_param, n2d, ixt, numelt, ixp, numelp, ixr, numelr, kxx, numelx)
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:895