BC with convection + radiation to the ambient
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 7
- Joined: Mon Sep 02, 2024 5:17 pm
BC with convection + radiation to the ambient
Hello code_saturne users,
I have a question regarding how to set up a boundary condition with radiation+convection on an external wall.
I'm trying to simulate a hot gas flow through ducts in Code_Saturne. I was wondering how to setup a boundary condition on the wall that combines:
* a heat transfer coefficient + outer temperature (representing the convection between the external wall and the ambient)
* an emissivity at the outer wall + outer temperature (representing the radiation from the externall wall to the ambient)
(* perhaps it would be nice also to include the conduction in the wall, but this may be calculated analytically and included in the heat transfer coefficient mentioned above)
All this WITHOUT simulating the solid. Just simulating the fluid flow.
I was thinking of two different methods:
1. Using the GUI, I tried different combinations of BC for the temperature scalar and for the thermal radiative heat transfer (I included a P1 radiation model, although I don't want it for the fluid, I just want the radiation from the external wall of the duct to the ambient).
However, the "thermal radiative heat transfer" does not seem to have any effect on the temperature distribution on the wall (the wall does not cool down through radiation), although I tried different emissivities, ambient temperatures, even with a conductivity heat flow.
2. I thought of another idea, to use a user law to define the heat flux or the heat transfer coefficient (and for example use the trick h = h_conv + h_rad, where h_rad = sigma * epsilon * (T_wall^4 - T_ambient^4)/(T_wall - T_ambient) ). However, how can one access the temperature value on the wall patch from the user law definition in the GUI ?? It seems to be possible to access only time and space variables.
If this is only possible through the code, could someone please explain the details of how to do it using the code (how to access the temperature value on the patch and to define the heat flux or the heat transfer coefficient based on the temperature) ?
Does someone have an example where they succeeded in applying such a BC?
For the reference, for those who are familiar with it, in ANSYS Fluent, the configuration of such a BC looks like in the attached picture (without conductivity. Just a heat transfer coefficient + an emissivity for the radiation to the ambient).
Thanks.
I have a question regarding how to set up a boundary condition with radiation+convection on an external wall.
I'm trying to simulate a hot gas flow through ducts in Code_Saturne. I was wondering how to setup a boundary condition on the wall that combines:
* a heat transfer coefficient + outer temperature (representing the convection between the external wall and the ambient)
* an emissivity at the outer wall + outer temperature (representing the radiation from the externall wall to the ambient)
(* perhaps it would be nice also to include the conduction in the wall, but this may be calculated analytically and included in the heat transfer coefficient mentioned above)
All this WITHOUT simulating the solid. Just simulating the fluid flow.
I was thinking of two different methods:
1. Using the GUI, I tried different combinations of BC for the temperature scalar and for the thermal radiative heat transfer (I included a P1 radiation model, although I don't want it for the fluid, I just want the radiation from the external wall of the duct to the ambient).
However, the "thermal radiative heat transfer" does not seem to have any effect on the temperature distribution on the wall (the wall does not cool down through radiation), although I tried different emissivities, ambient temperatures, even with a conductivity heat flow.
2. I thought of another idea, to use a user law to define the heat flux or the heat transfer coefficient (and for example use the trick h = h_conv + h_rad, where h_rad = sigma * epsilon * (T_wall^4 - T_ambient^4)/(T_wall - T_ambient) ). However, how can one access the temperature value on the wall patch from the user law definition in the GUI ?? It seems to be possible to access only time and space variables.
If this is only possible through the code, could someone please explain the details of how to do it using the code (how to access the temperature value on the patch and to define the heat flux or the heat transfer coefficient based on the temperature) ?
Does someone have an example where they succeeded in applying such a BC?
For the reference, for those who are familiar with it, in ANSYS Fluent, the configuration of such a BC looks like in the attached picture (without conductivity. Just a heat transfer coefficient + an emissivity for the radiation to the ambient).
Thanks.
-
- Posts: 4164
- Joined: Mon Feb 20, 2012 3:25 pm
Re: BC with convection + radiation to the ambient
Hello,
Do you have a small test case where in.1), the temperature does not seem to change ? Another user reported something similar (bu I have no.details) so I need to check whether this is a subtle case setup issue or whether we may have a bug here.
To see the effect of radiation on.the wall, I think only the thermal BC type involving a balance computation at the wall will/should work for this.
Best regards,
Yvan
Do you have a small test case where in.1), the temperature does not seem to change ? Another user reported something similar (bu I have no.details) so I need to check whether this is a subtle case setup issue or whether we may have a bug here.
To see the effect of radiation on.the wall, I think only the thermal BC type involving a balance computation at the wall will/should work for this.
Best regards,
Yvan
-
- Posts: 7
- Joined: Mon Sep 02, 2024 5:17 pm
Re: BC with convection + radiation to the ambient
Bonsoir Yvan,
Thanks a lot for your quick reply!
I have prepared a simple case with a circular pipe (inlet + outlet + wall), of radius 10mm and length 400mm.
There is a flow of hot gas, entering at 900°C with 10m/s.
There are 3 cases inside, the only difference being in the boundary condition at the wall + radiation model:
* case1: no radiative heat transfer. Wall BC: exchange coefficient (user law) with T=25°C and h=20W/m2/K
A picture with the results is in the attached png file.
* case2: radiative heat transfer P1 (absorption coefficient 1e-06, should not have any effect in what I'm trying to show).
Wall BC: exchange coefficient (user law) with T=25°C and h=20W/m2/K, and for the thermal radiative transfer at the wall: type=fixed exterior temperature, emissivity=0.99, conductivity=300W/m/K (high, so that the conductive thermal resistance is negligible), thickness=0.001m, exterior temperature=300K
-> surprisingly, the temperature drop is SMALLER than in the previous case. I would expect the hot wall to radiate heat to the cold ambient, and so the gas should be further cooled down than in the first case where we only had natural convection !! (is the emissivity referring to the inner side of the wall, i.e. to the radiative heat exchange between the hot gas and the inner pipe wall ? Or is it also referring to the exterior wall in contact with the ambient ?? ... in that case, it would be better to be able to set two different values for the emissivity, because one often places reflective foils (+ceramic fibre insulation) on the outer surface of hot ducts to reduce the radiation to the ambient.)
* case3: radiative heat transfer P1 (absorption coefficient 1e-06).
Wall BC: exchange coefficient (user law) with T=25°C and h=0.00001 W/m2/K (negligible), and for the thermal radiative transfer at the wall: type=fixed exterior temperature, emissivity=0.99, conductivity=300W/m/K (high, so that the conductive thermal resistance is negligible), thickness=0.001m, exterior temperature=300K
-> surprisingly, there is absolutely no cooling of the gas.
I ran this same case in ANSYS Fluent and it behaves as expected: a significant cooling is noticed due to radiation (actually, the radiation contribution at such hot surface temperature dominates over the convective heat losses).
This is not the behaviour that I expected. I hope you understood what I am aiming to do. This corresponds to a standard case in many industrial situations, where a hot solid or a hot duct loses heat to the ambient both through natural convection and radiation. But with such a "mixed" thermal BC, one can avoid simulating the solid or the surrounding air, i.e. one can summarise the effect of conduction through the duct wall + natural convection + external radiation to the ambient in only one BC applied on the inner duct wall.
Encore merci beaucoup !
Theo
Thanks a lot for your quick reply!
I have prepared a simple case with a circular pipe (inlet + outlet + wall), of radius 10mm and length 400mm.
There is a flow of hot gas, entering at 900°C with 10m/s.
There are 3 cases inside, the only difference being in the boundary condition at the wall + radiation model:
* case1: no radiative heat transfer. Wall BC: exchange coefficient (user law) with T=25°C and h=20W/m2/K
A picture with the results is in the attached png file.
* case2: radiative heat transfer P1 (absorption coefficient 1e-06, should not have any effect in what I'm trying to show).
Wall BC: exchange coefficient (user law) with T=25°C and h=20W/m2/K, and for the thermal radiative transfer at the wall: type=fixed exterior temperature, emissivity=0.99, conductivity=300W/m/K (high, so that the conductive thermal resistance is negligible), thickness=0.001m, exterior temperature=300K
-> surprisingly, the temperature drop is SMALLER than in the previous case. I would expect the hot wall to radiate heat to the cold ambient, and so the gas should be further cooled down than in the first case where we only had natural convection !! (is the emissivity referring to the inner side of the wall, i.e. to the radiative heat exchange between the hot gas and the inner pipe wall ? Or is it also referring to the exterior wall in contact with the ambient ?? ... in that case, it would be better to be able to set two different values for the emissivity, because one often places reflective foils (+ceramic fibre insulation) on the outer surface of hot ducts to reduce the radiation to the ambient.)
* case3: radiative heat transfer P1 (absorption coefficient 1e-06).
Wall BC: exchange coefficient (user law) with T=25°C and h=0.00001 W/m2/K (negligible), and for the thermal radiative transfer at the wall: type=fixed exterior temperature, emissivity=0.99, conductivity=300W/m/K (high, so that the conductive thermal resistance is negligible), thickness=0.001m, exterior temperature=300K
-> surprisingly, there is absolutely no cooling of the gas.
I ran this same case in ANSYS Fluent and it behaves as expected: a significant cooling is noticed due to radiation (actually, the radiation contribution at such hot surface temperature dominates over the convective heat losses).
This is not the behaviour that I expected. I hope you understood what I am aiming to do. This corresponds to a standard case in many industrial situations, where a hot solid or a hot duct loses heat to the ambient both through natural convection and radiation. But with such a "mixed" thermal BC, one can avoid simulating the solid or the surrounding air, i.e. one can summarise the effect of conduction through the duct wall + natural convection + external radiation to the ambient in only one BC applied on the inner duct wall.
Encore merci beaucoup !
Theo
- Attachments
-
- png_Results.zip
- (38.94 KiB) Downloaded 119 times
-
- e01_example_radiation_externalWall.zip
- (2.98 MiB) Downloaded 120 times
-
- Posts: 7
- Joined: Mon Sep 02, 2024 5:17 pm
Re: BC with convection + radiation to the ambient
I agree with you that this should be possible without including a thermal radiative heat transfer model for the gas flow.To see the effect of radiation on.the wall, I think only the thermal BC type involving a balance computation at the wall will/should work for this.
However, I am not familiar with coding in code_saturne, and I don't know how to access the local temperature in the cell located on the wall boundary patch (inner wall).
If I knew how to access that temperature (or the temperature on the boundary patch, say T_wallint), I would use a user-defined boundary condition for the outgoing flux and write something like this:
T_amb = 25; // °C - ambient temperature
lambda_wall = 20; // W/m/K - thermal conductivity of the duct wall
e_wall = 0.001; // m - wall thickness
h_conv = 5; // W/m2/K - natural convection heat transfer coefficient at the external surface of the duct
eps_wall = 0.85; // - emissivity of the external surface of the duct
sigma = 5.67e-08; // - Stefan constant
// One needs to calculate iteratively (or with root-finding) the temperature on the external wall surface T_wallext
// that satisfies: (1) the value of T_wallext must be between T_wallint and T_amb, and (2) q_cond = q_conv + q_rad
// with q_cond = (lambda/e_wall)*(T_wallint - T_wallext)
// q_conv = h_conv*(T_wallext - T_amb)
// q_rad = sigma*eps_wall*((T_wallext+273.15)^4 - (T_amb+273.15)^4)
// if the wall is very conductive, one can assume T_wallext ~= T_wallint and then calculate the flux directly from
// q_conv+q_rad
flux = q_conv; // the outgoing flux in the boundary cell
-
- Posts: 4164
- Joined: Mon Feb 20, 2012 3:25 pm
Re: BC with convection + radiation to the ambient
Hello,
Thanks for the detailed report. I have a very busy week ahead but I'll try to look into this as soon as possible, probably end of next week or early week after.
Best regards,
Yvan
Thanks for the detailed report. I have a very busy week ahead but I'll try to look into this as soon as possible, probably end of next week or early week after.
Best regards,
Yvan
-
- Posts: 7
- Joined: Mon Sep 02, 2024 5:17 pm
Re: BC with convection + radiation to the ambient
Hello Yvan,
Thanks a lot. I understand. I wish you "bon courage".
Kind regards,
Theo
Thanks a lot. I understand. I wish you "bon courage".
Kind regards,
Theo
-
- Posts: 4164
- Joined: Mon Feb 20, 2012 3:25 pm
Re: BC with convection + radiation to the ambient
Hello,
I took a quick look but need to check more in detail.
When using a thermal radiative transfer with fixed external temperature, I would expect the exchange coefficient to be set, but not the external temperature (in the user law definition). So I need to check whether the GUI is presenting a value that is not used in this case or if there is some inconsistency here.
In any case, the emissivity is defined for the interior face. We assume radiation only in the fluid domain, and a Dirichlet value on the external wall. To consider exterior emissivity, you would need to consider a separate exterior volume, also using radiation, and an intermediate solid zone. This should be feasible using the "internal coupling" feature of the code. In this case, I believe the type of grey or black wall would be "Temperature by main thermal BC".
Best regards,
Yvan
I took a quick look but need to check more in detail.
When using a thermal radiative transfer with fixed external temperature, I would expect the exchange coefficient to be set, but not the external temperature (in the user law definition). So I need to check whether the GUI is presenting a value that is not used in this case or if there is some inconsistency here.
In any case, the emissivity is defined for the interior face. We assume radiation only in the fluid domain, and a Dirichlet value on the external wall. To consider exterior emissivity, you would need to consider a separate exterior volume, also using radiation, and an intermediate solid zone. This should be feasible using the "internal coupling" feature of the code. In this case, I believe the type of grey or black wall would be "Temperature by main thermal BC".
Best regards,
Yvan
-
- Posts: 4164
- Joined: Mon Feb 20, 2012 3:25 pm
Re: BC with convection + radiation to the ambient
Hello,
Comparing logs with runs of case2 with 2 different exterior temperatures, I see that the computed temperature is not the same, but then we have the following warning:
I am not too sure about this relaxation parameter, but in cs_user_radiative_transfer_bcs, you can change it.
Also, the maximum variation goes down by about 0.1 after 10 iterations. So even without changing the relaxation parameter, you might have the correct values, but after many iterations (probably in the 1000s).
Also running the code through a debugger, it seems things are working correctly, but the relaxation really gets in the way, or hides the behavior. I do not know if increasing this parameter might cause stability issues or not.
Best regards,
Yvan
Comparing logs with runs of case2 with 2 different exterior temperatures, I see that the computed temperature is not the same, but then we have the following warning:
With a different value of the maximum variation, but the same relaxed value.** Information on wall temperature
-------------------------------
Warning: wall temperature relaxed to 10.00 at (1680 points)
Maximum variation: 65.5672
decreasing wall temperature: 1680 faces
increasing wall temperature: 0 faces
I am not too sure about this relaxation parameter, but in cs_user_radiative_transfer_bcs, you can change it.
Also, the maximum variation goes down by about 0.1 after 10 iterations. So even without changing the relaxation parameter, you might have the correct values, but after many iterations (probably in the 1000s).
Also running the code through a debugger, it seems things are working correctly, but the relaxation really gets in the way, or hides the behavior. I do not know if increasing this parameter might cause stability issues or not.
Best regards,
Yvan
-
- Posts: 7
- Joined: Mon Sep 02, 2024 5:17 pm
Re: BC with convection + radiation to the ambient
Hello Yvan,
Thanks a lot for taking the time and for looking into this.
My intention was actually to have an emissivity on the outer face, in order to avoid computing also the solid and the surrounding air...
I hadn't noticed the warning on the wall temperature, I will look into it more in detail.
I have another question: Let's say I have a domain in the shape of a vertical cylinder, with an inlet and outlet on the lower and upper faces and with a wall on the lateral surface. If I want to use "Prescribed (outgoing) flux (user law)" for the temperature boundary condition at the wall of my domain, how can I have access to the temperature on the boundary face (or in the boundary cell) from within the calculator ?
Best regards,
Théo
Thanks a lot for taking the time and for looking into this.
My intention was actually to have an emissivity on the outer face, in order to avoid computing also the solid and the surrounding air...
I hadn't noticed the warning on the wall temperature, I will look into it more in detail.
I have another question: Let's say I have a domain in the shape of a vertical cylinder, with an inlet and outlet on the lower and upper faces and with a wall on the lateral surface. If I want to use "Prescribed (outgoing) flux (user law)" for the temperature boundary condition at the wall of my domain, how can I have access to the temperature on the boundary face (or in the boundary cell) from within the calculator ?
Best regards,
Théo
-
- Posts: 4164
- Joined: Mon Feb 20, 2012 3:25 pm
Re: BC with convection + radiation to the ambient
Hello,
I do not think you can access this value from the GUI, so you need to handle this with a user-defined function. It would indeed be an interesting addition.
Actually, since the GUI-defined user expressions are used by the code to generate and compile code similar to that of user-defined functions (cs_meg_* instead of cs_user_*), it is possible to insert actual code in the middle of an expression, but this is not guaranteed to work with future versions (as the syntax can change a bit), and requires some additional trial and error, so a true user-defined function is recommended instead.
Best regards,
Yvan
I do not think you can access this value from the GUI, so you need to handle this with a user-defined function. It would indeed be an interesting addition.
Actually, since the GUI-defined user expressions are used by the code to generate and compile code similar to that of user-defined functions (cs_meg_* instead of cs_user_*), it is possible to insert actual code in the middle of an expression, but this is not guaranteed to work with future versions (as the syntax can change a bit), and requires some additional trial and error, so a true user-defined function is recommended instead.
Best regards,
Yvan