Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Process Simulation

Use custom equations to calculate the bulk thermodynamic properties of a compositional Fluid Type

Use custom equations to calculate the bulk thermodynamic properties of a compositional Fluid Type

  • Last UpdatedAug 01, 2025
  • 4 minute read

Use custom equations to calculate the bulk thermodynamic properties of a compositional Fluid Type

Compositional Fluid Types use the CompositionalState submodel from the Submodels Library as their default fluid state submodel. The CompositionalState submodel uses an external Dynamic Link Library (DLL) to define the equations the software uses to calculate the bulk thermodynamic properties of the fluid.

You can override the thermodynamic property equations from the external DLL with custom equations that you directly add to the CompositionalState submodel. To do this, you must change various sections of the CompositionalState submodel. However, any changes to the CompositionalState submodel from the Submodels Library affect all compositional Fluid Types that use the CompositionalState submodel as their fluid state submodel, which includes all compositional Fluid Types by default.

Therefore, we highly recommend that you do not change the CompositionalState submodel in the Submodels Library. Instead, you should create a copy of the CompositionalState submodel, and then modify the copy. Creating and modifying a copy of the CompositionalState submodel also allows you to return to the original CompositionalState submodel if you encounter any problems with your custom CompositionalState submodel.

You should use this method to override the equations for only the following types of bulk thermodynamic properties:

  • The total value for the fluid.

  • The value for the liquid phase mixture.

  • The value for the vapor phase mixture.

If you want to override the thermodynamic property calculations for individual components, you should use the thermodynamic data overrides available in the Component Data section of the Fluid Editor instead.

Use custom equations to calculate the bulk thermodynamic properties of a compositional Fluid Type

  1. Create a custom copy of the CompositionalState submodel from the Submodels Library.

    If you plan to use this custom CompositionalState submodel in many simulations, we recommend that you create the custom CompositionalState submodel in a new custom Model Library. If you plan to use this custom CompositionalState submodel in only one simulation, we recommend that you create this custom CompositionalState submodel in the simulation-specific Model Library for that simulation.

  2. Open your custom CompositionalState submodel in the Model Editor.

  3. In the Externals section of the Model Editor, add the PropOverride input to the Parameters list, and then set it equal to the list of thermodynamic properties that you want to use custom equations for.

    You must use the keyword for each thermodynamic property and separate the keywords with semicolons.

    The following table shows the thermodynamic properties that you can currently use custom equations for as well as their corresponding keywords:

    Property

    Keyword

    Enthalpy

    H

    Vapor enthalpy

    Hv

    Liquid enthalpy

    Hl

    Specific heat capacity

    Cp

    Vapor specific heat capacity

    Cpv

    Liquid specific heat capacity

    Cpl

    Liquid density

    rhol

    Vapor viscosity

    muv

    Liquid viscosity

    mul

    Vapor thermal conductivity

    kappav

    Liquid thermal conductivity

    kappal

    Surface tension

    sigmal

  4. In the Equations section, add all equations that are required to calculate the thermodynamic properties.

    For example, we want to use an equation for the liquid enthalpy of a water-methanol-ethanol-acetone mixture that accounts for the hydrogen bonding between these components. We assume that any components other than water, methanol, ethanol, and acetone are present in trace amounts. Therefore, we can use the following empirical equation to calculate the liquid enthalpy of the fluid:

  5. In the Condition column, select the ThPhys condition for any equations that calculate thermophysical properties that are not available in a stream or model instance unless you specifically configure the stream or model instance to show the thermophysical properties.

    You should add the ThPhys condition to equations that calculate the following thermodynamic properties:

    • Vapor specific heat capacity (Cpv)

    • Liquid specific heat capacity (Cpl)

    • Vapor viscosity (muv)

    • Liquid viscosity (mul)

    • Vapor thermal conductivity (kappav)

    • Liquid thermal conductivity (kappal)

    • Surface tension (sigmal)

  6. Close and then reopen any open simulations to apply any changes that you made to the Externals section.

  7. For each Fluid Type that you want to use the custom equations to calculate the thermodynamic properties for, do the following:

    1. Create a custom copy of the Fluid Type in the same Model Library that you copied the custom CompositionalState submodel into.

    2. Open the custom Fluid Type in the Fluid Editor.

    3. In the the Models section, in the State box, enter the name of your custom CompositionalState submodel.

      The name that you enter should follow the [Model Library name].[Model Type name] format. If your custom CompositionalState submodel is in the simulation-specific Model Library, use Models as the name of the Model Library.

  8. Replace the Fluid Types in your simulation with the corresponding custom Fluid Types as you desire.

    Any simulation fluids that use the custom Fluid Types now use the custom equations to calculate their thermodynamic properties.

Related Links
TitleResults for “How to create a CRG?”Also Available in