get_scalar_field_value#

PostProcessor3DLayout.get_scalar_field_value(quantity, scalar_function='Maximum', solution=None, variations=None, is_vector=False, intrinsics=None, phase=None, object_name='AllObjects', object_type='volume', adjacent_side=False)#

Use the field calculator to Compute Scalar of a Field.

Parameters:
quantitystr

Name of the quantity to export. For example, "Temp".

scalar_functionstr, optional

The name of the scalar function. For example, "Maximum", "Integrate". The default is "Maximum".

solutionstr, optional

Name of the solution in the format "solution : sweep". The default is None.

variationsdict, optional

Dictionary of all variation variables with their values. e.g. ['power_block:=', ['0.6W'], 'power_source:=', ['0.15W']] The default is None.

is_vectorbool, optional

Whether the quantity is a vector. The default is False.

intrinsicsdict, str, optional

Intrinsic variables required to compute the field before the export. These are typically: frequency, time and phase. It can be provided either as a dictionary or as a string.

If it is a dictionary, keys depend on the solution type and can be expressed as: - "Freq" or "Frequency". - "Time". - "Phase".

If it is a string, it can either be "Freq" or "Time" depending on the solution type. The default is None in which case the intrinsics value is automatically computed based on the setup.

phasestr, optional

Field phase. The default is None.

object_namestr, optional

Name of the object. For example, "Box1". The default is "AllObjects".

object_typestr, optional

Type of the object - "volume", "surface", "point". The default is "volume".

adjacent_sidebool, optional

To query quantity value on adjacent side for object_type = “surface”, pass True. The default is False.

Returns:
float

Scalar field value.

References

>>> oModule.EnterQty
>>> oModule.CopyNamedExprToStack
>>> oModule.CalcOp
>>> oModule.EnterQty
>>> oModule.EnterVol
>>> oModule.ClcEval
>>> GetTopEntryValue

Examples

>>> from ansys.aedt.core import Hfss
>>> aedtapp = Hfss()
>>> # Intrinsics is explicitly provided as a dictionary.
>>> intrinsics = {"Freq": "5GHz", "Phase": "180deg"}
>>> min_value = aedtapp.post.get_scalar_field_value(quantity_name, "Minimum", setup_name, intrinsics=intrinsics)
>>> plot1 = aedtapp.post.create_fieldplot_cutplane(cutlist, quantity_name, setup_name, intrinsics=intrinsics)
>>> # Intrinsics is provided as a string. Phase is automatically assigned to 0deg.
>>> min_value = aedtapp.post.get_scalar_field_value(quantity_name, "Minimum", setup_name, intrinsics="5GHz")
>>> plot1 = aedtapp.post.create_fieldplot_cutplane(cutlist, quantity_name, setup_name, intrinsics="5GHz")
>>> # Intrinsics is provided as a dictionary. Phase is automatically assigned to 0deg.
>>> intrinsics = {"Freq": "5GHz"}
>>> min_value = aedtapp.post.get_scalar_field_value(quantity_name, "Minimum", setup_name, intrinsics=intrinsics)
>>> plot1 = aedtapp.post.create_fieldplot_cutplane(cutlist, quantity_name, setup_name, intrinsics=intrinsics)
>>> # Intrinsics is not provided and is automatically computed from the setup.
>>> min_value = aedtapp.post.get_scalar_field_value(quantity_name, "Minimum", setup_name)
>>> plot1 = aedtapp.post.create_fieldplot_cutplane(cutlist, quantity_name, setup_name)