MATLAB Answers

Transient Neumann boundary condition

조회 수: 40(최근 30일)
Mickael 2020년 5월 1일
댓글: Mickael 2020년 5월 5일
Good evening,
I would like to simulate a heat transfer problem with the PDE toolbox and I am trying to apply a transient heat flux on one edge of a rectangle. The other edges have either adiabatic or constant boundary conditions.
Is it possible to put a transient heat flux function (Power(t) = P0 + P0 cos (2wt) with P0 the amplitude in W, w the pulsation in rad/s and t the time in s) directly with the applyBoundaryCondition function, do I have to use the setInitialConditions function to use the data coming from the last solvepde or am I totally wrong and I should use another method ?
Thank you for your help!
% Heat flux function of time which has ot be applied on edge 3
P = 0.0035; % Power (W)
length = 0.0003; % Length (m)
f=2; % Frequency (Hz)
W = 2*pi*f; % Pulsation (rad/s)
t_inc = 0.025; % time increment
t_end = 5; % time end
i=1; % matrix increment
for t = 0:t_inc:t_end
Power(i) = (P+P*cos(2*W*t))/length; % Power matrix (W/m)
time(i)=t; % time matrix
% Geometry
numberOfPDE = 1; % Number of equation
model = createpde(numberOfPDE); % Create a PDE with numberOfPDE equation
% Define the dimension of the substrate
width = 0.0006;
height = 0.0003;
gdm = [3 4 0 width width 0 0 0 height height]'; % Define the geometry
g = decsg(gdm, 'S1', ('S1')'); % Decompose constructive solid
%% Set boundary conditions.
setInitialConditions(model,Ta); % Specify the initial temperature on all nodes


Ravi Kumar
Ravi Kumar 2020년 5월 2일
You should be able to apply the Neumann BC using the power calculation that you have done in the beginning. But be sure to take care of units, you need heat flux, which is W/m^2, in 2-D case it would be W/m.
  댓글 수: 6
Mickael 2020년 5월 5일
Hi Ravi,
Thank you very much to point this. However, if you allow me, I still have a question regarding this problem because the temperature variation doesn't look like they should, the temperature variation are not a nice cosine function and above 5 periods there is no more periods... I would expect to observe cosine function whatever the number of period. I do not understand why increasing the final time would modify what has been calculated by the model at a lower time, is it expected ? is there still something that I am missing ?
Please find below the try I have performed with an arbitrary frequency of 100Hz. The time step is adjusted in order to always have the same number of point (100 here) to describe a period.
Nperiod = 2;
NpointPerPeriod = 100;
tfinal = Nperiod/(2*f);
tstep = tfinal/(Nperiod*NpointPerPeriod);
tlist = 0:tstep:tfinal;
For 2 period I obtain this figure :
For 5 period :
For 7 period:
For 10 period :
Thank you again for your very helpful help.
Best regards,

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

Community Treasure Hunt

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

Start Hunting!

Translated by