circumferential averge streamwise velocity using Tecplot and Matlab
2024-08-30 21:22:38
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;
最新文章
- IOS7开发~Xcode5制作framework
- php 环境变量收集
- unity3d shader之Roberts,Sobel,Canny 三种边缘检测方法
- Fedora安装qt总结四种方法
- linux_ssky-keygen + ssh-copy-id 无密码登陆远程LINUX主机
- Java笔记:枚举类
- 电子凭证 : Java 生成 Pdf
- Linux系统中安装Oracle过程记录
- windows服务器nginx+php启动开源ecshop
- Android Studio 使用USB真机调试教程
- 【原创】连接数据库MySQL,读取、显示、修改数据
- BZOJ4654 NOI2016国王饮水记(动态规划+三分)
- IntelliJ IDEA快捷键:Ctrl+空格
- openssl 自建CA签发证书 网站https的ssl通信
- 宝塔中mysql数据库命名小坑
- Django自带的加密算法及加密模块
- Linux内核学习笔记(7)--完全公平调度(CFS)
- PTC点击网赚入门
- Jquery easyUI datagrid载入复杂JSON数据方法
- H5新特性-----type=file文件上传
热门文章
- 1998 NOIP 拼数 string 和sort的新理解
- RAR去除广告
- E20171121-sl
- bzoj 1620: [Usaco2008 Nov]Time Management 时间管理【贪心】
- MySQL索引使用以及优化
- java Class.getResource和ClassLoader.getResource
- 构造 Codeforces Round #Pi (Div. 2) B. Berland National Library
- 25 C#类的继承
- 项目需求会__前端er定位的思考~
- 18 C#中的循环执行 for循环