Dear Community;
i am dealing with an issue with my model of a heat distribution of a cylindrical circular rod. My model is quite similar to https://de.mathworks.com/help/pde/examples/heat-distribution-in-a-circular-cylindrical-rod.html, but i am trying to create a heat flux, which is time-dependent. None of the tutorials or examples is really helpful. Unfortunately i am a beginner with Matlab, so i dont offer much skills in programming.
This is my code for the heatflux at the moment. Right now i am just working with an average heatflux, but i would like to use a time-dependent formula.
y_dach = 600; n=2; ts=1/8000; %increment
T=4; %T_max
t=0:ts:T; %timelist
heat = y_dach*sin(2*pi*n*t+pi/2); %Formula i want to use
heatflux_percentage = 0.35; Positive = heat >0;heat(~Positive)=0; % only positive values
heatflux = heat/ V_cyl; ,avg_heatflux=mean(heatflux_percentage*heatflux); thermalBC(thermalModelT,'Edge',[7,8],'HeatFlux',avg_heatflux)
This is my solver:
tfinal = 50; %tmax
tlist = 0:2:tfinal; %timeincrements
thermalModelT.SolverOptions.ReportStatistics = 'on';result = solve(thermalModelT,tlist);T = result.Temperature;
I know that i somehow have to use a function handle with state.time, but i dont know how to use it.
Many thanks in advance!
Best Answer