필터 지우기
필터 지우기

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
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:
Hope this helps resolve your issue.
Regards,
Ravi
Diego
Diego 2020년 5월 6일
Thank you so much Ravi,for spending your time to help me! It completly solves the issue!
The routine gives a maching but whith a better resolution than the finite difference version that I made previously. I'm realy happy with the results since this code will allow me to analize the problem in a 3D version.
Again, thanks for helpping me solving this problem!
Best Regards
Diego

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 General PDEs에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by