Problems with a non linear thermal convection block

1 回表示 (過去 30 日間)
pietro
pietro 2013 年 6 月 6 日
Hi all,
I have developed my own speed dependent convection block. At the end of the message you can see the code.
I get the following error using this model in a very simple model:
Initial conditions solve failed to converge. ...Nonlinear solver: failed to converge, residual norm too large. ......Here is the set of components with unconverged equations:
The model works with the built-in simscape convection block, therefore I'm sure the code is wrong. The error can be fixed changing this statement
heat_tr_coeff=3.974*AirHeatTransfCoeff/DiscDiam*Re^0.55;
in
heat_tr_coeff=3.974*AirHeatTransfCoeff/DiscDiam*Re;
How could I fix it?
Thanks
Cheers
% code
Pietro
component DiscBrakeLatConv < foundation.thermal.branch
parameters area = { 1e-4, 'm^2' }; % Area DiscDiam={1,'m'}; %Disc diameter AmbientTemp={300,'K'}; %Ambient temperature end parameters (Access=private) AirKinViscosity={19.32*10^-6,'(m^2)/(s)'}; AirHeatTransfCoeff={0.0294,'W/(m*K)' }; end
inputs w = {0, 'rad/s'}; % Ang rate : left end
function setup % Parameter range checking if area <= 0 pm_error('simscape:GreaterThanZero','Area') end
if AmbientTemp <= 0
pm_error('simscape:GreaterThanZero','Ambient Temperature')
en
end
equations
let
Re=((w*(DiscDiam/2)^2)/AirKinViscosity);
heat_tr_coeff=3.974*AirHeatTransfCoeff/DiscDiam*Re^0.55;
in
Q == area * 3.974*heat_tr_coeff* T;
end
end
end
end%

回答 (0 件)

カテゴリ

Help Center および File ExchangeFoundation and Custom Domains についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by