

One of the big pleasures of engineering is discovering creative solutions to complex problems. A few years ago, we worked on a healthcare product for a major MedTech manufacturer and faced a complicated fluid dynamics problem. Our mechanical engineering team found a way to use electrical engineering software to solve the challenge Let's explore how to use hydraulic analogy and EE software for fluid dynamics testing!
Our client's product uses a pump to deliver water through a cleaning nozzle. We needed a way to predict the system's performance. Our job would have been easy if the fluid flow had been smooth and steady. But this product required pulses of high-pressure water -- several per second.
We immediately realized that we would need to do some complicated math.
For pulsating liquid, when the flow is continually starting and stopping, our equations and mathematical model needed to account for all factors that affected the flow behavior:
How would we calculate the performance of a complex dynamic system that involves electricity, mechanisms, and fluid flow?

IMAGE CREDIT: Wikipedia Moody diagram used to predict pressure drop or flow rate of liquid in a tube.
Our client was interested in using specialized software, intended specifically for these kinds of complicated multi-disciplinary simulations. So, we chose a pair of software packages to test: an open-source project and a commercialized package based on the same open-source code. They were powerful and seemed to have the features we needed.
At that stage of the project, we didn't need a perfect simulation; we just needed something that could give us easy order-of-magnitude predictions. To be clear, the simulation software was very good; it just wasn't the right choice for ad hoc users who needed good enough results quickly and easily.
Design success requires simplicity and quick iterations. We needed a more straightforward, faster tool that would allow for quick iterations so we could develop good design intuitions:
The complex simulation software's bells and whistles were hindering our progress more than enabling it. We needed to develop a novel solution to move forward.
At the basic physics level, there are many similarities between the flow of water, the flow of electrons, and the movement of mechanical systems. So, to solve our dilemma, we drew on something called the "hydraulic analogy."

IMAGE CREDIT: Wikipedia | The analogy between a hydraulic circuit (left) and an electronic circuit (right).
The hydraulic analogy puts some math behind these intuitions. It turns out that the equations describing them are very similar, often identical.
Table: Hydraulic analogy equivalence between systems
That made us realize we could use circuit simulation software to solve the fluidic and mechanical equations. Amusingly, our electrical engineering colleagues gave us some funny looks, but we proceeded undaunted!
Thankfully, SPICE software was freely available, plentiful, and perfect for our task. SPICE-based simulation programs have been a staple of electrical engineering design for almost 50 years, and most circuit design software has some form of SPICE built in.
We chose to use LTspice, a standalone SPICE simulator program, for a number of reasons:

IMAGE CREDIT: YouTube | LTspice UI
The only significant complication was choosing the correct equations and units for the hydraulic analogy. For this, we relied on online sources. A quick search for "hydraulic analogy" led to several good resources.
The resulting units sometimes looked weird: our capacitances were on the order of 10-12, and inductances were 1010, but we got used to it!
The SPICE model had three subcircuits:
The three subcircuits were coupled bi-directionally, so the outputs of each one affected the behavior of all the others.
It turned out that the LTspice software was powerful enough to meet our needs without being overwhelming.
After just a few days, we were able to build a rough simulation that we could quickly refine over time, which taught us a lot about how the product would behave and let us iterate quickly through multiple different motors, tube materials, pump dimensions, etc.
Because it was a dynamic simulation, we gained insights into all sorts of complex behaviors that we would have missed with a simple steady-state analysis: things like resonance and impedance matching, which can have big effects on system performance.
Examples of how a fluidic system model, circuit, and simulation can work in LTspice.
The SPICE model proved to be a valuable tool during the early stages of the design process. We quickly converged on a viable product architecture, allowing us to move immediately into proof-of-concept prototyping.
Our client was pleased that we had found such a creative solution to the task, though they assigned a modeling specialist with a PhD to continue with the complicated software we had abandoned earlier. Even several months later, the modeling specialist still wasn't done; they had only managed to capture about 2/3 of the behaviors in our SPICE model. Did they ever finish it?
This underscores key insights when solving complex problems: