When using the “PM synchronous motor transient analysis”, an unknown variable appears and keeps reporting errors #5866
-
At this step, there have been continuous errors and the location of 'ElectricPeriods' cannot be found. I don't understand why this error occurred |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
@Samuelopez-ansys Sorry to bother you, could you please take a look at this question |
Beta Was this translation helpful? Give feedback.
-
Hi @CunhaoRong What I see from the logger is that you are trying to do plot1.name, but plot1 is a bool, please check the examples 👍 If it does not help you, please share a snippet code to reproduce the issue. |
Beta Was this translation helpful? Give feedback.
-
@CunhaoRong could you please debug and check what the create field plot method returns? because I guess it fails. Please check where plot1 is created. The way you are passing the name is correct but if plot1 is a bool it means that the method called to create plot1 has failed thus it returned False so this is the source of your problem and not plot_field_from_fieldplot. |
Beta Was this translation helpful? Give feedback.
@CunhaoRong did you check what is returned by this method?
plot1 = m2d.post.create_fieldplot_surface( assignment=faces_reg, quantity="Flux_Lines", intrinsics={"Time": m2d.variable_manager.variables["StopTime"].evaluated_value}, plot_name="Flux_Lines", )
if plot1 is False it means that it failed for some reason.
If you are using PyCharm you can try to debug the code and put a breakpoint at this line to check why it fails: