top of page

7 Things You Should Do Before Every CFD Simulation in COMSOL

In CFD, the quality of your results is determined long before you press the Run button. Small oversights in preparation — a poorly scaled mesh, inconsistent boundary conditions, or overlooked flow regime parameters — can lead to hours of wasted computation and misleading conclusions. In this article, we provide you with our “pre-flight” checklist for nearly every CFD simulation.


1. Start Simple


This might sound obvious, but based on our experience, it’s worth stating as the very first guideline: always begin with the simplest possible model. CFD is one of the trickiest areas of numerical simulation, and it’s important to make sure your model works in the most basic regime before adding complexity. Only after you’re confident in the basics should you bring in multiphysics couplings.


A child in a red shirt climbs stairs skipping easiest steps. Popular meme teaching fluid-flow simulations should be done step-by-step without skipping.
One picture is worth more than a thousand words. In simulation, progress comes from mastering the stairs one by one. And shorts are often longer and more expensive.

COMSOL makes it very easy to combine multiple physics interfaces, but just because you can doesn’t always mean you should. Build up gradually - you’ll save yourself a lot of time and frustration.


2. Evaluate Your Reynolds and Mach Numbers


Before choosing your solver, get a clear picture of your flow regime. Why it matters: The Reynolds number (Re) helps us determine whether your flow is laminar, transitional, or turbulent. The Mach number (Ma) helps us tell if compressibility effects need to be considered due to velocity properties of the flow (not considering non-isothermal flow, etc.). Selecting an inappropriate turbulence model or solver settings without these checks can result in entirely misleading outcomes.


How to check:

  1. Calculate Re = ρ*U*L/μ, where ρ is density, U is characteristic velocity, L is characteristic length, and μ is dynamic viscosity.

  2. Calculate Ma = U/c, where c is the local speed of sound.


What to watch out for:

  • Critical Reynolds number, and then choose the appropriate turbulence model. However, remember that the critical Re value largely varies depending on the geometry.

  • High-Mach flows (Ma > 0.3) typically need a compressible solver. If Ma is less than 0.3, then the error from not considering compressibility is below 5%.


3. Ensure Consistency in Your Boundary Conditions


Inconsistent or conflicting boundary conditions can cause your simulation to diverge—or worse, converge to a physically impossible solution.


Key checks:

  • Inlet vs. Outlet: For example, sometimes we need to prescribe mass flow on both inlet and outlet, typically when there are multiple outlets. In this case, make sure mass flow rate boundary conditions don’t contradict each other. When the continuity equation is not satisfied at the boundary, it can hardly be met in the volume.

  • Constant velocity profile right next to the wall boundary: one of the most common mistakes. Although COMSOL is usually able to converge with this inconsistency, it is much better to prescribe the correct profile manually, or in the case of pipe flow, use the fully developed flow BC (the difference between the constant and fully developed BC can be seen in Figure 1).

  • Inconsistency between initial and boundary conditions in time-dependent studies: the initial condition can often collide with the boundary conditions. A possible solution is to make a smooth transition to the desired values using, for example, a step function at the start of the simulation. Another way to treat this issue is to use a solution of the preceding stationary study with consistent boundary conditions for the time-dependent study.

  • Constant pressure boundary condition vs the gravitation: when we are using the gravitation in our model, it is easy to forget that gravitation linearly increases the hydrostatic pressure. This can easily collide with the constant pressure BC prescribed on the plane that isn’t part of the potential isosurface.


Two colormaps showing differences in the pressure gradient when setting inconsistent boundary condition.
Difference of pressure fields when prescribing a constant velocity profile (left) and a parabolic velocity profile (right) on the bottom boundary with the same average velocity and zero pressure BC on the upper boundary.

4. Assess Your Boundary Layer Mesh Quality


