Question about the mapped inlet subroutine

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Question about the mapped inlet subroutine

Post 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
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Question about the mapped inlet subroutine

Post by Jundi He »

Hi:

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

Regards!
Jundi
Attachments
cs_user_boundary_conditions-mapped_inlet.f90
(7.83 KiB) Downloaded 273 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Question about the mapped inlet subroutine

Post by Yvan Fournier »

Hello,

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

Regards,

Yvan
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Question about the mapped inlet subroutine

Post 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
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Question about the mapped inlet subroutine

Post by Yvan Fournier »

Hello,

Did you run a sufficient number of iteratons ?

Regards,

Yvan
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Question about the mapped inlet subroutine

Post 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
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Question about the mapped inlet subroutine

Post 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
Attachments
Screenshot from 2018-04-13 16-16-48.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Question about the mapped inlet subroutine

Post 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
Attachments
cs_user_source_terms.f90
(10.18 KiB) Downloaded 257 times
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Question about the mapped inlet subroutine

Post 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
s marco
Posts: 11
Joined: Fri Feb 14, 2020 3:59 pm

Re: Question about the constant mass flow rate

Post 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
Post Reply