> Let me clarify the matter: > > The answer to Greg's question is: No, there is no external access to the > Simulink algebraic loop solver parameters (tolerances, number of > iterations, etc.) > > The 'relative and absolute tolerances under Simulation|Parameters' apply to > the ODE solvers, only. This may or may not have impact on solving algebraic > loops, but only indirectly. > > As for solving algebraic loops: Simulink simply tries to solve them as > accurately as possible. > > Hope this helps, > Jacek
It answers the question, but it raises another, and I'm starting to think that I'm approaching the problem wrong (or rather, that I could be approaching th eproblem differently), so I'll pose it here.
I'm going to be developing a model of a pipe network. We want to use Simulink because we eventally need to overlay a control system on the model, and with Stateflow it seems like it would work admirably.
I'm having a problem writing the block that will represent a pipe section.
Currently, each pipe-block takes an inlet pressure, an outlet pressure, and a flow rate. It operates on these data, and calculates a new flow rate, and (if appropriate for the pipe location in the network) a new inlet and/or outlet pressure. The new outlet pressure and new flow are fed to the next pipe downstream, but the new inlet pressure must be fed back to the upstream pipe. This forms an algebraic loop.
My hope was that Simulink could solve this loop at each timestep and balance the flow. It's not happening. I get random errors that it's having trouble solving or that it's encountered a singularity. That, and the pipe flows don't match (as much as a 2-5% change in flow within a pipe section - conservation of mass is really an optional constraint, after all :)
I'm willing to try just about any solution (if someone could point me to a third party package for solving piping networks in Simulink, I'd be greatly in their debt)
+----------------------------+ Want to know the secret to riding a bike | | from Fairbanks to Anchorage? | Greg Anderson | 1. Push down with left foot. | Rogue Squadron - Rogue 31 | 2. Push down with right foot. | email@example.com | 3. Repeat. | firstname.lastname@example.org | 4. Stop when you reach Anchorage. | AIM - Aranthon | | www.wam.umd.edu/~dwarf | I know it seems pretty simple, but it | | worked for me. AAVR 1, 8/20-8/26, 2000 +----------------------------+ Want to help me wipe out AIDS? Ask me how!