转载自http://chan1629.blog.163.com/blog/static/19595703220137219166686

  1. 新建一个filename.scm,文件,用记事本打开。
  2. 在文件中输入以下内容:

(define y) "定义变量y

(do ((y 2 (+ y 1))) ((> y
301)) ''利用do过程实现循环,循环变量为y,初始值是2,每次加1,当y大于301时循环终止,

(ti-menu-load-string

(format #f "file /rcd
moving100m-train--1-~05d " y)) ''ti-menu-load-string命令相当有用,在scm文件中利用它实现fluent中菜单命令,format语句,跟c语言中的printf功能同,这条语句也很重要,实现了向双引号内传递变量的功能。~05d 表示一个五位"数",低位为y,不足五位在高位用0补齐,常用。

(ti-menu-load-string
"report/surface-integrals/area-weighted-avg (12 13) temperature yes
temperature.srp yes") ''此语句输出id为12
13的面上的面平均静温到temperature.srp 文件。这些个语句怎么用,格式怎样,需要自己摸索。

(ti-menu-load-string
"report/surface-integrals/area-weighted-avg (12 13) pressure yes
pressure.srp yes")''同上

(ti-menu-load-string
"report/surface-integrals/area-weighted-avg (12 13)
velocity-magnitude yes velocity.srp yes")'同上

)''此括号为do过程的结束括号。

  1. 打开fluent,设置好工作目录,把刚才的filename.scm,文件放入工作目录内。
  1. 在TUI内按回车键后输入:(load "filenam.scm")

则会循环打开300个cas和dat文件,打开dat文件后,输出面12 13上的静温,静压和速度大小。

=====================================================================================

点面1:

(define
(hy-create-point-surface name x y z)

(ti-menu-load-string

(format #f
"/surface/point-surface ~a ~a ~a" name x y z)

)

)

(hy-create-point-surface
"p1" 0 0 0)

=================================================================================================

点面2:

(do ((x 0 (+
x 0.2)) ) ((> x 1.0))

(ti-menu-load-string

(format #f
"/surface/point-surface x-~3.1f ~a 0 0"))

)

=====================================================================================

线面:

(define
m)

(define
n)

(define
i)

(do ((i 1 (+
i 1)) (m 156 (+ m 104)) (n 52 (+ n 104))) ((> i
15))

(ti-menu-load-string

(format #f
"/surface/line-surface PL_i-~02d_1 45.6691 24.8664 ~a -45.669
24.8664 ~a\n" i m n))

(ti-menu-load-string

(format #f
"/surface/line-surface PL_i-~02d_2 45.6691 -24.8664 ~a -45.669
-24.8664 ~a\n" i n m))

)

Fluent 批量添加线面、点面、平面的scheme实现  【转载】的更多相关文章

  1. 分布式监控系统Zabbix--完整安装记录-批量添加主机和自动发现端口

    一.Zabbix-3.0.3批量添加主机的配置如下: 0)被监控机上要安装zabbix_agent,并配置好zabbix_agentd.conf (如下172.29.8.50是zabbix_serve ...

  2. 「Python实用秘技04」为pdf文件批量添加文字水印

    本文完整示例代码及文件已上传至我的Github仓库https://github.com/CNFeffery/PythonPracticalSkills 这是我的系列文章「Python实用秘技」的第4期 ...

  3. zabbix利用api批量添加item,并且批量配置添加graph

    关于zabbix的API见,zabbixAPI 1item批量添加 我是根据我这边的具体情况来做的,本来想在模板里面添加item,但是看了看API不支持,只是支持在host里面添加,所以我先在一个ho ...

  4. 百度地图API 批量添加 带检索功能的信息窗口

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. yii2批量添加的问题

    作者:白狼 出处:http://www.manks.top/yii2_batch_insert.html 本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否 ...

  6. EF批量添加数据性能慢的问题的解决方案

    //EF批量添加数据性能慢的问题的解决方案 public ActionResult BatchAdd() { using (var db = new ToneRoad.CEA.DbContext.Db ...

  7. Java使用Mysql数据库实现批量添加数据

    EmployeeDao.java //批处理添加数据 public int saveEmploeeBatch(){ int row = 0; try{ con = DBCon.getConn(); S ...

  8. Mybatis批量添加对象List

    1.对应的xml文件: <!--批量添加--><insert id="insertStandardItemInfo" parameterType="ha ...

  9. SqlServer——批量操作(批量添加,删除)

    批量添加数据: 一条insert语句批量插入多条记录 常见的insert语句,向数据库中,一条语句只能插入一条数据: insert into persons (id_p, lastname , fir ...

随机推荐

  1. 【转载】C#中List集合使用Reverse方法对集合中的元素进行倒序反转

    在C#的List集合操作中,有时候需要对List集合中的元素的顺序进行倒序反转操作,此时就可使用到List集合中的Reverse方法来实现此功能,Reverse方法的签名为void Reverse() ...

  2. BBPlus团队ALPFA冲刺(肖文恒)

    ALPHA冲刺博客 第一天:https://www.cnblogs.com/bbplus/p/11931039.html 第二天:https://www.cnblogs.com/bbplus/p/11 ...

  3. 开发环境wamp3.06 + Zend studio 12 调试配置

    <?php $fileName = "php大师.test.php"; //补充程序,显示文件名(不包括扩展名) $start = strrpos($fileName, &q ...

  4. centos7安装后,一些小优化

    1.设置静态ip vim /etc/sysconfig/network-scripts/ifcfg-ens33 将BOOTPROTO=dhcp修改为BOOTPROTO=static ONBOOT=no ...

  5. CentOS7安装Redis单实例

    由于环境差异,安装过程可能遇到各种各样的问题,不要慌,根据错误提示解决即可. 1.下载redis下载地址在:redis.io比如把Redis安装到/usr/local/soft/ cd /usr/lo ...

  6. Windows性能计数器监控实践

    Windows性能计数器(Performance Counter)是Windows提供的一种系统功能,它能实时采集.分析系统内的应用程序.服务.驱动程序等的性能数据,以此来分析系统的瓶颈.监控组件的表 ...

  7. JVM的深入理解:由一次Quartz的定时任务引发的“A cannot cast to A”的问题

    由Quartz框架引发的“A cannot cast to A”的问题 起因与问题描述 向新开的项目中添加定时任务,部署集群,添加了热加载(springboot-dev-tools),发现在转型时候出 ...

  8. python __main__ 里的变量是全局变量 因此在函数里面可以访问到

    __main__ and scoping in python from:https://stackoverflow.com/questions/4775579/main-and-scoping-in- ...

  9. Django之路——10 django的分页组件

    Django的分页器(paginator) view from django.shortcuts import render,HttpResponse # Create your views here ...

  10. Centos7安装nginx后提示“Welcome to nginx on Fedora!”,conf.d目录下无default.conf文件

    问题描述 在腾讯云centos7上安装nginx sudo yum install nginx 打开默认网页显示 Welcome to nginx on Fedora! 且 /etc/nginx/co ...