Periodicity in Buyoncy driven flows

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
fahad
Posts: 26
Joined: Fri Jun 03, 2016 10:42 am

Periodicity in Buyoncy driven flows

Post by fahad »

Hi there:

I need help with periodic boundaries setup. I am having difficulty understanding translation vector and selection criteria.

My Case:

I have a pure natural convection case between two parallel plates. Flow is driven through boussinesq approximation hence no pressure gradient is required. I have successfully run this case. I only need to make vertical edges periodic so that I can take into account infinitely long parallel plates to remove edge effects. The edges are named "L" and "R". And domain is 1 meter long horizontally and plates are 0.05m apart with a depth of 0.01m.

How to determine the translation vector? (is there any method?)
What should be selection criteria? ("L" or "R" OR "L" and "R").

I randomly ran this case with translation vector (1,0,0) and ("L" or "R" selection criteria), the listing file gets stuck at writing mesh output even though it shows edges as internal faces. Listing file is attached. Thanks.
Attachments
listing.zip
(7.41 KiB) Downloaded 410 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Periodicity in Buyoncy driven flows

Post by Yvan Fournier »

Hello,

You parallel joining seems OK, so your syntax is good. The crash may be due to more subtle issues. If/when you interrupt your computation, do you have a backtrace in error* files ?

Did you test on a debug build, which has more instrumentation ?

Could you upgrade to 3.0.8 to include bug fixes ?

Regards,

Yvan
fahad
Posts: 26
Joined: Fri Jun 03, 2016 10:42 am

Re: Periodicity in Buyoncy driven flows

Post by fahad »

Hi Yvan:

No, there is no backtrace error file if I interrupt. If you remember, I upgraded CS to CS 4 but it messed up CAE Linux installation so bad that I basically had to re-install. Same happens if I upgrade ubuntu. Basically, its an issue at my end due to lack of linux know-how and lack of on-site linux technical support.
So for the time being, I request you to kindly briefly explain how translation vector (magnitudes and directions) and selection criteria are decided for a given case.

Thanks again
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Periodicity in Buyoncy driven flows

Post by Yvan Fournier »

Hello,

The translation vector is determined by your geometry. Your selection criteria should include faces on both sides of the periodic joining (such as "L or R" to include both L and R).

Regards,

Yvan
fahad
Posts: 26
Joined: Fri Jun 03, 2016 10:42 am

Re: Periodicity in Buyoncy driven flows

Post by fahad »

thanks yvan, selection criteria is clear to me but i am still clueless about the translation vector. Is there any document/tutorial/manual you can refer me to to understand what for example 1 in (1,0,0) physically mean or refer to and how it came about?. Thanks
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Periodicity in Buyoncy driven flows

Post by Yvan Fournier »

Hello,

I'm not sure I understand your question. You define the periodicity vector (assuming translation) when you define your mesh. The vector given to Code_Saturne must simply match that of your geometry and mesh. There are a few details and diagrams describing construction in the theory manual.

Regards,

Yvan
fahad
Posts: 26
Joined: Fri Jun 03, 2016 10:42 am

Re: Periodicity in Buyoncy driven flows

Post by fahad »

Hi Yvan, thanks.
I have been working on the buoyancy driven flows in rectangular cavities for sometime now. i am facing a difficulty that does not seem to resolve. It is related to interpreting code-saturne results. I would be really thankful if you could share anything that could help because i am really stuck.

My Objective: compute wall heat flux to determine convection coefficient.
Specifics: Since the heat flux distribution along the wall is not uniform, i need to find a spatial average value of wall heat flux.

What i do & issues: I import results.case file in paraview and it displays a multi-block data set which has partial arrays. Which means code-saturne provides both fluid and boundary domain informations. I do not know how code-saturne writes boundary data like for example input-thermal-flux? The wall has no thickness and it is certainly not meshed. Are these interpolated values from the nearest cell centers? But then how come wall only properties be obtained from fluid domain?

Then in order to find spatial average, I first extract boundary block. Then I need to apply interpolate variables filter and for that i need a slice which does not work if the slice is through the wall. I workaround using plot over a line filter and then interpolate variables. In either case, I must first apply cell data to point data filter. Here comes the biggest issue: as soon as i apply this filter, my data range for input-thermal-flux is halved when compared to data range displayed at extract block stage for example or even before that.

My calculated convection coefficient using original data range is in very good agreement with the analytical one but not with the cell data to point data filter applied. Keeping the original data range I have no apparent way to calculate spatial average or for that matter any useful filter. The most I have been able to do is apply cell center filter to boundary block extracted and then save data and then open it up in spreadsheet and then find average which is what i expect. But then how come a cell center filter means to a boundary block?

Sorry for the mess but I would really appreciate if you could guide me in finding the answers or any alternate way. If i post this in any paraview forum, it would loose its connection to code saturne hence posting here.

Thanks
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Periodicity in Buyoncy driven flows

Post by Yvan Fournier »

Hello,

The wall data output by Code_Saturne is based on turbulent wall law computations (assuming you are using a turbulence model). If you need an exchange coefficient, you may want to look at the user Nusselt calculation example (check under Doxygen or in a case's USER_EXAMPLES directory). You may also output T+ and T*, which may be useful combined with the wall flux. This will provide you more consistent results than repeatedly interpolating with ParaView.

Regards,

Yvan
fahad
Posts: 26
Joined: Fri Jun 03, 2016 10:42 am

Re: Periodicity in Buyoncy driven flows

Post by fahad »

Hi Yvan

thanks for relying. My case is laminar. yes i want to estimate exchange coefficient h. Wall heat flux qwall is unknown. Delta T (temperature difference) between horizontal walls is known. I looked deeply into that nusselt subroutine you mentioned. It does not work for an unknown qwall: atleast this is what i learned since there is no user documentation for that.

I just want to know if there is anyway we can output qwall from code saturne without third party post processing softwares? If so please guide.
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Periodicity in Buyoncy driven flows

Post by Yvan Fournier »

Hello,

You probably need to go back to the definition of the wall exchange coefficient. If you know the bulk inlet velocity and temperature, as well as the mean outside temperature and total/mean heat flux, you can determine the exchange coefficient.

If you need more local values, things get much more complicated, as for a given heat flux, if the temperature gradient relative to the wall is not constant (and it usually is not), the effective exchange coefficient varies with distance to the wall, so it is effectively a 3D quantity (which is quite artificial)

Regards,

Yvan
Post Reply