-
Notifications
You must be signed in to change notification settings - Fork 134
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
Codecov ReportAttention: Patch coverage is
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 |
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 |
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.
@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.
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.
@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.
@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. |
With this new PR: