19.5.3. Name Conversions

19.5.3.1. CONVERT_NAME_U2S

Converts user names to solver names, for domains, subdomains, boundary conditions, materials, phases and variables. It is available in both user CEL and junction box routines.

      SUBROUTINE CONVERT_NAME_U2S (TYPE,USER_NAME,
     &                             SOLVER_ZONE,SOLVER_NAME,OPER,CRESLT,
     &                             CZ,DZ,IZ,LZ,RZ)
CC --------------------
CC        Input
CC --------------------
CI TYPE          : Data Type
CI USER_NAME     : User name
CI SOLVER_ZONE   : Zone Name (solver format), if CTYPE = 'Variable'
CC
CC --------------------
CC        Output
CC --------------------
CO SOLVER_ZONE   : Zone Name (solver format),
CC                 for all TYPEs except 'Variable'.
CC SOLVER_NAME   : Solver name of form Var_Mat_Phase.
CC OPER          : Operator, if applicable.
CC CRESLT        : ='GOOD' for a successful conversion.

The arguments are of type:

      CHARACTER*(*) TYPE,USER_NAME,
     & SOLVER_ZONE,SOLVER_NAME,OPER,CRESLT

The character string TYPE denotes the type of entity for which a name conversion is required. Permitted types are tabulated below, together with descriptions of input and output names.

TYPE

Description

Example User Name Format

Solver Name Format

‘Domain’domain name

= zone name

‘Pipe’‘ZNn
‘Subdomain’subdomain name

= volume patch name

‘Heated Region’‘VPn
'Boundary' or ‘Bcp’boundary condition patch name‘Inlet’ ‘BCPn
‘Material’material name (library variable)

SOLVER_ZONE may be blank

‘O2’‘MTm’
'Monitor Point'Monitor Point name'MonitorPoint1''MPn'
'Source Point'Source Point nameSourcePoint1'SPn'
'Radiometer'Radiometer name

SOLVER_ZONE may be blank

Radiometer1'RADMONn'
'Rigid Body'Rigid Body name

SOLVER_ZONE may be blank

RigidBody1'RBn'
'Region'Region name

SOLVER_ZONE may be blank

Region1'REGn'
‘Additional Variable’Additional Variable NameWater.Phi1for example ‘QPUMASS_AVm_FLn’
‘AV’Additional Variable name (library variable)

SOLVER_ZONE may be blank

‘Phi’‘AVm’
‘Phase’phase name

= fluid or solid name

‘Water.’

‘Copper’

for example, ‘FLn

for example ‘SLn

‘Variable’variable name‘Water.Velocity’

‘Water.O2.Mass Fraction’

‘Water.Phi1’

‘Copper.Temperature’

for example ‘VEL_FLn

for example ‘MASFRN_MTm_FLn

for example ‘QPUMASS_AVm_FLn

for example ‘TEMP_SLm

Note:

  • The SOLVER_ZONE name is output for all entity types, except for TYPE = ‘Variable’, in which case it is required as an input variable.

  • OPER = ‘GRADIENT’ is returned if TYPE = ‘Variable’, and the USER_NAME is the name of a variable gradient. Otherwise, OPER = ‘ ‘ is returned.

  • The format of the name returned using ‘Additional Variable’ (for example, ‘QPUMASS_AV2_FL1’) is the format accepted by many internal utility routines.

19.5.3.2. CONVERT_NAME_S2U

Converts solver names to user names, for domains, subdomains, boundary conditions, materials, phases and variables. It is available in both user CEL and junction box routines.

      SUBROUTINE CONVERT_NAME_S2U (TYPE,SOLVER_NAME,OPER,
     &                             USER_NAME,CRESLT,
     &                             CZ,DZ,IZ,LZ,RZ)
CC TYPE          : Data Type
CI SOLVER_NAME   : Solver Name.
CC OPER          : Operator, if applicable
CO USER_NAME     : User name
CO CRESLT        : ='GOOD' for a successful conversion.

