Choke#
- class ansys.aedt.core.modeler.advanced_cad.choke.Choke(name: str = 'choke', number_of_windings: dict[str, bool] = <factory>, layer: dict[str, bool] = <factory>, layer_type: dict[str, bool] = <factory>, similar_layer: dict[str, bool] = <factory>, mode: dict[str, bool] = <factory>, wire_section: dict[str, bool] = <factory>, core: dict[str, ~typing.Any] = <factory>, outer_winding: dict[str, ~typing.Any] = <factory>, mid_winding: dict[str, ~typing.Any] = <factory>, inner_winding: dict[str, ~typing.Any] = <factory>, settings: dict[str, ~typing.Any] = <factory>, create_component: dict[str, bool] = <factory>)#
Class to create chokes in AEDT.
- Parameters:
- name
str,optional Name of the choke. The default is
"Choke".- number_of_windings
Dict[str, bool],optional Number of windings configuration.
- layer
Dict[str, bool],optional Layer configuration.
- layer_type
Dict[str, bool],optional Layer type configuration.
- similar_layer
Dict[str, bool],optional Similar layer configuration.
- mode
Dict[str, bool],optional Mode configuration.
- wire_section
Dict[str, bool],optional Wire section configuration.
- core
Dict[str,Any],optional Core configuration.
- outer_winding
Dict[str,Any],optional Outer winding configuration.
- mid_winding
Dict[str,Any],optional Mid winding configuration.
- inner_winding
Dict[str,Any],optional Inner winding configuration.
- settings
Dict[str,Any],optional Settings configuration.
- create_component
Dict[str, bool],optional Create component configuration.
- name
Examples
Create a basic choke with default parameters:
>>> from ansys.aedt.core.modeler.advanced_cad.choke import Choke >>> choke = Choke() >>> choke.name = "my_choke"
Create a choke with custom core dimensions:
>>> choke = Choke() >>> choke.core["Inner Radius"] = 15 >>> choke.core["Outer Radius"] = 25 >>> choke.core["Height"] = 12 >>> choke.core["Material"] = "ferrite"
Create a choke with custom winding configuration:
>>> choke = Choke() >>> choke.outer_winding["Wire Diameter"] = 2.0 >>> choke.outer_winding["Turns"] = 30 >>> choke.outer_winding["Material"] = "copper"
Configure number of windings:
>>> choke = Choke() >>> # Set to 2 windings >>> choke.number_of_windings = {"1": False, "2": True, "3": False, "4": False}
Set wire section type:
>>> choke = Choke() >>> # Use hexagonal wire section >>> choke.wire_section = {"None": False, "Hexagon": True, "Octagon": False, "Circle": False}
Create choke in HFSS application:
>>> import ansys.aedt.core as pyaedt >>> hfss = pyaedt.Hfss() >>> choke = Choke() >>> objects = choke.create_choke(app=hfss) >>> ground = choke.create_ground(app=hfss) >>> mesh = choke.create_mesh(app=hfss) >>> ports = choke.create_ports(ground, app=hfss)
Load choke configuration from JSON file:
>>> from ansys.aedt.core.generic.file_utils import read_json >>> config_data = read_json("choke_config.json") >>> choke = Choke.from_dict(config_data)
Export choke configuration to JSON file:
>>> choke = Choke() >>> choke.export_to_json("my_choke_config.json")
Create a differential mode choke:
>>> choke = Choke() >>> choke.mode = {"Differential": True, "Common": False} >>> choke.layer_type = {"Separate": True, "Linked": False}
Create a triple layer choke:
>>> choke = Choke() >>> choke.layer = {"Simple": False, "Double": False, "Triple": True} >>> choke.inner_winding["Turns"] = 10 >>> choke.mid_winding["Turns"] = 15 >>> choke.outer_winding["Turns"] = 20
Methods
Choke.create_choke([app])Create a choke.
Choke.create_ground(app)Create the ground plane.
Choke.create_mesh(app)Create the mesh.
Choke.create_ports(ground, app)Create the ports.
Choke.export_to_json(file_path)Export choke configuration to JSON file.
Choke.from_dict(data)Create a Choke instance from a dictionary.
Attributes
Get the choke parameters as a dictionary
Value for name.
Shortcut for dir(self).
Value for number of windings.
Value for layer.
Value for layer type.
Value for similar layer.
Value for mode.
Value for wire section.
Value for core.
Value for outer winding.
Value for mid winding.
Value for inner winding.
Value for settings.
Value for create component.