21 COMMON /scrns/ res1(lx1,ly1,lz1,lelv)
22 $ , res2(lx1,ly1,lz1,lelv)
23 $ , res3(lx1,ly1,lz1,lelv)
24 $ , dv1(lx1,ly1,lz1,lelv)
25 $ , dv2(lx1,ly1,lz1,lelv)
26 $ , dv3(lx1,ly1,lz1,lelv)
27 $ , respr(lx2,ly2,lz2,lelv)
28 common /scrvh/ h1(lx1,ly1,lz1,lelv)
29 $ , h2(lx1,ly1,lz1,lelv)
31 REAL DPR (LX2,LY2,LZ2,LELV)
35 REAL DVC (LX1,LY1,LZ1,LELV), DFC(LX1,LY1,LZ1,LELV)
36 REAL DIV1, DIV2, DIF1, DIF2, QTL1, QTL2
39 ntot1 = lx1*ly1*lz1*nelv
46 call sumab(vx_e,vx,vxlag,ntot1,ab,nab)
47 call sumab(vy_e,vy,vylag,ntot1,ab,nab)
48 if (if3d)
call sumab(vz_e,vz,vzlag,ntot1,ab,nab)
52 if(iflomach)
call opcolv(bfx,bfy,bfz,vtrans)
55 call add2 (qtl,usrdiv,ntot1)
57 if (igeom.eq.2)
call lagvel
60 call bcdirvc (vx,vy,vz,v1mask,v2mask,v3mask)
63 call copy(prlag,pr,ntot1)
64 if (icalld.eq.0) tpres=0.0
74 call hsolve (
'PRES',dpr,respr,h1,h2
76 $ ,imesh,tolspl,nmxp,1
77 $ ,approxp,napproxp,binvm1)
78 call add2 (pr,dpr,ntot1)
84 if(ifstrs .and. .not.ifaxis)
then
88 call cresvsp (res1,res2,res3,h1,h2)
90 call ophinv (dv1,dv2,dv3,res1,res2,res3,h1,h2,tolhv,nmxv)
91 call opadd2 (vx,vy,vz,dv1,dv2,dv3)
106 REAL RESPR (LX1*LY1*LZ1,LELV)
108 COMMON /scrns/ ta1(lx1*ly1*lz1,lelv)
109 $ , ta2(lx1*ly1*lz1,lelv)
110 $ , ta3(lx1*ly1*lz1,lelv)
111 $ , wa1(lx1*ly1*lz1*lelv)
112 $ , wa2(lx1*ly1*lz1*lelv)
113 $ , wa3(lx1*ly1*lz1*lelv)
114 COMMON /scrmg/ w1(lx1*ly1*lz1,lelv)
115 $ , w2(lx1*ly1*lz1,lelv)
116 $ , w3(lx1*ly1*lz1,lelv)
118 common /scruz/ sij(lx1*ly1*lz1,6,lelv)
119 parameter(lr=lx1*ly1*lz1)
120 common /scrvz/ ur(lr),us(lr),ut(lr)
121 $ , vr(lr),vs(lr),vt(lr)
122 $ , wr(lr),ws(lr),wt(lr)
131 call op_curl (ta1,ta2,ta3,vx_e,vy_e,vz_e,
134 CALL col2 (ta2, omask,ntot1)
135 CALL col2 (ta3, omask,ntot1)
137 call op_curl (wa1,wa2,wa3,ta1,ta2,ta3,.true.,w1,w2)
139 CALL col2 (wa2, omask,ntot1)
140 CALL col2 (wa3, omask,ntot1)
142 call opcolv (wa1,wa2,wa3,bm1)
144 call opgrad (ta1,ta2,ta3,qtl)
146 CALL col2 (ta2, omask,ntot1)
147 CALL col2 (ta3, omask,ntot1)
153 if (ifstrs .and. ifvvisp)
then
154 call opgrad (ta1,ta2,ta3,vdiff)
160 if (if3d.or.ifaxis) nij=6
162 call comp_sij (sij,nij,vx_e,vy_e,vz_e,
163 & ur,us,ut,vr,vs,vt,wr,ws,wt)
164 call col_mu_sij (w1,w2,w3,ta1,ta2,ta3,sij,nij)
166 call opcolv (ta1,ta2,ta3,qtl)
168 call opadd2cm (w1,w2,w3,ta1,ta2,ta3,scale2)
169 call opsub2 (wa1,wa2,wa3,w1,w2,w3)
173 call invcol3 (w1,vdiff,vtrans,ntot1)
174 call opcolv (wa1,wa2,wa3,w1)
177 call invers2 (ta1,vtrans,ntot1)
178 call rzero (ta2,ntot1)
182 call axhelm (respr,pr,ta1,ta2,imesh,1)
188 ta1(i,1) = bfx(i,1,1,1)/vtrans(i,1,1,1,1)-wa1(i)
189 ta2(i,1) = bfy(i,1,1,1)/vtrans(i,1,1,1,1)-wa2(i)
190 ta3(i,1) = bfz(i,1,1,1)/vtrans(i,1,1,1,1)-wa3(i)
194 ta1(i,1) = ta1(i,1)*binvm1(i,1,1,1)
195 ta2(i,1) = ta2(i,1)*binvm1(i,1,1,1)
196 ta3(i,1) = ta3(i,1)*binvm1(i,1,1,1)
200 call cdtp (wa1,ta1,rxm1,sxm1,txm1,1)
201 call cdtp (wa2,ta2,rym1,sym1,tym1,1)
202 call cdtp (wa3,ta3,rzm1,szm1,tzm1,1)
204 respr(i,1) = respr(i,1)+wa1(i)+wa2(i)+wa3(i)
207 call cdtp (wa1,ta1,rxm1,sxm1,txm1,1)
208 call cdtp (wa2,ta2,rym1,sym1,tym1,1)
211 respr(i,1) = respr(i,1)+wa1(i)+wa2(i)
217 call admcol3(respr,qtl,bm1,dtbd,ntot1)
222 CALL rzero (w1(1,iel),nxyz1)
223 CALL rzero (w2(1,iel),nxyz1)
225 $
CALL rzero (w3(1,iel),nxyz1)
226 cb = cbc(ifc,iel,ifield)
227 IF (cb(1:1).EQ.
'V'.OR.cb(1:1).EQ.
'v'.or.
228 $ cb.eq.
'MV '.or.cb.eq.
'mv '.or.cb.eq.
'shl')
then
230 $ (w1(1,iel),vx(1,1,1,iel),unx(1,1,ifc,iel),ifc)
232 $ (w2(1,iel),vy(1,1,1,iel),uny(1,1,ifc,iel),ifc)
235 $ (w3(1,iel),vz(1,1,1,iel),unz(1,1,ifc,iel),ifc)
236 ELSE IF (cb(1:3).EQ.
'SYM')
THEN
238 $ (w1(1,iel),ta1(1,iel),unx(1,1,ifc,iel),ifc)
240 $ (w2(1,iel),ta2(1,iel),uny(1,1,ifc,iel),ifc)
243 $ (w3(1,iel),ta3(1,iel),unz(1,1,ifc,iel),ifc)
245 CALL add2 (w1(1,iel),w2(1,iel),nxyz1)
247 $
CALL add2 (w1(1,iel),w3(1,iel),nxyz1)
248 CALL faccl2 (w1(1,iel),area(1,1,ifc,iel),ifc)
249 IF (cb(1:1).EQ.
'V'.OR.cb(1:1).EQ.
'v'.or.
250 $ cb.eq.
'MV '.or.cb.eq.
'mv ')
then
251 CALL cmult(w1(1,iel),dtbd,nxyz1)
253 CALL sub2 (respr(1,iel),w1(1,iel),nxyz1)
271 real resv1(lx1,ly1,lz1,lelv)
272 $ , resv2(lx1,ly1,lz1,lelv)
273 $ , resv3(lx1,ly1,lz1,lelv)
274 $ , h1 (lx1,ly1,lz1,lelv)
275 $ , h2 (lx1,ly1,lz1,lelv)
277 COMMON /scruz/ ta1(lx1,ly1,lz1,lelv)
278 $ , ta2(lx1,ly1,lz1,lelv)
279 $ , ta3(lx1,ly1,lz1,lelv)
280 $ , ta4(lx1,ly1,lz1,lelv)
282 ntot = lx1*ly1*lz1*nelv
285 CALL sethlm (h1,h2,intype)
287 CALL ophx (resv1,resv2,resv3,vx,vy,vz,h1,h2)
288 CALL opchsgn (resv1,resv2,resv3)
291 if (ifstrs)
scale = 2./3.
293 call col3 (ta4,vdiff,qtl,ntot)
295 call opgrad (ta1,ta2,ta3,ta4)
297 CALL col2 (ta2, omask,ntot)
298 CALL col2 (ta3, omask,ntot)
301 call opsub2 (resv1,resv2,resv3,ta1,ta2,ta3)
302 call opadd2 (resv1,resv2,resv3,bfx,bfy,bfz)
315 real resv1(lx1,ly1,lz1,lelv)
316 $ , resv2(lx1,ly1,lz1,lelv)
317 $ , resv3(lx1,ly1,lz1,lelv)
318 $ , h1 (lx1,ly1,lz1,lelv)
319 $ , h2 (lx1,ly1,lz1,lelv)
321 COMMON /scruz/ ta1(lx1,ly1,lz1,lelv)
322 $ , ta2(lx1,ly1,lz1,lelv)
323 $ , ta3(lx1,ly1,lz1,lelv)
324 $ , ta4(lx1,ly1,lz1,lelv)
325 COMMON /scrmg/ wa1(lx1*ly1*lz1,lelv)
326 $ , wa2(lx1*ly1*lz1,lelv)
327 $ , wa3(lx1*ly1*lz1,lelv)
329 ntot = lx1*ly1*lz1*nelv
332 CALL oprzero (resv1,resv2,resv3)
336 CALL sethlm (h1,h2,intype)
338 CALL ophx (resv1,resv2,resv3,vx,vy,vz,h1,h2)
339 CALL opchsgn (resv1,resv2,resv3)
342 if (ifstrs)
scale = 2./3.
344 call col3 (ta4,vdiff,qtl,ntot)
346 call opgrad (ta1,ta2,ta3,ta4)
348 call cdtp (wa1,pr ,rxm1,sxm1,txm1,1)
349 call cdtp (wa2,pr ,rym1,sym1,tym1,1)
350 if(if3d)
call cdtp (wa3,pr ,rzm1,szm1,tzm1,1)
352 call sub2 (ta1,wa1,ntot)
353 call sub2 (ta2,wa2,ntot)
354 if(if3d)
call sub2 (ta3,wa3,ntot)
357 CALL col2 (ta2, omask,ntot)
358 CALL col2 (ta3, omask,ntot)
361 call opsub2 (resv1,resv2,resv3,ta1,ta2,ta3)
362 call opadd2 (resv1,resv2,resv3,bfx,bfy,bfz)
368 subroutine op_curl(w1,w2,w3,u1,u2,u3,ifavg,work1,work2)
373 real duax(lx1), ta(lx1,ly1,lz1,lelv)
377 real w1(1),w2(1),w3(1),work1(1),work2(1),u1(1),u2(1),u3(1)
379 ntot = lx1*ly1*lz1*nelv
382 call dudxyz(work1,u3,rym1,sym1,tym1,jacm1,1,2)
384 call dudxyz(work2,u2,rzm1,szm1,tzm1,jacm1,1,3)
385 call sub3(w1,work1,work2,ntot)
387 call copy(w1,work1,ntot)
390 call copy (ta,u3,ntot)
393 call rzero (ta(1,1,1,iel),lx1)
394 call mxm (ta(1,1,1,iel),lx1,datm1,ly1,duax,1)
395 call copy (ta(1,1,1,iel),duax,lx1)
397 call col2 (ta(1,1,1,iel),yinvm1(1,1,1,iel),nxyz)
399 call add2 (w1,ta,ntot)
405 call dudxyz(work1,u1,rzm1,szm1,tzm1,jacm1,1,3)
406 call dudxyz(work2,u3,rxm1,sxm1,txm1,jacm1,1,1)
407 call sub3(w2,work1,work2,ntot)
409 call rzero (work1,ntot)
410 call dudxyz(work2,u3,rxm1,sxm1,txm1,jacm1,1,1)
411 call sub3(w2,work1,work2,ntot)
414 call dudxyz(work1,u2,rxm1,sxm1,txm1,jacm1,1,1)
415 call dudxyz(work2,u1,rym1,sym1,tym1,jacm1,1,2)
416 call sub3(w3,work1,work2,ntot)
421 if (ifavg .and. .not. ifcyclic)
then
426 call opcolv (w1,w2,w3,bm1)
428 call opcolv (w1,w2,w3,binvm1)
440 REAL A1(1),A2(1),A3(1),B1(1),B2(1),B3(1),C
441 ntot1=lx1*ly1*lz1*nelv
444 a1(i) = a1(i) + b1(i)*c
445 a2(i) = a2(i) + b2(i)*c
446 a3(i) = a3(i) + b3(i)*c
450 a1(i) = a1(i) + b1(i)*c
451 a2(i) = a2(i) + b2(i)*c
469 call cadd2 (vdiff_e,vdiff,dnu_star,n)
471 call cfill (vdiff,nu_star,n)
482 call add2(vdiff,vdiff_e,n)
492 parameter(lr=lx1*ly1*lz1)
493 real w1 (lr,1),w2 (lr,1),w3 (lr,1)
494 real ta1(lr,1),ta2(lr,1),ta3(lr,1)
500 if (if3d.or.ifaxis)
then
502 call vdot3 (w1(1,e),ta1(1,e),ta2(1,e),ta3(1,e)
503 $ ,sij(1,1,e),sij(1,4,e),sij(1,6,e),nxyz1)
504 call vdot3 (w2(1,e),ta1(1,e),ta2(1,e),ta3(1,e)
505 $ ,sij(1,4,e),sij(1,2,e),sij(1,5,e),nxyz1)
506 call vdot3 (w3(1,e),ta1(1,e),ta2(1,e),ta3(1,e)
507 $ ,sij(1,6,e),sij(1,5,e),sij(1,3,e),nxyz1)
513 call vdot2 (w1(1,e),ta1(1,e),ta2(1,e)
514 $ ,sij(1,1,e),sij(1,3,e),nxyz1)
515 call vdot2 (w2,ta1(1,e),ta2(1,e)
516 $ ,sij(1,3,e),sij(1,2,e),nxyz1)
517 call rzero (w3(1,e),nxyz1)
525 subroutine sumab(v,vv,vvlag,ntot,ab_,nab_)
531 real vvlag(lx1*ly1*lz1*lelv,*)
538 call add3s2(v,vv,vvlag(1,1),ab0,ab1,ntot)
539 if(nab_.eq.3)
call add2s2(v,vvlag(1,2),ab2,ntot)
553 common /scrns/ w1(lx1,ly1,lz1,lelt)
554 $ ,w2(lx1,ly1,lz1,lelt)
555 $ ,w3(lx1,ly1,lz1,lelt)
556 $ ,tx(lx1,ly1,lz1,lelt)
557 $ ,ty(lx1,ly1,lz1,lelt)
558 $ ,tz(lx1,ly1,lz1,lelt)
569 call copy(qtl,bq,ntot)
574 call opcolv (tx,ty,tz,binvm1)
575 call opcolv (tx,ty,tz,vdiff(1,1,1,1,2))
576 call opdiv (w2,tx,ty,tz)
578 call add2 (qtl,w2,ntot)
579 call dssum (qtl,lx1,ly1,lz1)
580 call col2 (qtl,binvm1,ntot)
583 call col3 (w2,vtrans(1,1,1,1,2),t,ntot)
588 dd = (1.0 - gamma0)/gamma0
590 call cmult(w1,dd,ntot)
592 call invcol3(w2,vtrans(1,1,1,1,2),vtrans,ntot)
595 call cadd(w1,1.0,ntot)
596 call copy(w2,w1,ntot)
597 call col2(w1,bm1,ntot)
599 p0alph1 = 1. /
glsum(w1,ntot)
601 call copy (w1,qtl,ntot)
602 call col2 (w1,bm1,ntot)
604 termq =
glsum(w1,ntot)
607 prhs = p0alph1*(termq - termv)
608 pcoef =(cv_bd(1) - cv_dtnek*prhs)
609 call add3s2(saqpq,p0thn,p0thlag(1),cv_bd(2),cv_bd(3),1)
610 if(nbd.eq.3)
call add2s2(saqpq,p0thlag(2),cv_bd(4),1)
613 termv =
glcflux(vx_e,vy_e,vz_e)
614 prhs = p0alph1*(termq - termv)
615 pcoef =(bd(1) - dt*prhs)
616 call add3s2(saqpq,p0thn,p0thlag(1),bd(2),bd(3),1)
617 if(nbd.eq.3)
call add2s2(saqpq,p0thlag(2),bd(4),1)
619 p0thlag(2) = p0thlag(1)
627 call cmult(w2,dd,ntot)
628 call add2 (qtl,w2,ntot)
643 ntot = lx1*ly1*lz1*nelv
656 COMMON /scrns/ dvc(lx1,ly1,lz1,lelv),
657 $ dv1(lx1,ly1,lz1,lelv),
658 $ dv2(lx1,ly1,lz1,lelv),
659 $ dfc(lx1,ly1,lz1,lelv)
661 ntot1 = lx1*ly1*lz1*nelv
664 CALL opdiv (dvc,vx,vy,vz)
665 CALL dssum (dvc,lx1,ly1,lz1)
666 CALL col2 (dvc,binvm1,ntot1)
668 CALL col3 (dv1,dvc,bm1,ntot1)
669 div1 =
glsum(dv1,ntot1)/volvm1
671 CALL col3 (dv2,dvc,dvc,ntot1)
672 CALL col2 (dv2,bm1 ,ntot1)
673 div2 =
glsum(dv2,ntot1)/volvm1
677 CALL sub3 (dfc,dvc,qtl,ntot1)
678 CALL col3 (dv1,dfc,bm1,ntot1)
679 dif1 =
glsum(dv1,ntot1)/volvm1
681 CALL col3 (dv2,dfc,dfc,ntot1)
682 CALL col2 (dv2,bm1 ,ntot1)
683 dif2 =
glsum(dv2,ntot1)/volvm1
686 CALL col3 (dv1,qtl,bm1,ntot1)
687 qtl1 =
glsum(dv1,ntot1)/volvm1
689 CALL col3 (dv2,qtl,qtl,ntot1)
690 CALL col2 (dv2,bm1 ,ntot1)
691 qtl2 =
glsum(dv2,ntot1)/volvm1
695 WRITE(6,
'(13X,A,1p2e13.4)')
696 &
'L1/L2 DIV(V) ',div1,div2
697 WRITE(6,
'(13X,A,1p2e13.4)')
698 &
'L1/L2 QTL ',qtl1,qtl2
699 WRITE(6,
'(13X,A,1p2e13.4)')
700 &
'L1/L2 DIV(V)-QTL ',dif1,dif2
701 IF (dif2.GT.0.1)
WRITE(6,
'(13X,A)')
702 &
'WARNING: DIV(V)-QTL too large!'
720 dimension s(lx1,ly1,lz1,lelt)
721 COMMON /scrsf/ tmp(lx1,ly1,lz1,lelt)
722 $ , tma(lx1,ly1,lz1,lelt)
723 $ , smu(lx1,ly1,lz1,lelt)
727 if (icalld.eq.0)
then
749 DO 2010 iface=1,nfaces
750 cb=cbc(iface,ie,ifield)
751 bc1=bc(1,iface,ie,ifield)
752 IF (cb.EQ.
'O ' .or. cb.eq.
'ON ' .or.
753 $ cb.eq.
'o ' .or. cb.eq.
'on ')
754 $
CALL faceis (cb,tmp(1,1,1,ie),ie,iface,lx1,ly1,lz1)
759 IF (isweep.EQ.1)
CALL dsop(tmp,
'MXA',lx1,ly1,lz1)
760 IF (isweep.EQ.2)
CALL dsop(tmp,
'MNA',lx1,ly1,lz1)
765 CALL col2(s,pmask,ntot)
766 CALL add2(s,tmp,ntot)
subroutine faceis(CB, S, IEL, IFACE, NX, NY, NZ)
subroutine bcdirvc(V1, V2, V3, mask1, mask2, mask3)
real function glcflux(tx, ty, tz)
real *8 function dnekclock()
subroutine scale(xyzl, nl)
subroutine dsop(u, op, nx, ny, nz)
subroutine dssum(u, nx, ny, nz)
subroutine axhelm(au, u, helm1, helm2, imesh, isd)
subroutine ophinv(o1, o2, o3, i1, i2, i3, h1, h2, tolh, nmxhi)
subroutine cadd(a, const, n)
subroutine col3(a, b, c, n)
subroutine invers2(a, b, n)
subroutine invcol2(a, b, n)
subroutine admcol3(a, b, c, d, n)
subroutine add2s2(a, b, c1, n)
subroutine vdot2(dot, u1, u2, v1, v2, n)
subroutine cadd2(a, b, const, n)
subroutine add3s2(a, b, c, c1, c2, n)
subroutine sub3(a, b, c, n)
subroutine cmult(a, const, n)
subroutine cfill(a, b, n)
subroutine invcol3(a, b, c, n)
subroutine add2s1(a, b, c1, n)
subroutine vdot3(dot, u1, u2, u3, v1, v2, v3, n)
subroutine mxm(a, n1, b, n2, c, n3)
subroutine cdtp(dtx, x, rm2, sm2, tm2, isd)
subroutine opdssum(a, b, c)
subroutine opdiv(outfld, inpx, inpy, inpz)
subroutine opcolv(a1, a2, a3, c)
subroutine ophx(out1, out2, out3, inp1, inp2, inp3, h1, h2)
subroutine ctolspl(tolspl, respr)
subroutine opadd2(a1, a2, a3, b1, b2, b3)
subroutine dudxyz(du, u, rm1, sm1, tm1, jm1, imsh, isd)
subroutine opchsgn(a, b, c)
subroutine opsub2(a1, a2, a3, b1, b2, b3)
subroutine oprzero(a, b, c)
subroutine opgrad(out1, out2, out3, inp)
subroutine hsolve(name, u, r, h1, h2, vmk, vml, imsh, tol, maxit, isd, approx, napprox, bi)
subroutine comp_sij(sij, nij, u, v, w, ur, us, ut, vr, vs, vt, wr, ws, wt)
subroutine crespsp(respr)
subroutine op_curl(w1, w2, w3, u1, u2, u3, ifavg, work1, work2)
subroutine cresvsp_weak(resv1, resv2, resv3, h1, h2)
subroutine redo_split_vis
subroutine sumab(v, vv, vvlag, ntot, ab_, nab_)
subroutine opadd2cm(a1, a2, a3, b1, b2, b3, c)
subroutine cresvsp(resv1, resv2, resv3, h1, h2)
subroutine col_mu_sij(w1, w2, w3, ta1, ta2, ta3, sij, nij)
subroutine faccl2(a, b, iface1)
subroutine faccl3(a, b, c, iface1)
subroutine sethlm(h1, h2, intloc)