[Nek5000-users] does load_fld() work with .f00* files ?? (default binary files)
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Oct 11 07:29:19 CDT 2012
PS:
- ncli is an integer I have defined as parameter earlier in usrchck.
- it actually seems like useric subroutine is called at some point
zeroing out all my vx,vy,vz. I have tried specifying ux = 1234 in useric
and then re-run the code and I get uvwpt min 1234 ...
- when I want to load just one single file using the restart option in
blah.rea, it works just fine.
On 11 October 2012 14:10, <nek5000-users at lists.mcs.anl.gov> wrote:
> Hi Nek's,
>
> I have some troubles with the load_fld subroutine. It seems to load the
> files I want, however it sets everything (vx, vy, vz) to zero...
> Here is what I have in my usrchk routine:
>
> n = nx1*ny1*nz1*nelt
> ifto = .true.
>
> if(nid.EQ.0) then
>
> open(unit=199,file='file.list',form='formatted',status='old')
> read(199,'(A80)') (filename(i),i=1,ncli+1)
> close(199)
> endif
>
> call bcast(filename,(ncli+1)*80)
>
> do i = 1,ncli+1
> call load_fld(filename(i))
> if(nid.EQ.0) write(*,*) 'File', filename(i), 'loaded.'
> call lambda2(t(1,1,1,1,1))
> call outpost(vx,vy,vz,pr,t,'PRT')
> enddo
>
> And here is what I get in my logfile for the first file for instance:
>
> nsteps=0 -> skip time loop
> running solver in post processing mode
>
> call userchk
> set initial conditions
> nekuic (1) for ifld 1
> call nekuic for vel
> xyz min 0.0000 0.0000 0.0000
> uvwpt min 0.99960E-20 0.99960E-20 0.99960E-20 0.0000
> 0.99960E-20
> PS min 0.0000 0.0000 0.99000E+22
> xyz max 1.0000 1.0000 1.0000
> uvwpt max 0.80000E-19 0.80000E-19 0.80000E-19 0.0000
> 0.80000E-19
> PS max 0.0000 0.0000 -0.99000E+22
> done :: set initial conditions
>
> File prtcav0.f00001 loaded.
>
> Have I been doing something wrong using the load_fld routine?
>
> Regards,
>
>
> On 12 March 2012 13:00, <nek5000-users at lists.mcs.anl.gov> wrote:
>
>> nek5000-users at lists.mcs.anl.**gov <nek5000-users at lists.mcs.anl.gov> a
>> écrit :
>>
>> Hi everyone, i am trying to post process some data but it seems load_fld
>>> doesn't load the velocity field correctly.
>>> My binary files are default .f00* files (param(66)=param(67)=0)
>>> I want to recalculate the vortex size (aa in my code) in a 2D case.
>>> So here is what i want my userchk() to do
>>> Open one by one .f00* files,
>>> Calculate the vorticity field from velocity field
>>> Restrain the domain to avoid Boundary conditions
>>> Calculate the circulation
>>> Calculate The vorticity barycenter coordinates
>>> Calculate The vorticity Size (aa)
>>> Output to "Rayon_Circulation_domaine_**entier" file the quantity
>>> sqrt(aa)
>>> Does load_fld() work only with .fld files ?? Because with this i got
>>> only negative values for the vorticity size and the circulation value is
>>> not good
>>> B.regards
>>> Can
>>>
>>>
>>>
>>> My post-precessing part in my userchk() is like
>>>
>>> ! read file-list
>>> if (nid.eq.0) then
>>> open(unit=199,file='file.list'**
>>> ,form='formatted',status='old'**)
>>> read(199,*) nfiles
>>> read(199,'(A80)') (filename(j),j=1,nfiles)
>>> close(199)
>>> endif
>>> call bcast(nfiles,isize)
>>> call bcast(filename,nfiles*80) do j = 1,nfiles
>>> call load_fld(filename(j))
>>> call comp_vort3(vort,work1,work2,**vx,vy,vz)
>>> do i=1, ntot
>>> if((abs(xm1(i,1,1,1))<14.9) .and. (abs(ym1(i,1,1,1))<14.9))
>>> & then x_new(i)=xm1(i,1,1,1)
>>> y_new(i)=ym1(i,1,1,1)
>>> rId(i)=1.0
>>>
>>> else
>>>
>>> x_new(i)=0.0
>>> y_new(i)=0.0
>>> rId(i)=0.0
>>>
>>> endif
>>>
>>> enddo
>>> circ=glsc3(rId,bm1,vort(1,1),**ntot)
>>> x_c=glsc3(x_new,bm1,vort(1,1),**ntot)/circ
>>> ! Calculation of vorticity barrycenter
>>> y_c=glsc3(y_new,bm1,vort(1,1),**ntot)/circ
>>>
>>> do i=1, ntot
>>> if((abs(xm1(i,1,1,1))<14.9) .and. (abs(ym1(i,1,1,1))<14.9))
>>> & then rr(i)=(xm1(i,1,1,1)-x_c(1))**2 + (ym1(i,1,1,1)
>>> & -y_c(1))**2
>>> else
>>> rr(i)=0.0
>>> endif
>>> enddo
>>>
>>> aa=glsc3(rr,bm1,vort(1,1),**ntot)/circ
>>> ! Calculation of vorticity size
>>> print*,'aa=',aa
>>> if (nid.eq.0) then
>>> open(UNIT=1,FILE='Rayon_**Circulation_domaine_entier',**STATUS='unknown')
>>> !Output to 'Rayon_Circulation_domaine_**entier' file
>>> write(1,'(1p20E15.7)') time,sqrt(aa),circ
>>> endif
>>> enddo
>>> !we are done
>>> call exitt
>>> c ==============================**==============================**
>>> ==============================**=======================
>>>
>>> ______________________________**_________________
>>> Nek5000-users mailing list
>>> Nek5000-users at lists.mcs.anl.**gov <Nek5000-users at lists.mcs.anl.gov>
>>> https://lists.mcs.anl.gov/**mailman/listinfo/nek5000-users<https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>
>>>
>> Well sorry for this, load_fld() works great with .f00* files
>> Le problem was related to my grid in the domain which was not tight
>> enough for x>10
>> Thx anyways
>>
>> ______________________________**_________________
>> Nek5000-users mailing list
>> Nek5000-users at lists.mcs.anl.**gov <Nek5000-users at lists.mcs.anl.gov>
>> https://lists.mcs.anl.gov/**mailman/listinfo/nek5000-users<https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>
>>
>
>
>
> --
> Jean-Christophe
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>
--
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20121011/6176dbf7/attachment-0001.html>
More information about the Nek5000-users
mailing list