-
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
Major rework of input generation and electrical models #464
Conversation
# Conflicts: # test.txt
# Conflicts: # test.txt
# Conflicts: # test.txt
…can (Random fswi and Symetrical random fswi)
# Conflicts: # Tests/Methods/Import/test_ImportGenPWM.py # pyleecan/Classes/Electrical.py # pyleecan/Classes/ImportGenPWM.py
# Conflicts: # test.txt
# Conflicts: # test.txt
…tVoltage [WiP] Add test_EEC_ELUT_SCIM_001.py to test EEC_SCIM using ELUT import
Hello @SebGue, This a very large PR indeed, it changes a lot of objects in pyleecan but it is clearly for the best :) After this PR we will probably do a new pyleecan major release. Here is a list of the tests for the new features/reorganization (the checked one are finished):
For test_mmf_dir.py, I still have to gather conventions for rotating direction in an .init file (rot_dir_ref=current_dir_ref=phase_dir_ref=-1), probably the .init file in Input method folder. For test_EEC_ELUT_SCIM_001.py, there is still some clean up to do. I detailed the different developments in the different issues gathered in global issue #452 . Best regards, |
Hello @EmileDvs thanks for your answer. I will have a look at all your questions/code changes. I will try to give some feedback uptill the beginning of next week. BR S |
# Conflicts: # Tests/Validation/Electrical/test_EEC_PMSM.py # Tests/Validation/Magnetics/test_FEMM_periodicity.py # pyleecan/Classes/MagElmer.py # pyleecan/Classes/MagFEMM.py # pyleecan/Classes/Magnetics.py # pyleecan/Classes/import_all.py # pyleecan/Functions/load_switch.py # pyleecan/Generator/ClassesRef/Simulation/Magnetics.csv # requirements.txt
[NF] Add method in dqh_transformation.py to calculate phase rotating direction from an n-phase signal
Hello @EmileDvs I have reviewed the code, so here we go :-) At first some technically notes. Now all the following points are maybe because I use my EEC a little different (in a class I called 'PerformanceOutput') and I don't know the very intention of your Electrical class usage. BR S |
Hello @SebGue, Thanks for your quick feedback :)
I think we can indeed improve how EEC object is handled in Electrical.run() . Putting the methods in EEC.solve_EEC can solve the issue but then we would have to look for the ELUT in self.parent.ELUT_enforced which is not really generic. You point out the fact that we have to make EEC.comp_parameters() compatible with LUT, in particular when we call self.fluxlink.comp_fluxlinkage() and self.indmag.comp_inductance(). To do so, we can create a FluxLinkLUT and IndMagLUT to mirror FluxLinkFEMM and IngMagFEMM, as children of FluxLink and IndMag abstract classes, with same methods so it can be transparent. To go a step further, we can merge FluxLink and IndMag objects into a single object, e.g. "ElecParam", with two methods comp_fluxlinkage() and comp_inductance() which are in fact very close (calling the model, calculating stator winding flux with/without currents, returns flux or inductance by dividing flux by current). Finally for the present case, we would have "ElecParamFEMM" and "ElecParamLUT", the first one calling MagFEMM in comp_fluxlinkage() and comp_inductance() and the second one taking a LUT as input and calling LUT methods in comp_fluxlinkage() and comp_inductance().
I think you are right about the skin effect model neglecting slot proximity effect but I'm not sure. The skin_effect model may be not validated yet, it's mostly important for SCIM to get skin effect in rotor bars. I don't know the reference for accouting skin effect in flux linkage, in any case it can also be set to 1 for now.
We use Electrical class to mainly get current from voltage, and from this we can calculate magnetic flux and forces. However I definitely think the "PerformanceOutput" class should part of the Electrical model and extend the loss calculation model to other losses. Is it ok for you if we merge soon the branch in pyleecan/master and then start a new common branch on EOMYS-Public to merge LUT formats and implement 'PerformanceOutput' ? That way we could start to work on a new pull request since this one is already quite huge. Best regards, |
Hello @EmileDvs I will answer your last question (and your question in #466) first. BR Sebastian |
ELUT could be an optional input parameter of solve_eec. With my implementation LUT is even part of EEC.
Oh, my point was not the parameters but the init of
I saw some references in the code |
Alright, in that case I am going to merge EEC and I have opened a branch "EEC_rework" on EOMYS-Public: https://github.com/EOMYS-Public/pyleecan/tree/EEC_rework In this PR the part related to LUT of SCIM is still in progress and will be adressed in the EEC_rework. |
You're probably right, the main interest of FluxLinkFEMM, IndMagFEMM classes and eec.fluxlink/eec.indmag attributes is to calculate those quantities within the workflow but we'll probably not use this workflow eventually. The most common workflow will be:
If solve_EEC() uses LUT by default, there is no need to keep LUT in Electrical rather than in EEC object, it makes sense. We can keep this in mind for EEC_rework.
Ah yes it probably comes from Pyrhonen book which is not freely available but we have this book and I can provide you with scans. |
@EmileDvs If you could provide the scans that would be great. But you don't have to hurry on that. |
This pull request is in progress to solve main issue #452