Papers
Topics
Authors
Recent
Search
2000 character limit reached

Automated CFD Simulation Pipeline

Updated 25 February 2026
  • Automatic CFD Simulation Routine is an integrated pipeline that automates geometry import, mesh generation, BC assignment, solver configuration, and post-processing for reproducible high-fidelity simulations.
  • The method employs modular scripting to automate case preparation, physiological parameter integration, and parallel execution using MPI, reducing manual error and setup time.
  • Its extensible architecture supports rapid adaptation to diverse biomedical and engineering applications, ensuring efficient and accurate simulation outcomes.

An automatic CFD simulation routine is an integrated computational framework that orchestrates geometry import, mesh generation, boundary condition assignment, solver configuration, parallel execution, and result post-processing with minimal or no manual intervention. Such pipelines combine domain-specific automation tools, physiological or empirical parameter integration, customized solver configuration, and scripting for robust, reproducible, and efficient high-fidelity simulations—exemplified by systems such as CoronaryHemodynamics for coronary artery hemodynamics in OpenFOAM (Mao et al., 2 Jan 2025). The objective is to transition from labor-intensive, error-prone manual workflows to fully automated, end-to-end CFD pipelines suitable for advanced biomedical, engineering, or clinical applications.

1. Modular Architecture and Workflow Orchestration

CoronaryHemodynamics implements a modular pipeline composed of specialized stages executed in a sequential, script-driven workflow. Core modules include:

  • casePreparer: Automates geometry cleaning, identifies boundary zones, and calculates Windkessel boundary condition (BC) parameters using physiological metrics.
  • cartesianMesh: Employs cfMesh to generate body-fitted Cartesian meshes based on provided geometry and a user-configurable mesh parameter file (MeshInfo).
  • initializeFields / changeDictionary: Bootstraps OpenFOAM field files (“0”-folders), injects derived BCs, and updates solver dictionaries (controlDict, fvSchemes, fvSolution).
  • decomposePar: Automatically decomposes the domain for distributed-memory execution and MPI parallelization.
  • simpleCoronaryFoam / pimpleCoronaryFoam: Custom solvers (steady-state SIMPLE or transient PIMPLE) integrating physiological outflow (Windkessel) and inflow (parabolic law) boundary conditions.
  • Orchestration: All modules are invoked via a shell script (e.g., runCoronary.sh) with well-defined invocation order for steady or transient regime.

This structured approach guarantees rapid, reproducible, and expert-level simulation set-up from standard @@@@4@@@@ geometry inputs through to high-fidelity CFD outputs.

2. Automated Case Setup: Geometry Import and Mesh Generation

Geometry preprocessing is invoked via convention-based STL file import. Inputs follow strict naming (e.g., Cap_Aorta.stl, Cap_LAD_D1.stl, Wall_CoronaryTree.stl). The pipeline maps these to OpenFOAM patch names, parsing a GeometryFiles configuration.

Mesh generation uses cfMesh via the cartesianMesh application, driven by a MeshInfo file:

1
2
3
4
meshSize        0.0005;
minFeatureSize  0.0001;
nRefinement     3;
surfaceSmoothing  true;

Mesh quality is enforced by cfMesh default constraints:

  • Non-orthogonality < 65°
  • Skewness < 4
  • Aspect ratio < 10

The automated approach eliminates manual intervention in geometry cleaning, mesh sizing, and refinement application, ensuring robust spatial discretization congruent with complex vascular topologies.

3. Boundary Condition Configuration and Physiological Integration

CoronaryHemodynamics automates configuration of both the inlet (aorta) and multiple outlets (coronary arteries):

  • Inlet: Parabolic velocity profile, with instantaneous flow rate Q(t)Q(t) prescribed by a waveform file (scaled_pulse_flow.flow). The velocity law is

u(r,t)=2Q(t)πR2[1(rR)2]u(r, t) = \frac{2\,Q(t)}{\pi\,R^2} \left[1-\left(\frac{r}{R}\right)^2\right]

  • Outlets: Implements both two- and three-element Windkessel models governed by:

I(t)=P(t)R+CdP(t)dtI(t) = \frac{P(t)}{R} + C\,\frac{\mathrm{d}P(t)}{\mathrm{d}t}

(1+rR)I(t)+CrdI(t)dt=P(t)R+CdP(t)dt\left(1+\frac{r}{R}\right) I(t) + C r \frac{\mathrm{d}I(t)}{\mathrm{d}t} = \frac{P(t)}{R} + C\,\frac{\mathrm{d}P(t)}{\mathrm{d}t}

