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

FEAT: enable harmonic force #5440

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

FEAT: enable harmonic force #5440

wants to merge 27 commits into from

Conversation

anur7
Copy link
Contributor

@anur7 anur7 commented Nov 18, 2024

With this new PR:

  • Added missing arguments for Transient solver (already done by @JuliusSaitz with the old not merged PR FEAT: Enable harmonic force #4848)
  • Implemented the method for Eddy Current solver.
  • Still not complete, for Transient solver it is needed other improvements.

@anur7 anur7 added the enhancement New features or code improvements label Nov 18, 2024
@anur7 anur7 self-assigned this Nov 18, 2024
@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@anur7 anur7 linked an issue Nov 18, 2024 that may be closed by this pull request
2 tasks
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 85.28%. Comparing base (84a7b79) to head (ea81b39).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5440      +/-   ##
==========================================
- Coverage   85.29%   85.28%   -0.01%     
==========================================
  Files         152      152              
  Lines       60906    60925      +19     
==========================================
+ Hits        51948    51959      +11     
- Misses       8958     8966       +8     

@anur7 anur7 marked this pull request as ready for review December 12, 2024 10:55
Comment on lines +1930 to +1944
if not self.is3d and self.geometry_mode == "about Z" or self.solution_type == "TransientAPhiFormulation":
if force_type == 0 and calculate_force == "Transient":
calculate_force = "Harmonic"
self.logger.warning(
"Object-Based Transient Force calculation is not supported for "
"non-rotational transient solutions. Only Harmonic Force will be calculated."
)
if not self.is3d and self.geometry_mode == "about Z":
if use_number_of_cycles_from_stop_time or use_number_of_cycles_for_stop_time:
self.logger.warning(
" ``number_of_cycles_from_stop_time´´ and ``number_of_cycles_for_stop_time´´"
"are not available for TransientZ."
)
use_number_of_cycles_from_stop_time = False
use_number_of_cycles_for_stop_time = False
Copy link
Contributor

Choose a reason for hiding this comment

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

@anur7 this part is very confusing. I'd simplify it. I also add an extra check on 2d and transient because use_number_of_cycles_from_stop_time and use_number_of_cycles_for_stop_time can be True in 3d Transient and Transient Aphi designs.
But this part has to be reviewed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gmalinve if I'm not wrong the Maxwell project used in UT contains only a transient 3d design. To increase the code coverage we need also a 2d design for testing.

@gmalinve
Copy link
Contributor

@anur7 I pushed a change to fix the failing test but there are some parts in the method that need to be reviewed and simplified.
Also the test has to be improved, it would be bettere to test more arguments, not just providing the assignment.

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 this pull request may close these issues.

m2d.enable_harmonic_force does not have a complete set of inputs
2 participants