Filter löschen
Filter löschen

Transient Neumann boundary condition

22 Ansichten (letzte 30 Tage)
Mickael am 1 Mai 2020
Kommentiert: Mickael am 5 Mai 2020
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

Antworten (1)

Ravi Kumar
Ravi Kumar am 2 Mai 2020
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 Kommentare
Ravi Kumar
Ravi Kumar am 5 Mai 2020
Hi Mickael,
I think your setup looks fine. You seem to have some unit inconsistency. In the power variation function, you have time constant of 1/(4*pi*2000) ~ 4E-5. So the dynamics is on the time-scale of 1E-5, but you are solving from 0 to 5, which also explains the initial fluctuation.
Mickael am 5 Mai 2020
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,

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by