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

Coil forces not properly calculated for circuit coils #87

Open
gsrutherford opened this issue Mar 4, 2023 · 0 comments
Open

Coil forces not properly calculated for circuit coils #87

gsrutherford opened this issue Mar 4, 2023 · 0 comments

Comments

@gsrutherford
Copy link

gsrutherford commented Mar 4, 2023

I have two versions of my device, one using circuits and one not. They produce very different values of coil forces.
I have narrowed this down due to line 181 of coil.py not being sufficient to set coil's current to zero.

This is because Circuit.Br resets the coil's current to a nonzero value.

Example:
My non-circuit code produces a radial force of -75.68 MN while the circuit code gives 57.51 MN for a certain coil.
If I do out the math in the coil.getForces method in my non-circuit version without setting coil.current = 0, I get 57.51. When I do set coil.current = 0, I get -75.68.

Suggestion:
In Circuit.getForces, set the multiplier of the coil in question to 0 prior to getting that coil's force and then set it back to the original value afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant