API reference#

The PyETK API contains the ToolkitBackend class, which provides methods for creating the whole model or specific geometries, such as the core, winding, or bobbin. These methods help you to visualize those parts and create core types, bobbins, excitations, circuits, and ultimately assemble an electronic transformer model. You use the PyETK API at the toolkit level.

The PyAEDT Common Toolkit provides common methods to create an AEDT session or connect to an existing AEDT session.

For information on using the PyETK API, see Create a transformer model in AEDT using the PyETK API.

class ansys.aedt.toolkits.electronic_transformer.backend.api.ToolkitBackend[source]#

Bases: AEDTCommon

Control the toolkit workflow.

This class provides methods to connect to a selected design and create the model or the parts of the transformer.

Examples

>>> from ansys.aedt.toolkits.electronic_transformer.backend.api import ToolkitBackend
>>> toolkit_api = ToolkitBackend()
>>> toolkit_api.launch_aedt()
>>> toolkit_api.wait_to_be_idle()
>>> toolkit_api.create_core_geometry()
create_bobbin_geometry(frontend_properties=None)[source]#

Create the bobbin geometry.

Parameters:
frontend_propertiesdict, default: None

Frontend properties.

Returns:
ansys.aedt.toolkits.electronic_transformer.backend.workflows.bobbin.Bobbin

Bobbin object.

create_core_geometry(frontend_properties=None)[source]#

Create the core geometry.

Parameters:
frontend_propertiesdict, default: None

Frontend properties.

Returns:
ansys.aedt.toolkits.electronic_transformer.backend.workflows.core.Core

Core object.

create_model(frontend_properties=None)[source]#

Create the complete model.

Parameters:
frontend_propertiesdict, default: None

Frontend properties.

Returns:
ansys.aedt.toolkits.electronic_transformer.backend.workflows.etk.ETK

ETK object.

create_winding_geometry(frontend_properties=None)[source]#

Create the winding geometry.

Parameters:
frontend_propertiesdict, default: None

Frontend properties.

Returns:
ansys.aedt.toolkits.electronic_transformer.backend.workflows.winding.Winding

Winding object.

load_properties_from_json(file_path)[source]#

Load properties from a JSON file.

Parameters:
file_pathstr

Path to the JSON file.

validate_json(data)[source]#

Validate input data from a JSON file.

Parameters:
datapathlib.Path

Path to the input data in JSON format.

validate_model(frontend_properties=None)[source]#

Validate the transformer model configuration.

Parameters:
frontend_propertiesdict, optional

Frontend properties. The default is None.

Returns:
tuple

Tuple containing validation status (bool) and list of error messages.