-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Abstract
Fix radius/circumferential mesh division settings in BSPM JMAG 2D FEA Analyzer
Context
When we use rotation slide mesh in JMAG, a mesh model is created to divided the rotor and stator into two mesh region. JMAG provides options to specify both the radial and circumferential division numbers for this, and eMach also supports to do this. See the following code:
eMach/examples/mach_eval_examples/bspm_eval/electromagnetic_step.py
Lines 34 to 35 in 0d42fbf
| airgap_mesh_radial_div=5, | |
| airgap_mesh_circum_div=720, |
However, if I look into the JMAG file, the checkboxes remain active (checked), while the division number is set property. This means that these settings are not actually applied: here is what airgap mesh looks like, where the slide division is automatically determined by JMAG, i.e., not by us:
Approach
We should add two lines before line 621 in add_mesh method to uncheck these boxes:
eMach/mach_eval/analyzers/electromagnetic/bspm/jmag_2d.py
Lines 612 to 626 in 0d42fbf
| def add_mesh(self, study, model): | |
| # this is for multi slide planes, which we will not be usin | |
| refarray = [[0 for i in range(2)] for j in range(1)] | |
| refarray[0][0] = 3 | |
| refarray[0][1] = 1 | |
| study.GetMeshControl().GetTable("SlideTable2D").SetTable(refarray) | |
| study.GetMeshControl().SetValue("MeshType", 1) # make sure this has been exe'd: | |
| # study.GetCondition(u"RotCon").AddSet(model.GetSetList().GetSet(u"Motion_Region"), 0) | |
| study.GetMeshControl().SetValue( | |
| "RadialDivision", self.config.airgap_mesh_radial_div | |
| ) # for air region near which motion occurs | |
| study.GetMeshControl().SetValue( | |
| "CircumferentialDivision", self.config.airgap_mesh_circum_div | |
| ) # 1440) # for air region near which motion occurs |
I.e.,
study.GetMeshControl().SetValue(u"AutoGapDivision", 0) # this is new line
study.GetMeshControl().SetValue(u"AutoDivision", 0) # this is new line
study.GetMeshControl().SetValue(
"RadialDivision", self.config.airgap_mesh_radial_div
) # for air region near which motion occurs
study.GetMeshControl().SetValue(
"CircumferentialDivision", self.config.airgap_mesh_circum_div
) # 1440) # for air region near which motion occursHere is the expected results:
where the number of division in radial is 5 and circumferential is 720.



