Hey there 👋
It’s Robin from CFD Engine & this is a quick pointer to yet another useful stash of OpenFOAM files.
Last month I talked about mining the tutorials with fzf
.
In the past I’ve talked about the function objects hiding in the cavity tutorial.
Well, this is another hidden-hoard of goodies, the annotated dictionary collection.
If you want somewhere to look up what the keywords & settings in your snappyHexMeshDict
actually do (& you don’t read C++
) then this is your best stop.
And it’s not just snappyHexMesh
either, there are loads of example dictionaries available.
Sound useful? Keep reading…
OpenFOAM dictionaries
Lots of OpenFOAM utilities need a dictionary to control what they do – think snappyHexMeshDict
, decomposeParDict
, blockMeshDict
etc.
Unless you’ve been revising the release notes, or scanning the source code, these tools probably all have features that you don’t know about.
And you can’t use a feature you don’t know about.
So, how do we discover all their tricks?
That’s where the annotated dictionaries come in.
A collection of dictionaries that detail the majority of each tool’s features & (more importantly) include short explanations for what those features do & how to use them.
As usual, they’re already on your computer, just change directory to $FOAM_ETC/caseDicts/annotated/
& start browsing.
Highlights
Not all of the annotated dictionaries are as annotated as you might like though.
For example, the annotated decomposeParDict
is quite detailed. The annotated blockMeshDict
, not so much.
Here are my top three, in terms of annotations & usefulness…
snappyHexMeshDict
The annotated snappyHexMeshDict
is probably the best of the bunch.
snappyHexMesh
has a huge feature set. I’ve no idea if this documents them all, but there’s plenty to discover – I found quite a few bits that were new-to-me 🙌
So, if you’ve ever pondered the difference between featureAngle
& resolveFeatureAngle
then this is a good place to start your research 🤓
meshQualityDict
I’m cheating slightly as this one doesn’t live in the annotated
directory any more, but it is linked from there.
Mesh quality settings are used in a few tools, like checkMesh
& snappyHexMesh
, but you’d be forgiven for not knowing what minVol
or minTriangleTwist
actually mean.
The annotated meshQualityDict
has a line of explanation for each measure, including what their values represent & how you can individually disable them.
topoSetDict
topoSet
is a tool for selecting faces &/or cells so they can be used for something at a later date.
Think, marking a bunch of cells for refinement, or putting them into a cellZone
to apply porous coefficients, that kind of thing.
The annotated topoSetSourcesDict
gives you an overview of all of the different selections you can make.
The annotated topoSetDict
gives you an idea of how you can combine those selections, to get exactly the bits you want.
topoSet
always feels like a fun logic puzzle (to me) – these two files will help you unlock it.
There’s more…
So there you have it, another little stash of helpful examples that might introduce you to some new features in your favourite OpenFOAM tools, or help illustrate how something works.
There are plenty more files & features to discover in the $FOAM_ETC/caseDicts/annotated
directory & thankfully it’s part of both the Foundation & OpenCFD versions (albeit with different contents).
Check it out & let me know what discoveries you make – every day’s a school day after all 🧑🎓
Until next week, stay safe,