Fluid Dynamics Simulation Alternatives

We approach fluid dynamics simulation differently depending upon our client need. AC Principle Dan Faulkner shares a new option for CFD.

Challenge: Improve a Complex, Dynamic Fluid System

A few years ago, we were working on a health care product for a major MedTech manufacturer and we were faced with a complicated fluid dynamics problem.

The product used a pump to deliver water through a cleaning nozzle, and we needed a way to predict the system performance. If the flow had been smooth and steady our job would have been easy, but this product required pulses of high-pressure water — several per second.

High-pressure water pulsing through a dynamic system, such as an oral irrigator.

Right away, we 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?

moody chart cfd computational fluid dynamics
IMAGE CREDIT: Wikipedia Moody diagram used to predict pressure drop or flow rate of liquid in a tube.

Starting with Specialized Fluid Dynamics Simulation Software: From Fun to Fatigue in 4 Days

Our client was interested in using specialized software, intended specifically for these kinds of complicated multi-disciplinary simulations.

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 both very powerful and seemed to have exactly the features we needed.

Day 1
Our first day with the software was fun and exciting, dragging some pre-built elements on the screen (motor, pump, piping, etc.), connecting them together, and then running a fluid dynamics simulation.

Day 2
However, 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 3
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 4
By day four, it was obvious that building an accurate fluid dynamics simulation was going to require weeks, but we couldn’t afford to wait that long.

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 required simplicity and quick iterations.
We needed a faster tool.

We needed a simple 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?

Novel Solution: Hydraulic Analogy Using Circuit Simulation Software

The bells and whistles of the complex simulation software were getting in our way more than enabling our progress. We needed to develop a novel solution to move forward.

To solve our dilemma, we drew on something called the “hydraulic analogy.”

At the level of basic physics, there are a lot of similarities between the flow of water, the flow of electrons, and the movement of mechanical systems.

Fluidic systemsElectrical systemsMechanical systems
PressureVoltageForce, torque
Flow rateCurrentVelocity
Pipe frictionResistanceDamper
Elasticity, gravityCapacitanceSpring
Fluid inertanceInductanceMass
Table: Hydraulic analogy equivalence between systems

The hydraulic analogy puts some math behind these intuitions. It turns out that the equations describing them are very similar, often identical.

That led us to realize that we could use circuit simulation software to solve the fluidic and mechanical equations.

We got some funny looks from our electrical engineering colleagues, but we proceeded ahead, undaunted!

electronic hydraulic analogy
Analogy between a hydraulic circuit (left) and an electronic circuit (right).
IMAGE CREDIT: Wikipedia

Putting SPICE freeware to work: LTspice simulator

Thankfully, freely-available SPICE software was 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

LTSpice Simulator cfd modelling
IMAGE CREDIT: YouTube | LTspice UI

Choosing the right equations

The only significant complication was choosing the right 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 the 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 to each other bi-directionally, so the outputs of each one affected the behavior of all the others.

Gleaning insights from a fluid dynamics 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 got insights into all sorts of complex behaviors that we would have missed with a simple steady-state analysis: things like resonance and impedance matching that can have big effects on the system performance.

Examples of how a fluidic system model, circuit, and simulation can work in LTspice.

Successful Fast Prototyping

The SPICE model turned out to be a valuable tool during the early stages of the design process. We were able to converge quickly on a viable product architecture, allowing us to move immediately into proof-of-concept prototyping.

Our client was very happy 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 that 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 going back and stripping away tools, processes, or even questions that are getting in the way of immediate progress.

> Critical analysis leads to faster solutions that enable important leaps in progress. It’s at the core of efficient engineering and our approach at AC.

Roadblocks Holding You Back? Let’s talk.

Do you have a complex problem without a predicate solution? Do you need help analyzing potential or existing roadblocks?

Are you ready for a dedicated and nimble engineering partner who works with you, wherever you are in your product development lifecycle?

Our engineers have decades of experience identifying the right solutions to quickly solve complex and ambiguous challenges.

Let us know how we can support your ambitious project, today.

Categories

Services

Client Industries

Tech Talk Series