Issue 027 – January 2, 2021

The housekeeping issue

Hey there,

It’s Robin from CFD Engine – Happy New Year 🎉 I’m back in your inbox with a mixed-bag of corrections, clarifications & changes – it’s “the housekeeping issue”.

New OpenFOAM Version

The big news, since my last email, is the release of a new OpenFOAM version from ESI-OpenCFD. I’ll focus on it in the next email but, if you can’t wait, then you should check out the release notes here.

Corrections

Firstly, a big thanks to all of you that take the time to share your thoughts on anything I’ve written, you help make these emails better for everyone. With that in mind, here are a couple of clarifications/corrections/changes from previous issues…

paraFoam

In Issue 023 I got myself in a bit of a fix while grasping for a shorthand to differentiate between the OpenFOAM readers in ParaView. It’s difficult to draw the boundaries between OpenFOAM tools/releases and in this case it seems that I attributed the OpenFOAM reader (the one I called paraFoam) to the OpenFOAM Foundation. This was unintentional. The plugin’s code has a long history, with a whole host of contributors & everyone who contributes to any code deserves recognition. The gist of the article holds – but this clarification is deserved. Thank you Mark for giving me a nudge.

Delta Plots

Not so much a clarification here as an addition to the Delta Plot workflow that I outlined in Issue 018.

I suggested using topoSet + subsetMesh + reconstruct + mapFields to do quick deltas between common surfaces, from different cases.

Having used it more widely I’ve added an “empty” createPatch step after the reconstruction commands. I’m using it to remove any zero-face patches that might’ve crept in when we ran subsetMesh. They can cause problems in the mapFields stage & this step is an easy fix.

Check out the original issue for more info on this workflow.

executeControl

In Issue 025 I shared a trio of tiny tips that were new to me. One tip described using an option (writeFields ) in forceCoeffs to write out the force coefficients as fields, useful for plotting force contours on surfaces.

I mentioned that you might want to have two functionObjects so that you can log force history every time step but only write the fields at write time.

As it turns out, there’s a keyword that handles this exact use case & it’s one that had totally passed me by (despite having seen it in the docs) 🤦‍♂️

By adding executeControl timeStep; & setting writeControl writeTime; we can have a single function that executes every time step (we want this for our force history) but only writes the fields at writeTime (I like it when stuff happens at the rightTime).

I’ll include a fuller example in the next “Tiny Tips” issue, but thought I’d mention it, just in case executeControl has passed you by too.

Thanks to Tom for this one 🙏

That’s a wrap

Lastly, thank you to all of the readers who gave me their feedback on the membership idea that I floated in the last email – it’s still not to late too have your say.

I’ll be back next week with an overview of OpenCFD’s Christmas gift, OpenFOAM v2012.

Until then, I wish you a happy & healthy 2021, filled with low skewness & minimal divergence 🙏

Stay safe,

Signed Robin K