The Optimal Workflow for Complex Modeling Projects on a Deadline
Have you ever feared a deadline because your model took longer to solve than expected? Here, we discuss common causes of time delays and how to prevent them. Let’s start with a real-world example: solving a complex modeling project on a deadline.
Real-World Example: Analyzing Bubbly Flow in an Industrial Reactor
Consider the following story. A large industrial reactor showed unexpected behavior in its bubbly flow compartment. Due to very costly downtimes — and difficulty in getting good measurements — the engineering department made a CFD model to analyze the problem. The engineer creating this model had to include a bidirectional coupling, as gas bubbles affected the water pressure and turbulence and water influenced the creation and transport of the gas. As such, the model became very nonlinear.
The engineer started by using a Bubbly Flow interface on the 3D CAD model of the reactor section. All of the relevant boundary conditions, material properties, and mesh were defined, but the engineer ran into convergence issues. The model had several inlets, outlets, narrow regions, gas creation sites, and more. Since the time-dependent study took about seven hours to compute, finding the cause of the trouble was an arduous task. Meanwhile, the deadline kept creeping closer and closer.
What would you do in this situation?
Sloshing inside a vehicle’s fuel tank. This example model involves computing the velocity and pressure for both the gas and liquid simultaneously. Such CFD computations in 3D are extremely valuable, but also have long computation times.
Optimizing the Modeling Workflow
Before continuing the story, let’s discuss (in a general way) what could have happened, because there are already lessons to be learned. There are many situations where a 3D model with complicated physics is required. A common approach is to take all of the expected “ingredients”, put them together, and reach your goal. But what if something unexpected happens? What if the model doesn’t converge? Now you’re in a tricky situation, of which any of the following factors could be the cause:
- Any boundary condition that you used in the first, second, third, etc. physics interface
- A coupling between any of the physics
- Material behavior
- The mesh requirements for any of these factors
- An unexpected or unknown phenomenon
A full 3D model might take anywhere from minutes to several hours to run. Thus, every mistake in a complex model takes longer to find out about. Moreover, you can’t be sure what causes the issue. A more reliable approach is to use the following steps:
- Open the Application Library via the File menu in the COMSOL Multiphysics® software or go to the online Application Gallery. In both places, you can find hundreds of example models with step-by-step instructions. Look at one that is similar to your situation so that you are familiar with the boundary conditions, meshing requirements, etc.
- Start your own model in 2D or 2D axisymmetry. It doesn’t matter if your situation cannot be fully represented in 2D. An approximation suffices.
- Test the major physical principles of your model in a single-physics environment. This gives you a feel for the numbers, required mesh size, time stepping needed, etc.
- After each successful step, add complexity, such as multiphysics effects, nonlinear materials, etc.
- Based on the 2D model, start building your CAD-based 3D model and run it step by step. After testing the fundamentals, add parameterization and formulas where needed.
This workflow is extremely efficient, because if you run into trouble, you can precisely pinpoint the cause and fix it quickly.
The File menu in COMSOL Multiphysics, showing where you can access the Application Library.
The Application Library, showing part of the results when typing “turbulent” in the search box. Every example model and app in the Application Library includes documentation and step-by-step instructions.
Simulation Results for the Simplified Industrial Reactor Model
Let’s go back to the industrial reactor model. The COMSOL Support team recommended making a simplified 2D model. Since this model required only five minutes to run, the engineer quickly identified the culprit: One outlet pipe was cut off in the CAD model. The short outlet caused a high vortex area to conflict with the boundary condition, which was fixed at a constant pressure. A short outlet is normally not a problem, but here, the combination of the outlet vortex with 3D turbulent bubbly flow and a less-than-optimal mesh made it a showstopper. The model ran smoothly after simply extending the outlet with an Extrude geometry operation.
A simplified 2D model that demonstrates the physical phenomenon is shown below.
Left: The original situation. A streamline plot of the velocity shows that the outlet cuts off a vortex in the flow. Right: The velocity profile with the extended outlet.
A close-up view of the velocity profiles in the outlet region. Left: The original, cutoff outlet. Right: The extended outlet. The outlet extension is hidden in this image to make a good comparison.
Starting a Project in COMSOL Multiphysics® Strategically
Computers are always getting faster, so when you have easy-to-use multiphysics software, it’s tempting to include all of the details in your model at once. After all, more detail means more accuracy. However, accuracy comes at the price of an increased computation time. Therefore, each modeling project should be preceded by an assessment of the required accuracy versus the time budget. This important step is often forgotten or underestimated. Think about the following scenarios and how they differ in demands:
- A researcher who investigates the fundamentals of a next-generation technique
- A mechanical engineer who works on a product to be shipped in eight months
- A consultant who gets paid by the hour for an assignment
- A master’s degree student working on a thesis due in six months, two of which are to be spent on modeling
If you start out with an unrealistic goal given the time budget — or worse, no well-defined goal — then you risk running into trouble.
In many cases, simulation projects do require high accuracy. When modeling real-world situations, multiphysics phenomena often have to be taken into account, typically in 3D CAD geometries. COMSOL Multiphysics covers the full spectrum of computational demands, from straightforward to complex. This gives you the freedom to maneuver anywhere between these extremes. Once you have determined your goal, you can outline a strategy on how to get there.
Left: A static load analysis of a bracket. Right: A coupled acoustic-mechanical analysis of a gearbox. Both analyses can be performed in the same interface and workflow when using COMSOL Multiphysics.
Concluding Thoughts on the Optimal Workflow for Complex Modeling Projects
By using the steps outlined in this blog post, you will have full confidence in reaching your modeling goals before a deadline. Notice that this approach is both simple and straightforward. However, when a complication occurs, it’s easy to get stuck in the details and lose sight of the bigger picture. This can happen, even with experienced simulation engineers. One of the most important modeling skills is the ability to isolate a problem and reduce it to the very essentials when needed.
Want to evaluate the COMSOL® software for your unique needs? Contact us via the button above.
Browse more blog posts about solving models in COMSOL Multiphysics:
- COMSOL Now
- Fluid & Heat
- Structural & Acoustics
- Today in Science