完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我成功编写了一个EMPro脚本,用于构建多层Luneberg镜头天线模型,定义局部网格设置并开始模拟。
我理解如何构建一个几何体并插入一个descreet feed端口(来自示例脚本)和远场监视器,但是我没有尝试理解如何在脚本设计中插入一个平面波激励和一个近场监视器。 我也有兴趣知道如何调用随机数生成器函数 - 我有一些使用ramdom(),math.random()等尝试失败。我会感谢你帮我解决这个问题。 以上来自于谷歌翻译 以下为原文 I was successful in writing a EMPro script that build a multilayer Luneberg Lens antenna model, define local mesh settings and start the simulation. I understood how to build a geometry and insert a descreet feed port (from example scripts) and far-field monitors, but I have failed attempts to understand how I can insert in a script design a plane wave exitation and a near field monitor. I also interested to know how one can call a random number generator function - I have some failed attempts using ramdom(), math.random() etc. I'll thank you to help me with this problem. |
|
相关推荐
1个回答
|
|
您好,这是设置平面波激发的简短片段。
您能否提供一些关于您想要设置哪种近场传感器的更多详细信息? 这将有助于创造一个例子。 #addalwave excitation planewave = empro.excitation.PlaneWave(“my planewave”)planewave.waveform = empro.activeProject.waveforms()[0]#将获取项目的第一个波形,确保你有一个。 planewave.incidentPhi =“30 deg”planewave.incidentTheta =“45 deg”planewave.polarization =“EPhi”#或ETheta planewave.amplitudeMultiplier =“1 V”empro.activeProject.externalExcitations()。append(planewave)simSetup = empro。 activeProject.createSimulationData()simSetup.excitationType =“ExternalExcitation”对于随机数,您可以随机使用Python标准库模块中的函数。 您应该在调用其函数之前导入库。 以下是如何获得0到1之间的随机数。更多函数可用并在此处记录:http://docs.python.org/2/library/random import random print random.random()谢谢,Bram。 以上来自于谷歌翻译 以下为原文 Hello, Here's a short snippet to setup a plane wave excitation. Can you provide some more details about what kind of near field sensor you want to setup? That'll help creating an example. # adding planewave excitation planewave = empro.excitation.PlaneWave("my planewave") planewave.waveform = empro.activeProject.waveforms()[0] # will take first waveform of project, make sure you have one. planewave.incidentPhi = "30 deg" planewave.incidentTheta = "45 deg" planewave.polarization = "EPhi" # or ETheta planewave.amplitudeMultiplier = "1 V" empro.activeProject.externalExcitations().append(planewave) simSetup = empro.activeProject.createSimulationData() simSetup.excitationType = "ExternalExcitation" For random numbers, you can use functions from Python's standard library module random. You should import the library before calling its functions. Here's how you get a random number between 0 and 1. More functions are available and documented here: http://docs.python.org/2/library/random import random print random.random() Thanks, Bram. |
|
|
|
只有小组成员才能发言,加入小组>>
1283 浏览 0 评论
2371 浏览 1 评论
2189 浏览 1 评论
2062 浏览 5 评论
2946 浏览 3 评论
1104浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
751浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
922浏览 0评论
1284浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 21:29 , Processed in 1.290709 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号