[Nek5000-users] [*] Re: [*] Re: Postprocessing

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Mar 31 09:32:51 CDT 2010


Mani,

yes comp_vort3() works for 2D and 3D. 
The reason why your vorticity seems to be ZERO is simple.:

If you call outpost(fld1,fld2,fld3,fld4,fld5,'foo') in 2D you'll dump effectively {fld1,fld2,fld4,fld5}. The 'z-velocity' (here fld3) is missing in 2D. 

However vort(1,3) is the only non-trivial component in 2D!

There is an easy fix:
Put vort(1,3) first in the argument list of outpost() and then visualize the vorticity using the x-velocity variable in VisIt.

hth,
Stefan
 

On Mar 31, 2010, at 4:14 PM, nek5000-users at lists.mcs.anl.gov wrote:

> Dear Paul,
> 
>    Does the code that you gave to output vorticity work for 2D too? I'm trying to simulate a lid driven cavity at Re=10000 and the velocity seems fine but nothing shows up on the vorticity plot (I've attached both of them).
> 
> Mani chandra
> 
> On 03/27/2010 06:13 PM, nek5000-users at lists.mcs.anl.gov wrote:
>> 
>> Hi Mani,
>> 
>> Nek currently supports only a few output fields:
>> 
>> X, V, p, T, ps1, ... ,psn
>> 
>> X = coords
>> V = velocity
>> p = pressure
>> T = temperature
>> psj = jth passive scalar
>> 
>> The call
>> 
>>       call outpost(vort(1,1),vort(1,2),vort(1,3),pr,t,'vrt')
>> 
>> would generate a file "vrtmycase0.f..." with vorticity
>> components in place of V=(vx,vy,vz).
>> 
>> To view these with visit, load the vrt... file and request
>> to look at "velocity"  (VisIt thinks the field is a velocity
>> field).
>> 
>> Paul
>> 
>> 
>> On Sat, 27 Mar 2010, nek5000-users at lists.mcs.anl.gov wrote:
>> 
>>> On 03/24/2010 09:58 PM, nek5000-users at lists.mcs.anl.gov wrote:
>>>> 
>>>> Mani,
>>>> 
>>>> It somewhat depends on what you're after.
>>>> 
>>>> You can use postx and compute the vorticity there --- it is
>>>> only 32 bit but it does allow you to compute the vorticity
>>>> for any existing velocity data in the (older) .fld file
>>>> output format.
>>>> 
>>>> Alternatively, if you're using VisIt or some other analysis
>>>> tool, or doing run-time analysis, you can compute the vorticity
>>>> at runtime.  If you wish to output the vorticity field, you can
>>>> do so, e.g., as follows:
>>>> 
>>>> c----------------------------------------------------------------------- 
>>>>      subroutine userchk
>>>>      include 'SIZE'
>>>>      include 'TOTAL'
>>>> 
>>>>      parameter(lt=lx1*ly1*lz1*lelv)
>>>>      common /scrns/ vort(lt,3),w1(lt),w2(lt)
>>>> 
>>>>      if (mod(istep,iostep).eq.0) then
>>>>         call comp_vort3(vort,w1,w2,vx,vy,vz)
>>>>         call outpost(vort(1,1),vort(1,2),vort(1,3),pr,t,'vrt')
>>>>      endif
>>>> 
>>>>      return
>>>>      end
>>>> c----------------------------------------------------------------------- 
>>>> 
>>>> 
>>>> This would generate an output "vrtmy_case..." if your .rea file is
>>>> my_case.rea
>>>> 
>>>> Any of the post-processing tools could then read the vrt.... files
>>>> and treat the vorticity as the velocity vector field.
>>>> 
>>>> As I say, not exactly sure what you have in mind, but this is one
>>>> possible approach.
>>>> 
>>>> Paul
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Wed, 24 Mar 2010, nek5000-users at lists.mcs.anl.gov wrote:
>>>> 
>>>>> Dear Nek devs,
>>>>> 
>>>>>   I'm a bit confused regarding postprocessing. Is one supposed to run a simulation and then run nek5k again to load the fld files using load_fld() for postprocessing? Or can one compute the desired quantities after every time step using userchk() and then output them in a file? For example, how can I compute the vorticity using the differential operators defined in the code? After computing the vorticity, can it be outputted using the same fld files?
>>>>> 
>>>>> Regards,
>>>>> Mani chandra
>>>>> _______________________________________________
>>>>> Nek5000-users mailing list
>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>> 
>>>> _______________________________________________
>>>> Nek5000-users mailing list
>>>> Nek5000-users at lists.mcs.anl.gov
>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>> 
>>> Dear Paul,
>>> 
>>>   The files generated by the code in usr_chk(), vrtmy_case0.f* do not seem to have vorticity in them when I view them in Visit through the database file. They only seem to have pressure, x, y, z components of velocity and the velocity magnitude. Could something be wrong?
>>> 
>>> Mani chandra
>>> _______________________________________________
>>> Nek5000-users mailing list
>>> Nek5000-users at lists.mcs.anl.gov
>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>> 
>> _______________________________________________
>> Nek5000-users mailing list
>> Nek5000-users at lists.mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>> 
> 
> <velocity.png><vorticity.png><Mail Attachment.txt>




More information about the Nek5000-users mailing list