ansys.dpf.core.operators.math.sweeping_phase#
- class ansys.dpf.core.operators.math.sweeping_phase(real_field=None, imaginary_field=None, angle=None, unit_name=None, abs_value=None, imaginary_part_null=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Shifts the phase of a real and an imaginary field (in 0 and 1) of a given angle (in 3) of a unit (in 4).
- Parameters:
real_field (Field or FieldsContainer) – field or fields container with only one field is expected
imaginary_field (Field or FieldsContainer) – field or fields container with only one field is expected
angle (float)
unit_name (str, optional) – String Unit. Supported values: “deg” or “rad”. Default: “rad”.
abs_value (bool)
imaginary_part_null (bool) – If the imaginary part field is empty and this pin is true, then the imaginary part is supposed to be 0 (default is false).
- Returns:
field
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.math.sweeping_phase()
>>> # Make input connections >>> my_real_field = dpf.Field() >>> op.inputs.real_field.connect(my_real_field) >>> my_imaginary_field = dpf.Field() >>> op.inputs.imaginary_field.connect(my_imaginary_field) >>> my_angle = float() >>> op.inputs.angle.connect(my_angle) >>> my_unit_name = str() >>> op.inputs.unit_name.connect(my_unit_name) >>> my_abs_value = bool() >>> op.inputs.abs_value.connect(my_abs_value) >>> my_imaginary_part_null = bool() >>> op.inputs.imaginary_part_null.connect(my_imaginary_part_null)
>>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.math.sweeping_phase( ... real_field=my_real_field, ... imaginary_field=my_imaginary_field, ... angle=my_angle, ... unit_name=my_unit_name, ... abs_value=my_abs_value, ... imaginary_part_null=my_imaginary_part_null, ... )
>>> # Get output data >>> result_field = op.outputs.field()
- _inputs#
- _outputs#
- static _spec() ansys.dpf.core.operators.specification.Specification #
- static default_config(server: ansys.dpf.core.server_types.AnyServerType = None) ansys.dpf.core.config.Config #
Returns the default config of the operator.
This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.
- Parameters:
server – Server with channel connected to the remote or local instance. When
None
, attempts to use the global server.- Returns:
A new Config instance equivalent to the default config for this operator.
- Return type:
config
- property inputs: InputsSweepingPhase#
Enables to connect inputs to the operator
- Returns:
An instance of InputsSweepingPhase.
- Return type:
inputs
- property outputs: OutputsSweepingPhase#
Enables to get outputs of the operator by evaluating it
- Returns:
An instance of OutputsSweepingPhase.
- Return type:
outputs