# HELP: Implicit equation solving with more than one tear variable

• posted

Hi, I have a nonlinear set of equations that I have to solve implicitly, it's a flow network where I can't escape the square law relationship between pressure and flow, and as a consequence an explicit solution is looking either very nasty indeed or infeasible. My simulation tools can handle a single tear variable (using Newton Raphson), but the situation has just got more complicated, and I now have to converge two separate tear variables at once to solve the equation set.

Can anyone point me to the name of a technique that can be used for this? I'd really prefer a codeable approach rather than a packaged tool, because the solution has to be embedded into existing C++ code.

TIA

• posted

2-D Newton's method? (I'm no expert here, but I've had it work).

If this needs to be in your controller I'd be leery of any iterative technique, because it's very difficult to guarantee precision and real- time performance. If 'embedded' means "stuck into a product to work on the desktop" then you're probably OK.

If it's part of a simulation, could you make the estimate of the your tear variables a bit approximate, doing (say) just one or two iterations of Newton's method each step, and depending on the smallness of your time step and some feedback method (that you identify, of course) to keep things close to the right value? I'm making this all sound pretty fuzzy because (a) I don't know if it actually is the right path and (b) I'd have to ponder on your equations to see if what I'm saying makes any sense at all.

(By the way, what's a tear variable? Having to do with shear in a fluid I'm sure, although 'tear' sounds more violent somehow.)

• posted

I thought tear variable was a common expression, apologies if it isn't. It refers to the variable that you converge in an implicit solution, like there are two halves of the problem torn apart and the procedures aligns the two halves across the tear.

Thanks for the suggestions, guys.

• posted

Very interesting discussion. There is an excellent tutorial at the University of Edinborough titled "Modelling, Simulation and Optimisation":