Maxwell 2D: Edit Circuit Element Values in Maxwell-EC Interface via pyaedt

Options

Dear all,
I have two questions regarding pyansys - would anybody mind to help me with those questions?

Question 1:

  • For a Maxwell 2D-Design with an external Circuit, I would like to change the Parameter values of some circuit elements as depicted below:
    o In my Variable Manager, I have defined 3 Variables (R_end_winding;R_supply;L_end_winding).
    o Now, if I go to the excitations tab in Maxwell --> right click --> External circuit --> Edit External Circuit, I can modify the Values of the three corresponding Circuit elements.
    o By default, they are assigned a value, but I want to change this value and write the variable name into the column instead.
    ==> What is the pyaedt command to write any variable or value in this column?

Default Values

Modification

Question 2:

  • What is the pyaedt command to import a Maxwell 2D Circuit netlist from an existing .sph file?

As always – thank you very much for your valuable support.
BR
Richard

Answers

  • Giulia M.
    Giulia M. Member, Employee Posts: 16
    First Comment First Anniversary Ansys Employee First Answer
    Options

    Hi @Richard!

    It's Giulia here, thanks for contacting us!
    Let me start from your second question.
    To import a circuit netlist please use this method: m2d.edit_external_circuit(netlist_file_path, design_name) . Find link in doc here: edit_external_circuit.
    Regarding your first question, ideally you could use the same method but this functionality is not exposed in PyAEDT yet.
    What I suggest is to do it through the native API:
    m2d.omodule.EditExternalCircuit("", sources, sources_type_array, parameter_name, parameter_value)
    where sources is the list of source names, sources_type_array is the list of source types (1 is for time dependent, 2 for position dependent and 3 for speed dependent), parameter_name is the array of parameter names (in you example "L_end_winding_EC", "R_end_winding", "R_supply") and finally parameter_value is the array of parameter values (in your example tha parameterized values "L_end_winding_EC", "R_end_winding", "R_supply" in column Value).

    Please open an issue in PyAEDT asking for this functionality to be implemented and edit_external_circuit method improved. I'll try to take a look myself and if possible add an example to show how to use edit_external_circuit method. https://github.com/ansys/pyaedt/issues.

    Thanks for your cooperation!

    Kind regards,

    Giulia