Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Missing Circuit Elements Needed for ETK #5282

Open
DaveTwyman opened this issue Oct 11, 2024 · 1 comment · May be fixed by #5283
Open

Add Missing Circuit Elements Needed for ETK #5282

DaveTwyman opened this issue Oct 11, 2024 · 1 comment · May be fixed by #5283
Assignees
Labels
enhancement New features or code improvements

Comments

@DaveTwyman
Copy link
Contributor

DaveTwyman commented Oct 11, 2024

Description of the feature

Migration work of the transformer toolkit from ACT to PyAEDT needs the following elements that are missing from PyAEDT

Steps for implementing the feature

Add to the MaxwellCircuitComponents class
-Sinusoidal Current Source
-Sinusoidal Voltage Source

-Create a new class to keep track of page number after exposure in create_component method of primitives_circuit.py to PyAEDT

Add to the CircuitComponents class
-CreatePage
-SelectPage

No response

Useful links and references

No response

@DaveTwyman DaveTwyman added the enhancement New features or code improvements label Oct 11, 2024
@DaveTwyman DaveTwyman self-assigned this Oct 11, 2024
@jvela018
Copy link
Contributor

jvela018 commented Feb 3, 2025

@DaveTwyman ,

There are two potential work arounds here.

  1. Use the create_component method
  2. In case that you want an actual intuitive method with the name of the component you can create a wrapper

Based on the ETK you can create an instance of MaxwellCircuit (although, I'd rather go through Maxwell3D)

        app = MaxwellCircuit(design="circuit_" + design_name)
        schematic = app.modeler.schematic

Let us create variables for schematics location=[0,0] and page number: 4

page = 4 
x = 0 
y = 0

Case (1) you can create a Voltage source as follows

    component_name = schematic.create_component(
                component_library="Sources",
                component_name="VSin",
                location=[x, y],
                angle=-90,
                page=("Page{}".format(page))
            )

in case (2) you could just wrap case (1) so that assigning the voltage source looks like

def create_voltage_source(location, page):
    schematic.create_component(
                component_library="Sources",
                component_name="VSin",
                location=[x, y],
                angle=-90,
                page=("Page{}".format(page))
            )

We could become even more creative and create a simple source that includes both voltage/current sources

def create_source(type=VSin, location, page):
    schematic.create_component(
                component_library="Sources",
                component_name=type,
                location=[x, y],
                angle=-90,
                page=("Page{}".format(page))
            )

Note that this method in addition to PR #5712 , should be enough to handle this issue. Maybe we can reconsider PR #5283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants