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