24.2 Design and implementation

FieldConvert utility in Python was designed to provide the user with an easy workflow. Hence, a minimum effort is required to set up the conversion and the majority of work is done behind the scenes.

This section will discuss the design of the utility, including the description of work yet to be done, as well as the user workflow required to execute the basic conversions.

24.2.1 FieldConverter class

The entire procedure outlined in the original FieldConvert utility is managed by the FieldConverter class located in utilities/FieldConvert/Python/FieldConvert.py. The class has the following attributes:

24.2.2 User workflow

The currently suggested user workflow is as follows:

  1. Initialise an instance of FieldConverter class.
  2. Add a session file as well as an input and an output file.
  3. Add any modules, e.g. vorticity.
  4. Run the conversion.

The code showcasing the suggested workflow can be found in the main function of the FieldConvert.py file.

24.2.3 Conversion process