54 SUBROUTINE fvmesh0(T_MONVOL, XYZINI, IXS, IXC, IXTG, PM,IPM, IGRSURF, XYZREF,NB_NODE)
70 use element_mod ,
only : nixs,nixc,nixtg
74#include "implicit_f.inc"
87 INTEGER IXS(NIXS,*), IXC(NIXC,*), IXTG(NIXTG,*)
88 INTEGER IPM(NPROPMI,*)
90 my_real xyzini(3,nb_node), pm(npropm,*), xyzref(3,nb_node)
91 TYPE (SURF_) ,
DIMENSION(NSURF) :: IGRSURF
96 . N, ITYP, NNS, NTG, NBRIC, NBX, NBY, NNB,
98 . PFLAG, NNI, NTGI, ILVOUT, NNFV, NNT, NSURFI,
99 . NSEG, IREF, NTRFV, NPOLH, ID,
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
108 CALL my_alloc(x,3,nb_node)
112 ityp = t_monvol(n)%TYPE
114 titr = t_monvol(n)%TITLE
115 IF (ityp == 6 .OR. ityp == 8)
THEN
121 iref = t_monvol(n)%IVOLU(59)
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
139 t_monvol(n)%KR5 = 1+nrvolu*nvolu+lrcbag+lrbagjet+lrbaghol+t_monvol(n)%IVOLU(34) + nnt*6
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
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,
171 t_monvol(n)%RVOLU(44) = lx
172 t_monvol(n)%RVOLU(45) = ly
173 t_monvol(n)%RVOLU(53) = lz
175 nbx = t_monvol(n)%IVOLU(54)
176 nby = t_monvol(n)%IVOLU(55)
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))
184 CALL fvbric(t_monvol(n)%IVOLU, t_monvol(n)%RVOLU, t_monvol(n)%NODES, x, nns)
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)
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
196 . t_monvol(n)%ELEMA, t_monvol(n)%TAGELA, ixs, id ,titr, nb_node, ityp)
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
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
206 t_monvol(n)%NODE_COORD(3, i) =
211 ilvout = t_monvol(n)%IVOLU(44)
212 nsurfi=t_monvol(n)%INT_SURFID
213 nseg=igrsurf(nsurfi)%NSEG
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)
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)
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)
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.)
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 )
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)
267 nnfv = t_monvol(n)%IVOLU(46)
268 CALL fvnodbr(t_monvol(n)%IBUFA, nna, nnfv, ifv, nb_node)
271 nnfv = t_monvol(n)%IVOLU(46)
272 ntrfv = t_monvol(n)%IVOLU(47)
273 npolh = t_monvol(n)%IVOLU(49)
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,
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,
300 CALL fvelarea(t_monvol(n)%NODES, t_monvol(n)%ELEM, xyzref, ntgt,
301 1 t_monvol(n)%ELAREA)
310 . //,
' FVMBAG: FINITE VOLUME MESH '/
311 .
' -------------------------- ')