OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
multifluid_global_tdet.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!|| multifluid_global_tdet ../starter/source/multifluid/multifluid_global_tdet.F
25!||--- called by ------------------------------------------------------
26!|| initia ../starter/source/elements/initia/initia.F
27!||--- uses -----------------------------------------------------
28!|| message_mod ../starter/share/message_module/message_mod.F
29!||====================================================================
30 SUBROUTINE multifluid_global_tdet(IPARG,ELBUF_TAB,MULTI_FVM,IPM)
31C-----------------------------------------------
32C D e s c r i p t i o n
33C-----------------------------------------------
34C CASE OF SUBMATERIAL BASED ON JWL MATERIAL LAW (HIGH EXPLISIVE WITH TIME CONTROL DETONATION)
35C
36C This subroutine is computing detonation times in global buffer from detonation times of layers (submaterials
37C Global detonation time is relevant when there are several explosive submaterial laws.
38C
39C GBUF%TB : global burning time (may not be allocated in case of JWL is not used, check GBUF%G_TB > 0)
40C LBUF%TB : local burning time of current layer
41C If initial volume fraction is 0.0 then detonation time of current layer is not taken into account to calculate global detonation time.
42C
43C This subroutine must be called after INIVIOL treatment (INITIAL VOLUME FRACTION)
44C Precondition : MULTI_FVM%IS_USED=.TRUE.
45C-----------------------------------------------
46C M o d u l e s
47C-----------------------------------------------
48 USE elbufdef_mod
49 USE multi_fvm_mod
50 USE message_mod
51 USE multi_fvm_mod
52 USE constant_mod , ONLY : zero, ep21
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56 implicit none
57#include "my_real.inc"
58C-----------------------------------------------
59C C o m m o n B l o c k s
60C-----------------------------------------------
61#include "com01_c.inc"
62#include "com04_c.inc"
63#include "param_c.inc"
64#include "vect01_c.inc"
65C-----------------------------------------------
66C D u m m y A r g u m e n t s
67C-----------------------------------------------
68 INTEGER,INTENT(IN) :: IPARG(NPARG,NGROUP),IPM(NPROPMI,NUMMAT)
69 TYPE(elbuf_struct_), TARGET, DIMENSION(NGROUP),INTENT(INOUT) :: ELBUF_TAB
70 TYPE(multi_fvm_struct), INTENT(INOUT) :: MULTI_FVM
71C-----------------------------------------------
72C L o c a l V a r i a b l e s
73C-----------------------------------------------
74 LOGICAL IS_JWL
75 INTEGER :: NEL,IG,OFFSET,NG,SUBMATLAW,ILAY,NLAY,II
76 my_real :: vfrac
77 TYPE(l_bufel_) ,POINTER :: LBUF
78 TYPE(g_bufel_) ,POINTER :: GBUF
79 TYPE(buf_mat_) ,POINTER :: MBUF
80C-----------------------------------------------
81C S o u r c e L i n e s
82C-----------------------------------------------
83 IF(multi_fvm%IS_USED)THEN
84 DO ng=1,ngroup
85 mtn = iparg(1,ng)
86 nel = iparg(2,ng)
87 nft = iparg(3,ng)
88 ity = iparg(5,ng)
89 gbuf => elbuf_tab(ng)%GBUF
90 !---skip if Burn Fraction is not allocated
91 IF(gbuf%G_TB > 0)THEN
92 !---skip if material law is not #151
93 IF (mtn == 151) THEN
94 nlay = elbuf_tab(ng)%NLAY
95 DO ig=1,nel,nvsiz
96 offset = ig - 1
97 lft = 1
98 llt = min(nvsiz,nel-offset)
99 nft = iparg(3,ng) + offset
100 is_jwl = .false.
101 !Number of layers ( = number of material in law 151)
102 IF (nlay > 1) THEN
103 gbuf%TB(lft:llt) = -ep21
104 DO ilay = 1, nlay
105 !SUBMATLAW = IPM(2, IPM(20 + ILAY, MTN))
106 submatlaw = elbuf_tab(ng)%BUFLY(ilay)%ILAW
107 IF (submatlaw == 5) THEN
108 lbuf => elbuf_tab(ng)%BUFLY(ilay)%LBUF(1,1,1)
109 DO ii = lft, llt
110 vfrac = lbuf%VOL(ii)/gbuf%VOL(ii)
111 IF(vfrac >= zero)THEN
112 gbuf%TB(ii) = max(gbuf%TB(ii), lbuf%TB(ii))
113 ENDIF
114 ENDDO
115 is_jwl = .true.
116 ENDIF
117 ENDDO
118 IF(.NOT.is_jwl)THEN
119 DO ii = lft, llt
120 gbuf%TB(ii) = zero
121 ENDDO
122 ELSE
123 DO ii = lft, llt
124 IF(gbuf%TB(ii) <= -ep21)THEN
125 gbuf%TB(ii) = zero
126 ENDIF
127 ENDDO
128 ENDIF
129 ENDIF ! IF(NLAY > 1)
130 ENDDO ! next IG
131 ENDIF ! IF(MTN == 151)
132 ENDIF ! IF(GBUF%G_TB > 0)
133 ENDDO ! next NG
134
135 ENDIF ! IF(MULTI_FVM%IS_USED)THEN
136
137 END SUBROUTINE
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine multifluid_global_tdet(iparg, elbuf_tab, multi_fvm, ipm)