How to stop algebraic loops in two phase simscape models
1 view (last 30 days)
Show older comments
I am trying to model a R449a based chiller with hot gas bypass. The hot gas bypass loop is causing a algebraic loop error in the compilation stage when the model is run.
I have tried adding additional volumes on each side of the components concerned which did not help. There are PI controllers in the valve model which monitor the superheat, saturation temperature and inlet temperature and allow hot gas or cold liquid into the inlet as needed.
0 Comments
Answers (1)
Karanjot
on 6 Oct 2023
Edited: Karanjot
on 6 Oct 2023
Hi Stuart,
I understand that you want to resolve an algebraic loop in a Simscape model.
An algebraic loop occurs when a signal loop in a model contains only blocks that have direct feedthrough. Direct feedthrough refers to blocks that use the input value for the current time step to calculate the output value for the current time step. Feedback loops can create algebraic loops in a model.
To determine whether the model contains algebraic loops, use the below code:
Simulink.BlockDiagram.getAlgebraicLoops(mdl);
You can remove these algebraic loops by introducing a delay in the loop using the Unit Delay block.
To learn more about this, you can refer to the below documentation:
I hope this helps!
0 Comments
See Also
Categories
Find more on Discontinuities 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!