Outlet resistance and compliance parameters (Ri,Ci)(R_i, C_i) are derived automatically from patient metrics via Murray’s law and tabulated ratios.

Boundary condition code snippets are programmatically injected into OpenFOAM dictionary files, with all parameters either computed or auto-filled from templates.

4. Solver Configuration and Numerical Parameters

Solvers are tailored to the haemodynamic regime:

  • Governing Equations: Newtonian, incompressible Navier–Stokes (steady or transient)

U=0,(ρU)t+(ρUU)=p+μ2U\nabla \cdot \mathbf{U} = 0, \quad \frac{\partial (\rho \mathbf{U})}{\partial t} + \nabla \cdot (\rho \mathbf{U} \otimes \mathbf{U}) = -\nabla p + \mu \nabla^2 \mathbf{U}

  • Solvers:
    • simpleCoronaryFoam for steady-state problems (SIMPLE loop)
    • pimpleCoronaryFoam for time-dependent simulations (PIMPLE loop)
  • Numerical Controls: (From fvSchemes, fvSolution)
    • Time-step Δt=104\Delta t =10^{-4} s (transient)
    • Primary residual convergence: <106<10^{-6}
    • Pressure: GAMG, DIC smoothing; Velocity: smoothSolver, DILU
    • PIMPLE loop with 2 outer correctors, 3 correctors, 1 non-orthogonal corrector

Configuration files are generated and updated automatically, enabling rapid transition between solution regimes and direct adaptation to new vascular domains.

5. MPI Parallelization and High-Performance Execution

Full support for distributed execution across multiple cores is achieved via OpenFOAM’s decomposePar utility, configured in decomposeParDict:

1
2
numberOfSubdomains 8;
method            scotch;
Recommended decomposition methods (METIS or SCOTCH) optimize load balancing for unstructured meshes. The standard execution sequence is:
1
2
3
decomposePar
mpirun -np 8 pimpleCoronaryFoam -parallel
reconstructPar
Parallelization is transparent to the workflow, with no manual partitioning required.

6. Automation Scripting, Extensibility, and Reproducibility

Every element is script-driven, typically via a shell driver such as runCoronary.sh. This script chains case preparation, mesh generation, field initialization, dictionary injection, parallel decomposition, simulation, and post-processing:

1
2
3
4
5
6
7
8
casePreparer
cartesianMesh
initializeFields
changeDictionary
decomposePar
mpirun -np 8 pimpleCoronaryFoam -parallel
reconstructPar
foamToVTK
Switching between steady and transient analysis modes is reduced to a single command-line argument. For new geometries or boundary condition models, users update STL files and template parameter files; the automation logic propagates downstream changes through the entire workflow without further intervention. Extensible support for additional solvers, rheology models, or alternate BCs is achieved by substituting module calls in the driving script.

7. Post-Processing and Output Management

Primary solution fields (pressure pp, velocity U\mathbf{U}, wall shear stress) and time-series at boundary caps are automatically extracted and stored for analysis. Standard OpenFOAM probe functionObjects are used:

1
2
3
4
5
6
7
8
9
10
11
12
functions
{
    outletProbe
    {
        type probes;
        libs ("libsampling.so");
        fields (p U);
        probeLocations ((0.1 0 0) ...);
        outputControl timeStep;
        outputInterval 1;
    }
}
Data is written to postProcessing/probes/ and time directories. Visualization is automated via ParaView or Python scripting, enabling rapid generation of figures such as wall shear stress maps:
1
2
3
4
5
6
7
from paraview.simple import *
reader = OpenFOAMReader(FileName="case.foam")
reader.MeshRegions = ['internalMesh']
Show(reader)
ColorBy(reader, ('POINTS','wallShearStress'))
Render()
SaveScreenshot("WSS.png")
This design maintains tight coupling between simulation outputs and domain-appropriate quantitative or qualitative visualization.


In summary, an automatic CFD simulation routine as realized in CoronaryHemodynamics (Mao et al., 2 Jan 2025)—and generalizable to other vascular or physical domains—embeds robust automation at each pipeline stage: geometry acquisition, mesh generation, physiological boundary condition assignment, solver deployment, high-performance parallelization, and post-processing. By enforcing strict conventions, templated configuration, and script-driven workflow execution, the framework ensures reproducibility, extensibility, and efficiency, advancing both research and clinical simulation capabilities in hemodynamics.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Automatic CFD Simulation Routine.