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