Multiphysics modelling
19 Feb 2004
Most mathematical modelling of engineering systems centres on the software's ability to solve the often quite complex series of partial differential equations (PDEs) that describe the fundamental underlying processes.
Techniques such as computational fluid dynamics (CFD) and finite element analysis (FEA) can solve, for example, the basic equations of fluid flow and structural mechanics, respectively, at an incremental level and then integrate those solutions across the whole system.
By combining these techniques with other PDE solvers, for say heat transfer functions, you then start to get a complete picture of the process or system in model form, which can then be used for design or simulation.
These models are undoubtedly mathematically elegant but they have in the past required an enormous amount of computational and, many would say, intellectual power to develop.
A software package that has only just come on the market, however, has taken modelling to the next stage by offering an expanded 'multiphysics' capability.
Developed by Oxford-based Comsol, FEMLAB 3 can model virtually any physical phenomena that can be described with PDEs, and do so in a way that links different disciplines all in the one package. 'For example,' says Comsol MD Patrik Bosander, 'the analysis of a fuel cell might involve not only chemical reactions and electrical currents but also fluid dynamics and heat transfer. Femlab 3 couples these various transport processes and reactions faster and simpler than any other software.'
Now in version 3.0, Femlab (standing for Finite Element Modelling LABoratory) actually first appeared in 1995 as a 'PDE Toolbox' module in the well-known MATLAB engineering software from MathWorks. Subsequent versions added a structural mechanics module, an electromagnetics module and, in 2002, a chemical engineering module.
Although still able to integrate tightly with Matlab, as of last month Femlab 3 is now available as a standalone program that has been written in optimised code 'from the ground up' in C++ and Java.
Compared to previous versions, says Comsol, the new package can compute some models as much as 20 times faster while using as much as 20 times less memory. On a standard desktop PC it is said to handle stationary, Eigenvalue and time-dependent problems with as many as a million degrees of freedom. Solution times for such cases typically range from 15 minutes to a couple of hours depending on the solver technique and the speed of the computer.
Apart from speed, however, what gives Femlab 3 its extra edge is that users can enter their own partial differential equations simply by typing them into a dialogue box that serves as a type of free-form equation editor. Comsol claims it's the only package of its type where users can enter PDEs in this way, and then combine and interlink any type of phenomena to perform unlimited multiphysics.
This ability to arbitrarily couple any number of non-linear partial differential equations makes Femlab's chemical engineering module a powerful tool for sophisticated and non-standard modelling, but the package is not just a research tool. Ready-to-use applications, specific to many chemical engineering unit operations, offer a quick and straightforward modelling procedure for many design and development applications.
There are three groups of these ready-to-use applications in the chemical engineering module: Momentum Balances, Energy Balances, and Material Balances - or heat, mass and momentum transfer, as described in those classic textbooks of Transport Phenomena by Bird, Stewart and Lightfoot, and Elements in Chemical Reaction Engineering by H Scott Fogler, whose theories provide the underlying technical foundation of the module.
Whether using one of the applications 'prepared earlier' within Femlab, or inputting your own equations (or even combining the two procedures in true multiphysics mode), modelling with the chemical engineering module involves the following relatively simple steps:
create or import the system or equipment geometry in 1D, 2D or 3D<br>select the equations that define the system<br>specify the properties or coefficients in the selected equations<br>generate and refine the finite element mesh<br>run the simulation<br>visualise and process the results.<br>
Selecting one of the predefined applications automatically brings up options for the governing equations and boundary conditions. The user can then easily define the coefficients - for instance, the diffusion coefficient, reaction rate and velocity vector in the diffusion-convection-reaction equation, as described in the adjoining panels.
Once the module has computed the solution to a problem, a large number of chemical-engineering specific visualisation tools can be used to present the results as fluxes, reaction rates, compositions or virtually any function of the modelled variables. Femlab 3's accelerated Java graphics drive this part of the package, and also offer distinct advantages at the initial modelling stage, in which users can create models without any coding.
'Modelling in traditional packages is extremely time consuming,' explains Comsol's R&D vice president, Dr. Lars Langemyr. 'Roughly 90% of the time needed to simulate a system gets taken up with setting up and defining the model. In Femlab 3 you can build one in minutes.'
Explaining the impact that the package's user interface has had on his work, Dr. Jordan MacInnes at the University of Sheffield's department of chemical and process engineering, says: 'I was studying electrokinetic flow in microchannels, and after several months working with another package I was finishing up the model definition. A short time later I got a copy of Femlab 3 and, thanks to its equations-based interface and flexible entry of variables and their values, it took me only a couple of hours to complete the same model. I simply couldn't believe how much time I saved.'
Dr. MacInnes would presumably qualify for the special academic pricing that is available for Femlab 3. But at £4995 for a single-user perpetual licence, including support and automatic upgrades for 12 months, the package seems competitively priced for an industrial market that, as shown in the panels, can reap significant benefits from its application to real-world problems.
An academic problem
To illustrate the use of Femlab 3 in a complex multiphase system, consider a model produced by chemical engineering graduate students under Prof B Finlayson at the University of Washington in Seattle. The model treats the flow field and species distribution in an experimental reactor for studying heterogeneous catalysis. It exemplifies the coupling of free and porous media flow in fixed bed reactors.
The void between the catalyst particles and the pores inside them form a system with a bimodal pore structure - large pores appear between the particles and micro-pores are inside the particles. With Femlab 3, the students could combine a global material balance for the bed with the kinetics including the mass transport resistance in the micro-pores. They then expressed this resistance and the reactions in the micro-pores using the Thieles modulus, given by an analytical expression that was simply typed into Femlab's Kinetics edit field.
An industrial solution
Boyle Engineering of Newport Beach, California, is a US-wide engineering contractor specialising in environmental and water treatment projects. Its Water Science Group director Dr. Eric Vogler has recently been using Femlab in the design of a chlorine contact tank for drinking water distribution systems in Riverside Country, California.
At 32ft tall by 36ft diameter, the tank was designed to accommodate between 6 and 9million gallons per day (MGD) of drinking water, which is treated using the chloramination process. In this process sodium hypochlorite is added before flow into the tank and ammonia added to flow out of the tank. To increase the contact time and ensure adequate disinfection, the tank was to be designed with baffles.
To minimise dead volumes within the contact tank, and to accommodate the required daily flow, Vogler's process designers decided to model the tank and baffle designs using the k-epsilon turbulence equations, which are contained within the Femlab chemical engineering module.
After dead volumes were minimised through flow modelling and baffle design, a numerical tracer test was conducted using the mass transport equations in the module. The results from the numerical tracer testing (shown left) enabled the design engineers to effectively size the tank to meet health requirements.
'In the end,' says Vogler, 'the modelling we did resulted in a 10% decrease in the size of the contact tank from our preliminary plans and also afforded substantial cost savings to the client.'