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

Go to the source code of this file.

Functions/Subroutines

subroutine multifluid_init2t (elbuf_str, nel, nsigs, nvc, iparg, ixtg, ale_connectivity, igeo, ipart, iparttg, ipm, ptsh3n, npf, iloadp, xgrid, pm, geo, sigi, skew, tf, bufmat, facload, multi_fvm, error_thrown, detonators, mat_param)

Function/Subroutine Documentation

◆ multifluid_init2t()

subroutine multifluid_init2t ( type(elbuf_struct_), intent(in), target elbuf_str,
integer, intent(in) nel,
integer, intent(in) nsigs,
integer, intent(out) nvc,
integer, dimension(*), intent(inout) iparg,
integer, dimension(nixtg, *), intent(in) ixtg,
type(t_ale_connectivity), intent(inout) ale_connectivity,
integer, dimension(*), intent(in) igeo,
integer, dimension(lipart1, *), intent(in) ipart,
integer, dimension(*), intent(in) iparttg,
integer, dimension(npropmi, *), intent(in) ipm,
integer, dimension(*), intent(in) ptsh3n,
integer, dimension(*), intent(in) npf,
integer, dimension(sizloadp, *), intent(in) iloadp,
dimension(3, *), intent(in) xgrid,
dimension(npropm, *), 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(multi_fvm_struct) multi_fvm,
logical error_thrown,
type(detonators_struct_) detonators,
type(matparam_struct_), dimension(nummat), intent(in) mat_param )

Definition at line 36 of file multifluid_init2t.F.

