@wuyukai 大哥,你帮我看看这个,是不是也是这个问题呀?
https://www.cfd-china.com/topic/7801/paraview求助-操作出现问题了/5?_=1735889189654
谢谢大哥了
@wuyukai 大哥,你帮我看看这个,是不是也是这个问题呀?
https://www.cfd-china.com/topic/7801/paraview求助-操作出现问题了/5?_=1735889189654
谢谢大哥了
"ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py"
第790-792行:
if value == None:
rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
return
第786-826行代码:
rep.UseSeparateColorMap = separate
association = rep.ColorArrayName.GetAssociation()
arrayname = rep.ColorArrayName.GetArrayName()
component = None
if value == None:
rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
return
if not isinstance(value, tuple) and not isinstance(value, list):
value = (value,)
if len(value) == 1:
arrayname = value[0]
elif len(value) >= 2:
association = value[0]
arrayname = value[1]
if len(value) == 3:
# component name provided
componentName = value[2]
if componentName == "Magnitude":
component = -1
else:
if association == "POINTS":
array = rep.Input.PointData.GetArray(arrayname)
if association == "CELLS":
array = rep.Input.CellData.GetArray(arrayname)
if array:
# looking for corresponding component name
for i in range(0, array.GetNumberOfComponents()):
if componentName == array.GetComponentName(i):
component = i
break
# none have been found, try to use the name as an int
if i == array.GetNumberOfComponents() - 1:
try:
component = int(componentName)
except ValueError:
pass
if component is None:
rep.SetScalarColoring(arrayname, servermanager.GetAssociationFromString(association))
else:
rep.SetScalarColoring(arrayname, servermanager.GetAssociationFromString(association), component)
rep.RescaleTransferFunctionToDataRange()
def GetAssociationFromString(val):
"""Returns array association integer value from its string representation"""
global ASSOCIATIONS, _LEGACY_ASSOCIATIONS
val = str(val).upper()
try:
return ASSOCIATIONS[val]
except KeyError:
try:
return _LEGACY_ASSOCIATIONS[val]
except KeyError:
raise RuntimeError ("invalid association string '%s'" % val)
这个是“ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py"的
第3198到3208行代码
但是在另一台电脑上,两个版本都能用。裂开了。是不是这台电脑的什么文件不合适了?有没有大佬能指导一下,5555555555555555555555,裂开了。
这个是另一个版本的,提示的问题
Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 772
Failed to determine the LookupTable being used.
Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 772
Failed to determine the LookupTable being used.
Traceback (most recent call last):
File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3203, in GetAssociationFromString
return ASSOCIATIONS[val]
KeyError: 'NONE'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3206, in GetAssociationFromString
return _LEGACY_ASSOCIATIONS[val]
KeyError: 'NONE'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 217, in <module>
File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py", line 791, in ColorBy
rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3208, in GetAssociationFromString
raise RuntimeError ("invalid association string '%s'" % val)
RuntimeError: invalid association string 'NONE'
各位大佬,想请教一下paraview操作的问题,突然无法运行了,然后重新下载了一个新版本,还是有这个问题,这个是运行时候的错误提示,能不能帮我指导处理一下,谢谢各位了。
Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 3180
Failed to determine the LookupTable being used.
Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 3180
Failed to determine the LookupTable being used.
Traceback (most recent call last):
File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3273, in GetAssociationFromString
return ASSOCIATIONS[val]
KeyError: 'NONE'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3276, in GetAssociationFromString
return _LEGACY_ASSOCIATIONS[val]
KeyError: 'NONE'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 217, in <module>
File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py", line 1082, in ColorBy
rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3278, in GetAssociationFromString
raise RuntimeError("invalid association string '%s'" % val)
RuntimeError: invalid association string 'NONE'
烦请各位大佬指点一下,workbench里面mesh画的带角度的翼型的网格,为什么边界层厚度不一样啊?怎么处理一下呢?上面的感觉太窄了
@李东岳 李老师,就是感觉有时候,不能满足通过理论计算得到的边界层信息,比如不能满足边界层厚度啊,层数也达不到,这种一般怎么处理啊?感觉workbench的mesh虽然可以,但是我希望通过这个方式画网格,这样对我后续的计算方便一点。💋
snappyHexMesh画边界层,大家都是按照计算下来的层数,边界层高度画嘛?我按照计算下来的,层数一多就画不出来啊,就是很简单的翼型绕流的,有没有大神有相关的心得体会之类的,可以交流一下嘛~
@李东岳 好滴,谢谢李老师~
发现这个参数匹配好麻烦啊,层数、第一层高度等等之类的,感觉按照计算得到的画一下基本不出来
大家好,请教一下各位专家老师,就是我用这个snappyHexMesh画一个翼型的边界层时,出现了部分区域生成边界层,部分区域没有边界层的现象。
想请大家指点一下,这是什么原因呢?可以通过哪些方面的调整解决这个问题呢?谢谢大家。
您好,请问解决了嘛?我现在也碰到了同样的问
@huiyin 谢谢~
谢谢谢谢~么么哒~
期待期待
我是个小白啊,感觉有时候处理这种空间后,反而打不开了,所以还是买硬盘吧