石家庄做淘宝网站,外贸 网站设计,网站手机版怎么弄,wordpress修改联系我们页面0.什么是PyFluent?
官方介绍如下#xff1a;
PyFluent 是 PyAnsys 生态系统的一部分#xff0c; 允许您在所选的 Python 环境中结合使用 Fluent 与其他 PyAnsys 库和外部 Python 库一起使用。
PyFluent 实现了客户端-服务器体系结构。它使用谷歌遥控器 过程调用或 gRPC 接…0.什么是PyFluent?
官方介绍如下
PyFluent 是 PyAnsys 生态系统的一部分 允许您在所选的 Python 环境中结合使用 Fluent 与其他 PyAnsys 库和外部 Python 库一起使用。
PyFluent 实现了客户端-服务器体系结构。它使用谷歌遥控器 过程调用或 gRPC 接口用于启动或连接正在运行的 Fluent 进程作为服务器。但是您只需要与 Python 交互接口。
可以使用 PyFluent 以编程方式创建、交互和控制 Fluent 会话用于创建您自己的自定义工作区。此外您可以使用 PyFluent 通过高度可配置的定制功能提高您的生产力脚本。 PyFluent 文档 0.19.2 — PyFluent (pyansys.com) 可以使用Python控制ANSYS软件的调用包括网格生成、计算、后处理、数据提取和设计优化简而言之很牛。 1.如何使用pip安装库及更换镜像源
使用python的pip安装前先配置合适的源推荐使用镜像源例如清华、阿里网速会快一些。
使用以下代码安装nump库-i后表示选择的源地址。
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple也可以使用阿里源替换代码就可以。
-i https:// mirrors.aliyun.com/pypi/simple使用 -i 方式是临时换源也可以修改配置文件永久换源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
查看是否配置成功
pip config list
若提示下图则说明成功配置 附国内常用的镜像源
清华大学
https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣
https://pypi.douban.com/simple/
阿里云
https://mirrors.aliyun.com/pypi/simple/
中国科学技术大学
https://pypi.mirrors.ustc.edu.cn/simple 2.安装PyFluent所需库文件
所需核心库有以下三个
PyFluent-CoreGitHub - ansys/pyfluent: Pythonic interface to Ansys FluentPythonic interface to Ansys Fluent. Contribute to ansys/pyfluent development by creating an account on GitHub.https://github.com/ansys/pyfluentPyFluent-parametricGitHub - ansys/pyfluent-parametric: Pythonic interface to Ansys Fluent parametricPythonic interface to Ansys Fluent parametric. Contribute to ansys/pyfluent-parametric development by creating an account on GitHub.https://github.com/ansys/pyfluent-parametricPyFluent-visualizetionGitHub - ansys/pyfluent-visualization: Visualize Ansys Fluent simulations using PythonVisualize Ansys Fluent simulations using Python. Contribute to ansys/pyfluent-visualization development by creating an account on GitHub.https://github.com/ansys/pyfluent-visualization 可在开源网格GitHub中下载也可以使用ANSYS官方的 Ansys Python Manager 程序进行辅助配置比较方便。库版本需要与Python版本和ANSYS版本进行匹配。
PyAnsys文档https://docs.pyansys.com/https://docs.pyansys.com/version/dev/下载Ansys Python Managerhttps://github.com/pyansys/python-installer-qt-gui/releases/https://github.com/pyansys/python-installer-qt-gui/releases/下载 Python Download Python | Python.orgThe official home of the Python Programming Languagehttps://www.python.org/downloads/
官方安装链接视频如下本文是对其内容进行简化 PyFluent 安装 |Ansys创新课程https://courses.ansys.com/index.php/courses/getting-started-with-pyfluent/lessons/lesson-2-installation/ Ansys-Python-Manager安装后启动界面如下 2.1安装Phthon
如果电脑中未安装Python,可以在此界面中安装如已安装可以跳过此界面。Python版本推荐最新版本的前一个版本稳定而不落后。
Python安装地址
Download Python | Python.orghttps://www.python.org/downloads/ 2.2 安装配置虚拟环境
可选则是否创建虚拟环境此后运行代码可在此环境中进行无需到Python默认路径。若无需求可跳过此界面。 2.3 安装PyFluent所需库文件
在该窗口下依次安装Core、parametric和visualizetion库文件。 2.4 启动Jupyter Notebook
在目录中输入cmd当前路径下启动命令行窗口。 输入“jupyter notebook”启动Jupyter Notebook。 Jupyter Notebook启动界面。 可以新建或者打开文档这里打开ANSYS官方提供的实例“Launching Fluent.ipynb” Launching Fluent.ipynb文件内容 选中一行代码后可“SHIFTEnter”运行或者点击 “单箭头” 标志运行该行代码。 这里代码的主要效果是启动FLUENT运行后效果如下PyFluent就成功安装了也可以使用PyCharm或者VS等其他软件启动。