# Radiation and convection in thermal models with different ambient and sink temperatures

7 views (last 30 days)
Enrico on 21 Mar 2020
Commented: Enrico on 31 Mar 2020
Dear Community,
I have to implement a simple 2D steady heat conduction problem for a rectangular domain with different boundary conditions: fixed temperature on one side, perfectly insulated on another side, convection AND radiation on the other two sides.
I have already found the solution here
but it seems that it works only if BOTH ambient and sink temperatures are the same (the ambient or undisturbed temperature is applied to convection and sink temperature to radiation).
In my case these two temperatures are different. Is it possible to solve it ?

Ravi Kumar on 23 Mar 2020
For your case, you might be better off using 'HeatFlux' and defining the boundary complete heat flux due to convection and radiation at the two boundaries. You can even define the 'HeatFlux' as a function with two different sink temperatures for convection and radiation.
Regards,
Ravi
Enrico on 26 Mar 2020
Kind Regards
Enrico
Enrico on 30 Mar 2020
Just a follow-up with a further - possibly trivial - question.
I solved the problem of setting a BC with both convection AND radiation, with DIFFERENT ambient and sink temperatures, using the following instruction
applyBoundaryCondition(Fin,'neumann','edge',[1 3],...
'q',@myqfun,'g',@mygfun,'Vectorized','on');
with
function bcMatrix = mygfun(location,state)
h = 50; % Convective heat transfer coefficient [W/m^2 K]
sigma = 5.670367E-8; % Stefann-Boltzmann constant [W/(m^2 K^4)]
Tinf = 25; % External fluid temperature [°C]
Ts = 15; % External sink temperature [°C]
emiss = 0.7; % Surface emissivity [-]
g = h*Tinf+...
+(emiss*sigma*((state.u+273.15).^2+(Ts+273.15)^2).*...
((state.u+273.15)+(Ts+273.15)))*Ts;
bcMatrix = g;
end
%
function bcMatrix = myqfun(location,state)
h = 50; % Convective heat transfer coefficient [W/m^2 K]
sigma = 5.670367E-8; % Stefann-Boltzmann constant [W/(m^2 K^4)]
Tinf = 25; % External fluid temperature [°C]
Ts = 15; % External sink temperature [°C]
emiss = 0.7; % Surface emissivity [-]
q = h+emiss*sigma*((state.u+273.15).^2+(Ts+273.15)^2).*...
((state.u+273.15)+(Ts+273.15));
bcMatrix = q;
end
The previous instructions have been set by observing that heat transfer by convection and radiation from a gray diffuse surface - no emitting or participating media - can be expressed by
where
is the so called radiation heat transfer coefficient.
My (trivial) question is: how can I pass, in an efficient and possibly elegant way, the parameters, e.g. h, Ts etc., to both mygfun and myqfun ?
Enrico

Ravi Kumar on 30 Mar 2020
To pass additional parameter, wrap the functions that actually computes with the ones you specify as inputs. In your example:
...
h = 50; % Convective heat transfer coefficient [W/m^2 K]
sigma = 5.670367E-8; % Stefann-Boltzmann constant [W/(m^2 K^4)]
Tinf = 25; % External fluid temperature [°C]
Ts = 15; % External sink temperature [°C]
emiss = 0.7; % Surface emissivity [-]
mygfunInterface = @(location,state) mygfun(location,state,h,sigma,Tinf,Ts,emiss)
...
Similaraly for q functionction and use
applyBoundaryCondition(Fin,'neumann','edge',[1 3],...
'q',myqfunInterface,'g',mygfunInterface,'Vectorized','on');
And, updated the actual function to take additinal inputs:
function bcMatrix = mygfun(location,state,h,sigma,Tinf,Ts,emiss)
...
end

#### 1 Comment

Enrico on 31 Mar 2020
Thanks a lot!
Enrico