OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
multifluid_init2.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_init2 ../starter/source/multifluid/multifluid_init2.F
25!||--- called by ------------------------------------------------------
26!|| initia ../starter/source/elements/initia/initia.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| m5in2 ../starter/source/initial_conditions/detonation/m5in2.F
30!|| matini ../starter/source/materials/mat_share/matini.F
31!|| qcoor2 ../starter/source/elements/solid_2d/quad/qcoor2.F
32!|| qdlen2 ../starter/source/elements/solid_2d/quad/qdlen2.F
33!|| qvoli2 ../starter/source/elements/solid_2d/quad/qvoli2.F
34!||--- uses -----------------------------------------------------
35!|| detonators_mod ../starter/share/modules1/detonators_mod.f
36!|| message_mod ../starter/share/message_module/message_mod.f
37!||====================================================================
38 SUBROUTINE multifluid_init2(NEL, NSIGS,
39 . IPARG, IXQ, IPM, ALE_CONNECTIVITY, IGEO, IPART, IPARTQ, NPF,
40 . PTQUAD, ILOADP, X, PM,
41 . GEO, SIGI, SKEW, TF, BUFMAT, FACLOAD, ELBUF_STR, ERROR_THROWN, DETONATORS,
42 . MAT_PARAM)
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE elbufdef_mod
47 USE message_mod
50 USE matparam_def_mod, ONLY : matparam_struct_
51 use element_mod , only : nixq
52C-----------------------------------------------
53C I m p l i c i t T y p e s
54C-----------------------------------------------
55#include "implicit_f.inc"
56C-----------------------------------------------
57C G l o b a l P a r a m e t e r s
58C-----------------------------------------------
59! MVSIZ
60#include "mvsiz_p.inc"
61C-----------------------------------------------
62C C o m m o n B l o c k s
63C-----------------------------------------------
64! NIXQ, NPROPMI, NPROPM, LFACLOAD
65#include "param_c.inc"
66! JEUL, NFT
67#include "vect01_c.inc"
68! LIPART1
69#include "scr17_c.inc"
70! NUMQUAD
71#include "scry_c.inc"
72! SIZLOADP
73#include "com04_c.inc"
74C-----------------------------------------------
75C D u m m y A r g u m e n t s
76C-----------------------------------------------
77 INTEGER, INTENT(IN) :: NEL, NSIGS,IXQ(NIXQ, *), IPM(NPROPMI, NUMMAT),
78 . IGEO(*), IPART(LIPART1, *), IPARTQ(*), PTQUAD(*),
79 . NPF(*), ILOADP(SIZLOADP, *)
80 INTEGER, INTENT(INOUT) :: IPARG(*)
81 TYPE(elbuf_struct_), INTENT(IN), TARGET :: ELBUF_STR
82 my_real, INTENT(IN) :: X(*), FACLOAD(LFACLOAD, *)
83 my_real, INTENT(INOUT) :: PM(NPROPM, NUMMAT)
84 my_real, INTENT(INOUT) :: geo(*), sigi(nsigs, *),
85 . skew(lskew, *), tf(*), bufmat(*)
86 LOGICAL :: ERROR_THROWN
87 TYPE(detonators_struct_) :: DETONATORS
88 TYPE(t_ale_connectivity), INTENT(INOUT) :: ALE_CONNECTIVITY
89 TYPE(MATPARAM_STRUCT_) ,DIMENSION(NUMMAT) ,INTENT(IN) :: MAT_PARAM
90C-----------------------------------------------
91C L o c a l V a r i a b l e s
92C-----------------------------------------------
93 INTEGER :: ILAY, NLAY, II, IP, IBID, MATLAW
94 INTEGER :: NGL(MVSIZ), MAT(MVSIZ), PID(MVSIZ)
95 INTEGER :: IX1(MVSIZ), IX2(MVSIZ), IX3(MVSIZ), IX4(MVSIZ)
96 my_real :: Y1(MVSIZ), Y2(MVSIZ), Y3(MVSIZ),Y4(MVSIZ),
97 . z1(mvsiz), z2(mvsiz), z3(mvsiz),z4(mvsiz),
98 . sy(mvsiz), sz(mvsiz), ty(mvsiz),tz(mvsiz),pres,vfrac
99 my_real :: tempel(nel)
100 TYPE(l_bufel_) ,POINTER :: LBUF
101 TYPE(G_BUFEL_) ,POINTER :: GBUF
102 TYPE(BUF_MAT_) ,POINTER :: MBUF
103C-----------------------------------------------
104C B e g i n n i n g o f s u b r o u t i n e
105C-----------------------------------------------
106C Global buffer
107 gbuf => elbuf_str%GBUF
108C Number of layers ( = number of material in law 151)
109 nlay = elbuf_str%NLAY
110C Gather coordinates, material Id and so on
111 CALL qcoor2(x, ixq(1, nft + 1), ngl, mat, pid,
112 . ix1, ix2, ix3, ix4,
113 . y1, y2, y3, y4,
114 . z1, z2, z3, z4,
115 . sy, sz, ty, tz)
116C Volume, area computation
117 CALL qvoli2(gbuf%VOL, ixq(1, nft + 1), ngl, gbuf%AREA,
118 . y1, y2, y3, y4,
119 . z1, z2, z3, z4)
120C Compute deltax
121 IF (jeul /= 0) THEN
122 CALL qdlen2(iparg(63),
123 . gbuf%AREA, gbuf%DELTAX,
124 . y1, y2, y3, y4,
125 . z1, z2, z3, z4)
126 ENDIF
127 tempel(:) = zero
128 pm(104,ixq(1, 1 + nft)) = zero !global pressure
129
130C Loop over the materials
131 DO ilay = 1, nlay
132C Layer buffer
133 lbuf => elbuf_str%BUFLY(ilay)%LBUF(1,1,1)
134 mbuf => elbuf_str%BUFLY(ilay)%MAT(1,1,1)
135 DO ii = 1, nel
136C Material
137 mat(ii) = mat_param( ixq(1,ii+nft) )%MULTIMAT%MID(ilay)
138C Partial volumes
139 lbuf%VOL(ii) =mat_param( ixq(1,ii+nft) )%MULTIMAT%VFRAC(ilay) * gbuf%VOL(ii)
140 ENDDO
141C Material initialization
142 ip = 1
143 ibid = 0
144 CALL matini(pm, ixq, nixq, x,
145 . geo, ale_connectivity, detonators, iparg,
146 . sigi, nel, skew, igeo,
147 . ipart,ipartq,
148 . mat, ipm, nsigs, numquad, ptquad,
149 . ip, ngl,npf, tf, bufmat,
150 . gbuf, lbuf, mbuf, elbuf_str, iloadp,
151 . facload, gbuf%DELTAX,tempel,mat_param )
152
153 vfrac = mat_param( ixq(1,1+nft) )%MULTIMAT%VFRAC(ilay)
154 pres = pm(104, mat_param( ixq(1,1+nft) )%MULTIMAT%MID(ilay) )
155 pm(104,ixq(1, 1 + nft)) = pm(104,ixq(1, 1 + nft)) + vfrac * pres !global pressure
156
157 matlaw = ipm(2, mat(1))
158 IF (matlaw == 5) THEN
159! JWL MAT - layer detonation times
160 IF (.NOT. error_thrown) THEN
161 IF (pm(44, mat(1)) == zero) THEN
162 CALL ancmsg(msgid = 1623, msgtype = msgerror, anmode = aninfo,
163 . i1 = ipm(1, ixq(1, 1 + nft)), i2 = ipm(1, mat(1)))
164 ENDIF
165 error_thrown = .true.
166 ENDIF
167 CALL m5in2(pm, mat, ipm(1, ixq(1,1+nft)), detonators, lbuf%TB, x, ixq, nixq)
168 ENDIF
169 ENDDO
170
171 IF (nlay > 1) THEN
172
173C Mass globalization
174 gbuf%RHO(1:nel)=zero
175 DO ilay = 1, nlay
176 lbuf => elbuf_str%BUFLY(ilay)%LBUF(1,1,1)
177 DO ii = lft, llt
178 gbuf%RHO(ii) = gbuf%RHO(ii) + lbuf%RHO(ii) * mat_param( ixq(1,ii+nft) )%MULTIMAT%VFRAC(ilay)
179 ENDDO
180 ENDDO
181
182C Temperature globalization. We must solve later T such as e+p/rho=integral(Cp_global(T),dT)
183 gbuf%TEMP(1:nel)=zero
184 DO ilay = 1, nlay
185 lbuf => elbuf_str%BUFLY(ilay)%LBUF(1,1,1)
186 DO ii = 1, nel
187 gbuf%TEMP(ii) = gbuf%TEMP(ii) + lbuf%TEMP(ii) * mat_param( ixq(1,ii+nft) )%MULTIMAT%VFRAC(ilay) *
188 . lbuf%RHO(ii)/gbuf%RHO(ii) !volfrac*densfrac=massfrac
189 ENDDO
190 ENDDO
191
192 ENDIF
193
194 END SUBROUTINE multifluid_init2
subroutine m5in2(pm, mat, m151_id, detonators, tb, x, ix, nix)
Definition m5in2.F:40
subroutine matini(pm, ix, nix, x, geo, ale_connectivity, detonators, iparg, sigi, nel, skew, igeo, ipart, ipartel, mat, ipm, nsig, nums, pt, ipt, ngl, npf, tf, bufmat, gbuf, lbuf, mbuf, elbuf_str, iloadp, facload, ddeltax, tempel, mat_param)
Definition matini.F:83
subroutine multifluid_init2(nel, nsigs, iparg, ixq, ipm, ale_connectivity, igeo, ipart, ipartq, npf, ptquad, iloadp, x, pm, geo, sigi, skew, tf, bufmat, facload, elbuf_str, error_thrown, detonators, mat_param)
subroutine qvoli2(volu, ixq, ngl, aire, y1, y2, y3, y4, z1, z2, z3, z4)
Definition qvoli2.F:40
subroutine qcoor2(x, ixq, ngl, mxt, pid, ix1, ix2, ix3, ix4, y1, y2, y3, y4, z1, z2, z3, z4, sy, sz, ty, tz)
Definition qcoor2.F:38
subroutine qdlen2(iparg, aire, deltax, y1, y2, y3, y4, z1, z2, z3, z4)
Definition qdlen2.F:39
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
program starter
Definition starter.F:39