[Nek5000-users] Read file without using load_fld nor mfi subroutines

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue May 30 08:54:20 CDT 2017


Hi;
The easies solution would be to copy your velocity and pressure to 
temporary arrays before reading the file and placing them back later on. 
e.g.

       real tmp_vel(lx1*ly1*lz1*lelv,ldim), tmp_pr(lx2*ly2*lz2*lelv)
       common /SCREV/ tmp_vel, tmp_pres
       integer n_tot


       call opcopy(tmp_vel(1,1),tmp_vel(1,2),tmp_vel(1,ndim),vx,vy,vz)
       n_tot = nx2*ny2*nz2*nelv
       call copy(tmp_pr,pr)

!     read file and use variables

       call opcopy(vx,vy,vz,tmp_vel(1,1),tmp_vel(1,2),tmp_vel(1,ndim))
       n_tot = nx2*ny2*nz2*nelv
       call copy(pr,tmp_pr)


Regards
Adam

On 30/05/17 15:32, nek5000-users at lists.mcs.anl.gov wrote:
> Hi Neks,
>
> I may have a problem when I'm trying to read velocity field (only 
> velocity field, I don't need pressure.) so I can assign specific 
> boundary conditions using userbc().
>
> My questions are : 1) Is it possible to read velocity fields in nek 
> that are contained in .f000* files without modifying the pressure "pr" 
> nor the velocity fields "vx,vy,vz" ?
>                               2) Is there any subroutine (besides 
> load_fld or mfi) that would allow me to read .f000* files?
>
>
> When I use the mfi (in ic.f) subroutine, it looks like the pressure 
> field is modified and hence I'm quickly running into errors like the 
> following:
>
> 100 **ERROR**: Failed in HMHOLTZ: VELX          NaN          NaN 
> 1.0000E-12.
>
> If I use load_fld() I seem to me going back to the initial conditions.
>
> Thank you for your help,
>
> Arnold
> _______________________________________________
> 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