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定义一个网格,网格上的每个点代表一个有限数量的状态中的细胞.过渡规则 ...
随机推荐
- CF 908 D New Year and Arbitrary Arrangement —— 期望DP
题目:http://codeforces.com/contest/908/problem/D 首先,设 f[i][j] 表示有 i 个 a,j 个 ab 组合的期望,A = pa / (pa + pb ...
- bzoj1597 [Usaco2008 Mar]土地购买——斜率优化DP
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1597 就是斜率优化水题... 然而WA了十几遍,正负号处理真让人心累... 还是该负就负,别 ...
- C#直接删除指定目录下的所有文件及文件夹(保留目录)
#region 直接删除指定目录下的所有文件及文件夹(保留目录) /// <summary> /// 直接删除指定目录下的所有文件及文件夹(保留目录) /// </summary&g ...
- mac+php+xdebug
1,下载xdebug 2,进入xdebug-2.4.0RC4目录,运行phpize命令, 2,google之后说要安装autoconf brew install autoconf 3,但是使用brew ...
- NOIP前的刷题记录
因为这几天要加油,懒得每篇都来写题解了,就这里记录一下加上一句话题解好了 P4071 [SDOI2016]排列计数 组合数+错排 loj 6217 扑克牌 暴力背包 P2511 [HAOI2008 ...
- org.apache.poi.hssf.util.Region
从POI 3.18开始被Deprecated,在3.20版本中被移除了,所以3.20以前的都有 为了避免这个问题,用CellRangeAddress代替Region,其用法相同
- jSignature做手动签名,canvas支持触摸屏的签名涂鸦插件
整理的前面可以用的: <!doctype html> <html lang="en"> <head> <meta charset=&quo ...
- AGC16E Poor Turkeys
输入样例: 10 10 8 9 2 8 4 6 4 9 7 8 2 8 1 8 3 4 3 4 2 7 输出样例#6: 5 话说这题虽然不是很OI但是确实挺锻炼思维的 一开始以为是用并查集之类的东西维 ...
- 递推DP HDOJ 5375 Gray code
题目传送门 /* 题意:给一个串,只能是0,1,?(0/1).计算格雷码方法:当前值与前一个值异或,若为1,可以累加a[i],问最大累加值 DP:dp[i][0/1]表示当前第i位选择0/1时的最大分 ...
- excel poi 取单元格的值
/** * 取单元格的值 * * @param cell 单元格对象 * @param treatAsStr 为true时,当做文本来取值 (取到的是文本,不会把“1”取成“1.0”) * @retu ...