The definition of OpenFOAM schemes in configuration dictionaries can contain a variable number of parameters. Alias names can be used in order to parameterize the case with different schemes.
Define aliases for used schemes either within a dictionary file, or a separate file that is to be included by an OpenFOAM dictionary.
Linear Gauss linear;
PLSQ pointCellsLeastSquares;
Parameterize the case using the aliases, by adding the parameter vector to the parameter file
gradScheme (Linear PLSQ);
Use the pyFoam templates to refer to the aliases inside the appropriate configuration dictionary:
#include "../path/to/alias/file"
grad(U) |-gradScheme-|
An example cavity case is available at the
SFB 1194/Z-Inf example repository
and the README.md
has a description of this how-to for the cavity case.