python - How to save the results in sdf file format after simulation through python Api in Dymola
问题描述
By default
dymola.simulateModel("Modelica.Mechanics.Rotational.Examples.CoupledClutches", 0.0, 1.0,0, 0.0,"Dassl",0.0001, 0.0, "res")
generates .mat
file
Suppose if we want to generate txt file then below line is used
dymola.experimentSetupOutput(textual=True)
But if I want to save the result in sdf file format what should I do?
解决方案
我可能错了,但我认为 Dymola 中没有这样的标志可以直接将模拟结果输出为 sdf。
sdf 文件是在模拟完成后生成的dsres2sdf.exe
,位于 Dymola 安装目录的 bin 文件夹中。
因此,您可以简单地执行模拟,然后从 python 调用 exe 将 Dymola 结果文件转换为 sdf 文件。
Usage: dsres2sdf.exe <result.mat> <result.sdf>
推荐阅读
- entity-framework - 在 EF 中使用 ANY 搜索儿童模型非常慢
- asp.net - 当至少有 2 人连接时,SignalR 使网站挂起
- javascript - 我需要一个正则表达式来匹配字符串
- c# - 关于包含的表达式名称的简单问题?:
- ios - 更新到 iOS 13 后,UITextField 的建议(电子邮件、电话号码、名字...)不会出现在键盘上方
- python - 使用熊猫阅读excel时列开始行不均匀
- r - 使用 pivot_longer 将宽列收集到多个长列 - 第 2 部分
- vue.js - Vue-router 在运行时改变模式
- java - 配置弹性搜索以侦听 0.0.0.0:9200 (IPV4)
- java - Web 应用程序如何与独立的 Java 应用程序通信