From nek5000-users at lists.mcs.anl.gov Mon Jun 8 11:53:39 2015 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 8 Jun 2015 09:53:39 -0700 Subject: [Nek5000-users] Problem in TurbChannel example Message-ID: ?Hi Neks, I am trying to use standard Smagorinsky model to simulate the flow for my case. For that, we have used comp_gije, comp_sije, mag_tensor_e, cmult, set_grid_spacing subroutines from the turbChannel example to calculate turbulent or eddy viscosity. (I have attached the subroutine here). subroutine eddy_visc(ediff,e) c c Compute eddy viscosity using dynamic smagorinsky model c include 'SIZE' include 'TOTAL' include 'ZPER' real ediff(nx1*ny1*nz1,nelv),cs integer e common /dynsmg/ sij (lx1*ly1*lz1,ldim,ldim) $ , dg2 (lx1*ly1*lz1,lelv) $ , snrm(lx1*ly1*lz1,lelv) real sij,dg2,snrm parameter(lxyz=lx1*ly1*lz1) ntot = nx1*ny1*nz1 call comp_gije(sij,vx(1,1,1,e),vy(1,1,1,e),vz(1,1,1,e),e) call comp_sije(sij) call mag_tensor_e(snrm(1,e),sij) call cmult(snrm(1,e),2.0,ntot) call set_grid_spacing(dg2) if (e.eq.nelv) then ! planar avg and define nu_tau cs = 0.10 ntot = nx1*ny1*nz1*nelv do i=1,ntot cstat = (cs**2.0)*dg2(i,1) ediff(i,1) = param(2) + cstat*snrm(i,1) enddo endif return ? ? end However, we faced some difficulties running our case. We found that when the element distribution is not uniform between the processors (mod (lelg,lp).ne.0) the code freezes in the set_grid_spacing subroutine when Dsavg is called. In order to debug this case we did some tests on TurbChannel example with dynamic Smagorinsky model and we found that this problem also exists there. Thus, it seems that we will be having this problem except from the cases that (mod (lelg,lp).eq.0) and we do not understand the reason for that. Therefore, could you please guide me so that I can deal with this problem? Thanks,? Mahzad *PhD** Mechanical Engineering* *Arizona State University* *School for engineering of matter, transport and energy (SEMTE)* Mahzad Khoshlessan *PhD** Mechanical Engineering* *Arizona State University* *School for engineering of matter, transport and energy (SEMTE)* -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Wed Jun 10 09:34:23 2015 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 10 Jun 2015 16:34:23 +0200 Subject: [Nek5000-users] Newton Message-ID: Hi Nek's I'm trying to code in Nek5000 the Newton algorithm. In order to do so, I'm referring to the Tuckerman's paper "Bifurcation analysis for timesteppers" of 2000. I would like to take advantage from the semi-implicit temporal scheme in order to precondition the Bi-CGStab algorithm to solve the linear problem that carry out the Newton step. As explained in the Tuckerman's paper, in order to get a good preconditioning, I should have a time step with a dt which is about 100 to 1000 times greater than that which ensures the CFL condition. I'm not able to increase the dt has the Helmholtz fails in the projection methods. So, I tried to preconditioning the Bi-CGStab routine with a one step of Stoke problem always with a large dt because if L is the linear operator: U(n+1) = (I-dt*L^-1)U(n) ~ (-dt*L^-1)U(n) but the Helmholtz Helmholtz fails too. I would like to know if I can do somethings like: r0 = K^(-1)*r0 where r0 = is the residue vector in the Bi-CGStab routine and K^(-1) is the inverse of the stiffness matrix. In the stokes problem, using a large DT, H (Helmholtz) tends to the limit K so i could do a matrix-vector problem H^(-1)*r0 if there is a way to call a routine the do this yet for the pressure preconditioning. Can someone please help me? thanks Alessandro PhD student at Dynfluid Laboratory Ecole Nationale Sup?rieure d'Arts et M?tiers de Paris - Paristech -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Tue Jun 30 10:08:01 2015 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 30 Jun 2015 17:08:01 +0200 Subject: [Nek5000-users] Regarding Post-Processing Message-ID: Hi Neks, I would like to post process the 0.f00* files. I set my Nsteps = 0 to run in post processing mode. and used the below code. Can someone tell me how to create the 'file.list' file ? I tried creating a file.list, something like this: ca0.f00001 ca0.f00002 ca0.f00003 . . . . . . but still I get error "Bad integer for item 1 in list input " subroutine userchk include 'SIZE' include 'TOTAL' include 'RESTART' logical if_drag_out,if_torq_out character*80 filename(9999) parameter (lt=lx1*ly1*lz1*lelt) real l2(lx1,ly1,lz1,nelt) integer nfiles ntot = nx1*ny1*nz1*nelv ifreguo = .true. if (nid.eq.0) then open(unit=199,file='file.list',form='formatted',status='old') read(199,*) nfiles read(199,'(A80)') (filename(i),i=1,nfiles) close(199) endif call bcast(nfiles,isize) call bcast(filename,nfiles*80) do i = 1,nfiles call load_fld(filename(i)) call lambda2(L2) ifto = .true. call outpost(vx,vy,vz,pr,l2,'his') enddo call exitt Thanks, Kamal From nek5000-users at lists.mcs.anl.gov Tue Jun 30 10:16:25 2015 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 30 Jun 2015 17:16:25 +0200 Subject: [Nek5000-users] Regarding Post-Processing In-Reply-To: References: Message-ID: Hi Kamal, When you create your file.list, the first line needs to be the number of files you're going to read, and the following lines the file names. For example : 5 file.f00001 file.f00002 file.f00003 file.f00004 file.f00005 Regards, Holly Holly JOHNSON PhD Student ONERA - DAFE D?partement d'A?rodynamique Fondamentale et Exp?rimentale 8, Rue des Vertugadins 92190 - Meudon - France Le 30/06/2015 17:08, nek5000-users at lists.mcs.anl.gov a ?crit : > Hi Neks, > > I would like to post process the 0.f00* files. I set my Nsteps = 0 to > run in post processing mode. > and used the below code. Can someone tell me how to create the > 'file.list' file ? > > I tried creating a file.list, something like this: > > ca0.f00001 > ca0.f00002 > ca0.f00003 > . . > . . > . . > > > but still I get error "Bad integer for item 1 in list input " > > subroutine userchk > include 'SIZE' > include 'TOTAL' > include 'RESTART' > logical if_drag_out,if_torq_out > > > character*80 filename(9999) > parameter (lt=lx1*ly1*lz1*lelt) > real l2(lx1,ly1,lz1,nelt) > integer nfiles > > ntot = nx1*ny1*nz1*nelv > > ifreguo = .true. > > if (nid.eq.0) then > open(unit=199,file='file.list',form='formatted',status='old') > read(199,*) nfiles > read(199,'(A80)') (filename(i),i=1,nfiles) > close(199) > endif > > call bcast(nfiles,isize) > call bcast(filename,nfiles*80) > > do i = 1,nfiles > call load_fld(filename(i)) > call lambda2(L2) > ifto = .true. > call outpost(vx,vy,vz,pr,l2,'his') > enddo > > call exitt > > > Thanks, > Kamal > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Mon Jun 29 12:58:52 2015 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 29 Jun 2015 17:58:52 +0000 Subject: [Nek5000-users] Spectral interpolation of velocity gradients Message-ID: Hi Neks, I study particles in a turbulent flow and need to know velocity gradients dvi_dxj at particle positions x_p. In order to do this, I modified the subroutine interp_v(uvw,xyz,n) from the particle tracking example ''hemi''. First, I calculate the velocity gradients with the subroutine gradm1(): call gradm1(vxx,vxy,vxz,vx) call gradm1(vyx,vzy,vzz,vy) call gradm1(vzx,vzy,vzz,vz) Second, I interpolate the velocity gradients to the particle positions with the subroutine intpts(): call opcopy(wrk(1,1),wrk(1,2),wrk(1,3),vxx,vyx,vzx) call intpts(wrk,ndm,pts,npart,outint,ifjac,ifpts,ihandle) I have a few questions regarding this approach: 1. Is intpts() capable of interpolating derived fields like the velocity gradient field? 2. Do you have a good explanatory reference where the mathematical principles behind intpts() are explained? 3. As far as I understand, the fields vx, vy, vz and consequently the derived fields vxx, vxy, vxz, ... are local and defined on the local coordinate fields xm1, ym1, zm1. What is happens if an interpolation point is on a different processor and outside the coordinates stored in xm1, ym1, zm1? Best regards, Philipp Weiss -------------- next part -------------- An HTML attachment was scrubbed... URL: