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!
Improving a Complex, Dynamic Fluid System
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:
- Acceleration of each pulse
- Deceleration of each pulse
- Diameter and material of the long, flexible tubing that would swell and shrink during each pulse
- Geometry and size of the custom-designed piston pump
- Electromechanical behavior of the DC motor driving the pump
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.
Analyzing Specialized Fluid Dynamics Simulation Software
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.
Software Analysis: From Fun to Fatigue in 4 Days
Software Analysis on | Results |
---|---|
Day 1 | Our first day with the software was fun and exciting, dragging some pre-built elements on the screen (motor, pump, piping, etc.). We connected them together and ran a fluid dynamics simulation. |
Day 2 | Our third day with the software became exasperating. Many of the drag-and-drop elements were similar to what we needed, but not exactly right, and they couldn't just be tweaked to fit our needs. This forced us to start creating custom elements in the software. It proved to be a very complicated task, requiring us to wade through swamps of dense code -- not suitable for first-time users. |
Day 3 | Unfortunately, our second day with the software was annoying. As we tried to make our preliminary model more realistic, we had to dive deeply into the parameters of each drag-and-drop element and figure out how to adjust them to match our design. We spent hours poring through cryptic help files. |
Day 4 | By day four, it was obvious that building an accurate fluid dynamics simulation was going to require weeks, and we couldn't afford to wait that long. |
Software Results: Too Complex; Simpler & Faster Software Solution 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:
- Which parameters matter most?
- How sensitive is the design to manufacturing tolerances?
- What tubing materials are likely to give us the best performance?
- Roughly how large should the motor be?
- How much power will the product consume?
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.
Novel Solution: Hydraulic Analogy Using Circuit Simulation Software
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.
Fluidic Systems | Electrical Systems | Mechanical Systems |
---|---|---|
Pressure | Voltage | Force, torque |
Flow rate | Current | Velocity |
Pipe friction | Resistance | Damper |
Elasticity, gravity | Capacitance | Spring |
Fluid inertance | Inductance | Mass |
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!
Putting SPICE Freeware to Work
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:
- Available at no cost
- Simple, intuitive, and easy to use – even for casual and first-time users
- In use around the world, with active online help resources and forums
Choosing the Right Equations
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!
Defining the Subcircuits
The SPICE model had three subcircuits:
- The first one modeled the motor in the electrical domain, capturing voltage, current, resistance, and electromagnetic effects.
- The second subcircuit covered the motor in the mechanical domain: torque, speed, rotor friction, and rotor inertia.
- The third and final subcircuit simulated the fluidic domain: pressures, flows, tubing, and the rotation-to-flow behavior of the pump.
The three subcircuits were coupled bi-directionally, so the outputs of each one affected the behavior of all the others.
Gleaning Insights from the Simulation
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.
Warning: Trying to access array offset on value of type bool in /home/andrews/www/www/wp-content/plugins/elementor/includes/base/widget-base.php on line 223
Warning: Undefined array key -1 in /home/andrews/www/www/wp-content/plugins/elementor/includes/base/controls-stack.php on line 695
Examples of how a fluidic system model, circuit, and simulation can work in LTspice.
Successful Prototyping from Rapid Software Simulation
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:
- Moving forward sometimes means removing tools, processes, or even questions that are hindering immediate progress.
- Critical analysis leads to faster solutions that enable necessary leaps in progress. It’s at the core of efficient engineering and our approach at AC.