How to solve unconverged equations error ?
21 views (last 30 days)
I created a hydrulic model on simulink based on simulink example ( http://www.mathworks.com/help/physmod/hydro/examples/front-loader-actuation-system.html )
In the previous runnings model, it gave me error about "Pressure fell below zero" and I solved it with custom hydraulic fluid block (set as warning not error : http://www.mathworks.com/help/physmod/simscape/ref/customhydraulicfluid.html ).
After that solution, model gives me another error about cylinder block
An error occurred while running the simulation and the simulation was terminated
Nonlinear solver to advance time one step failed to converge, residual norm too large.
...Here is the set of components with unconverged equations:
'loaderBHL/Actuation System/Boom cylinder'
Equation location is:
'C:/Program Files/MATLAB/R2014b/toolbox/physmod/simscape/library/m/+foundation/+hydraulic/+elements/translational_converter_compressible.ssc' (line 121)
snippet of ssc file :
% Fluid mechanical interface
position.der == (R.v - C.v)*dir;
volume == if vol_ref>V_dead, vol_ref else V_dead end;
f == area*pressure_chamber*dir;
% Flow rate exiting the chamber
pressure_chamber == A.p;
qV == rho_over_rho0*area*(R.v - C.v)*dir;
qrho == drho_over_rho0dp * pressure_chamber.der * volume; % <<< line 121
q == qV + qrho;
I tried other solutions discussed in other questions like increase consistency tolerance or valve passage area or pump setting pressure but it still gives same error.
How to solve this error ? If it's related about pressure fell, is there any other hydraulic block to connect cylinder block and prevent this pressure fell?
In addition; sometimes simulation freezing about 1-5 seconds (like lag) after that it continues, sometimes it doesn't and gives this error at that time.
Yifeng Tang on 14 Sep 2022
My experience: this typically happens when the piston moves while flow is constricted in the expanding chamber of the cylinder. The pressure drops rapidly and can violate the minimum pressure limit. The solution to this error, I think, is NOT to set it as a warning, because it's trying to tell us something here. A few things to check:
1) is my valve acting synchronised correctly with the motion of the mechanical parts?
2) is the near zero/neutral part of the valve opening table realistic? or can it close too fast or stay closed for too wide a range?
3) does adding some entrained air to the fluid property settings help? some entrained air can change the bulk modulus curve significantly and the fluid becomes more compliant at low pressure. It can expand more without lowering the pressure too much, so this may help, too.
Overall, look at the results very carefully in the result explorer and think if there is any physical explanation of the low pressure, and focus on the relevant blocks.