AddDataTransferByDisplayNames()


Important:  This command is deprecated. To add a data transer, use the AddDataTransfer() command instead.


Given arguments that specify the coupling interface, target side, and variables to be associated with each side of the interface, adds a data transfer object to the data model.

Requires that you specify variables using their display names.

Data transfer definitions may be either variable-based or expression-based, depending on the Optional Keyword Arguments given. Only arguments of a single type may be used. That is, if a variable-based data transfer argument is given, then no expression-based data transfer arguments can be used. Conversely, if an expression-based data transfer argument is given, then no variable-based arguments can be used.

Cannot be run after participants have started.

Returns the name of the data transfer created.

For more detailed information on the object created, see DataTransfer.

Essential Keyword Arguments

Interface : string

String indicating the object display name of the interface on which the data transfer is to be created.

TargetSide : string

String indicating the side of the interface to receive the data transfer variable. Possible values:

  • One

  • Two

Optional Keyword Arguments

SourceVariable, TargetVariable : string

Strings specifying the names of the variables associated with the source and target side of the interface. Used to define a variable-based data transfer.

Cannot be combined with SideOneVariable and SideTwoVariable.

SideOneVariable, SideTwoVariable : string

Note:  Ansys recommends that you use the SourceVariable and TargetVariable settings instead.


Strings specifying the names of the variables associated with sides One and Two of the interface. Used to define a variable-based data transfer.

Cannot be combined with SourceVariable and TargetVariable.

TargetVariable : string

String specifying the name of the variable on the target side of the data transfer. When used without a corresponding SourceVariable keyword, it is used to define an expression-based data transfer.

Value : string

String specifying the expression used to define the source side of the data transfer.

Return Type

String

Examples

Example 5: Add a two-way variable-based data transfer

 
AddDataTransferByDisplayNames(
	Interface = 'Interface-1',
	TargetSide = 'One',
	TargetVariable = 'TempVar1',
	SourceVariable = 'TempVar2')

AddDataTransferByDisplayNames(
	Interface = 'Interface-1',
	TargetSide = 'Two',
	TargetVariable = 'LossVar',
	SourceVariable = 'HeatRateVar')


Example 6: Add an expression-based transfer of a scalar quantity

 
AddDataTransferByDisplayNames(
	Interface = 'Interface-1',
	TargetSide = 'One',
	TargetVariable = 'MyTemp',
	Value = '300 [K] if Step < 3 else temperature') 


Example 7: Add an expression-based data transfer of a vector quantity


AddDataTransferByDisplayNames(
	Interface = 'Interface-1',
	TargetSide = 'One',
	TargetVariable = 'INCD',
	Value = 'vector(INCD * Position.x / 1 [m], INCD * Position.y / 0.5 [m], INCD * Position.z / 0.02 [m])')   


Example 8: Add an expression-based data transfer of a vector quantity using X, Y, and Z components


Note:  Ansys recommends that you define new expressions using the single Value argument, as shown above in Example 6: Add an expression-based transfer of a scalar quantity.

Existing expressions defined using the ValueX, ValueY, and ValueZ arguments are still supported, but will be combined into single value.



>>> AddDataTransferByDisplayNames(
         Interface = 'Interface-1',
         TargetSide = 'One',
         TargetVariable = 'Case2Displacement',
         ValueX = 'INCD * Position.x / 1 [m]',
         ValueY = 'INCD * Position.y / 0.5 [m]',
         ValueZ = 'INCD * Position.z / 0.02 [m]')