Plotting the Mass Fraction of Fresh Air at Cylinder 1

Create a surface average report, monitor, and plot for the mass fraction of fresh air at Cylinder 1.

First, define a field function to calculate the fresh air mass fraction:

  1. Right-click the Automation > Field Functions node and select New > Scalar.
  2. Rename the User Field Function 1 node to Fresh Air.
  3. Select the Fresh Air node and set the following properties:
    Property Setting
    Function Name FreshAir
    Definition ${MassFractionn2-vap}+${MassFractiono2-vap}

    The braces in the definition are required as the field function names use hyphens, which the code interprets as a minus operation.

To plot the mass fraction of fresh air at cylinder 1:
  1. Right-click the Reports node and select New > Metrics > Surface Average.
  2. Rename the Surface Average 1 node to Fresh Air.
  3. Edit the Fresh Air node and set the following properties:
    Property Setting
    Parts Cyl1
    Scalar Field Function Fresh Air
  4. Right-click the Fresh Air report and select Create Monitor and Plot from Report.
  5. Save the simulation.