Page 1 of 2

Question about the mapped inlet subroutine

Posted: Tue Mar 27, 2018 3:15 pm
by Jundi He
Hi Code Saturne develop team:

I am simulating a vertical channel downward flow with inlet at the top face (named "top") and outlet at the bottom face (named "bot"), the turbulence model I am using is the k-omega SST model. At each iteration, I need to copy the outlet face (named "bot") velocity field and impose it at the inlet face (named "top"). The vertical distance between the top inlet face and the bottom outlet face is 0.0162m. My mapped inlet subroutine is attached, am I doing it correctly?

Regards!
Jundi

Re: Question about the mapped inlet subroutine

Posted: Tue Mar 27, 2018 5:35 pm
by Jundi He
Hi:

Sorry that I forgot to include the subroutine, this is the mapped inlet subroutine that I used.

Regards!
Jundi

Re: Question about the mapped inlet subroutine

Posted: Wed Mar 28, 2018 11:55 am
by Yvan Fournier
Hello,

It seems OK at a quick glance. Do the results match what you expect ?

Regards,

Yvan

Re: Question about the mapped inlet subroutine

Posted: Tue Apr 03, 2018 11:24 am
by Jundi He
Hi Yvan:

The result doesn't meet my expect, I've checked the outlet and inlet velocity contour, and they are total different, I have exactly the same mesh at the outlet and the inlet, it seems that Code Saturne did not copy the outlet velocity field to the inlet.

Regards!
Jundi

Re: Question about the mapped inlet subroutine

Posted: Tue Apr 03, 2018 10:40 pm
by Yvan Fournier
Hello,

Did you run a sufficient number of iteratons ?

Regards,

Yvan

Re: Question about the mapped inlet subroutine

Posted: Thu Apr 05, 2018 3:58 pm
by Jundi He
Hi Yvan:

Yes, I've run for several thousand iterations, from the monitoring point, the values are converge and stay constant. But still, the outlet and inlet velocity field is different. I guess there are some problems in my subroutine.

Regards!
Jundi

Re: Question about the mapped inlet subroutine

Posted: Fri Apr 13, 2018 4:27 pm
by Jundi He
Hi Yvan:

I guess I know what cause the problem. The contour shows the streamwise velocity of the channel (downward flow, inlet from the top and outlet from the bottom), because of the ribs on the left wall, there are re-circulations near the rib wall. If the subroutine copy the outlet velocity field and impose it to the inlet, it will cause problem, because the inlet boundary condition only allow "inject" but not "extract". Do you have a solution on this? How to copy the outlet velocity field to the inlet in such flow, to make it periodic? Thanks for the time.

Regards!
Jundi

Re: Question about the mapped inlet subroutine

Posted: Fri Apr 13, 2018 4:35 pm
by Yvan Fournier
Hello,

For this case, using a true periodicity condition and a momentum source term to ensure the bulk flow velocity is probably the cleanest solution (this is what we do for our own "ribs" case, with the attached file).

Best regards,

Yvan

Re: Question about the mapped inlet subroutine

Posted: Mon Apr 16, 2018 10:46 am
by Jundi He
Hi Yvan:

I was doing the periodic case with the momentum source term previously, but in this case, I have a constant heat flux on the rib wall, if I do the "true" periodic case, I need to impose a heat sink, which is impossible, because my geometry is an eccentric channel with ribs, the mass flux in different circumferential position is hugely different. Is there a method to impose a negative velocity at the inlet, so that the mapped inlet subroutine can be impose.

Regards!
Jundi

Re: Question about the constant mass flow rate

Posted: Fri Feb 14, 2020 4:14 pm
by s marco
Yvan Fournier wrote: Fri Apr 13, 2018 4:35 pm Hello,

For this case, using a true periodicity condition and a momentum source term to ensure the bulk flow velocity is probably the cleanest solution (this is what we do for our own "ribs" case, with the attached file).

Best regards,

Yvan


Hi Yvan,

Is it possible to impose constant mass flow rate with this subroutine in code_saturne v6? It seems not working due to error ''can't open module file setup.mod''.

Best regards,
Marco