Borrar filtros
Borrar filtros

Problems with a non linear thermal convection block

1 visualización (últimos 30 días)
pietro
pietro el 6 de Jun. de 2013
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%

Respuestas (0)

Categorías

Más información sobre Foundation and Custom Domains en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by