Compute the flux of scalar through the outlet boundary

73 views
Skip to first unread message

Pau Fradera

unread,
Oct 1, 2023, 8:54:08 PM10/1/23
to Nek5000
Dear Community,

I am trying to compute the flux of scalar through the outlet boundary of my computational domain, and output it to a file at every time step.

The outlet boundary is perpenducular to the unit vector in x direction.

The integral I need to compute is the surface integral of "phi * vx", over the outlet surface. Where vx is the x velocity component and phi the scalar.

It would be much appreciated if someone could give me an idea on how to proceed.

I think this can be done using the surface_int( ) subroutine, however I could not find much information about it, and only 1 example ("expansion") from which I would like to ask a question:

Why do we need the lines that do "glsum"? I thought that with that loop over nelv and ndim we are already summing all the elements. Am I wrong?

Furthermore, how do I deal with my case in which the velocity component is in the velocity mesh while the scalar is in the temperataure mesh?

Thank you very much in  advance for your time reading my message.

Sincerely,

Pau Fradera-Soler

Fischer, Paul

unread,
Oct 1, 2023, 10:39:36 PM10/1/23
to Pau Fradera, Nek5000
Dear Pau,

I think the attached will do what you are asking.

The glsum is necessary to get a shared result across all MPI ranks.

hth.

Paul


From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of Pau Fradera <pau.fr...@gmail.com>
Sent: Sunday, October 1, 2023 7:54 PM
To: Nek5000 <nek...@googlegroups.com>
Subject: [nek5000] Compute the flux of scalar through the outlet boundary
 
--
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 on the web visit https://groups.google.com/d/msgid/nek5000/b2dfb2f3-1783-45a6-a609-0889018d34e0n%40googlegroups.com.
flux_out.usr

Pau Fradera

unread,
Oct 3, 2023, 1:30:17 PM10/3/23
to Nek5000
Dear Professor Fischer,

Thank you very much for your reply and for your clarification regarding the glsum.

I tested the code you shared and it seems to be working.

Thanks again.

Sincerely,

Pau Fradera-Soler

El dia diumenge, 1 d’octubre de 2023 a les 19:39:36 UTC-7, fischerp va escriure:
Reply all
Reply to author
Forward
0 new messages