gradm1 vs opdiv for computing velocity divergence
Dear all, I am new to Nek5000 and am trying to output the velocity divergence of my 2D, unsteady N-S solution for a flat plate with elliptic leading edge using PN-PN-2 formulation. I compute divergence using gradm1() and opdiv() and the values I get from the two don't seem to match the DIVERGENCE and HELMHOLTZ (p021 and p022) residuals in the .rea file (which are 1e-9 and 1e-11). I get div ~ 1 using gradm1() and div~1e-2 using opdiv() and the divergence is close to the elliptic leading edge. Am I missing something(scaling factor maybe?) in the computation of divergence here? subroutine userchk include 'SIZE' include 'TOTAL' common /scren/ vort (lx1,ly1,lz1,lelv,3) ! x y z components $ , work1(lx1,ly1,lz1,lelv) $ , work2(lx1,ly1,lz1,lelv) $ , dudx(lx1,ly1,lz1,lelv) $ , dvdy(lx1,ly1,lz1,lelv) $ , div1(lx1,ly1,lz1,lelv) $ , div2(lx2,ly2,lz2,lelv) $ , div3(lx1,ly1,lz1,lelv) n = nx1*ny1*nz1*nelt ntot2 = nx2*ny2*nz2*nelt c Compute divergence using gradm1() call gradm1(dudx,work1,work2,vx) call gradm1(work1,dvdy,work2,vy) div1 = dudx + dvdy c Compute divergence using opdiv() call opdiv(div2,vx,vy,vz) c opdiv returns bm2*div call col2(div2,bm2inv,ntot2) call mappr(div3,div2,work1,work2) if(nid .eq.0)write(6,*)'Done mapping div2 to xm1' call outpost(div1,div3,vx,pr,vort(:,:,:,:,1), & 'divvort') return end This is from the output file showing the DNORM, DIVEX Step 2, t= 4.0340639E+00, DT= 1.0892282E-04, C= 0.500 2.1168E+01 2.1168E+01 Solving for fluid F T T 9.999999999999999E-012 p22 2 1 2 Hmholtz VELX: 42 6.4400E-12 8.2479E-02 1.0000E-11 9.999999999999999E-012 p22 2 1 2 Hmholtz VELY: 40 6.3878E-12 9.2957E-02 1.0000E-11 2 U-PRES gmres: 120 6.0275E-08 1.0000E-09 6.4717E-04 5.7658E+00 1.6938E+01 2 DNORM, DIVEX 6.027476742433520E-008 6.027476742402435E-008 2 4.0341E+00 2.0912E+01 Fluid done Thanks Prahladh Iyer Postdoctoral Researcher National Institute of Aerospace, Hampton, Virginia Resident: NASA Langley Research Center Email : [email protected]
participants (1)
-
nek5000-users@lists.mcs.anl.gov