SolidWorks API - 电磁动力学
是否可以使用 SolidWorks API for Animator/Motion Study/COSMOS/EMS 来模拟自定义力(在我的例子中为电磁力)?
我正在寻找能够公开所需数据的 API 的任意组合,以便能够模拟正电/负电或北/南磁力的动态。
我需要做的最基本的事情是:
- 对两个立方体进行建模
- 将一个立方体上的一个点标记为具有正电荷,将另一个立方体上的点标记为负电荷(或北/南磁性)
- 按“开始”
- 观察它们聚集在一起并坚持
一旦我能弄清楚如何做到这一点,我就可以完成我正在尝试编写的更复杂的代码(这不是问题)。我只是不知道从哪里开始。我搜索了又搜索,但找不到明确的答案,文档稀疏且难以掌握。
如果这绝对不可能或不值得在 SolidWorks 中尝试,那么这是一个可以接受的答案。如果我可以自由选择平台,我绝不会选择 SolidWorks,但它是为我选择的。
编辑
看来 COSMOSMotion API 的 IDDMActionReactionForce 类正是我正在寻找的。谁能指出一个使用它来定义两个对象之间的自定义力的示例?
Is it possible to simulate custom forces (in my case, electromagnetic) using the SolidWorks API for Animator/Motion Study/COSMOS/EMS?
I'm looking for any combination of API's that would expose the required data to be able to simulate the dynamics of either electrical positive/negative or magnetic north/south forces.
The very basics of what I need to be able to do is:
- Model two cubes
- Mark a point on one as having positive charge and the point on the other as negative charge (or north/south magnetism)
- Press "Go"
- Watch them come together and stick
Once I can figure out how to do this, I can go through with the more complicated code that I'm trying to write (that's not the problem). I'm simply stuck on where to begin. I have searched and searched but cannot find a definitive answer, the documentation is sparse and hard to grasp.
If this is definitely not possible or not worth it to attempt in SolidWorks, then that's an acceptable answer. I never would have chosen SolidWorks if I was left free to pick the platform, but it was chosen for me.
EDIT
It seems COSMOSMotion API's IDDMActionReactionForce class is what I was looking for. Can anyone point me to an example of using it to define a custom force between two objects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不能谈论 SolidWorks,所以我的回答可能无关紧要 — 但我已经使用光线追踪软件来模拟动态系统。
就我而言,我正在模拟月食和日食的情况。光线追踪软件 (POVRay) 负责生成包括太阳、地球和月球在内的场景图像,但我必须计算动画每一帧的各个物体的位置。
我怀疑电磁动力学建模可能就是这种情况,您必须每隔一定时间计算所涉及的物体的位置,以便 Solidworks 渲染动画场景。
我对 SolidWorks 功能的认识可能完全错误,所以祝您好运。
我很想说“这是不可能的”,因为你说这将是“一个可以接受的答案”,但这太容易了。
I can't speak about SolidWorks, so my answer may be irrelevant — BUT I have used ray-tracing software to model dynamic systems.
I my case, I was simulating the circumstances of lunar and solar eclipses. The ray-tracing software (POVRay) took care of generating an image of the scene including the Sun, Earth and Moon, but I had to calculate the positions of the various bodies for each frame of the animation.
I suspect this may be the case with modelling Electromagnetic Dynamics, and you will have to calculate the positions of the bodies involved at intervals, so that Solidworks will render the scenes of an animation.
I may be all wrong about the capabilities of SolidWorks, so I wish you luck.
I was tempted to say that "it's impossible" because you said it would be "an acceptable answer", but that would be too easy.
经过多次尝试,我的结论是 SolidWorks 不是合适的平台。它不允许您参与其内部物理计算,而且我提到的 Force 对象对于我需要建模的问题来说效率太低。理论上,它将两个立方体沿着 SolidWorks 内置的重力/碰撞检测模拟元素结合在一起,但当遇到 n 体问题时,很明显它不是为此而设计的。
After much trying, my conclusion is SolidWorks is not the appropriate platform for this. It doesn't let you hook into its internal physics calculations and the Force object I spoke of is way too inefficient for the problem I needed to model. Theoretically, it will work to bring two cubes together along side SolidWorks' built in gravity/collision detection simulation elements but when confronted with an n-body problem, it was apparent that it wasn't made for that.