# Temperature-dependent boundary conditions

조회 수: 4(최근 30일)
Shengyue Shan 2019년 9월 13일
댓글: Shengyue Shan 2019년 9월 14일
Hello,
I am having some difficulty developing my code for a heat transfer process using pde toolbox. I got errors as shown below,
Unable to convert 'pde.PDEModel' to 'sym'.
Error in sym (line 214)
Error in solve>getEqns (line 402)
a = sym(a);
Error in solve (line 226)
[eqns,vars,options] = getEqns(varargin{:});
Error in heat_toy (line 56)
results = solve(model,tspan);
My boundary condition are tempeature-dependent. The coefficients 'g' and 'q' are defined by functions g1 and q1 respecitvely, and are as written as below,
function value = g1(location,state)
value = h*Ta./(S(state.u).*D(state.u));
end
function value = q1(location,state)
value = h.*S(SpecificHeat(state.u).*D(state.u));
end
S and D are functions of temperature, and are written as shown below,
function value = S(u)
cp = A3*u.^2 + B3*u + C3;
end
function value = D(u)
rho = A2*u.^2 + B2*u + C2;
end
Is it the boundary condititions that are causing me errors? Is there any way to solve it?
Thank you very much!
Best regards,
SS

댓글을 달려면 로그인하십시오.

### 채택된 답변

Ravi Kumar 2019년 9월 14일
Do you have PDE Toolbox in your installed products list? You can check this by executing 'ver' at the command prompt. If so, did you create the 'model' variable using model=createpde(....)?
Regards,
Ravi
##### 댓글 수: 7표시숨기기 이전 댓글 수: 6
Shengyue Shan 2019년 9월 14일
Hi Ravi,
I guess I figured it out. The error was caused by using function solve instead of solvepde. Thanks for your help!
Best regards,
Shengyue Shan

댓글을 달려면 로그인하십시오.

### 범주

Find more on Heat Transfer in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!