PDE thermal model with internal heat sources as a function of temperature

조회 수: 5 (최근 30일)
Urban Simoncic
Urban Simoncic 2019년 10월 10일
답변: Bradley 2023년 10월 3일
For the steady state heat transfer model I want to specify internal heat source as a function of local temperature. I tried as:
internalHeatSource(myPde, @(location, state) A*((interpolateTemperature(state.u, [location.x; location.y; location.z]))' - Tb), 'cell', 11);
but when I try to solve the model, I get an error:
Function specifying a heat source must accept two
input arguments and return one output argument.
Perhaps I have to somehow transform state.u to thermalresults form. Can you explain me how to properly do that?

답변 (2개)

Tadeu Fagundes
Tadeu Fagundes 2020년 2월 12일
I have the same issue. It seems like if you only use the location input, it works fine. But anything using the state input gives me the same error.
  댓글 수: 2
Urban Simoncic
Urban Simoncic 2020년 2월 13일
Exactly, you can use location, but not the state. But I found a solution for my problem. I wanted to have an internal heat source LINEARLY proportional to the local temperature and that can be done by solving general PDE in Matlab and setting appropriate terms to 0.
Diego
Diego 2020년 5월 1일
Same issue. I have been looking around, but I can't find an answer for this problem. I have been trying to simulate the steady state of a curing process inside a heated die and I can’t progress because of this problem with a temperature dependent internal heat source.

댓글을 달려면 로그인하십시오.


Bradley
Bradley 2023년 10월 3일
I might have something for this... after many hours of trial and error.
For my model, I created an anonymous function as you did. In my model, I have a temperature minimum which will trigger the internal heat generated to switch between 0 and whatever my net heat value is for the system.
Q_int = @(location,state) myInternalHeat(TemperatureMin,HeatParams,state.u);
TemperatureMin is a double, and HeatParams is a structure containing Q_net.
Then, myInternalHeat works like this:
function Q_int = myInternalHeat(TemperatureMin,HeatParams,state)
mean_temp = mean(state);
if mean_temp <= TemperatureMin
Q_int = zeros(size(state));
else
Q_int = zeros(size(state)) + HeatParams.Q_net;
end
end
It was important to keep Q_int the same size as state so it would actually read and return correctly. From there, I assigned my internal heat with the normal internalHeatSource function. From their documentation here it seems that the form of your function must follow the two in, one out format.

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by