Setting up the User Defined Method

You set up the user defined method similar to the other methods of the virtual disk model in that you define the geometry and its orientation. Additionally, the user defined method requires that you specify a virtual disk resolution and the location of the inflow velocity plane with respect to the location of the virtual disk. You must specify a user-defined volume source to model a rotating device. For this specification, different methods are available such as tables, field functions, or user coding.

To set up the user defined method:
The virtual disk is a simplified representation of a complex rotating machine—such as a propeller or wind turbine. Only the geometrical dimensions of the disk are required. Details such as the number of blades, the chord, and twist variation are not necessary for this method. To specify the disk geometry:
  1. Select the Virtual Disk > Disk Geometry node, and set the relevant properties.
Set the virtual disk resolution such that each bucket is associated with at least one cell of the volume mesh. The virtual disk resolution must not be too fine. The resulting size of a bucket must approximately correspond to the cell size of the underlying volume mesh. For more information see Disk Resolution. To specify the disk resolution:
  1. Select the Virtual Disk > Disk Resolution node and set the relevant properties.
The inflow velocity plane is located upstream of the virtual disk and is oriented with respect to the direction of the virtual disk normal, that is, with respect to the Z direction of the disk local coordinate system. This plane is discretized using the same resolution as the radial and azimuthal virtual disk resolution. For more information see Inflow Velocity Plane. To specify the inflow velocity plane:
  1. Select the Virtual Disk > Inflow Velocity Plane node and set the relevant properties.
Select how you provide the volumetric source term.
  1. Edit the User Source Term Profile node and set Method to one of the following:
    • Composite
    • Constant
    • Field Function
    • Table (Iteration)
    • Table (time)
    • Table (x,y,z)
    • Table (xyz, time)
    • User Code
To define the volumetric source term through field functions or user coding, specific field functions for the user defined method are available. To access the points of the virtual disk mesh in user coding or field functions, you use the field function Position. It provides the disk mesh points coordinates with respect to the laboratory coordinate system. You can only use these field functions to define the volumetric source term.
  1. If you set Method to User Code:
    1. Create the source code for the user coding in C or Fortran.
      An example coding for the user defined method is shown below::

      This small example demonstrates how to use the specific field functions of the user defined method to access the inflow velocity vector and the density on the virtual disk mesh.

    2. Create a new user library.
    3. Load the user library into Simcenter STAR-CCM+.
    4. Select the User Source Term Profile > User Code node and set Function to [Your User Coding].
  2. (Optional) Visualize the virtual disk and the inflow plane.
    For more information see User Defined Method Reference.