## Simulating Viscous Fingering Using Equation-Based Modeling

##### David Kan December 18, 2013

A prospective user of COMSOL approached me about modeling viscous fingering, which is an effect seen in porous media flow. He hadn’t found a satisfying solution elsewhere, so he turned to COMSOL. I’d like to share with you some of my insight on how to go from idea to model to simulation by taking a “do-it-yourself approach” and utilizing the equation-based modeling capabilities of COMSOL Multiphysics.

### A DIY Approach to Modeling Viscous Fingering

Not knowing much about the subject myself, I did a quick search in our COMSOL Conference Papers and Presentations collection. (If you’re unfamiliar with the resource, you should really check it out; it contains papers and presentations covering a broad spectrum of applications that have been on display at our annual COMSOL Conference worldwide.)

#### Leveraging Equation-Based Modeling

The search brought me to a paper on modeling viscous fingering, presented by Ekkehard Holzbecher of Georg-August Universität Göttingen at the COMSOL Conference 2009 in Milan. As I scanned through it, I noticed that Ekkehard was using equations directly in his simulation. He based his model on work by Will Zimmerman and Bud Homsy, starting with the mathematical model described in their work and then using COMSOL Multiphysics to define his particular simulation.

A couple of neat things about Ekkehard’s model:

1. He used the partial differential equations (PDEs) that are built directly into COMSOL
2. He used a random function to specify his initial conditions to produce the fingering using MATLAB

After getting a fairly good feel for the model, I went about attempting to repeat his simulation. What first looked like a challenging model to set up turned out to be quite easy in COMSOL. I simply chose a 2D, Coefficient Form PDE and implemented the model. I chose reasonable values for the physical parameters, and I was able to use the built-in random function that comes with COMSOL. You can see some of the results here:

#### Flexibility Provides Good Results

Now for people like Ekkehard and I, equation-based modeling or, as I like to call it, DIY simulations, is a natural approach. But it’s not for everyone, and I get that. It was time for me to go back to my prospect with these results in hand.

It turns out that he loved the results. The approach was absolutely acceptable to him, primarily because he got good results. He was an experienced scientist and the equations suited him just fine. In this case, the flexibility of the software allowed him to do things he was unable to do elsewhere.

It’s interesting to me that I sometimes still get questions like, “what module do I need in order to use equations?” This is what COMSOL Multiphysics is based on. It’s in our essential structure. While you don’t have to enter your own equations, you always have that option — in all of our modules. After this experience, my confidence in COMSOL has never been higher, and I’m so impressed with the user-base we’ve developed. As we continue to roll out new product updates, rest assured that we’ll continue to support all of our DIY simulation enthusiasts.

#### Older Post

Predicting Microwave Drying of Potatoes