OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
multifluid_init2.F File Reference
#include "implicit_f.inc"
#include "mvsiz_p.inc"
#include "param_c.inc"
#include "vect01_c.inc"
#include "scr17_c.inc"
#include "scry_c.inc"
#include "com04_c.inc"

Go to the source code of this file.

Functions/Subroutines

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)

Function/Subroutine Documentation

◆ multifluid_init2()

subroutine multifluid_init2 ( integer, intent(in) nel,
integer, intent(in) nsigs,
integer, dimension(*), intent(inout) iparg,
integer, dimension(nixq, *), intent(in) ixq,
integer, dimension(npropmi, nummat), intent(in) ipm,
type(t_ale_connectivity), intent(inout) ale_connectivity,
integer, dimension(*), intent(in) igeo,
integer, dimension(lipart1, *), intent(in) ipart,
integer, dimension(*), intent(in) ipartq,
integer, dimension(*), intent(in) npf,
integer, dimension(*), intent(in) ptquad,
integer, dimension(sizloadp, *), intent(in) iloadp,
dimension(*), intent(in) x,
dimension(npropm, nummat), intent(inout) pm,
dimension(*), intent(inout) geo,
dimension(nsigs, *), intent(inout) sigi,
dimension(lskew, *), intent(inout) skew,
dimension(*), intent(inout) tf,
dimension(*), intent(inout) bufmat,
dimension(lfacload, *), intent(in) facload,
type(elbuf_struct_), intent(in), target elbuf_str,
logical error_thrown,
type(detonators_struct_) detonators,
type(matparam_struct_), dimension(nummat), intent(in) mat_param )

Definition at line 38 of file multifluid_init2.F.

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
#define my_real
Definition cppsort.cpp:32
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 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