Transient Neumann boundary condition
3 次查看(过去 30 天)
显示 更早的评论
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
i=i+1;
end
% 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
geometryFromEdges(model,g);
%% Set boundary conditions.
setInitialConditions(model,Ta); % Specify the initial temperature on all nodes
applyBoundaryCondition(model,'dirichlet','edge',1,'u',Ta);
applyBoundaryCondition(model,'neumann','edge',3,'g',Power(1));
0 个评论
回答(1 个)
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.
Regards,
Ravi
6 个评论
Ravi Kumar
2020-5-5
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.
Regards,
Ravi
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!