40C-----------------------------------------------
41C M o d u l e s
42C-----------------------------------------------
43 USE elbufdef_mod
44 USE multi_fvm_mod
45 USE message_mod
48 USE matparam_def_mod, ONLY : matparam_struct_
49C-----------------------------------------------
50C I m p l i c i t T y p e s
51C-----------------------------------------------
52#include "implicit_f.inc"
53C-----------------------------------------------
54C G l o b a l P a r a m e t e r s
55C-----------------------------------------------
56! MVSIZ
57#include "mvsiz_p.inc"
58C-----------------------------------------------
59C C o m m o n B l o c k s
60C-----------------------------------------------
61! NIXTG, NPROPMI, NPROPM, LFACLOAD
62#include "param_c.inc"
63! JEUL, NFT
64#include "vect01_c.inc"
65! NUMSH3N
66#include "scry_c.inc"
67! LIPART1
68#include "scr17_c.inc"
69! SIZLOADP
70#include "com04_c.inc"
71! N2D
72#include "com01_c.inc"
73C-----------------------------------------------
74C D u m m y A r g u m e n t s
75C-----------------------------------------------
76 TYPE(ELBUF_STRUCT_), INTENT(IN), TARGET :: ELBUF_STR
77 INTEGER, INTENT(IN) :: NEL, NSIGS, IXTG(NIXTG, *),
78 . IGEO(*), PTSH3N(*), NPF(*), ILOADP(SIZLOADP, *),
79 . IPART(LIPART1, *), IPARTTG(*), IPM(NPROPMI, *)
80 INTEGER, INTENT(INOUT) :: IPARG(*)
81 INTEGER, INTENT(OUT) :: NVC
82 my_real, INTENT(IN) :: xgrid(3, *), facload(lfacload, *)
83 my_real,INTENT(INOUT) :: pm(npropm, *)
84 my_real, INTENT(INOUT) :: geo(*), sigi(nsigs, *), skew(lskew, *),
85 . tf(*), bufmat(*)
86 TYPE(MULTI_FVM_STRUCT) :: MULTI_FVM
87 LOGICAL :: ERROR_THROWN
88 TYPE(DETONATORS_STRUCT_) DETONATORS
89 TYPE(t_ale_connectivity), INTENT(INOUT) :: ALE_CONNECTIVITY
90 TYPE(MATPARAM_STRUCT_) ,DIMENSION(NUMMAT) ,INTENT(IN) :: MAT_PARAM
91C-----------------------------------------------
92C L o c a l V a r i a b l e s
93C-----------------------------------------------
94 TYPE(L_BUFEL_) ,POINTER :: LBUF
95 TYPE(G_BUFEL_) ,POINTER :: GBUF
96 TYPE(BUF_MAT_) ,POINTER :: MBUF
97 INTEGER :: NLAY, NGL(MVSIZ), MAT(MVSIZ), IX1(MVSIZ), IX2(MVSIZ), IX3(MVSIZ)
98 my_real ::
99 . y1(mvsiz), z1(mvsiz),
100 . y2(mvsiz), z2(mvsiz),
101 . y3(mvsiz), z3(mvsiz),
102 . nx(mvsiz), ny(mvsiz), nz(mvsiz),
103 . lgth1(mvsiz), lgth2(mvsiz), lgth3(mvsiz),pres,vfrac
104 my_real :: tempel(nel)
105 INTEGER :: II, I, IP, IBID, ILAY, MATLAW
106C-----------------------------------------------
107C P r e - C o n d i t i o n s
108C-----------------------------------------------
109 IF(n2d>0 .AND. mtn /=151) THEN
110 CALL ancmsg(msgid=1646,
111 . msgtype=msgerror,
112 . anmode=aninfo_blind_1)
113 RETURN
114 ENDIF
115C-----------------------------------------------
116C B e g i n n i n g o f s u b r o u t i n e
117C-----------------------------------------------
118 tempel(:) = zero
119C Global buffer
120 gbuf => elbuf_str%GBUF
121C Number of layers ( = number of material in law 151)
122 nlay = elbuf_str%NLAY
123C Gather nodale coordinates, compute surface (and volume)
124 DO ii = 1, nel
125 i = ii + nft
126 ix1(ii) = ixtg(1 + 1, i)
127 ix2(ii) = ixtg(1 + 2, i)
128 ix3(ii) = ixtg(1 + 3, i)
129 y1(ii) = xgrid(2, ixtg(1 + 1, i))
130 z1(ii) = xgrid(3, ixtg(1 + 1, i))
131 y2(ii) = xgrid(2, ixtg(1 + 2, i))
132 z2(ii) = xgrid(3, ixtg(1 + 2, i))
133 y3(ii) = xgrid(2, ixtg(1 + 3, i))
134 z3(ii) = xgrid(3, ixtg(1 + 3, i))
135 ngl(ii) = ixtg(6, i)
136 nx(ii) = half * ((y2(ii) - y1(ii)) * (z3(ii) - z1(ii)) -
137 . (z2(ii) - z1(ii)) * (y3(ii) - y1(ii)))
138 ny(ii) = zero
139 nz(ii) = zero
140 gbuf%AREA(ii) = sqrt(nx(ii) * nx(ii) + ny(ii) * ny(ii) + nz(ii) * nz(ii))
141 IF (n2d /= 1) THEN
142 gbuf%VOL(ii) = gbuf%AREA(ii)
143 ELSE
144 gbuf%VOL(ii) = (y1(ii) + y2(ii) + y3(ii)) * (
145 . y1(ii) * (z2(ii) - z3(ii)) +
146 . y2(ii) * (z3(ii) - z1(ii)) +
147 . y3(ii) * (z1(ii) - z2(ii))) * one_over_6
148 ENDIF
149 ! TODO(DC) Calcul volume axi
150 lgth1(ii) = sqrt((y2(ii) - y1(ii)) * (y2(ii) - y1(ii)) +
151 . (z2(ii) - z1(ii)) * (z2(ii) - z1(ii)))
152 lgth2(ii) = sqrt((y3(ii) - y2(ii)) * (y3(ii) - y2(ii)) +
153 . (z3(ii) - z2(ii)) * (z3(ii) - z2(ii)))
154 lgth3(ii) = sqrt((y1(ii) - y3(ii)) * (y1(ii) - y3(ii)) +
155 . (z1(ii) - z3(ii)) * (z1(ii) - z3(ii)))
156 gbuf%DELTAX(ii) = gbuf%AREA(ii) / max(lgth1(ii), lgth2(ii), lgth3(ii))
157 ENDDO
158
159 CALL c3veok3(nvc ,ix1 ,ix2 ,ix3 )
160
161 pm(104,ixtg(1, 1 + nft)) = zero !global pressure
162
163C Loop over the materials
164 DO ilay = 1, nlay
165C Layer buffer
166 lbuf => elbuf_str%BUFLY(ilay)%LBUF(1,1,1)
167 mbuf => elbuf_str%BUFLY(ilay)%MAT(1,1,1)
168 DO ii = 1, nel
169C Material
170 mat(ii) = mat_param( ixtg(1,ii+nft) )%MULTIMAT%MID(ilay)
171C Partial volumes
172 lbuf%VOL(ii) = mat_param( ixtg(1,ii+nft) )%MULTIMAT%VFRAC(ilay) * gbuf%VOL(ii)
173 ENDDO
174C Material initialization
175 ip = 1
176 ibid = 0
177 CALL matini(pm, ixtg, nixtg, xgrid,
178 . geo, ale_connectivity, detonators, iparg,
179 . sigi, nel, skew, igeo,
180 . ipart,iparttg,
181 . mat, ipm, nsigs, numsh3n, ptsh3n,
182 . ip, ngl, npf, tf, bufmat,
183 . gbuf, lbuf, mbuf, elbuf_str, iloadp,
184 . facload, gbuf%DELTAX,tempel)
185
186 vfrac = mat_param( ixtg(1,1+nft) )%MULTIMAT%VFRAC(ilay)
187 pres = pm(104, mat_param( ixtg(1,1+nft) )%MULTIMAT%MID(ilay) )
188 pm(104,ixtg(1, 1 + nft)) = pm(104,ixtg(1, 1 + nft)) + vfrac * pres !global pressure
189
190 matlaw = ipm(2, mat(1))
191 IF (matlaw == 5) THEN
192! JWL MAT
193 IF (.NOT. error_thrown) THEN
194 IF (pm(44, mat(1)) == zero) THEN
195 CALL ancmsg(msgid = 1623, msgtype = msgerror, anmode = aninfo,
196 . i1 = ipm(1, ixtg(1, 1 + nft)), i2 = ipm(1, mat(1)))
197 ENDIF
198 error_thrown = .true.
199 ENDIF
200 CALL m5in2t(pm, mat, ipm(1, ixtg(1,1+nft)), detonators, lbuf%TB, xgrid, ixtg, nixtg)
201 ENDIF
202 ENDDO
203
204 IF (nlay > 1) THEN
205
206C Mass globalization
207 gbuf%RHO(1:nel)=zero
208 DO ilay = 1, nlay
209 lbuf => elbuf_str%BUFLY(ilay)%LBUF(1,1,1)
210 DO ii = 1, nel
211 gbuf%RHO(ii) = gbuf%RHO(ii) + lbuf%RHO(ii) * mat_param( ixtg(1,ii+nft) )%MULTIMAT%VFRAC(ilay)
212 ENDDO
213 ENDDO
214
215C Temperature globalization. We must solve later T such as e+p/rho=integral(Cp_global(T),dT)
216 gbuf%TEMP(1:nel)=zero
217 DO ilay = 1, nlay
218 lbuf => elbuf_str%BUFLY(ilay)%LBUF(1,1,1)
219 DO ii = 1, nel
220 gbuf%TEMP(ii) = gbuf%TEMP(ii) + lbuf%TEMP(ii) *
221 . mat_param( ixtg(1,ii+nft) )%MULTIMAT%VFRAC(ilay)*lbuf%RHO(ii)/gbuf%RHO(ii) !volfrac*densfrac=massfrac
222 ENDDO
223 ENDDO
224
225 ENDIF
subroutine c3veok3(nvc, ix1, ix2, ix3)
Definition c3veok3.F:36
#define my_real
Definition cppsort.cpp:32
subroutine m5in2t(pm, mat, m151_id, detonators, tb, x, ix, nix)
Definition m5in2t.F:36
#define max(a, b)
Definition macros.h:21
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 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