import OpenModal as OM # In order to reload modules to new location when unpickling files
import pickle
import sys
import pandas as pd
sys.modules['openModal'] = OM # In order to reload modules to new location when unpickling files
## see: https://stackoverflow.com/questions/13398462/unpickling-python-objects-with-a-changed-module-path
file_name=r'beam_accel.mdd'
f = open(file_name, 'rb')
data = pickle.load(f)
writer = pd.ExcelWriter('output.xlsx')
data[0].tables['analysis_index'].astype(str).to_excel(writer, 'index')
data[0].tables['analysis_values'].astype(str).to_excel(writer, 'values')
writer.save()
当前模态向量还没有在uff中导出,您必须 用python打开保存的*.mdd文件(mdd文件实际上是pickled数据)。 在数据中可以找到几何数据、模态向量等
下面是执行此操作的python代码(另请参见:https://github.com/openmodal/OpenModal/issues/31):
相关问题 更多 >
编程相关推荐