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定义一个网格,网格上的每个点代表一个有限数量的状态中的细胞.过渡规则 ...
随机推荐
- [Codeforces 482A] Diverse Permutation
[题目链接] https://codeforces.com/contest/482/problem/A [算法] 首先构造一个(k + 1)个数的序列 , 满足它们的差为1-k 对于i > k ...
- 【LNOI 2014】 LCA
[题目链接] 点击打开链接 [算法] 考虑求lca(x,y)的深度 我们可以将从根到x路径上的点都打上标记,然后,询问y到根上路径的权值和 那么,求sigma(depth(lca(i,z)))(l & ...
- 9 Range 实用操作
9.1 剪切.复制和粘贴来移动数据 sourceRange.Cut [Destination] 如果指定Destination,相当于Ctrl^X(sourceRange) & Ctrl^V( ...
- MIPI接口
接口 分辨率 说明 RGB 800*480以下 大部分AP均支持RGB接口,此类LCD在低端平板广泛使用 LVDS 1024*768及以上 主要通过转换芯片将RGB等专程LVDS来支持:少量AP直接集 ...
- nodejs实现验证码
http://www.9958.pw/post/nodejs_lesson http://www.9958.pw/post/nodejscapp
- 如何在 ubuntu 12.04 上安装 skype(转载)
转自:http://blog.51osos.com/linux/how-to-install-skype-in-ubuntu-12-04/ 添加Canonical Partner Repository ...
- bzoj4987: Tree(树形dp)
Description 从前有棵树. 找出K个点A1,A2,…,Ak. 使得∑dis(AiAi+1),(1<=i<=K-1)最小. Input 第一行两个正整数n,k,表示数的顶点数和 ...
- 洛谷2019 3月月赛 T2
题干 洛谷同款 T2?(看似比T1简单些) 二维前缀和嘛?[多简单 我天天拿二维前缀和水DP] 这是前缀和的预处理 2333 处理出来所有的情况 某个地方要加上mod再%mod 如果没有这一步 那么 ...
- N - Binomial Showdown (组合数学)
Description In how many ways can you choose k elements out of n elements, not taking order into acco ...
- SqlServer数据库(可疑)解决办法
-- 当数据库发生这种操作故障时,可以按如下操作步骤可解决此方法,打开数据库里的Sql 查询编辑器窗口,运行以下的命令. --1.修改数据库为紧急模式 ALTER DATABASE Zhangxing ...