-
Notifications
You must be signed in to change notification settings - Fork 222
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
Bug: Field calculator error when no variables in design #32
Comments
It's funny it fails on getQDielecitc. Id expect it to fail on a junction. It seems like mabe the issue is with the frequencies. did you run a simulation that now has results or was this before |
I think I found the issue. When lv = self._get_lv(variation) occurs and there are no variables in the design, you get lv = [''] (a list with one empty string), which causes the error. In the case of no design variables, we want it to set lv =[] (just an empty list). I confirmed that this fixes it on some small functions I wrote, but I'm not sure where/how to add a check for this in pyEPR to fix it wherever it might come up. |
Hi Zlatko,
Sure, this sounds like a good idea. I saw in the thread that you're
thinking mid-late September, which should work for me.
Best,
Patrick
…On Thu, Aug 13, 2020 at 3:31 PM Zlatko Minev ***@***.***> wrote:
@ptruitt <https://github.com/ptruitt> I’d like to invite you to get
together for a Working Group Meeting for pyEPR.
See #45 <#45>
Would you be interested?
Best wishes,
Zlatko
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYIT73UHWPNCBFWOXXUUBTSAQ5SBANCNFSM4M2DIW2A>
.
|
We will have a working group meeting for pyEPR soon: Meeting signup link: https://forms.gle/oYsCjCMZLZtfrGuFA You can you sign up / help spread the word to anyone you think would be interest. |
I noticed that (at least some) field calculator operations fail when there are no variables in the design. One can get around this by just adding a variable to the design and setting it to a constant value if you don't want/need to vary it, but this isn't obvious at first. I have not found a fix for this. Sample error shown below:
com_error Traceback (most recent call last)
in
----> 1 test.get_Qdielectric('Substrate', '0', '0')
~\code\pyEPR\pyEPR\core_distributed_analysis.py in get_Qdielectric(self, dielectric, mode, variation, U_E)
840 def get_Qdielectric(self, dielectric, mode, variation, U_E = None):
841 if U_E == None:
--> 842 U_E = self.calc_energy_electric(variation)
843 Qdielectric = OrderedDict()
844 print('Calculating Qdielectric_' + dielectric + ' for mode ' +
~\code\pyEPR\pyEPR\core_distributed_analysis.py in calc_energy_electric(self, variation, volume, smooth)
595
596 lv = self._get_lv(variation)
--> 597 return A.evaluate(lv=lv)
598
599 def calc_energy_magnetic(self,
~\code\pyEPR\pyEPR\ansys.py in evaluate(self, phase, lv, print_debug)
2768 args.extend(["Freq:=", self.setup.solution_freq])
2769
-> 2770 self.calc_module.ClcEval(setup_name, args)
2771 return float(self.calc_module.GetTopEntryValue(setup_name, args)[0])
2772
~\anaconda3\envs\pyEPR\lib\site-packages\win32com\client\dynamic.py in ClcEval(self, solnName, varVals)
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147024365), None)
The text was updated successfully, but these errors were encountered: