如何解决PFC FiPy 导入gmsh,从.msh Ansys 格式转换而来的错误

问题描述

在 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

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...