55
56
57
58 USE my_alloc_mod
70 use element_mod , only : nixs,nixc,nixtg
71
72
73
74#include "implicit_f.inc"
75
76
77
78#include "com01_c.inc"
79#include "com04_c.inc"
80#include "param_c.inc"
81#include "units_c.inc"
82#include "scr17_c.inc"
83
84
85
86 TYPE(MONVOL_STRUCT_), DIMENSION(NVOLU), INTENT(INOUT) :: T_MONVOL
87 INTEGER IXS(NIXS,*), IXC(NIXC,*), IXTG(NIXTG,*)
88 INTEGER IPM(NPROPMI,*)
89 INTEGER NB_NODE
90 my_real xyzini(3,nb_node), pm(npropm,*), xyzref(3,nb_node)
91 TYPE (SURF_) , DIMENSION(NSURF) :: IGRSURF
92
93
94
95 INTEGER IFV,
96 . N, ITYP, NNS, NTG, NBRIC, NBX, NBY, NNB,
97 . NBA, NTGA, NNA,
98 . PFLAG, NNI, NTGI, ILVOUT, NNFV, NNT, NSURFI,
99 . NSEG, IREF, NTRFV, NPOLH, ID,
100 . NTGT, INODE
101 INTEGER I
102 INTEGER IBID
103 CHARACTER(len=nchartitle) :: TITR
104 INTEGER, DIMENSION(:), ALLOCATABLE :: MINUS_SIGN_REVERSE
105 my_real,
DIMENSION(:,:),
ALLOCATABLE :: x
106 my_real dirx,diry,dirz,dir2x,dir2y,dir2z,origx,origy,origz,lx,ly,lz
107
108 CALL my_alloc(x,3,nb_node)
109 pflag = 0
110 ifv=0
111 DO n = 1, nvolu
112 ityp = t_monvol(n)%TYPE
114 titr = t_monvol(n)%TITLE
115 IF (ityp == 6 .OR. ityp == 8) THEN
116 IF (pflag == 0) THEN
117 WRITE(iout,1000)
118 pflag = 1
119 ENDIF
120
121 iref = t_monvol(n)%IVOLU(59)
122 IF(iref==0) THEN
123 x=xyzini
124 ELSE
125 x=xyzref
126 ENDIF
127
128 ifv=ifv+1
129 nns = t_monvol(n)%NNS
130 ntg = t_monvol(n)%NTG
131 nni = t_monvol(n)%NNI
132 ntgi = t_monvol(n)%NTGI
133 nba = t_monvol(n)%NBRIC
134 ntga = t_monvol(n)%NTGA
135 nna = t_monvol(n)%NNA
136 nnt = nns + nni
137 ntgt = ntg + ntgi
138
139 t_monvol(n)%KR5 = 1+nrvolu*nvolu+lrcbag+lrbagjet+lrbaghol+t_monvol(n)%IVOLU(34) + nnt*6
140
141
142
143 dirx = t_monvol(n)%RVOLU(35)
144 diry = t_monvol(n)%RVOLU(36)
145 dirz = t_monvol(n)%RVOLU(37)
146 dir2x = t_monvol(n)%RVOLU(38)
147 dir2y = t_monvol(n)%RVOLU(39)
148 dir2z = t_monvol(n)%RVOLU(40)
149 origx = t_monvol(n)%RVOLU(41)
150 origy = t_monvol(n)%RVOLU(42)
151 origz = t_monvol(n)%RVOLU(43)
152 lx = t_monvol(n)%RVOLU(44)
153 ly = t_monvol(n)%RVOLU(45)
154 lz = t_monvol(n)%RVOLU(53)
156 fvdata(ifv)%ID_DT_OPTION = t_monvol(n)%IVOLU(27)
159 fvdata(ifv)%CFL_COEF = t_monvol(n)%RVOLU(71)
160 fvdata(ifv)%DTMIN = t_monvol(n)%RVOLU(72)
162 fvdata(ifv)%PDISP_OLD = zero
163
165 . ntga, t_monvol(n)%ELEMA, x,
id,
166 . dirx, diry, dirz, dir2x, dir2y,
167 . dir2z, origx, origy, origz,
168 . lx, ly, lz, t_monvol(n)%NODES, t_monvol(n)%IBUFA, t_monvol(n)%TAGELA,
169 . titr)
170
171 t_monvol(n)%RVOLU(44) = lx
172 t_monvol(n)%RVOLU(45) = ly
173 t_monvol(n)%RVOLU(53) = lz
174
175 nbx = t_monvol(n)%IVOLU(54)
176 nby = t_monvol(n)%IVOLU(55)
177 nbric = nbx * nby
178 nnb = (nbx + 1) * (nby + 1) * 2
179 ALLOCATE(
fvdata(ifv)%BRIC(8,nbric),
180 .
fvdata(ifv)%TBRIC(13,nbric),
182 .
fvdata(ifv)%SFAC(6,4,nbric))
183
184 CALL fvbric(t_monvol(n)%IVOLU, t_monvol(n)%RVOLU, t_monvol(n)%NODES, x, nns)
185
186 t_monvol(n)%IVOLU(50) = t_monvol(n)%IVOLU(46)
187 t_monvol(n)%IVOLU(51) = t_monvol(n)%IVOLU(47)
188 t_monvol(n)%IVOLU(52) = t_monvol(n)%IVOLU(48)
189 t_monvol(n)%IVOLU(53) = t_monvol(n)%IVOLU(49)
190
192 . t_monvol(n)%NODES, t_monvol(n)%ELEM, x, t_monvol(n)%IVOLU,
fvdata(ifv)%BRIC,
193 .
fvdata(ifv)%XB, t_monvol(n)%RVOLU, ntg, ntgi, nbric,
fvdata(ifv)%TBRIC,
195 . t_monvol(n)%TBRIC, t_monvol(n)%TFAC, t_monvol(n)%TAGELS, t_monvol(n)%IBUFA,
196 . t_monvol(n)%ELEMA, t_monvol(n)%TAGELA, ixs,
id ,titr, nb_node, ityp)
197
198 IF (
kmesh(n) >= 2)
THEN
199 t_monvol(n)%KRA5 = 1 + nrvolu * nvolu + lrcbag + lrbagjet + lrbaghol +
200 . t_monvol(n)%IVOLU(34) + 7*nnt+4*ntgt+6*nna
201 t_monvol(n)%VELOCITY(1:3, 1:nna) = zero
202 DO i = 1, nna
203 inode = t_monvol(n)%IBUFA(i)
204 t_monvol(n)%NODE_COORD(1, i) = node_coord(1, inode)
205 t_monvol(n)%NODE_COORD(2, i) = node_coord(2, inode)
206 t_monvol(n)%NODE_COORD(3, i) = node_coord(3, inode)
207 ENDDO
208 ENDIF
209
210 IF (ntgi > 0) THEN
211 ilvout = t_monvol(n)%IVOLU(44)
212 nsurfi=t_monvol(n)%INT_SURFID
213 nseg=igrsurf(nsurfi)%NSEG
214
215
216
217 t_monvol(n)%POROSITY(1:ntgi) = zero
218 CALL fvelinte(t_monvol(n)%NODES, t_monvol(n)%ELEM(1, ntg + 1), ixc, ixtg,
219 . pm, ipm, ilvout, ifv, nnt, ntg, t_monvol(n)%POROSITY,
220 . nseg,igrsurf(nsurfi)%ELTYP, ntgi, t_monvol(n)%ELTG,
221 . nb_node,igrsurf(nsurfi)%ELEM)
222
223
224
225 ALLOCATE(minus_sign_reverse(ntgi))
226 minus_sign_reverse(:) = 0
228 . t_monvol(n)%NODES, t_monvol(n)%ELEM(1, ntg + 1), t_monvol(n)%IBAGJET,
229 . t_monvol(n)%NJET , igrsurf ,
230 . t_monvol(n)%ITAGEL(ntg + 1), nns+nni , ntgi,nb_node,
231 . minus_sign_reverse)
232
233
234
236 . t_monvol(n)%NODES, t_monvol(n)%ELEM(1, ntg + 1), t_monvol(n)%IBAGHOL,
237 . t_monvol(n)%NVENT, igrsurf ,
238 . t_monvol(n)%ITAGEL(ntg + 1), nns+nni , ntgi, nb_node)
239
241 . t_monvol(n)%NODES, t_monvol(n)%ELEM(1, ntg + 1), ibid, ixc, ixtg, ntgi,
242 . t_monvol(n)%ELTG(ntg + 1), t_monvol(n)%MATTG(ntg + 1), nb_node, .false.)
243
244
245
247 . t_monvol(n)%NODES, t_monvol(n)%ELEM(1, ntg + 1), ixc, ixtg,
248 . t_monvol(n)%ELTG(ntg + 1), ntgi, ilvout,
249 . minus_sign_reverse)
250 DEALLOCATE(minus_sign_reverse)
252 . ixc, ixtg, ntgi, t_monvol(n)%ITAGEL(ntg + 1), t_monvol(n)%ELTG(ntg + 1),
253 . t_monvol(n)%IBAGHOL, ilvout , 1 )
254
255
256
257 DO i=1,nsurf
258 nseg=igrsurf(i)%NSEG
259 CALL fvthsurf(nseg, ntgi,igrsurf(i)%ELTYP, t_monvol(n)%ELTG(ntg + 1),
260 . t_monvol(n)%THSURF_TAG(i, 1:ntgi + 1), igrsurf(i)%ELEM)
261 ENDDO
262 ENDIF
263
264
265
266 IF (nna > 0) THEN
267 nnfv = t_monvol(n)%IVOLU(46)
268 CALL fvnodbr(t_monvol(n)%IBUFA, nna, nnfv, ifv, nb_node)
269 ENDIF
270
271 nnfv = t_monvol(n)%IVOLU(46)
272 ntrfv = t_monvol(n)%IVOLU(47)
273 npolh = t_monvol(n)%IVOLU(49)
274
275
276
277 IF (iref /= 0) THEN
278 CALL fvvolu( ityp, nnfv, ntrfv, npolh,
279 1 t_monvol(n)%NODES, t_monvol(n)%IBUFA, t_monvol(n)%ELEMA, t_monvol(n)%TAGELA,
280 2 xyzini, t_monvol(n)%IVOLU, t_monvol(n)%RVOLU,
285
286
287 ENDIF
288
289
290
292 1 t_monvol(n)%NODES, t_monvol(n)%IBUFA, t_monvol(n)%ELEMA, t_monvol(n)%TAGELA,
293 2 xyzini, t_monvol(n)%IVOLU,
297
298
299
300 CALL fvelarea(t_monvol(n)%NODES, t_monvol(n)%ELEM, xyzref, ntgt,
301 1 t_monvol(n)%ELAREA)
302
303 ENDIF
304 ENDDO
305
306 DEALLOCATE(x)
307 RETURN
308
3091000 FORMAT(
310 . //,' FVMBAG: FINITE VOLUME MESH '/
311 . ' -------------------------- ')
312
subroutine fvelarea(ibuf, elem, x, nel, elarea)
subroutine fvelprint(ixc, ixtg, nel, itagel, eltg, ibaghol, ilvout, iflag)
subroutine fvelsurf(ibuf, elem, elem_id, ixc, ixtg, nel, eltg, mattg, nb_node, flag)
subroutine fvinjectint(ibuf, elem, ibagjet, njet, igrsurf, itagel, nn, nel, nb_node, minus_sign_reverse)
subroutine fvverif(nela, elema, x, monvid, vx3, vy3, vz3, vx1, vy1, vz1, xb0, yb0, zb0, lx, ly, lz, ibuf, ibufa, tagela, titr)
subroutine fvnodbr(ibufa, nna, nnfv, ifv, nb_node)
subroutine fvthsurf(nseg, ntgi, surf_eltyp, eltg, itag, surf_elem)
subroutine fvventholeint(ibuf, elem, ibaghol, nvent, igrsurf, itagel, nn, nel, nb_node)
type(fvbag_data), dimension(:), allocatable fvdata
subroutine fvelinte(ibuf, elem, ixc, ixtg, pm, ipm, ilvout, ifv, nnt, ntg, porosity, nseg, surf_eltyp, ntgi, eltg, nb_node, surf_elem)
subroutine fvinjnormal(ibuf, elem, ixc, ixtg, eltg, nel, ilvout, minus_sign_reverse)
subroutine fvlength(nns, nntr, npolh, ibuf, ibufa, elema, tagela, x, ivolu, ifvnod, rfvnod, ifvtri, ifvpoly, ifvtadr, ifvpolh, ifvpadr, ibpolh, dlh)
integer, dimension(:), allocatable kmesh
subroutine fvvolu(ityp, nns, nntr, npolh, ibuf, ibufa, elema, tagela, x, ivolu, rvolu, ifvnod, rfvnod, ifvtri, ifvpoly, ifvtadr, ifvpolh, ifvpadr, mpolh, epolh, vpolh_ini)
integer, parameter nchartitle
subroutine fvbric(ivolu, rvolu, ibuf, x, nn)
subroutine fvmesh1(ibuf, elem, x, ivolu, bric, xb, rvolu, nel, neli, nbric, tbric, sfac, dxm, nba, nela, tba, tfaca, tagels, ibufa, elema, tagela, ixs, id, titr, nb_node, ityp)