Why InternalHeatSource function doesn't accept variable internal heat expressions in terms of state.u?
2 ビュー (過去 30 日間)
古いコメントを表示
Greetings
I am trying to create a internal heat source that is a function of Temperature for a steady state simulation. However it seems that InternalHeatSource function doesn't accept functions that declares the internal heat source value that are function of state.u, but when I write, in the same expression, location.x in place of state.u, the code does works. Does anyone know the reason why?
8 件のコメント
Ravi Kumar
2020 年 5 月 5 日
Hi Diego,
If you insert a breakpoint in the q function and set a condition (numel(state.u)>1), then you will observe that solver does call the q function with various values of solution. So it does see new values of q at different solution values. I think it might be just plotting issue. You are plotting the initial step if you don't specify right column ID in the T matrix (note T is a matrix now). If I change the plot command to:
pdeplot(model,'XYData',T(:,end),'Contour','on','ColorMap','hot');
then I get the following plot:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/290583/image.png)
Hope this helps resolve your issue.
Regards,
Ravi
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で General PDEs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!