Non-converging initial conditions issue while using custom components in simscape
이전 댓글 표시
Hello again everyone, I'm actually working on modelling hydraulic systems, and I had to create my own custom simscape block with this code:

It's quite similar to the hydraulic restive pipe in the foundation library, the main difference is that it uses a relation of type: p = K * q^2 .
In order to test the block, I made this simple model:

with a pressure source at 25 bars (as an example). When running the simulation, I have the common error: Initial conditions failed to converged .. Equations (including nonlinear equations) of one or more components may be dependent or inconsistent with almost all of the components being involved. If I replace it with the foundation's hydraulic restive tube, there's not any problem. After trying to understand where the mistake come from, I have noticed (by tinkering the equations) that the fact that the relationship between p and q is not linear ( p = r * q) but quadratic (p = r' * q^2) is the origin of the issue.
Any idea of why ? And if you fave any idea of solution, I'm all opened !
Don't hesitate to ask,
Thanks in advance
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating Custom Components and Libraries에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!