CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Temperature dependant heat flux BC (https://www.cfd-online.com/Forums/cfx/191940-temperature-dependant-heat-flux-bc.html)

VRam August 24, 2017 22:08

Temperature dependant heat flux BC
 
I am carrying out HVAC flow and thermal analysis in a box like region and my domain is the interior of the box - domain boundaries are the inner walls of the box. The input that i have is the outer wall temperature of the box. I tried giving a heat flux boundary condition at the wall using the expression

(Thermal conductivity of wall)*(Outerwall temp - Temperature)/(wall thickness)

Temperature - CEL Variable. temperature computed by the solver at the wall, the other terms are fixed values

The solution diverges very rapidly. I get either a "overflow" error or "density out of bounds" error

Is there something fundamentally wrong about such a boundary condition? If not is are there some tweaks to acheive convergence with such boundary conditions?

ghorrocks August 24, 2017 23:45

Not, there is nothing fundamentally wrong with this approach. In fact I have used it many times myself so similar approaches have worked for me.

But you are changing the numerical stability of the system, so you may need double precision numeric, tighter convergence tolerance or smaller time steps to converge. Of course this assumes you have the maths correct - if your maths is wrong and you have not applied the boundary correctly then it will never converge.

Opaque August 25, 2017 00:21

Whenever you use a non-linear boundary condition, i.e. q_outer_wall =
f(T_inner_wall), you must linearize respect to the solution variable.

Keep in mind the solution variable for ANSYS CFX is enthalpy, h. Then, here it goes

q_outer_wall = K * (T_outer - T) / Thickness

d q_outer_wall/dh = - K / Thickness * dT/dh = -K /Thickness * (1/Cp_fluid)

Question: how do we introduce the linearization coefficient in the setup?
Answer: add an Energy boundary source on the boundary, set the Flux strength to 0, and the Flux Coefficient = - K / (Cp_fluid * Thickness)

You should be able to converge monotonically w/o any issues.

Hope you understand that using q = K * (T_outer - T ) / Thickness you are making the assumption the heat flow is 1-dimensional normal to the wall. Such approximation is a function of the thermal conductivity ratio between the fluid and the solid and aspect ratio of the wall.

Hope the above helps,

VRam August 25, 2017 02:31

Quote:

Originally Posted by ghorrocks (Post 661765)
Not, there is nothing fundamentally wrong with this approach. In fact I have used it many times myself so similar approaches have worked for me.

But you are changing the numerical stability of the system, so you may need double precision numeric, tighter convergence tolerance or smaller time steps to converge. Of course this assumes you have the maths correct - if your maths is wrong and you have not applied the boundary correctly then it will never converge.

Thanks Glenn. I'll try the double precision and see if it works. This is a steady state problem - Do you think using a lower timescale would help?

I do think that I have the rest of the maths correct because the solution runs when I give a fixed heat flux as the BC at the wall. The maths at this particular location is whatever I had described.

VRam August 25, 2017 02:46

Quote:

Originally Posted by Opaque (Post 661767)
Whenever you use a non-linear boundary condition, i.e. q_outer_wall =
f(T_inner_wall), you must linearize respect to the solution variable.

Keep in mind the solution variable for ANSYS CFX is enthalpy, h. Then, here it goes

q_outer_wall = K * (T_outer - T) / Thickness

d q_outer_wall/dh = - K / Thickness * dT/dh = -K /Thickness * (1/Cp_fluid)

Question: how do we introduce the linearization coefficient in the setup?
Answer: add an Energy boundary source on the boundary, set the Flux strength to 0, and the Flux Coefficient = - K / (Cp_fluid * Thickness)

You should be able to converge monotonically w/o any issues.

Hope you understand that using q = K * (T_outer - T ) / Thickness you are making the assumption the heat flow is 1-dimensional normal to the wall. Such approximation is a function of the thermal conductivity ratio between the fluid and the solid and aspect ratio of the wall.

Hope the above helps,



Thanks Opaque. I'll try this out. I still have one question. Where does the outer wall temperature figure in such a setup. What would the thermal boundary condition at the wall be?

I am also not sure that I fully understood the linear Vs non-linear BC.

Assume that instead of heat flux BC, I gave a temperature BC at the same wall as
Outer Wall Temp - Wall Heat Flux*thickness/k
Would it work as T here is a linear function of a solution variable?

ghorrocks August 25, 2017 02:55

The approaches I described will only work if the effect is small so it is numerically stable regardless. Opaque's answer is more general - as he is talking about how the condition you are adding is linearised for the solver. So it is not the linear/non-linear nature of the BC he is talking about, it is whether the solver has linearised your boundary correctly so it will converge robustly.

Rewriting the equation to give temperature rather than heat flux will not help. The linearisation of the solver is unchanged.

Opaque August 25, 2017 12:24

I may have misunderstood the question a bit.

You can also use the Heat Transfer Coefficient option since

Q_wall = K/Thickness * (T_outer - T_inner)

Just provide

Outside Temperature = T_outer

Heat Transfer Coefficient = K / Thickness

The software should take care of the rest.

haideralshami August 26, 2017 21:37

thank for all
how can i input heat flux for persons and lights ....to cfx ansys

ghorrocks August 27, 2017 05:39

If this is for a HVAC simulation and the only thing which is important is the heat load then you can add these as source points.


All times are GMT -4. The time now is 12:42.