19.2.1. Junction Box Routine Options and Parameters

A junction box routine is created in CFX-Pre so that the CFX-Solver knows where to find the Fortran subroutine and when it should be called. The parameters that must be specified are described below. For details, see Junction Box Routines in the CFX-Pre User's Guide.

The parameters that must be set for the USER ROUTINE CCL object are similar to the parameters used for User CEL Functions; however, an additional Junction Box Location CCL parameter specifies at which point the junction box routine is called during execution of the CFX-Solver.

The following parameters have to be set for the USER ROUTINE CCL object to fully declare a junction box routine.

  • Calling Name: Is the name you use internally in your subroutine (for example, mysub for SUBROUTINE MYSUB(...)). Note that this should be in lower case even when it is in upper case in the Fortran file.

  • Library Name: Is the shared library name (your Fortran filename by default). For details, see Shared Libraries.

  • Library Path: Is the path to the directory that contains the final shared library in subdirectories for each platform. For details, see Shared Libraries.

  • Junction Box Location: Is a list of locations in the simulation where a junction box routine has to be called. The locations listed below are possible and are illustrated in the diagram that follows:

    • First Partitioning Call: Only applicable if partitioning is performed. Called just before the mesh is read and before partitioning is performed.

    • Start of Partitioning: Only applicable if partitioning is performed. Called after reading the mesh but before the partitioning process.

    • End of Partitioning: Only applicable if partitioning is performed. Called just after the partitioning has been completed and the .par file is written.

    • First Call: Called just before the mesh is read and the physics and boundary condition initialization. Called after partitioning has been completed if applicable.

    • Start of Run: Called after the problem setup is completed and the mesh has been read in.

    • End of Run: Called just after the results file has been written.

    • User Input: Called after Start of Run. This is the recommended location for your Fortran input code that works in parallel as well as serial runs. For details, see Reading Data with the User Input Option.

    • User Start: Called after User Input on all partitions.

    • User Output: Called after End of Run. This is the recommended location for your Fortran output code that works in parallel as well as serial runs. For details, see Writing Data with the User Output Option.

    • Start of Timestep: Called at the start of each timestep. This applies only for transient runs and relates to the outer loop.

    • User Input Start of Timestep: Called at the start of each timestep. Works identically to the User Input location but is called at the beginning of each timestep in a transient run.

    • End of Timestep: Called at the end of each timestep. This is applicable only for a transient run and relates to the outer loop.

    • Start of Coefficient Loop: Called at the start of each iteration loop. For a transient run, this relates to the inner loop.

    • User Input Start of Coefficient Loop: Called at the start of each coefficient loop. Works identically to the User Input location but is called at the beginning of each coefficient loop in a transient run and steady-state run.

    • End of Coefficient Loop: Called at the end of each iteration loop. For a transient run, this relates to the inner loop.

    • Start of Linear Solution: Called before the linear solver for a particular set of equations.

    • End of Linear Solution: Called after the linear solver for a particular set of equations.

    • Abort: Called if the Solver stops prematurely for some reason.

    • Start of Rigid Body Solution: Called at the start of the rigid body solution. Only applicable for cases with a rigid body enabled. The rigid body solver is called in accordance with the rigid body solver control settings. For details, see Rigid Body Control Tab in the CFX-Pre User's Guide.

    • End of Rigid Body Solution: Called at the end of the rigid body solution.

    • Start of Backup Results Writing: Called just before writing a backup results (.bak) file. Such files are written at the end of a coefficient loop or at the end of a timestep loop, depending on the output control settings.

      This junction box location might be useful for writing restart information needed by other User Fortran routines.

    • Start of Transient Results Writing: Called just before writing a transient results (.trn) file.

      This junction box location might be useful for writing restart information needed by other User Fortran routines.

    • Start of Results Writing: Called just before writing the CFX-Solver results (.res) file.

      This junction box location might be useful for writing restart information needed by other User Fortran routines.