You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
66 verify winding layout jlpy and incorporate it to main - #70
@haitao-ZCU Two quick comments/questions before a proper review:
Please change the name of the file to something proper, for example, keep the original name windings.py.
You removed belt_offset from the anchors, but did not add coil_pitch. I thought they correspond to each other, and I would expect that if one is removed, the other needs to be added. Is it not like that?
@haitao-ZCU Ok, thanks. Are we sure that the second layer of coils is added to the stator? We should check the generated designs by our plotting functions (I also asked this in #69). We have plot_barriers which plots manually (fast), but there is only the rotor. We also have save_design, which grabbed the image from Ansys (slow), but the second one was probably deleted. If the second one is missing, please add it in a separate PR and then check the image.
In winding.py, the first (front) layer's vars use names: phase, polarity, coil_object. The second (back) layer's vars use the same names with a '_back' suffix: phase_back, polarity_back. So, coil_object_back follows the same naming rule.
Another thing worth noting is that, from line 113 in winding.py, the current implementation can only support 1 and 2 layers structure.
Same rotor (same barrier seed) and same current for both layer counts, mean torque are
When "Nc" in both machines are changed from a fixed value to a formula like "68/Layers" (line 46, synrm_3f_36s.py) and "113/Layers" (line 29, synrm_5f_40s.py), the mean torque are now as follows.
Motor
Layers=1
Layers=2
synrm_3f_36s
4.213
4.214
synrm_5f_40s
9.117
9.130
@saxik13 current _build_stator_coils places layer i_layer at (lines 148-149, synrm_3f_36s.py) :
Yes, the gap between two layers is necessary for a properly working model, and it follows the real winding in the slot. The gap should probably be larger to avoid creasing very small mesh elements in this area. But the influence on the results should be negligible.
@saxik13
Thanks for the explanations. I still have another question: with the current implementation, the position of the first layer's inner edge and the second layer's outer edge changes with (Layers-1)*SpaceLayers/2. Should both ends stay fixed at the Layers=1 position, with the gap only carved out between the layers?
fix origin and sizes in _build_stator_coils (lines 148-149, synrm_3f_36s.py) to ensure both ends (inner edge of the first layer, and outer edge of the second layer) stay fixed at the same position as Layers=1. Only the middle changes, with a full SpaceLayers gap carved out between layers.
change the fixed Nc to 68/Layers and 113/Layers, respectively. (line 46 in synrm_3f_36s.py, and line 29 in synrm_5f_40s.py)
The torque results for both machines are now as follows
Yes, when we use 113/Layers (56.5), there's no error, and we got the results.
But I think it's necessary to investigate how Ansys handles this value before merging, I want to compare Nc=56, 113/Layers (56.5 here), and 57 for the same config and report the results.
With a larger PointPer, 56.5 lands almost exactly on the linear interpolation midpoint of 56 and 57 (within ~0.002%). This matches what @saxik13 said.
I also checked the Ansys project file, the following graph shows that Ansys receives 56.5. But I suggest that for a double layers structure, Nc should be an even (integer for each layer), because Ansys website states it should be an integer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.