Computing drag along a given direction

20 views
Skip to first unread message

Filipe Brandao

unread,
May 26, 2026, 1:27:59 PM (8 days ago) May 26
to Nek5000
I am simulating a flow over a flat plate (x-z plane) and I trying to get drag along x (so averaged only over z). I just want to plot u_tau vs x. Is there a way to compute this without modifying the torque_calc subroutine?

Thanks,
Filipe

Fischer, Paul

unread,
May 27, 2026, 6:52:13 AM (7 days ago) May 27
to Filipe Brandao, Nek5000
Filipe,

Unfortunately, torq_calc returns only a fully-condensed single value (fx, fy, fz; Tx,Ty,Tx) for drag and torque.

Probably best approach:

Spanwise average in z first.  (Several examples exist on how to map (vx , vy , vz ) into (ax,ay,az), where, say,
 ay is a 3D scalar field that is invariant in the spanwise direction - it should be a one-liner... or maybe 6 lines.

Then, take the gradient of that (in nek5000, call gradm1(axx,axy,axz,ax).  The term you want to evaluate
Is axy at y=0.   That is:    < du/dy > (x,y=0,z).    With <a> --> spanwise average.

For that, I suggest to use hpts, with a set of points that are at, say, y=1.e-6 and z=.01 (i.e. not on an element boundary).

Let me know if you need further elaboration. 

I suspect it's about 20-30 lines in userchk() to implement this.

Best,
Paul


From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of Filipe Brandao <filipe....@gmail.com>
Sent: Tuesday, May 26, 2026 12:27 PM
To: Nek5000 <nek...@googlegroups.com>
Subject: [nek5000] Computing drag along a given direction
 
I am simulating a flow over a flat plate (x-z plane) and I trying to get drag along x (so averaged only over z). I just want to plot u_tau vs x. Is there a way to compute this without modifying the torque_calc subroutine?

Thanks,
Filipe

--
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nek5000/ecdb7b9d-94ae-4cde-935a-0f6ff3dff2bdn%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages