MATLAB Answers

1D Fourier equation with temperature dependent thermal properties

1 view (last 30 days)
Maria Lorena Richiusa
Maria Lorena Richiusa on 5 Jun 2020
Hello! I am trying to solve the 1D Fourier's equation with temperature dependent thermal properties but I do not know how to get the temperature results from pdepe at each time step and use them to evaluate the material properties for the next time step. Can you help me sort this out? Find below the example.
In this case, for example, the thermal diffisivity is temperature dependent accordint to the law:
diffr=3.34E-10*T^4 - 9.37E-07*T^3 + 9.38E-04*T^2 - 4.80E-01*T + 2.09E+02
function [c,f,s] = pdex1pde(x,t,u,dudx,diffr,Tfront)
c = 1/diffr;
f = dudx;
s = 0;
end
Many thanks for the help!

  0 Comments

Sign in to comment.

Answers (1)

Bill Greene
Bill Greene on 6 Jun 2020
function [c,f,s] = pdex1pde(x,t,T,dudx,diffr,Tfront)
diffr=3.34E-10*T^4 - 9.37E-07*T^3 + 9.38E-04*T^2 - 4.80E-01*T + 2.09E+02;
c = 1/diffr;
f = dudx;
s = 0;
end

  3 Comments

Maria Lorena Richiusa
Maria Lorena Richiusa on 7 Jun 2020
HI Bill, thanks for answer to my question. Actually I made a mistake in setting the problem, as T is the current u solution from the differential equation.
function [c,f,s] = pdex1pde(x,t,u,dudx,diffr,Tfront)
diffr=3.34E-10*u^4 - 9.37E-07*u^3 + 9.38E-04*u^2 - 4.80E-01*u + 2.09E+02;
c = 1/diffr;
f = dudx;
s = 0;
end
Does it work like this? Sorry about my typo.
Thanks again.
Lorena
Bill Greene
Bill Greene on 7 Jun 2020
Yes, you are free to name that third argument whatever you like-- u, T, or any other legal matlab variable name.
Maria Lorena Richiusa
Maria Lorena Richiusa on 7 Jun 2020
Thanks again for your answer. Could I define the temperature-dependent material property law on an external script that recalls the pdepe function, and passing this function as an argument of the pdepe? I have tried but in a wrong way, as the temperature is a result of the pdepe function.
Thanks a lot for your answer.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!