I am using Matlab PDE Toolbox to generate a thermal model.
I would like to define a time-dependent AmbientTemperature to be used for convective heat transfer. I wrote this code but it doesn't work (error: The value of 'AmbientTemperature' is invalid. Must be specified as a numeric value):
tam=23;ampl=7;phi=0; T=duration; omega=2*pi/T;
ta = @(region,state) tam+ampl*cos(omega*state.time+phi);
thermalmodel.StefanBoltzmannConstant = 5.670373E-8;
thermalBC(thermalmodel,'Face',,'ConvectionCoefficient',hcint,'Emissivity',@(region,state) eps3, 'AmbientTemperature',ta);
Other than that, I need to specifify an internal heat source that is a function of the average temperature at two specified faces of my 3D geometry.
Any help is very much appreciated.