[Nek5000-users] how to dump drag and lift in a file

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Mar 4 19:01:20 CST 2014


Hi Tubois,

The normal way would be to not have your results go to the screen
(which is in any case slow), but to redirect stdout to a file, as
the nekb and nekbmpi scripts do.  ("b" is for background).

I would normally do the following:

nekbmpi blah 8

...

grep dragx logfile > t.x

and then plot the contents of t.x.  Here, blah is my session name.


If you don't like that option (but, really, you should in anycase
redirect stdout), you can copy the common block ctorq from navier5.f
into your userchk subroutine and then have something like:

       common /ctorq/ dragx(0:maxobj),dragpx(0:maxobj),dragvx(0:maxobj)

       call torque_calc(scale,x0,.false.,.false.)

       if (nid.eq.0) write(14,1) istep,time,dragx(1)
     1 format(i9,1p2e17.9)


Best,

Paul


On Tue, 4 Mar 2014, nek5000-users at lists.mcs.anl.gov wrote:

> Hi, nek users,
>
> Instead of letting the function torque_calc dumping the drag lift and
> torque on screen, how can I have the them dumped to a file? Thank you.
>
> Best regards
>
> Tubois
>


More information about the Nek5000-users mailing list