Scalar and outlet problem

173 views
Skip to first unread message

Mike Good

unread,
Oct 17, 2022, 7:21:10 PM10/17/22
to Nek5000
Hello Nek,

I am simulating a simple channel that flows over a rough bed. My simulation diverges when the injected scalar in the channel reaches the outlet. How can I solve this issue?

How can I apply the sponge or other method to my problem?

Thanks
Mike

Ricardo

unread,
Oct 26, 2022, 3:20:56 PM10/26/22
to Nek5000
Hi Neks, I also have a problem with the outflow divergence for the scalar field.
I wonder if anyone knows how to extend the velocity sponge zone to multiple scalar fields, or perhaps if anyone knows of a reference work for such a numerical technique.

Ricardo

Fischer, Paul

unread,
Oct 26, 2022, 3:26:57 PM10/26/22
to Ricardo, Nek5000
calling turb_outflow in userchk() generally works for channel/pipe flows
---both for scalars and velocity.  It's not great for boundary-layer flows
but often can work with some minor effort.  

From the navier5.f source code:

c-----------------------------------------------------------------------

      subroutine turb_outflow(d,m1,rq,uin)


c     . Set div U > 0 in elements with 'O  ' bc.

c

c     . rq is nominally the ratio of Qout/Qin and is typically 1.5

c

c     . uin is normally zero, unless your flow is zero everywhere

c

c     . d and m1 are work arrays of size (lx1,ly1,lz1,lelt), assumed persistant

c

c     This routine may or may not work with multiple outlets --- it has

c     not been tested for this case.

c

c

c     TYPICAL USAGE -- ADD THESE LINES TO userchk() in your .usr file:

c                      (uncommented)

c

c     common /myoutflow/ d(lx1,ly1,lz1,lelt),m1(lx1*ly1*lz1,lelt)

c     real m1

c     rq  = 2.

c     uin = 0.

c     call turb_outflow(d,m1,rq,uin)

c


ref. is here:

Computer methods in applied mechanics and engineering 196 (31-32), 3049-3060


hth,
Paul


From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of Ricardo <rasf...@gmail.com>
Sent: Wednesday, October 26, 2022 2:20 PM
To: Nek5000 <nek...@googlegroups.com>
Subject: [nek5000] Re: Scalar and outlet problem
 
--
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/68b0ffd0-13a4-4f5a-83fb-c324e2d37db3n%40googlegroups.com.

Ricardo

unread,
Oct 27, 2022, 2:38:29 PM10/27/22
to Nek5000
Hello Paul,

Thank you for your quick reply.
Indeed, it seems to be a great solution. Unfortunately, in all cases where I add these lines, the code crashes at the first time step.
Is there any way to check the routine? Am I missing something else?

Thank you for your time,
R

Fischer, Paul

unread,
Oct 27, 2022, 2:57:20 PM10/27/22
to Ricardo, Nek5000
What is the size of your domain and the magnitude of the velocity?

There may be a scaling issue (though I tried to make it scale independent)

Sent: Thursday, October 27, 2022 1:38 PM
To: Nek5000 <nek...@googlegroups.com>
Subject: Re: [nek5000] Re: Scalar and outlet problem
 
Reply all
Reply to author
Forward
0 new messages