问题描述
在 PFC 软件中通过 FiPy.grid3D("") 导入 .msh2 网格类型进行网格划分有什么问题? 该网格从 openFOAM 导出并转换为 FiPy 的可读 .msh。嵌入式 FiPy 版本为 3.1,Python 版本为 2.7。
IPython 3.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object',use 'object??' for extra details.
%guiref -> A brief reference about the graphical user interface.
Traceback (most recent call last):
File "<itasca-code-0-19def0f6e02e>",line 116,in <module>
File "<itasca-code-0-19def0f6e02e>",line 11,in __init__
File "C:\Program Files\Itasca\PFC500\exe64\python27\lib\site-packages\fipy\meshes\factoryMeshes.py",line 111,in Grid3D
if numerix.getShape(dx) == () File "C:\Program Files\Itasca\PFC500\exe64\python27\lib\site-packages\fipy\tools\numerix.py",line 242,in getShape
raise AttributeError,"No attribute 'shape'"
AttributeError: No attribute 'shape'
解决方法
您的问题很难理解,但 Grid3D
不解析 Gmsh 网格。你想要Gmsh3D
。