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 option to enable or disable eddy current calculations in BSPM analyzer #347

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

noguchi-takahiro
Copy link
Contributor

@noguchi-takahiro noguchi-takahiro commented Dec 21, 2024

This PR adds option to enable or disable eddy current calculations in BSPM analyzer to close #346.

Summary of changes

These changes are taking place in this PR:

  • add a field self.enable_eddy_current_calcs in jmag_2d_config.py to take a value of either True or False, defaulting True, i.e., the eddy current calculations are enabled by default. By using kwargs.get(), the default value of True is returned unless this field is defined. Therefore, we do not need to add/edit the field in existing code (e.g., in electromagnetic_step.py).
    image

  • edit jmag_2d.py so that

  1. when enable_eddy_current_calcs is True, it passes 1 to JMAG to enable the eddy current calculation or
  2. when enable_eddy_current_calcs is False, it passes 0 to JMAG to disable the eddy current calculation

These are applied to both the shaft and PM.
image

Some testing myself

  1. Run bspm_evaluator.py without any changes. When opening the JMAG file, eddy currents are enabled.
  2. Add a new line enable_eddy_current_calcs=True within JMAG_2D_Config() in electromagnetic_step.py. Run bspm_evaluator.py and when opening the JMAG file, eddy currents are enabled.
  3. Add a new line enable_eddy_current_calcs=False within JMAG_2D_Config() in electromagnetic_step.py. Run bspm_evaluator.py and when opening the JMAG file, eddy currents are disabled as expected.

Copy link
Contributor

@elsevers elsevers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @noguchi-takahiro! Level 2 review summary: Approved

  • Does the code comply with the code guidelines? Yes
  • Does the code documentation comply with the documentation guidelines? Yes
  • Is the writing, grammar, and syntax correct and clear? Yes
  • Is the changeset compliant with the eMach architecture? Yes
  • Are the physics accurate? Yes
  • Did the reviewer change the release schedule for the issues bing closed? Yes, I have scheduled this for release v1.2.0
  • Did the reviewer change the branch the PR is being merged into? No, this is correctly configured to merge into develop
  • Level 1 re-review instructions (if revisions are requested):
  • When your PR is approved, remember to merge via Squash and Merge. Please ask if you are unsure of how to do this.

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

Successfully merging this pull request may close these issues.

Add ability to specify whether eddy currents are enabled in the BSPM analyzer
2 participants