Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
FEAT: VSin, ISin Sources added to Maxwell Circuit Primitives #5283
base: main
Are you sure you want to change the base?
FEAT: VSin, ISin Sources added to Maxwell Circuit Primitives #5283
Changes from 7 commits
5aac760
f8699a5
8552947
93375bd
955bcf7
cf6153e
eb4c79e
a07645f
84e4f7a
d7945da
a3a2340
46152e2
bf84832
0c4d246
d180ad8
5a95e4e
4b7d09f
f00f682
359f752
fdf3786
4ef9e9f
d44fd5d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 1270 in src/ansys/aedt/core/modeler/circuits/primitives_circuit.py
Codecov / codecov/patch
src/ansys/aedt/core/modeler/circuits/primitives_circuit.py#L1270
Check warning on line 1278 in src/ansys/aedt/core/modeler/circuits/primitives_circuit.py
Codecov / codecov/patch
src/ansys/aedt/core/modeler/circuits/primitives_circuit.py#L1278
Check warning on line 317 in src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py
Codecov / codecov/patch
src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py#L315-L317
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DaveTwyman this is not correct, please debug and see what happens when you set a property that doesn't exist. You access "Ia" through parameters. you don't have to use set_property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gmalinve, I just double checked and this works, I couldn't get a bug to appear.
Ia is one of the ten parameters that ISin can take and the most used parameter (it's the amplitude of the sinusoidal current), it's fed into PyAEDT 'create_isin' using the 'value' parameter. I did think of renaming 'value' to something like 'IPeak', 'Current' etc but since the rest of the Maxwell circuit components in the library have a 'value' parameter I've stuck with using 'value' for consistency. The usage of '.set_property' is throughout the rest of the 'primitives_maxwell_circuit' .
Were you suggesting another approach to 'set_property' that has some advantages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DaveTwyman this is not a bug. You simply have to access the property and change its value through the "parameters" property, without using the set_property method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gmalinve , Sorry I'm not following this, could you tell me what you would replace line 326 with and why?
All the other circuit components in the library use this "set_property" approach
Check warning on line 328 in src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py
Codecov / codecov/patch
src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py#L326-L328
Check warning on line 359 in src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py
Codecov / codecov/patch
src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py#L357-L359
Check warning on line 370 in src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py
Codecov / codecov/patch
src/ansys/aedt/core/modeler/circuits/primitives_maxwell_circuit.py#L368-L370