This repository contains four simulation cases for the “Optimizing Hole Distribution in a Showerhead of a Semiconductor Reactor” study. The mesh setup and workflow are the same for all cases, with differences in geometry configuration.

Case Descriptions

Case 1 → Without showerhead and baffle.

Case 2a → With showerhead and baffle (baffle diameter = 8 mm).

Case 2b → With showerhead and baffle (baffle diameter = 16 mm).

Case 3 → With showerhead and baffle (baffle diameter = 8 mm, modified substrate position).

Folder and File Details
constant/triSurface/

Contains the STL geometry files for showerhead, baffle, and substrate.

Each case has different STL files depending on the geometry configuration.

constant/extendedFeatureEdgeMesh/

Generated after running surfaceFeatureExtract.

Stores extracted feature edges required by snappyHexMesh.

system/

Contains mesh and solver setup files:

blockMeshDict → Defines the base mesh.

surfaceFeatures → Creates extendedFeatureEdgeMesh (stored in constant/extendedFeatureEdgeMesh).

snappyHexMeshDict → Controls refinement and snapping around STL surfaces.

extrudeMeshDict → Defines extrusion from 2D mesh to 3D.

changeDictionaryDict → Defines wedge patches.

createPatchDict → Synchronizes coupled points after patch creation.

controlDict → Controls simulation execution.

constant/

Contains physical property files:

triSurface geometries

extendedFeatureEdgeMesh

polyMesh (after meshing)

transportProperties

turbulence model setup

0/

Initial and boundary condition files for:

velocity (U)

pressure (p)

Workflow for All Cases

The following workflow applies to Case 1, Case 2a, Case 2b, and Case 3.

Generate base mesh

blockMesh


Extract surface features

surfaceFeatureExtract


Outputs are stored in constant/extendedFeatureEdgeMesh/.

Run snappyHexMesh

snappyHexMesh -overwrite


Define wedge patches

changeDictionary
createPatch


Extrude the mesh

extrudeMesh


Run the solver

simpleFoam

During the simulation setup, you may see warnings such as:
"FOAM Warning:
Wedge patch 'wedge1' is not planar.
Either correct the patch or split it into planar parts."

Why this happens-
Wedge patches in OpenFOAM must be perfectly flat (planar).
Due to very small floating-point rounding errors in the STL geometry or meshing, OpenFOAM detects a slight non-planarity.
The deviation is very small and only numerical.

Why you should not worry-
The solver still runs normally.
The wedge boundary condition is correctly applied.
The results are not affected.
This warning is common in wedge-based simulations and is safe to ignore.

Example Commands per Case
🔹 Case 1
cd case1
blockMesh
surfaceFeatureExtract
snappyHexMesh -overwrite
changeDictionary
createPatch
extrudeMesh
simpleFoam