The arguments are of type:

      CHARACTER*(*) CTYPE,SOLVER_NAME,OPER,USER_NAME,CRESLT

This performs the reverse operation. For details, see CONVERT_NAME_U2S. See the table for TYPE name conventions, as well as for full descriptions of input and output names.

Examples of its use are provided in:

19.5.3.3. VAR_ALIAS

This function returns the alias (user name) of the input variable CVAR (solver format).

      CHARACTER*(*) FUNCTION VAR_ALIAS(CVAR, CZ,DZ,IZ,LZ,RZ)

The arguments are of type:

      CHARACTER*(*) CVAR

Its functionality is superseded by CONVERT_NAME_S2U, but it is retained, as it may be quicker and easier to use in certain circumstances. For details, see CONVERT_NAME_S2U.

19.5.3.4. LOCALE_ALIAS

Returns the alias (user name) of the input locale LOCALE (solver format).

      CHARACTER*(*) FUNCTION LOCALE_ALIAS(LOCALE, CZ,DZ,IZ,LZ,RZ)

The arguments are of type:

      CHARACTER*(*) LOCALE

Its functionality is superseded by CONVERT_NAME_S2U, but it is retained, as it may be quicker and easier to use in certain circumstances. For details, see CONVERT_NAME_S2U.

19.5.3.5. CONVERT_USER_NAMES

Converts user variable names to solver variable names. The functionality of this routine is superseded, but it is included for back compatibility. For details, see CONVERT_NAME_U2S.

      SUBROUTINE CONVERT_USER_NAMES(SOLVERR_ZONE,USER_NAME,SOLVER_NAME,OPER,
     &                              CRESLT,CZ,DZ,IZ,LZ,RZ)
CC --------------------
CC        Input
CC --------------------
CI SOLVER_ZONE   : Zone Name (solver format)
CI USER_NAME     : User name
CC --------------------
CC        Output
CC --------------------
CC SOLVER_NAME   : Solver name of form Var_Mat_Phase.
CC OPER          : Operator, if applicable.
CC CRESLT        : ='GOOD' for a successful conversion.

The arguments are of type:

      CHARACTER*(*) SOLVER_ZONE,USER_NAME,SOLVER_NAME,OPER,CRESLT

OPER = ‘GRADIENT’ is returned if the user variable name is a gradient. Otherwise, OPER = ‘ ‘ is returned.

19.5.3.6. GET_PHASE_FROM_VAR

Returns the phase name from the input variable name CVAR.

      SUBROUTINE GET_PHASE_FROM_VAR ( CVAR, PHASE )
CI CVAR Variable Name (Solver Format)
CO PHASE Fluid or solid name (Solver Format. Blank if not present).
The arguments are of type:
CHARACTER*(*) CVAR, PHASE

On exit, PHASE = ‘FLn’ for a fluid phase, or ‘SLn’ for a solid phase, where n is an integer.

Examples of its use are available. For details, see User CEL Example 2: Using Gradients for an Additional Variable Source.

19.5.3.7. PARSMP

This subroutine provides the property, material and fluid components of the input variable CVAR.

      SUBROUTINE PARSMP(WHO,CVAR,CPROP,CMAT,CPHASE,LBULK,
     & LNOPHASE,CERACT,CRESLT,CZ,DZ,IZ,LZ,RZ)
CI CVAR         : Target variable name (Solver Format)
CO CPROP        : Material property (i.e. class) part of name
CO CMAT         : Material (i.e. component) part of name
CO CPHASE       : Fluid part of name
CO LBULK        : True if material name is missing from full name
CO LNOPHASE     : True if phase name is missing from full name

The arguments are of type:

      CHARACTER*(*) WHO,CVAR,CPROP,CMAT,CPHASE,CERACT,CRESLT
      LOGICAL LBULK,LNOPHASE