Transient heat flux boundary condition in PDE toolbox

Hi,
I am modelling temperature distribution of a circular cylindrical rod with a plate. The model is very much similar to (https://au.mathworks.com/help/pde/ug/heat-distribution-in-a-circular-cylindrical-rod.html) model. In my model, I am using heat flux boundary condition at the edge 2 (interface of rod and plate) which is varying with time. I have set 298 K as atmospheric temperature and 910 K as initial temperature. It is expected that heat flux will be zero when the edge temperature will reach at atmospheric temperature. I have set the boundary condition as given in the following code. The results do not seem correct because the edge temperature reaches steady state at time t=1s for all initial temperatures (T_0 = 510K and 910K).
How can I solve the problem?
k = 1.3913; %Thermal conductivity [W/(mK)]
h_thick = 0.001; %Thickness of the plate [m]
T_amb = 298; %Atmospheric temperature [K]
T_0 = 910; %Initial temperature [K]
thermalBC(thermalModelT,'Edge',2,'HeatFlux',@(location,state) (T_surr-state.u)*k/h_thick);

 Accepted Answer

Based on what you describe, it appears you are assigning heat flux on an interior edge. These are not boundaries of the domain so they won't be processed. Refer to https://www.mathworks.com/help/pde/ug/do-not-specify-boundary-conditions-between-subdomains.html

4 Comments

Hi Ravi,
In the real system this is an interior edge. But in my model, I am only using a rectangular geometry (see the attached image) and I am applying heat flux boundary condition at that edge (edge 2). My query is how can I apply transient heat flux boundary condition (heat flux gradually reaches to zero with time) on that edge. To do so, I need to call a function for heat flux where at each time step, T_0 (edge temperature) need to update (see the function in the attached image).
If you want to turn of the heat flux if T0<Tamb, you need to write a if-statement and do so. I would suggest writing a regular function, instead of a function handle and provide it as heat flux. Say,
function q = myHeatFlux(location,state)
if (state.u < Tamb)
...
else
...
end
and specify this function in thermalBC as:
thermalBC(thermalModelT,'Edge',2,'HeatFlux',@myHeatFlux);
I am applying as following function but getting the same result like before. How can I make sure that 'state.u' representing 'edge 2' temperature and updating with time?
thermalBC(thermalModelT,'Edge',2,'HeatFlux',@myHeatFlux);
function HF = myHeatFlux(~,state)
if state.u > 298
HF = (298-state.u)*1.3913e+03;
else
HF = 0;
end
end
Since you are assiging this function to Edge 2, state.u that solve constructs only contains values asssociated with Edge 2.

Sign in to comment.

More Answers (0)

Asked:

on 30 Sep 2020

Commented:

on 1 Oct 2020

Community Treasure Hunt

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

Start Hunting!