[Nek5000-users] Residuals

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Jun 15 09:44:39 CDT 2010


PS - I forgot to divide by dt in the routine below.

      To do this,


      dti = 1./dt
      call opcmult(uo,vo,wo,dti)

      after opcopy


On Tue, 15 Jun 2010, nek5000-users at lists.mcs.anl.gov wrote:

>
> JC,
>
> Given that (v,u_t) = (v,r), where r is the residual, I would
> assume that you can get the desired residual estimate by looking
> at u_t := du/dt ~= || u^n - u^n-1 || / dt ?
>
> Typically, I would do this in userchk, creating a set of variables
> in a common block, e.g.
>
>      parameter (lt=lx1*ly1*lz1*lelt)
>      common /vold/ uo(lt),vo(lt),wo(lt)
>      real linf,l2,h1,semi
>
>      n = nx1*ny1*nz1*nz1*nelv
>
>      if (istep.gt.0) then
>         call opsub2 (uo,vo,wo,vx,vy,vz)
>         call normvc (h1,semi,l2,linf,uo,vo,wo)
>         if (nid.eq.0) write(6,1) istep,time,h1,semi,l2,linf
>    1    format(i8,1p5e13.6,' resnorm')
>      endif
>      call opcopy (uo,vo,wo,vx,vy,vz) ! Save current velocity
>
>
> Then "grep resnorm logfile > t.t"  would put the time history
> of this quantity into the file t.t, assuming your stdout is
> directed to logfile.
>
> Paul
>
>
> On Tue, 15 Jun 2010, nek5000-users at lists.mcs.anl.gov wrote:
>
>> Hi Nek's,
>> 
>> I have a question concerning residuals.
>> I wanna run a calculation that yields to a stationnary flow. In order to be 
>> sure that my calculation has converged, I'd like to see the residuals.
>> How/where could I output them ?
>> 
>> Regards,
>> JC
>> _______________________________________________
>> Nek5000-users mailing list
>> Nek5000-users at lists.mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>



More information about the Nek5000-users mailing list