circumferential averge streamwise velocity using Tecplot and Matlab
Input:
results from solver
output:
circumferential averge physical quantities( such as streamwise velocity)
How to?

1. draw an structured 2D axial meshin Pointwise
a. similar nodes distribution as the mesh in the solver ( normally unstructured)
b. export as plot3D format
2. interpolate solution results on the 2D plane in Tecplot
a. import the CFD results in Tecplot
b. import the 2D mesh
file /load data/
c. interpolate data on the 2D mesh
d. rotate the 2D mesh and then interpolate again ( using for loop)
tecplot macro
#!MC 1410
$!Varset |NumLoop|=360
$!Loop |NumLoop|
$!Varset |num|=(|Loop|*1+0)
$!RotateData
ZoneList = [4]
Angle = |num|
XVar = 1
YVar = 2
ZVar = 3
NormalX = 1
NormalY = 0
NormalZ = 0
$!LinearInterpolate
SourceZones = [1]
DestinationZone = 4
VarList = [4-9]
LinearInterPConst = 0
LinearInterpMode = DontChange
$!WriteDataSet "C:\Users\kaiming\Documents\ZJU\output_|num|.dat"
IncludeText = No
IncludeGeom = No
IncludeDataShareLinkage = Yes
ZoneList = [4]
Binary = No
UsePointFormat = Yes
Precision = 9
TecplotVersionToWrite = TecplotCurrent
$!EndLoop
output like this

average the result , reshape the data into an array, then get the circumferential average results with 2D matrix distribution -- matlab
matlab code is as follows:
n=359;
a=[];
b=[];
c=[];
for i=1:n
filename=sprintf('output_%d.dat',i);
fileinfo = importdata(filename);
ux=fileinfo.data(:,7);
uy=fileinfo.data(:,8);
uz=fileinfo.data(:,9);
a=[a,ux];
b=[b,uy];
c=[c,uz]; end
aver_Ux=sum(a,2)/n;
aver_Uy=sum(b,2)/n;
aver_Uz=sum(c,2)/n;
aver_Ux=aver_Ux.' % transpose
aver_Uy=aver_Uy.' % transpose
aver_Uz=aver_Uz.' % transpose
aver_Ux_array=reshape(aver_Ux, 499,[]);
aver_Uy_array=reshape(aver_Uy, 499,[]);
aver_Uz_array=reshape(aver_Uz, 499, []);
save -ascii aver_ux_array.dat aver_Ux_array;
save -ascii aver_uy_array.dat aver_Uy_array;
save -ascii aver_uz_array.dat aver_Uz_array;


circumferential averge streamwise velocity using Tecplot and Matlab的更多相关文章
- circumferential averaged streamwise velocity in ParaView
Goal: get a averaged axial velocity in a circular loop (dashed line in the following figure) Steps: ...
- radial profiles of mean streamwise velocity at X/D=3
matlab code: load aver_ux_array.dat; load z_array.dat; r=z_array(:,); r=r.' r_j=0.00125; r_nor=r/d; ...
- jet flow in a combustion chamber
Table of Contents 1. contacts 2. Paper digest 2.1. LES vs. RANS 2.2. Dynamics of Transient Fuel Inje ...
- PMD -- An extensible cross-language static code analyzer.
PMD An extensible cross-language static code analyzer. https://github.com/pmd/pmd 跨语言静态代码分析工具.可以查找通用 ...
- Java代码质量度量工具大阅兵
FindBugs FindBugs, a program which uses static analysis to look for bugs in Java code. It is free so ...
- streamwise veloicty along the jet axis using Matlab/Octave
input file: v.csv scpirts as follows filename='v.csv'; % assign file to a variable m=csvread(filenam ...
- Matlab绘图函数一览
要查看Matlab所有绘图函数,请从Matlab主界面菜单查看“绘图目录”,或从Matlab帮助文档查看“Types of MATLAB Plots”(在线版本).本文的图和英文解释摘自Matlab帮 ...
- 非刚性图像配准 matlab简单示例 demons算法
2011-05-25 17:21 非刚性图像配准 matlab简单示例 demons算法, % Clean clc; clear all; close all; % Compile the mex f ...
- 美国康奈尔大学BioNB441元胞自动机MATLAB应用
美国康奈尔大学BioNB441在Matlab中的元胞自动机 介绍 元胞自动机(CA)是用于计算计划利用当地的规则和本地通信.普遍CA定义一个网格,网格上的每个点代表一个有限数量的状态中的细胞.过渡规则 ...
随机推荐
- BZOJ_3667_Rabin-Miller算法_Mille_Rabin+Pollard rho
BZOJ_3667_Rabin-Miller算法_Mille_Rabin+Pollard rho Description Input 第一行:CAS,代表数据组数(不大于350),以下CAS行,每行一 ...
- js实现IOS上删除app时颤抖动画j函数
欢迎提供更好的方法! <!--http://www.cnblogs.com/webzhangnan/p/3244920.html --> <html> <head> ...
- 7 Worksheet 对象
7.1 设置阶段 代码清单7.1:使用Parent属性获得一个对象的父对象的指针 '使用Parent属性获得一个对象的父对象的指针 Sub MeetMySingleParent() 'Declare ...
- 洛谷 P2585 [ ZJOI 2006 ] 三色二叉树 —— 树形DP
题目:https://www.luogu.org/problemnew/show/P2585 首先,三色其实记录两种状态:是绿色,不是绿色 即可,因为红蓝可以随意取反: 一开始因为懒得还原出树,所以写 ...
- POJ1673 ZOJ1776 三角形四心模板
POJ1673 题中所述点即为三角形的垂心,用向量法可以轻松证明. 垂心 重心 外心 均位于三角形的欧拉线上,且三者有线性关系,于是,求出重心和外心即可求得垂心. 重心就是三点的平均值,外心可以通过解 ...
- SVN导出指定版本差异文件 ***
当一个项目进入运营维护阶段以后,不会再频繁地更新全部源文件到服务器,这个时间的修改大多是局部的,因此更新文件只需更新修改过的文件,其他 没有修改过的文件就没有必要上载到服务器.但一个稍微上规模的项目文 ...
- 堆排序的C实现
这几天有点抵触情绪,看过了快速排序还有一些别的东西,但是一点都不想写有点复杂的代码0 0拖到了今天终于写了前几天就应该自己写一下的堆排序,完全用C语言写的,下面把代码贴一下.很多地方写得并不好,不过已 ...
- bzoj 1576: [Usaco2009 Jan]安全路经Travel【spfa+树链剖分+线段树】
这几天写USACO水题脑子锈住了--上来就贪心,一交就WA 事实上这个是一个叫最短路树的东西,因为能保证只有一条最短路,所以所有最短路合起来是一棵以1为根的树,并且在这棵树上,每个点被精灵占据的路是它 ...
- 赋予option元素点击事件后,点击select时却触发了option事件。如何解决?
将select的优先级提到option之前就可以了. 方法:为select元素添加position:relative: <select class="adt" name=&q ...
- [转]Linux系统调用--fcntl函数详解
功能描述:根据文件描述词来操作文件的特性. 文件控制函数 fcntl -- file control头文件: #include <unistd.h> #include & ...