Sig Turbomachinery Library OpenFoamTurbo profile1DfixedValue

From OpenFOAMWiki

1 profile1DfixedValue Boundary Condition

The boundary condition profile1DfixedValue implements a cylindrical boundary condition field defined by a 1D fixed value profile (radial or vertical) for a typical RANS k-epsilon computation (eg. simpleFoam, turbFoam, etc).

The profile data is read from a separate CSV (Comma Separated Value) file similar to files generated by Ansys CFX.

This boundary condition is available on openfoam-extend through a new library called OpenFoamTurbo.

The ERCOFTAC conical diffuser testcase case-study documented on the Wiki (namely Case0) is a good test case for playing with the new profile1DfixedValue BC (see ERCOFTAC conical diffuser).

1.1 Usage

Here is an example of a dictionary entry in boundaryField for the velocity values for an inlet BC of type profile1DfixedValue:

       inlet
       {
           type             profile1DfixedValue;  // Type of the boundary condition
           fileName         "profileExample.csv"; // Name for the ASCII file containing the 1D profile.
           fileFormat       "turboCSV";           // Format of the file. turboCSV is a simple CSV file format
           interpolateCoord "Z";                  // The interpolation coordinate: "R"=radial, "Z"=vertical
           fieldName        "Velocity";           // The field we want to apply the profile to :
                                                  // "Velocity", "K", "Epsilon", "Pressure"
           fieldScaleFactor  0.001;               // Scale factor for the field. This entry is optional.
                                                  // The default is 1.0
       }

The 1D profile ASCII file must be located under the "constant" directory of the case.

For each specific fieldName, we expect to find the following entry/entries in the turboCSV file header:

       Velocity : "Velocity Axial" and "Velocity Radial" and "Velocity Circumferential"
       K        : "Turbulence Kinetic Energy"
       Epsilon  : "Turbulence Eddy Dissipation"
       Pressure : "Pressure"

It is possible to provide a scale factor for the field values. For instance, for the pressure field, this scale factor could be 1/rho, rho being the density. This scaling factor will be used to scale the pressure since it is p/rho that is solved by simpleFoam, icoFoam, etc

The header of the file must contain the string [Data] on a single line, then a list of comma-separated field names with an optional unit description. The optional unit description will be discarded.

Here is a few examples of valid turboCSV file headers:

[Data]
R [ m ], Velocity Axial [ m s^-1 ], Velocity Radial [ m s^-1 ], Velocity Circumferential [ m s^-1 ], Pressure [ Pa ], Turbulence Kinetic Energy [ m^2 s^-2 ], Turbulence Eddy

Dissipation [ m^2 s^-3 ]

[Data]
Z [ m ], Velocity Axial [ m s^-1 ], Velocity Radial [ m s^-1 ], Velocity Circumferential [ m s^-1 ], Pressure [ Pa ], Turbulence Kinetic Energy [ m^2 s^-2 ], Turbulence Eddy

Dissipation [ m^2 s^-3 ]

[Data]
R, Velocity Axial, Velocity Radial, Velocity Circumferential, Pressure, Turbulence Kinetic Energy, Turbulence Eddy Dissipation
[Data]
R, Pressure
[Data]
Z, Velocity Axial, Velocity Radial, Velocity Circumferential

Following this file header, a list of comma-separated field values must be provided, one entry per line or one entry per R or Z values. On each line, there must be as many entries as there are field names provided.

For a given line of field values, the nth entry on the line corresponds to a value for the nth field name from the file header.

There must be at least 2 lines of field values, in increasing values of R or Z.

The min and max values for R or Z define the range over which the interpolateCoord values will be interpolated.

1.2 Current limitations

  • The rotation axis is forced to the Z axis
  • The profile is interpolated, not extrapolated, so make sure to provide a data file that fully covers your geometry
  • For OpenFOAM 1.3, you need to define the following preprocessor constant at compile time: _OPENFOAM_1_3