Hi,
I am new to Matlab and am try to follow the example at the following link https://www.mathworks.com/help/pde/examples/heat-distribution-in-a-circular-cylindrical-rod.html The problem is the following; when it comes to defining thermal conductivity, I can easily define it as a function of "state or region. However, when it comes to defining it as a function of both region and state I am running into trouble. I am trying the following
% The rod is composed of a material with the following thermal properties.
mu = 1.65E-2; % thermal conductivity, W/(m-degree K)
nu = 3; lambda = 8.6E-4; % thermal conductivity, W/(m-degree K)gamma = 1.09;
PDE Toolbox allows definition of the non-constant coefficients as function of spatial coordinates and solution.
k1func = @(region,state) lambda*state.u.^gamma;k2func = @(region,state) mu*state.u.^nu;kfunc = @(region,state) (k1func+k2func).*region.y;
For a steady-state analysis, specify the thermal conductivity of the material.
thermalProperties(thermalModelS,'ThermalConductivity',kfunc);
and I get the following error
Error using pde.ThermalMaterialAssignment/checkCoefFcnHdlArgCounts (line 378) Function handle specifying a material property must accept two input arguments and return one output argument.
Any idea, what am I doing wrong?
Best Answer