Define Inlet and Outlet Boundaries in FreeCAD CFD

This article provides a concise, step-by-step guide on how to properly set up inlet and outlet boundary conditions in FreeCAD using the CfdOF (Computational Fluid Dynamics OpenFOAM) workbench. You will learn how to select geometry faces, assign boundary types, and configure the necessary physical parameters—such as velocity, volume flow, and static pressure—to ensure a stable and accurate CFD simulation.

Prerequisites

Before assigning boundaries, ensure you have:

  1. Created your fluid domain geometry.
  2. Switched to the CfdOF workbench.
  3. Created a CFD analysis container by clicking the CFD Analysis button.
  4. Generated or set up your fluid physics model (incompressible or compressible).

Step 1: Define the Inlet Boundary Condition

The inlet boundary directs fluid into your simulation domain. In most incompressible internal flows, this is specified as a fixed velocity or fixed flow rate.

  1. Select the Surface: In the 3D view, click directly on the face (or faces) representing where fluid enters the model.
  2. Create Boundary Condition: Click the CFD Boundary Condition icon in the CfdOF toolbar (or go to CFD > Boundary condition).
  3. Configure Boundary Settings:
    • Boundary Type: Select Inlet.
    • Sub-Type:
      • Choose Fixed Value (Uniform Velocity) to prescribe a specific fluid speed (e.g., \(1.0\text{ m/s}\) along the normal axis).
      • Choose Volumetric Flow Rate or Mass Flow Rate if you have total throughput values instead of linear velocity.
    • Flow Direction: Set the direction vector. Selecting the Normal checkbox automatically applies the flow perpendicular to the chosen surface.
    • Turbulence Parameters: If using a turbulence model (like \(k\)-\(\epsilon\) or \(k\)-\(\omega\) SST), enter the turbulence intensity (typically 1% to 5%) and length scale or eddy viscosity ratio.
  4. Click OK to apply. A new boundary object appears in the Model Tree under the CFD Analysis container.

Step 2: Define the Outlet Boundary Condition

The outlet boundary allows fluid to leave the domain. A standard configuration pairs a velocity inlet with a fixed static pressure outlet.

  1. Select the Surface: In the 3D view, select the face where the fluid exits the domain.
  2. Create Boundary Condition: Click the CFD Boundary Condition icon again.
  3. Configure Boundary Settings:
    • Boundary Type: Select Outlet.
    • Sub-Type:
      • Choose Static Pressure (Standard for most internal flows).
    • Value: Set the gauge pressure (typically 0 Pa for an outlet venting to atmosphere or reference conditions).
    • Backflow Settings: Ensure backflow handling is set to prevent numerical divergence if flow recirculation reaches the outlet boundary.
  4. Click OK to save the boundary condition.

Best Practices for Boundary Definition

  • Well-Posed Problem: For stable convergence in standard incompressible CFD, always pair a defined flow rate/velocity at the inlet with a fixed pressure at the outlet. Avoid specifying fixed velocity at both boundaries, as this over-constrains the continuity equation.
  • Face Grouping: If you have multiple inlet or outlet faces operating under the exact same conditions, hold Ctrl and select all corresponding faces before creating the boundary condition to manage them in a single entry.
  • Mesh Alignment: Ensure that the mesh generated later is properly refined near the inlet and outlet boundaries to capture gradient transitions accurately.