r/OpenFOAM

I built a GPU-resident CFD solver in CUDA and would love feedback on the architecture
▲ 44 r/OpenFOAM+2 crossposts

I built a GPU-resident CFD solver in CUDA and would love feedback on the architecture

I’ve been working on brae, a GPU-resident CFD solver for OpenFOAM-style cases.

The goal is to run existing finite-volume CFD cases on one GPU while avoiding the usual CPU-GPU transfer loop every iteration. The current path is simpleFoam-compatible: matrix assembly, pressure correction, turbulence updates, and sparse linear solves are designed to stay resident on the GPU.

Repo: https://github.com/simd-ai/brae

This is still early, but in the current benchmark it is around ~5× faster than a GPU-accelerated OpenFOAM setup on the same GPU, with validation error under 1%.

I’d really appreciate technical feedback on the CUDA architecture, benchmark methodology, or solver design.

u/tihiera — 1 day ago

I’ve been working on an AI agent for automating CFD workflows — looking for feedback

I’ve been working on a tool called Chat2Sim that tries to automate part of the CFD setup process.

The basic idea is:

  • upload a geometry file
  • describe the simulation in natural language
  • generate the case setup
  • create the mesh
  • run OpenFOAM
  • visualize the results

It’s still early, but the goal is to reduce the amount of manual setup/debugging needed before getting to useful CFD results.

I’m mainly looking for feedback from people who use OpenFOAM, CFD, or simulation tools regularly:

What part of the CFD workflow would you actually want automated?
And what would make you trust or not trust this kind of tool?

https://www.youtube.com/watch?v=_saR6qUW-kc

u/No-Elderberry248 — 5 days ago

Help with Zone Labelling and Meshing Workflows in OpenFOAM

I am a relatively new OpenFOAM user and I am finding mesh generation + the labelling of different surfaces and volumes for boundary and other conditions a cumbersome task. LLMs are also making me run in circles.

I have read that Gmsh/Ansys/snappyHexMesh, etc. can be used. I am curious what workflows you use for this: defining boundary/cell zones + meshing. This would help me discover options and see what's best for me.

reddit.com
u/SapotaJuice — 4 days ago
▲ 8 r/OpenFOAM+1 crossposts

Struggling to get y+ near 1 with snappyHexMesh boundary layers

I use snappyHexMesh with surface snapping and boundary layers. For the inflation layers, I’m using addLayersControls with addLayers true.

The issue is that no matter how much I reduce the first layer height, I can’t reliably get y+ close to 1. Sometimes the mesh quality gets worse, sometimes layers seem to get dropped, and the final y+ does not respond the way I expect. It feels like the requested first layer thickness is not always actually being preserved on the surface.

What am I doing wrong? I struggled a lot with snappyHexMesh and I really hope it is my fault for not being able to get the y+ right and I hope there is a fix. I don't want to go back to StarCCM+ at all.

reddit.com
u/chipthehp — 9 days ago
▲ 52 r/OpenFOAM+4 crossposts

CFD-Based Design Optimization and Thermal Performance Analysis of a Shell-and-Tube Type Heat Exchanger Using ANSYS Fluent

Hello Guys, I am a Mechanical Engineer currently working on CFD projects.

I recently completed a Computational Fluid Dynamics (CFD) project of a client focused on the design optimization of a Shell-and-Tube Heat Exchanger using ANSYS Fluent.

🔹 Project Objective To improve heat exchanger thermal performance through progressive design modifications and validate CFD results against theoretical calculations based on the LMTD (Log Mean Temperature Difference) method.

🔹 Design Evolution

✅ Design 1: Basic Double-Pipe Heat Exchanger

✅ Design 2: Added Tube Headers, End Plates, and Flow Management Components

✅ Design 3: Introduced Baffles to Enhance Cross-Flow and Improve Heat Transfer

✅ Design 4: Replaced Single Tube with a 5-Tube Bundle while Maintaining Equivalent Flow Area• Increased heat transfer surface area by approximately 123%

✅ Design 5 (Final Optimized Design):• 5-Tube Bundle• 8 Internal Baffles• ~2.84 Million Computational Cells• SST k-ε Realizable Turbulence Model• Complete CFD Validation Against Analytical Calculations

🔹 Pre-Simulation Engineering Calculations

Using the LMTD method, the operating conditions were determined as:

• Shell-side Velocity: 0.00658 m/s• Tube-side Velocity: 0.01492 m/s

These values were then used as boundary conditions for CFD simulations and validation.

📊 Validation Design 5 produced the closest agreement with theoretical predictions:

• Shell Outlet Temperature: 387 K(Target: 350 K | Error: 10.6%)

• Tube Outlet Temperature: 382 K(Target: 400 K | Error: 4.4%)

Compared to Design 1, the shell-side prediction error was reduced from nearly 29% to 10.6%, demonstrating the effectiveness of the design optimization process.

🔹 Verification A mesh independence study was conducted using coarse, medium, and fine meshes. Temperature variation between medium and fine meshes remained below 0.01%, confirming numerical reliability and solution stability.

This project was a great exercise in combining:✔ Heat Transfer Theory✔ CFD Simulation✔ Design Optimization✔ Numerical Validation✔ Engineering Problem Solving

If you want to learn more about the project or get the hands on guidance on the project for Free, do let me know in my dm. Thanks

u/muskanshuja1 — 13 days ago

High courant number / very small deltaT

Hello

First of all I'm still a beginner. I'll be really thankful if you can help me.

​

I'm running this spillway simulation and right now as I'm at around the time step 18 s, the courant number is reaching the max 0.6, and deltaT is very small (0.00017).

I noticed that the Courant number is high around the foot of the crest which is physically the place with the most turbulence (as you can see the image)

With this the simulation will take a very long time. Is there a way to fix this or should I just wait it out.

​

Thanks in advance.

u/No-Ice-8888 — 14 days ago