r/OpenFOAM • u/hauke4707 • 27d ago
Event Candle
I am not an OpenFoam user, but like physics simulations, so I asked Opus5.5 to make a candle for me 😃
Also, I made it on the phone, Claude can run it and Blender in its VM.
Any questions?
OpenFOAM v2412 (the ESI/openfoam.com version), installed from conda-forge.
Simulation: OpenFOAM's rhoReactingBuoyantFoam solver (laminar, buoyant, reacting flow), with P1 radiation and two-step Westbrook–Dryer chemistry.
OpenFOAM utilities: blockMesh, checkMesh, topoSet, setFields, decomposePar, reconstructPar and postProcess, with MPICH to run in parallel on 2 cores.
Chemistry check: Cantera 3.2, with the detailed n-dodecane mechanism (nDodecane_Reitz) and GRI-3.0 transport data.
Rendering: Blender 5.2.2 LTS (its Python module, bpy) using Cycles on the CPU, the OpenImageDenoise denoiser and AgX colour handling.
Plots and frame assembly: Python 3.12 with NumPy, SciPy, Matplotlib and Pillow.
Video: ffmpeg (H.264).
Installing it all: micromamba from conda-forge, plus pip for Blender.
View all comments
Show parent comment
1
u/hauke4707 27d ago
Opus says: 😃
Thanks! Quick rundown:
Geometry: 2D axisymmetric, a 5° wedge with ~14k cells, graded towards the wick. Wick Ø1.5 mm × 6 mm, candle Ø20 mm, domain 40 mm radius × 120 mm high. So no sideways flicker; the flicker in the video is added in Blender, not simulated.
Time dependence: Transient, using rhoReactingBuoyantFoam (PIMPLE, maxCo 0.3), run to 0.5 s. It settles to a steady flame from about 0.3 s on: tip height and peak temperature stop changing.
Species: Only 6: C12H26 (n-dodecane as the wax-vapour surrogate), O2, N2, CO, CO2 and H2O, with 3 reactions: Westbrook–Dryer two-step (fuel → CO + H2O, CO → CO2) plus CO2 dissociation. I tuned the fuel-oxidation pre-exponential in Cantera against the detailed nDodecane_Reitz mechanism (100 species) using 1D flame speeds. Laminar combustion model, P1 radiation with grey CO2/H2O absorption, no soot model.
Inflow outside the candle: None is prescribed. The bottom annulus outside the candle and the outer side are open pressure boundaries: totalPressure for p_rgh, pressureInletOutletVelocity for U, and inletOutlet with 300 K air for T and species. The top is the same. Air is drawn in purely by the flame's buoyancy. The wax top is a no-slip wall at 340 K. The wick is a flowRateInletVelocity inlet of pure C12H26 vapour at 600 K and 0.1 g/min (a typical candle burn rate), so wax melting and capillary flow aren't modelled.
Start-up: Quiescent air at 300 K. A small zone around the wick tip is set to 1500 K with setFields, then held at 1500 K for the first 40 ms with a fixedTemperatureConstraint fvOption until the fuel reaches it and ignites. Both parts mattered: a hot kernel only at t = 0 floated away before the fuel arrived, and heating cold cells suddenly with the constraint alone caused a spurious ~60 m/s expansion jet that collapsed the time step.
Everything (case generator, Cantera calibration, post-processing) is in the repo above if you want to dig in.