A high-quality boundary layer mesh is critical for accurately capturing near-wall gradients, specifically in turbulent flow, but even in laminar flow, it is very important. COMSOL uses two default types of wall treatment for turbulent flow: Wall functions and Low Re wall treatment. Low Re is usually more precise; however, it also has higher mesh requirements. There are three basic mesh inspection metrics in COMSOL :


  • Wall resolution in viscous units is the default metric when using turbulent models with wall functions. For optimal wall resolution, it should vary in the low dozens and definitely shouldn’t exceed one hundred.

  • Wall liftoff (in length units) can also be used when evaluating wall function turbulence models. This metric doesn’t have any universal number to aim for because it is in length units. The rule of thumb is to aim for values of 2 or more orders of magnitude lower than the specific dimension.

  • Dimensionless distance to cell center is the default metric when evaluating Low Re turbulence models. For the simpler turbulence models, the acceptable value of the metric is around 1. For the two equations model or the v2-f model, the value should be less than 0.5.


There is also an option for Automatic wall treatment that evaluates boundary layer mesh quality and then, based on it, applies either wall functions or Low Re wall treatment. This option can use both treatments in different parts of the model.

For the wall resolution quality to be inspected, we usually need the first calculation to be performed and then refine the mesh if needed.


5. Opt for a Mapped or Swept Mesh When Possible

Although a non-structured mesh is a great tool when the geometry is highly irregular or when we start with the software. If possible, swept (or structured) meshes can dramatically improve numerical accuracy and convergence speed in swept-volume regions.


When to use swept meshes:

  • Geometries with predominantly hexahedral or prismatic shapes—e.g., duct flows, blade passages, or annular channels.

  • Regions where flow follows a clear sweep direction.

Pros:

  • Reduced cell count for the same accuracy

  • Better alignment with the flow, lowering numerical diffusion.

  • Faster solver convergence due to improved element quality.

Cons:

  • Not possible to use with highly irregular geometries


It is possible to combine the structured and non-structured mesh in COMSOL if it is possible to use the swept mesh only in parts of the model. In that case, it is essential to make sure that the growth factor in the swept-tetrahedral transition isn’t too large, as it is one of the most common reasons these meshes don’t converge.

It should be noted that the performance of a structured mesh increases as the edges of the elements are aligned with the direction of the flow.


Fluid flow (CFD) meshes - structured and unstructured example.
Mapped (structured) mesh (left) vs unstructured (right) around NACA airfoil

6. Look for Symmetry in Your Model


Exploiting symmetry can cut your computational cost in half (or more) without sacrificing accuracy. Speeding up your simulation.


Types of symmetry:

  • Plane symmetry: Flow patterns mirrored across a flat plane.

  • Rotational symmetry: Periodic sectors in turbomachinery or rotating machinery.

  • Of course, the most convenient type of symmetry is the 2D axisymmetric component.


Implementation tips:

  • Define symmetry or periodic flow boundary conditions carefully — wrong orientation can introduce artificial sources or sinks. COMSOL has a solid automatic direction estimation tool, but if your simulation is diverging, it is a good place to look for an error.

  • Verify that inlet and outlet flow profiles match across the symmetry plane and that you have (if you’re using mass flow BC) prescribed a consistent fraction of the mass flow.


Keep in mind that turbulence is an asymmetrical phenomenon and that any symmetry plane brings some artificial assumption to the calculation.


7. Don’t Rely Solely on the Steady-State Solution


Even if your main interest is steady behavior, and all of your boundary conditions are time-independent, a transient behavior can still occur, causing solver stability issues and multiple solution branches. When you use the time-dependent study, it uncovers oscillatory or unstable flow features that may be missed in a pure steady-state simulation.


Colormap showing velocity field of Von Karman vortex street - textbook example of unsteady flow in stationary BCs.
Von Karman vortex street - textbook example of unsteady flow in stationary BCs

Ready to Elevate Your CFD Workflow?


By systematically applying these seven checks, you’ll minimize errors, reduce run times, and boost confidence in your results. If you’d like personalized guidance or in-depth training on advanced meshing and solver strategies, our Simulation Guys experts are here to help.


Are you seeking assistance for a COMSOL simulation project?

Try our innovative service: COMSOL Multiphysics consultations. Our consultants, working in various R&D institutions, will share their long-term experience during online meetings to teach you how to set up your model on your own COMSOL license.



bottom of page