首页 Tecplot中使用公式

Tecplot中使用公式

举报
开通vip

Tecplot中使用公式Tecplot中使用公式 建议加入精华.虽然是其他地方找来的,但是我花了很多时间来整理的. Data->Alter->Specify Equations 可以使用公式 Tecplot 公式形式如下: Lvalue = f(Rvalue1, Rvalue2, Rvalue3, ...) f() 类似 FORTRAN 表达式,参考下面的内容。Lvalue 是对一个存在或不存在的变量的引用, RvalueN 是对值的引用(如常数、变量值或序号)。 公式中可以有空格,但是在内部函数名称和变量名称中不能有空格。 ...

Tecplot中使用公式
Tecplot中使用公式 建议加入精华.虽然是其他地方找来的,但是我花了很多时间来整理的. Data->Alter->Specify Equations 可以使用公式 Tecplot 公式形式如下: Lvalue = f(Rvalue1, Rvalue2, Rvalue3, ...) f() 类似 FORTRAN 关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf 达式,参考下面的 内容 财务内部控制制度的内容财务内部控制制度的内容人员招聘与配置的内容项目成本控制的内容消防安全演练内容 。Lvalue 是对一个存在或不存在的变量的引用, RvalueN 是对值的引用(如常数、变量值或序号)。 公式中可以有空格,但是在内部 函数 excel方差函数excelsd函数已知函数     2 f x m x mx m      2 1 4 2拉格朗日函数pdf函数公式下载 名称和变量名称中不能有空格。 如果 Lvalue 指定的变量在当前 Frame 的数据集中存在,公式将修改变量的值;如果不存 在就建立一个新变量。 如果公式包含语法错误,在一个错误对话框中显示公式,告知错误的大概位置。 每个公式占一行,可以使用多个公式,单击 Compute 生效,每个公式按顺序用于所有指定 的 ZONE 和数据。 公式变量和值 变量可以用3种方法指定:根据数据文件中的顺序,名称或字母代码。 可以用数据文件中变量的顺序引用变量,V1 是数据文件中的第一个变量,V2 是第二个,依此类推。 如,要设置数据文件中第一个变量等于第二个变量和第三个变量的和,用 V1 = V2 + V3 用这个方法创建新变量必须指定下一个变量的序号,假设数据文件中有5个变量,可以创建一个新变量等于第四个变量的一半:TV6 = V4 / 2 不能跳过中间的数字指定变量,否则 Tecplot 弹出错误信息对话框指出变量名无效。 变量也可以用名称指定,方法为用大括号("{"和"}")包含变量名,如要设置 V3 等于变量 R/RFR 的值用: V3 = {R/RFR} 变量名大小写不敏感,前后的空格也忽略,因此下面的公式是相同的: v3 = {R/rfr} V3 = { r/rfr } 变量名中的空格有意义,因此下面的公式和上面的公式不同: V3 = {R / rfr} 如果有两个或多个变量名字相同,Tecplot 使用第一个变量,即如果 V5 和 V9 都叫 R/rfr, 用变量名时使用的是 大括号也可以用于公式左侧,此时如果该变量不存在就创建一个新变量,这在公式文件中很 重要, 如,下面的公式设置变量 T/R 等于变量 T 除以变量 R,如果不存在变量 T/R,将创建一个新变量。 {T/R} = {T} / {R} 变量也可以用字母代码表示,有效的字母代码为:: I: 数据的 I 序号 J: 数据的 J 序号 (有限元 ZONE 为 1) K: 数据的 K 序号 (有限元 ZONE 为 1) X: X轴变量(在 XY Line 图形中,所有图形必须有相同的 X 变量名称) Y: Y轴变量(在 XY Line 图形中,所有图形必须有相同的 Y 变量名称) Z: Z轴变量(如果存在)) A: Polar 图的 Theta 轴,如果这个变量有效,图形必须是 Polar Line,且所有图形必须有相 同的 Theta 变量名称) R: Polar 图的 R 轴,图形必须是 Polar Line,且所有图形必须有相同的 Theta 变量名称 U: 向量的 X 分量(如果存在) V: 向量的 Y 分量(如果存在) W: 向量的 Z 分量(如果存在) B: value-blanking variable (if set).Plot->Blanking->value-Blanking里设置 C: 等值线变量(如果存在) S: 散点大小变量(如果存在) 字母代码可以用于公式右侧任意位置,不要加大括号,例如: V3 = I + J V4 = cos(X) * cos(Y) * cos(Z) {Dist} = sqrt(U*U + V*V + W*W), {temp} = min(B,1) 代表变量的字母代码,除I, J, K外,都可以用在公式左侧,如: Z = X*X/(1+Y*Y) W = 0 S = 1+ABS(S) 如果 Tecplot 图不存在使用的字母代码会有出错信息,如在非 3D 图形中使用 Z,字母代码引用的变量只对当前 Frame 有效。 公式中还可以使用辅助数据,如引用数据文件中的辅助数据从无量纲变量计算有量纲变量, 公式中使用辅助 数据语法如下 AUXZONE[nnn]:Name AUXDATASET:Name AUXFRAME:Namel 例如辅助数据集中的常数 Pref 可以用 AUXDataSetref 引用,使用这个变量的公式如: {P} = {P_NonDim} * AUXDataSetref Frame 辅助数据常数 Mach 可以用 AUXFrame:Mach 引用。 ZONE 辅助数据常数有2种方法引用:AUXZone:Name 对当前 ZONE 使用 Name, AUXZone[nnn]:Name 对 ZONE 号为 nnn GW(的 ZONE 使用 Name。如果正在对 ZONE 1-3 操作,对 ZONE 1 操作时,AUXZone:Reynolds 引用 ZONE 1 中的辅助数据 Reynolds,=xsw 对 ZONE 2 操作时,AUXZone:Reynolds 引用 ZONE 2 中的辅助数据 Reynolds,依此类推。而 AUXZone[2]:Reynolds 对NRH 所有操作 ZONE 引用 ZONE 2 中的辅助数据常数 Reynolds。 公式操作符和函数 操作符: + 加 减 * 乘 / 除 ** 指数 优先级为: ** 高 *,/ +,- 低 可用函数(除非注明,所有函数使用一个参数): SIN: Sine (用弧度) COS: Cosine (用弧度) TAN: Tangent (用弧度): ABS: 绝对值 ASIN: Arcsine (结果是弧度) ACOS: Arccosine (结果是弧度) ATAN: Arctangent (结果是弧度) ATAN2(A,B): Arctangent of A/B (结果是弧度) SQRT: 开平方 LOG: 自然对数(底是e) ALOG: 自然对数(底是e) LOG10: 以10为底的对数 ALOG10: 以10为底的对数 EXP: 指数(底是e); EXP(V1)=e**(V1). MIN(A,B): A 和 B 的最小值 MAX(A,B): A 和 B 的最大值 SIGN: 参数为负时返回 -1,否则返回 ROUND: 舍入到最近整数 TRUNC: 去掉小数部分 LOG 和 ALOG 等价,LOG10 和 ALOG10 等价。 要调用内部函数,把它的参数放在小括号("(" 和 ")")里,如: V4 = ATAN(V1) Tecplot 有一组完全的一、二阶导数和微分函数: ddx ddy ddz dda ddr d2dx2 d2dy2 d2dz2 d2da2 d2dr2 d2dxy d2dyz d2dxz d2dar ddi ddj ddk d2di2 d2dj2 d2dk2 d2dij d2djk d2dik 导数和微分函数可以象内部函数一样使用,如: V4 = ddx(V3) V6 = d2dx2(v5) {dC/dx} = ddx(C) V8 = ddj(X) {Vt12} = ddy({Vt11}(i+1)) + ddy({Vt11}(i-1)) Z = d2dj2(sin(v5*v6)) V9 = ddj(ddx({R/T})) C = d2dij(C[1]-C). {NEWVAR} = ddi(X)+ddj(Y)+ddk(Z) 导数和微分函数限制如下: IJK-ordered ZONE 的导数和微分用全 3D 体积计算。 如果在选定 ZONE 的所有数据点上存在导数没有定义的点,那么在所有点都不进行计算 导数计算使用当前 Frame 的坐标轴定义,如果有多个 Frame 且对相同的数据集有不同的 变量指定时需要注意。 所有导数和微分都在数据点中心或网格中心(如果导数变量是网格中心变量)。 2个 ZONE 边界上的导数可能不同,因为 Tecplot 每次只计算一个 ZONE 。 导数和微分函的边界条件\ 对于 ordered ZONE ,一阶导数和微分的边界值(ddx, ddy, ddz, ddi, ddj, and ddk)用 simple 或 complex 方法计算,缺省是 simple。 配置文件中的下面参数控制使用的方法 $!INTERFACE DATA {DERIVATIVEBOUNDARY=SIMPLE} 把 SIMPLE 改为 COMPLEX 使用 complex 边界条件。 对于 simple 边界条件,边界导数用边界的一阶导数计算,等价于一阶导数在边界上是常数 (二阶导数等于0)。 complex 边界条件时,边界导数从相邻内点导数线性外插,等价于二阶导数在边界上时常数 (一阶导数线性变化)。 二阶导数和微分(d2dx2, d2dy2, d2dz2, d2dxy, d2dyz, d2dxz, d2di2, d2dj2, d2dij, d2dk2, d2djk, and d2dik) 忽略这些边界条件,边界导数被设置成等于内部相邻的导数,等价于二阶导数在边界上是常 数。 可以用序号范围和序号选项建立自己的导数边界条件。 指定 ZONE 号: 变量后跟中括号可以指定变量值的 ZONE V3 = V3 - V3[1 X = ( X[1] + X[2] + X[3] ) / 3 {TempAdj} = {Temp}[7] - {Adj} V8 = V1[19] - 2*C[21] + {R/T}[18] ZONE 号必须是小于等于 ZONE 数的正整常数。 指定的 ZONE 必须和当前区域有相同的结构(I-, IJ-, 或 IJK-ordered 或 有限元) 和维数(即 IMax, 节点数等) 不指定时使用当前 ZONE。 ZONE 指定只在公式右侧起作用,所有公式右侧的值在修改前都不变。要在公式左侧指定 ZONE, 在指定公式对话框中 ZONE 内指定。 指定数据序号 用小括号("(" 和 ")")可以指定序号,可以是绝对位置或相对当前的位置,如: V2 = ( V2(i+1) + V2(i-1) U = U(i+1,j) - U(i-1,j) + V(i+2,1) + 3*W(i-1). {NTQ} = {TQ} + {TQ}(i-3,j+7,k-1) - {TQ}(3,j+1,k+8} S = S(i+1,j) - V3(2) + {RFR/T}(J+2) 用 I,J,K 可以指定序号相对当前位置的偏移,必须使用整数偏移量,如果超过 ZONE 末尾,使用边界值, 如当 I=IMax-1 和 I=IMax 时,V3(i+2) 使用 V3(imax);I=1 或 2 时,V3(i-2) 使用 V3(1) 用一个正整数指定绝对位置,如 V3(2) 引用 V3 的第二个值。 序号顺序必须是 I, J, K 顺序的,如果数据是 I-ordered 忽略 J,如果数据不是 IJK-ordered 忽 略 在有限元数据中不可以使用序号。 序号指定只在公式右侧起作用,如果不指定则使用当前序号,要在公式左侧使用序号,在指 定公式对话框中 Index Ranges 内指定。 序号可以和 ZONE 共同使用,先用 ZONE,如: V3 = V3 - V3[1](i+1) Y = Y[1] - Y[2](1) + Y(1,j+3) + Y 新变量的数据类型 可以在 New Var Data Type 下拉列表中指定,缺省是 Auto,Tecplot 自动指定合适的类型。 也可以手动指定。 可用数据类型为: Single: 4byte 浮点数 Double: 8byte 浮点数 Long Int: 4byte 整数] Short Int: 2byte 整数 Byte: 1byte 整数(0-255) Bit: 0或1 新变量的位置 可以在 New Var Location 下拉列表中指定,缺省是 Auto,Tecplot 假设变量在节点上,即使 公式中所有变量都 是 cell-centered 的也一样。 修改公式使用范围 ZONE 和序号范围是可以修改的,要对单独的公式指定范围,在公式末尾加冒号,再加下面 的语句: 公式范围 = Comments > = 限制 ZONEN = 限制 I 的范围 = 限制 J 的范围 = 限制 K 的范围 > = 创建新变量时,设置左侧变量数据类 例如,要把 ZONE 1,3,4,5 的 X 加 1: X=X+1:k 下面的例子每隔一个序号 I 就对 X 加 1,注意,0 表示序号最大值。 X=X+1: 下面的例子创建一个新变量,同时赋予变量类型: {NewV}=X-Y: 对话框中的 Remove 按钮可以删除这些限制。 公式例子: 下面的公式中 V1 (数据文件中的第一个变量) 变成自己的 2.5 倍: V1 = 2.5* V1 设置变量 "Density" 等于 205,如果不存在这个变量就创建了一个新变量。 {Density} = 205 变量 Y ( Y 轴变量) 用 X ( X 轴变量) 平方的相反数代替: Y = -X**2 V3 用 V2 四舍五入的结果代替,如果数据集中只有2个变量,就会创建新的变量。 V3 = round(V2) 数据集中的第四个变量用第三个变量的对数代替 V4 = ALOG10(V3) 假设第3、4个变量是速度的 X、Y 向分量,并且总共有 5 个变量,下面创建第 6 个变量 V6 是速度的大小 V6 = (V3*V3+V4*V4)**0.5 或 V6 = sqrt(V3**2+V4**2) 上面的操作也可以用下面的公式代替(假设当前窗口已经设置了矢量图): {Mag} = sqrt(U*U + V*V) 公式中也可以引用 I, J, K 序号,例如,如果想把 ZONE 中一部分值用 value-blanking 排除,可以创建一个 以 I, J 为函数的新变量(IJ-ordered 数据),然后用 value-blanking 可以剔除特定单元的数据,如果 value-blanking 变量的值小于等于 value-blanking 分离值。 下面的公式设置变量 "diff" 的值为变量 "depth" 及其本身舍入值的差值: {diff} = {depth} - trunc({depth}) 下面的公式把等值线变量 C 设置为散点大小变量 S 的绝对值 C = abs(S) 用已知变量创建新的变量]X Variable Location. Each variable in each zone in a data file may be located at the nodes or the cell-centers. Each variable is specified as NODAL or CELLCENTERED in the VARLOCATION parameter array, located in the control line. The format is: > VARLOCATION=([set-of-vars]=var-location,[set-of-vars]=var-location, ...) > where set-of-vars is the set of the variables and var-location is either > NODAL or CELLCENTERED. > Variables omitted from the list are assumed to be NODAL. For example: > VARLOCATION=([3-7,10]=CELLCENTERED, [11-12]=CELLCENTERED) > specifies that variables 3 through 7, 10, 11 and 12 are cell-centered and > all other variables are, by default, nodal for this zone. > All cell-centered variables must list one value for each element. With nodal variables, one value must be listed for each node. Zones with cell-centered variables must be in BLOCK data packing format. 也就是说只要对每个变量指定nodal或者cellcentered,就可以让tecplot区分出节点坐标和流场数值。不过fortran编程仍然有些麻烦。如果采用cell-centered,必须使用block选项。 关于更详细的信息参考另外一篇文章。 3.3 二进制文件如何处理以便在tecplot中显示(手册第11章) 采用tecio.dll输出二进制数据 在windows下,tecio.dll在bin子目录。在util/tecio子目录下有readme.txt介绍如何编译链接此库: 只要把Tec80\Include和Tec80\bin目录分别添加到devstudio的包含和库目录即可。 关于函数的使用参考Reference manual。 TECFIL用于选择输出文件。 TECDAT allows you to write your data in a piecemeal fashion in case it is not contained in one contiguous block in your program. Enough calls to TECDAT must be made that the correct number of values are written for each zone and that the aggregate order for the data is correct. 每次调用teczne后,tecdat要一次或多次把teczne定义的数据个数写入文件。在teczne给 出了多少个,必须写多少个。多或少都不行。否则,下次调用teczne会出现 Err: (TECZNE) Wrong number of data values in file 1: 3696 data values for Zone 1 were processed, 116640 data values were expected. 类似的错误提示。 如果出现了类似的错误,不知道其产生的原因,可以将tecini中的debug参数设置成1, 将 会给出详细的变量值log供查错。 四、data operation 变量按照他们的组织顺序编号为V1,V2,....,不区分大小写. 变量也可以按照变量名称引用,在大括号中放入变量名称即可,例如r3={r/rfr} tecplot可以求微分、差分,可以针对某些数据点进行操作。可以对数据进行光滑、插值。 常用的函数见使用手册447页。 V3 = V3 - V3[1],可以在变量后面附加区域标示,用“[]“括起来的自然数。注意只有在方程右面才可以出现区域标示。 U = U(i+1,j) - U(i-1,j) + V(i+2,1) + 3*W(i-1),也可以加序号。用“()”括起来,可以是绝对的也可以是i,j,k开头的偏移量。如果和区域标示同时出现,需要排列在区域标示后面。 导数和微分 函数如下: ddx ddy ddz d2dx2 d2dy2 d2dz2 d2dxy d2dyz d2dxz ddi ddj ddk d2di2 d2dj2 d2dk2 d2dij d2djk d2dik ddx==>d/dx d2dx2==>d2/dx2 ddi==>[v(i+1)-v(i-1)]/2--中心差分 注意微分是对x,y,z,而差分是对i,j,k。 如果不能对所有数据点求导,tecplot不会对任何数据点求导. 边界的求导函数值可能会不同. 五、绘图 画等值线图的方法 contour-->contour attributes-->contour plot type flood -->填充图;lines-->等值线; tecplot坐标轴的刻度值可以更改,在label-->tick mark and label spacing中更改.默认为5,去掉 auto spacing复选框后,可以任意更改. tecplot 我有许多个等值线图,是一个流动的不同区域,希望能够将这些图形组合起来给出流动的一 个完整的图像。 采用tecplot的frame linking.这个功能的目的是将不同frame的属性连接在一起,保证他们相同的属性。联接的属性有: contour levels, frame size and position, x-,y-axis range, 3d plot view. 除了可以设置frames之间的连接属性外,还可以设置不同的组.同一组中的frames具有相同的属性,更改其中一个frame的属性,其它frame的属性都自动更改。 tecplot支持用鼠标选择多个选项,单击后直接拖动即可。 data slicing 在data菜单里可以选择extract -> slicing。指定相关参数后在三维countour图上已经可以看到明显的线指示slicing的位置。想看其等值线图,只需要把三维的关掉即可。 第21章 三维数据显示 21.1 显示某表面 从plot attributes选择volume page,Surface to plot有如下选项: 1) boundary cell faces: 只画min, max I,J,K表面上的单元。 2) exposed cell faces: 所有可见单元都会画出。 或者指定i,j,k的范围? 21.2 画哪个点 用于画vector和scatter。 surfaces only - 画在上面指定的表面上; all - 整个zone全画. 还可以通过extract创建zone,然后画表面。 21.8 特殊的3d图 21.8.1 Fence plots 图21-14 多表面图? 需要打开contour,然后在指定i,j,k表面的序号,然后把contour plot的属性改为flood或者flood with lines,把flood translucecy设置为中。 然后选择shade zone layer即可。 手册还指出可以为ij-ordered zone画,可以为extracted surfaces画。具体还不清楚。 Slice tool 我不知道是不是tecplot9以后新加的工具,就是这个Interactive slice tool,interactive就是你可以直接用鼠标在三维图上点,点击图标后面的...可以打开对话框,然后显示一些选项,可 以控制slice的位置,让slice动起来,在360中可以设置多达5个的slice group,可以组合显示,也可以单独显示。从contour那里把show legend勾选上,就可以显示级别图。非常 方便。 Blanking,是指定zone的某些部分不显示。在3D图中,类似于cutaway view。Blanking有三 种方式: 1) Value-blanking 可以设置最多8个条件,建议新建变量用于value-blanking的操作。 2) IJK-blaning 可以指定是范围内的被blank(interior选项)还是范围外的被blank(exterior选项)。 3) Depth-Blanking:根据网格与viewer plane的距离确定是否显示。 感觉blank后新的边界面上仍然会有contour显示。 第25章 数据操作 建立区域各点一般好像是均匀分布。 25.6.1 建立1-d line zone,这个可以用来建立单变量函数的函数图。先建立一个区域,然后在specify equations选项中写出函数,然后画图即可。 25.6.2 建立一个矩形区域。用来将不规则数据插值成规则网格。或者画函数图(双变量函数)。可 以在2d或者3d frame中建立区域。 25.6.3 建立圆形或者柱形区域. 25.*** 如果有较少量的XY数据对,那么可以直接用data->create zone->enter xy-values。注意要在xy模式下。在打开的对话框中输入x 空格 y,这样建立I顺序的区域。 25.6.5 摘取数据 25.6.6 复制区域,可以建立三维区域的投影,可以建立关于某一个轴的镜像区域。 25.7 删除区域 25.8 三角化,这个需要仔细看看,可以用来三角化其他划分网格的软件产生的数据点。可以用来 建立不规则数据的2-d field plots。 25.9 插值数据,这个也要仔细看看。手册翻译:插值是根据一个区域的数据点指定另一个区域的 数据点的变量值。可以将不规则数据通过插值建立规则网格的contour图,包括二维和三维。 25.10 光滑数据. 对于输出的数据,可能在EXCEL处理后存储为逗号分割格式较好.因为这样不容易产生行数据的分割错误. 调入数据的时候,使用LOAD DATA FILES,不要使用IMPORT!!! TITLE="FLOWFIELD" VARIABLES="XCOORD" "YCOORD" "DENSITY" "TRTEMP" "ROTTEMP" "OVTEMP" "U" "V" "W" ZONE I=80, J=60, K=1, F=POINT ZONE I=20,J=20,K=1,... I是横向,J是纵向。 UltraEdit可以直接选择列数据,这样选择并将网格编号数据删除后就可以直接输入到 tecplotz中,用load data files打开。 Tecplot宏命令总结 许多文章都提到,使用tecplot作为结果显示软件。利用tecplot的宏文件实现结果显示的自 动化。 1 概念 Tecplot的宏文件是包含一个或多个宏命令的文件。文件以如下方式开头: #!MC 1100 函数定义: $!MACROFUNCTION $!ENDMACROFUNCTION 函数运行: $!RUNMACROFUNCTION 2 运行宏文件 命令行方式:tecplot -p a.mcr即可。 从tecplot中运行:菜单选择 将macro添加到quick marco panel: 3 编写前向兼容宏 一些规则: a. 开始宏前先打开layout。?? b. 将文件及图形与宏文件保存在同一目录中。 用|macrofilepath|表示宏文件路径,避免采用绝对路径。 $!Openlayout "|macrofilepath|\Density.lpk" c. 避免采用$!Pick宏命令。?? d. 尽可能多的注释。 4 宏文件的调试 - 参阅手册 5 宏命令语法 #表示注释行。 宏命令格式: $!命令名 [命令修饰符] [必选参数] [可选参数] 必选参数和可选参数具有如下形式 赋值参数:参数名 算符(+= *=...) 值 子命令参数:命令名{参数名} 6 宏变量 宏变量指用"|"包括的字符串,不分大小写。变量在程序运行到此处时被替换。 取消定义$!REMOVEVAR. 6.1 内部变量 6.2 系统环境变量 环境变量为|$xxxx|格式。 6.3 用户定义变量 *** 变量定义 定义$!VARSET 变量 操作符 双精度数值 $!VARSET |ABC| += 2 abc加2. $!VARSET |ABC| = 37 6.5 字符串变量 6.6 变量初值(初始化) 6.7 函数参数 采用|n|的形式表示,n表示自然数。 6.8 数值变量的格式化输出 采用类似C语言的格式化语句。 7 宏命令总结 宏命令分三类: 控制命令:宏文件流程的控制。 操作命令:执行某种可见的操作。 8 Python脚本支持 Tecplot 360新加入了对python脚本的支持。这样你可以:通过宏文件调用python模块、在 tecplot内部使用python脚本命令、运行独立的脚本程序,通过这些方式来和tecplot交互。 这是从yahoogroups上找到的,通过google。呵呵,google还是强啊。还有应该多看国外的 论坛,这里面的回复还有tecplot的president mike. xxx。强吧。 还有关于tecplot不能在vista上运行的问题这个论坛也介绍了一些。不兼容。 ----- Original Message ----- From: "Paul" To: Sent: Thursday, March 11, 2004 6:31 AM Subject: [Tecplot_Talk] Re: cell-centered data > Hi, > Tecplot 10 can read finite volume data (thabks to tecplot.com!): > > in fact, this is done the same way that you read FE data. You need to > organize your data as an ASCII file which has to be in block mode > (instead of point) and the keywords "DATAPACKING=BLOCK" and > "VARLOCATION" need to appear in the heading: > > TITLE = "Finite volume dataset" > VARIABLES = "X", "Y", "Z", "U", "V", "W" > ZONE T="the data" N=3383, E=3283, ZONETYPE=FE... > DATAPACKING=BLOCK > VARLOCATION=([1-3]=NODAL, [4-6]=CELLCENTERED) > DT=(SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE ) > -2.900000000E+002 ... > Connectivity ... > > First all values X (nodal values) need to be given, then all values y and x respectively and afterwards u, v, w (velocity, cell centered). > I copied the parts of the manual for you (tpum.pdf in the Tec100/doc dir): > > The DATAPACKING Parameter. The zone data packing is specified by the DATAPACKING parameter in the control line. There are two data packing options: POINT and BLOCK. In POINT format, the values for all variables are given for the first point, then the second point, and so on. In BLOCK format, all of the values for the first variable are given in a block, then all of the values for the second variable, then all of the values for the third, and so forth. Zones with cell-centered data must use BLOCK data packing. More detail on this is given below. > > Variable Location. Each variable in each zone in a data file may be > located at the nodes or the cell-centers. Each variable is specified as > NODAL or CELLCENTERED in the VARLOCATION parameter array, > located in the control line. The format is: > VARLOCATION=([set-of-vars]=var-location,[set-of-vars]=var-location, ...) > where set-of-vars is the set of the variables and var-location is either > NODAL or CELLCENTERED. > Variables omitted from the list are assumed to be NODAL. For example: > VARLOCATION=([3-7,10]=CELLCENTERED, [11-12]=CELLCENTERED) > specifies that variables 3 through 7, 10, 11 and 12 are cell-centered and > all other variables are, by default, nodal for this zone. > All cell-centered variables must list one value for each element. With > nodal variables, one value must be listed for each node. Zones with > cell-centered variables must be in BLOCK data packing format. > > > --- In Tecplot_Talk@yahoogroups.com, "Hussein Hoteit" > wrote: > > Hi everyone, > > > > > > > > I have a data set coming from an unstructured finite volume grid > (triangular > > grid) > > > > so one cell-centered value is specified to each triangle. > > > > How can tecplot 10 interpolate these data? > > > > what format i have to specify in the plt file? is it similar to the FE > > style? > > > > Thank you > > > > H.Hoteit > > > > > Yahoo! Groups Links > > > > I had some problems with this also and unfortunately the manual does not explaining this very well and section should be added to explain how to use cell-centered data included in it. Here is what the header should look like this is for IJK data, but I would assume it would be the same for FE data. VARIABLES = "X" "Y" "Rock Type" ZONE T="Test" I=182, J=98, K=1,F=BLOCK VARLOCATION = (NODAL, NODAL, CELLCENTERED) DT= (SINGLE SINGLE Single) You can only use block format with cell centered data. So this is how it works For Variables X and Y (they define the location of the XY locations of the grid. For these variables there are 17836 values = 182 * 98. Since it is block format, write out all your X values, then your Y values. Next for the variable Rock Type, it is a cell centered variable and the number of values would be 17557 = (182-1) * (98 - 1). If you have more than 1 cell-centered variable, repeat for each variable that is cell-centered. The zone header needs to have the VARLOCATION Card in it. So in your case I would imagine you would change header like so VARIABLES="X","Y","Z","P","M" ZONE T="VOLUME", N= 9882, E= 4800, F=FEBLOCK,ET=BRICK VARLOCATION = (NODAL, NODAL, NODAL, CELLCENTERED, CELLCENTERED) Then 9882 X Values as a block Then 9882 Y Values as a block Then 9882 Z values as a block Then 4800 P values as a block Then 4800 M Values as a block The Cell Connectivity List I hope this helps Mike P.S. Back when I was evaluating V10, Sandy Cox sent me this information about using cell centered data. ****Since, this was for the Beta Version, I am not sure if it changed for the release version.**** See Important note enclosed by stars below V. Tecplot 10 and Cell Centered Data ==================================== Tecplot 10 introduces cell centered data to data files (binary .plt files and ASCII .dat files) and the user interface. Data Files ---------- To load cell centered data into Tecplot the "ZONE" record of an ASCII data file must contain a new option, "VARLOCATION". This option identifies value location of each variable in the data file. The ASCII data file syntax for the "VARLOCATION" option is as follows: VARLOCATION = ([nnn=][var_location],...) where: nnn Optional value that specifies the ordinal variable number in the file with a value between 1 and the maximum number of variables. var_location Optional enumeration that specifies the value location for the specified or implied variable number and all variables that follow it. For example if a data file contained 7 variables (where 3 nodal variables are followed by 2 cell centered and 2 nodal variables) the "VARLOCATION" option could be written in a compact form as follows: VARLOCATION = (4=CELLCENTERED, 6=NODAL) If not initially specified, Tecplot assumes a variable value location of NODAL. So in the example above, Tecplot assumes that variables 1 through 3 are NODAL. Once a variable's value location changes Tecplot assumes that all variables following it have the same variable location until it is changed again. In this case, variables 4 and 5 are CELLCENTERED and variables 6 and 7 are NODAL. Several less compact but equivalent forms of the above "VARLOCATION" option follow: VARLOCATION = (1=NODAL, 4=CELLCENTERED, 6=NODAL) or VARLOCATION = (NODAL, 4=CELLCENTERED, 6=NODAL) or VARLOCATION = (NODAL, NODAL, NODAL, CELLCENTERED, CELLCENTERED, NODAL, NODAL) or VARLOCATION = (1=NODAL, 2=NODAL, 3=NODAL, 4=CELLCENTERED, 5=CELLCENTERED, 6=NODAL, 7=NODAL) Several important items with regard to cell centered variables in Tecplot 10 data files needs attention. First, only block format is supported as point is meaningless for cells. Additionally, when supplying cell centered values in the data section of the ZONE record the data must be dimensioned by number of elements, not number of points. For example with a rectangular ordered zone of dimension 3x3x3, there are 27 points and 8 elements. Therefore all "NODAL" variables must supply 27 node values and all "CELLCENTERED" variables must supply 8 cell center values. **************************************************************************** ** IMPORTANT NOTE -------------- The ASCII data file syntax for "VARLOCATION" will change in future Tecplot 10 alpha releases to use a "set" notation which is more consistent with other options in Tecplot data files. In addition it will have different default assumptions than is currently supported by the ASCII data file option. The binary file equivalent of this option will likely remain unchanged in future releases. **************************************************************************** *** Data Alter ---------- In addition to loading cell centered data from data files, cell centered variables are easily created within Tecplot using "Data Alter". The value location of new variables created with "Data Alter" can either be assigned automatically, based on the value location's of participating variables, or explicitly assigned to "Nodal" or "Cell Centered" by selecting the desired value location from the "New Var Location" option menu in the lower right hand corner of data alter's "Specify Equations" dialog. If the value location's of the participating variables are mixed then the resulting variable's value location defaults to nodal for automatic assignment. Style ----- The "Points To Plot" option in the "Volume" page of the "Plot Attributes" dialog contains two new options for cell centered data, "Cell Centers Near Surfaces" and "All Cell Centers". Note that if the plot style mandates a cell centered variable and one is not provided Tecplot will automatically derive one. Future Tecplot 10 alpha releases will rename this page and provide access to the "Points To Plot" option for non-volume zones. VI. Tecplot 10 and Auxiliary Data ================================= Auxiliary data are tagged pieces of user defined information that can be attached to Tecplot frames, datasets, and zones and then later manipulated. The data can then be used from within Tecplot in dynamic text, "Data Alter", macros, and by auxiliary data aware addons. Dataset and zone auxiliary data is saved with the data file while frame auxiliary data is saved with the layout. Data Files ---------- Dataset auxiliary data is specified in an ASCII dataset using the "DATASETAUXDATA" option with the following syntax: DATASETAUXDATA name= where name Required tag name of the piece of auxiliary data. Required value represented as a string. Any number of dataset auxiliary data items may be specified. Examples: DATASETAUXDATA MachNumber="0.5" DATASETAUXDATA BetaAngle="0.0872665" DATASETAUXDATA Author="John Smith" Zone auxiliary data is also specified in the dataset. The "ZONE" record of the ASCII data file may contain any number of zone auxiliary data items and are identified by the "AUXDATA" option with the following syntax: AUXDATA name= where name and are defined as above. Examples: ZONE T="747-400 Prelim" AUXDATA Run="210" AUXDATA PressureSensor="23" ... ZONE T="747-400 Prelim" AUXDATA Run="211" AUXDATA PressureSensor="24" ... The dataset and zone auxiliary data are retained with the dataset. In other words, the auxiliary data is always saved with the dataset and zones respectively. Data Alter, Dynamic Text, and Macro Incrinsic Expansion ------------------------------------------------------- Auxiliary data is accessed for "Data Alter", dynamic text and macro intrinsic expansion using a similar syntax: AUXFRAME:name AUXDATASET:name AUXZONE[nnn]:name AUXZONE:name <-- "Data Alter" only. where name Required auxiliary data name. nnn Required zone number for dynamic text and macro language. Note that for "Data Alter" the zone is optional and if not specified the current zone on which the data alter operation is being performed is used. For "Data Alter" the value must be a number. Additionally, all dynamic text must be identified by surrounding the text with the "&(" and ")" tokens and macro intrinsic expansion must be identified by surrounding the text with verticle bars "|". Data Alter Example: $!AlterData Equation="{Pressure} = {Rho} * AuxZone:R * {Temp}" This calculates pressure for all zones using rho and temperature and the specific gas constant specified in each zone. Dynamic Text Example: "Flow rates for well #&(AuxZone[1]:Well) collected on &(AuxDataSetate)." If added as a text item, Tecplot would dynamically replace the auxiliary data item named "Well" with the auxiliary data's value string. Macro Language Intrinsic Expansion Example: $!LOOP |AuxZone[1]:NumIterations| $!VARSET |Author| = |AuxDataSet:Author| Macro Language -------------- Frame, dataset, and zone auxiliary data can also be added or modified and deleted via Tecplot's macro language using the "$!SETAUXDATA" and "$!DELETEAUXDATA" commands. The syntax of the two commands is as follows: $!SETAUXDATA AUXDATALOCATION = [zone/dataset/frame] ZONE = [zone num] # only needed if AUXDATALOCATION is zone NAME = VALUESTRING = $!DELETEAUXDATA AUXDATALOCATION = [zone/dataset/frame] ZONE = [zone num] # only needed if AUXDATALOCATION is zone NAME = In addition the data may be accessed using the "$!GETAUXDATA" command. Note $!GETAUXDATA is somewhat redundant with macro intrinsic expansion however it does allow the data location, zone, and name to be dynamically selected from the macro language. $!GETAUXDATA |MacroVar| AUXDATALOCATION = [zone/dataset/frame] ZONE = [zone num] # only needed if AUXDATALOCATION is zone NAME = -----Original Message----- From: Enda Dimitri Vieira Bigarella [mailto:enda_bigarella@y...] Sent: Thursday, November 27, 2003 10:47 AM To: Tecplot_Talk@yahoogroups.com Subject: [Tecplot_Talk] 3-D Cell-centered plot - HOWTO? Hy, I'm using Tecplot 10 and I would like to plot 3-D cell-centered data in it. I currently do these plots in a node-based FE type, with the following tec file header: VARIABLES="X","Y","Z","P","M" ZONE T="VOLUME", N= 9882, E= 4800, F=FEPOINT,ET=BRICK This means that I have to compute an averaged property in the node from the cell-centered data. And this is really annoying, especially in the boundaries of the domain. I've discovered that Tec 10 allows for a cell centered plot, however I couldn't find anywhere an understandable explanation about how to do it (I couldn't understand the user manual on this subject). Therefore, I would like to know if someone is already using REAL cell-centered data in tecplot and if someone could help me make a suitable cell-centered tec file header. Thanx a lot in advance. Best regards, Biga
本文档为【Tecplot中使用公式】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_314871
暂无简介~
格式:doc
大小:87KB
软件:Word
页数:40
分类:交通与物流
上传时间:2017-12-13
浏览量:1021