
[Sponsors] 
July 6, 2015, 05:53 

#41 
New Member
Oğuzhan Medet
Join Date: Jul 2015
Posts: 3
Rep Power: 11 
i need help about processing a test data in matlab. after processing matlab, i have to transfer it to tecplot. Who can help me?


July 6, 2015, 19:23 

#42 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
I can if you describe your data and upload a mat file somewhere


July 7, 2015, 02:15 

#43 
New Member
Oğuzhan Medet
Join Date: Jul 2015
Posts: 3
Rep Power: 11 
my data is 240*216 matrix. My task is to transform it to a form which tecplot can read and can plot a graph or can simulate it.


July 7, 2015, 04:52 

#44 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
very easy, follow one of the 2D ij examples in mat2tecplot


July 7, 2015, 05:14 

#45 
New Member
Oğuzhan Medet
Join Date: Jul 2015
Posts: 3
Rep Power: 11 
can you send me the link?


July 7, 2015, 23:49 

#46 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
Look at the first few posts of this thread


July 21, 2015, 13:17 
Problem with cellcentered variable

#47 
New Member
Victor Magri
Join Date: Jul 2015
Posts: 2
Rep Power: 0 
Dear friends,
I'm trying to use mat2tecplot for writing cell centered variables through surfaces, but the binary file generated does not give me the expected answer. For example, consider the code: Code:
tdata=[]; tdata.Nvar=5; tdata.vformat(1:tdata.Nvar) = 2; tdata.varnames={'x','y','z','T', 'P'}; tdata.surfaces(1).zonename='mysurface zone'; tdata.surfaces(1).x=[1,2,3;1,2,3;1,2,3]; %size 3x3 tdata.surfaces(1).y=[1,1,1;2,2,2;3,3,3]; %size 3x3 tdata.surfaces(1).order=3; tdata.surfaces(1).v=[]; tdata.surfaces(1).v(1,:,:)=[10,20;30 40]; tdata.surfaces(1).v(2,:,:)=[50,60;70 80]; tdata.surfaces(1).varloc=1; mat2tecplot(tdata,'mysurf2DT_xy_cellcenter.plt') Code:
TITLE = "tecplot data" VARIABLES = "x" "y" "z" "T" "P" ZONE T="mysurface zone" STRANDID=1, SOLUTIONTIME=0 I=3, J=3, K=1, ZONETYPE=Ordered DATAPACKING=BLOCK VARLOCATION=([35]=CELLCENTERED) DT=(DOUBLE DOUBLE DOUBLE DOUBLE DOUBLE ) 1.000000000E+000 1.000000000E+000 1.000000000E+000 2.000000000E+000 2.000000000E+000 2.000000000E+000 3.000000000E+000 3.000000000E+000 3.000000000E+000 1.000000000E+000 2.000000000E+000 3.000000000E+000 1.000000000E+000 2.000000000E+000 3.000000000E+000 1.000000000E+000 2.000000000E+000 3.000000000E+000 0.000000000E+000 0.000000000E+000 0.000000000E+000 0.000000000E+000 0.000000000E+000 0.000000000E+000 1.000000000E+001 3.000000000E+001 4.000000000E+001 0.000000000E+000 0.000000000E+000 0.000000000E+000 Code:
1.000000000E+001 3.000000000E+001 2.000000000E+001 4.000000000E+001 5.000000000E+001 7.000000000E+001 6.000000000E+001 8.000000000E+001 I'm using the mat2tecplot version provided in the website: http://www.tecplot.com/blog/2014/07/...smatlabdata/ Thank you so much for your help! 

July 21, 2015, 17:00 

#48 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
Pls see if the following works:
tdata=[]; tdata.Nvar=5; tdata.vformat(1:tdata.Nvar) = 2; tdata.varnames={'x','y','z','T', 'P'}; tdata.surfaces(1).zonename='mysurface zone'; tdata.surfaces(1).x=[1,2,3;1,2,3;1,2,3]; %size 3x3 tdata.surfaces(1).y=[1,1,1;2,2,2;3,3,3]; %size 3x3 tdata.surfaces(1).z=[0,0;0,0] %size 2x2 tdata.surfaces(1).order=3; tdata.surfaces(1).v=[]; tdata.surfaces(1).v(1,:,: )=[10,20;30 40]; %size 2x2 tdata.surfaces(1).v(2,:, : )=[50,60;70 80]; %size 2x2 tdata.surfaces(1).varloc=1; mat2tecplot(tdata,'mysurf2DT_xy_cellcenter.plt') 

July 21, 2015, 22:58 
Problem with cellcentered variable

#49 
New Member
Victor Magri
Join Date: Jul 2015
Posts: 2
Rep Power: 0 
Dear Wen Long,
it gave exactly the same result as before. So, the problem is not with the variable "z". My opinion is that it is around the lines 91659185, which write the variables "P" and "T": Code:
switch(iv) %by default matlab fwrite() writes array A[Imax,Jmax,Kmax] %with i=1:Imax, j=1:Jmax,k=1:Kmax and with i varying the fastest, %j the second and k the last %hence we do not have to have k,j,i nested loops as above case 1 surface_data_value=x_data(1:Imax1,1:Jmax1); case 2 surface_data_value=y_data(1:Imax1,1:Jmax1); case 3 surface_data_value=z_data(1:Imax1,1:Jmax1); otherwise surface_data_value=tdata.surfaces(isurf).v(iv3,1:Imax1,1:Jmax1); end %also need to pad zeros to make sure it (only needed for ordered data) %occupies the same size as nodal %variables surface_data_value=reshape(surface_data_value,[1,(Imax1)*(Jmax1)]); surface_data_value=[surface_data_value zeros([1,Imax*Jmax(Imax1)*(Jmax1)])]; fwrite(fid_out,surface_data_value,var_formatstr{iv}); 

August 9, 2015, 15:33 

#50 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
I think it is an issue with Tecplot itself on how contours are rendered . The data writer is still okay.
Attached example have same values for T and P, yet the plots are different Attachment 41330 See attached zip file Wen Last edited by wenlong; August 10, 2015 at 15:52. 

August 10, 2015, 15:55 
update (v1.4)

#51 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
A slightly corrected version (v1.4)
Wen 

September 16, 2015, 21:00 

#52  
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
Quote:
This is now fixed in v1.5 See attached file with an example. 

September 17, 2015, 15:33 

#53 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
V1.5 updated in the end. Or simple click the clip(attachment) on the top right of the thread


October 1, 2015, 16:24 

#54  
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
This is solved in version 1.5 above
Quote:


October 13, 2015, 11:44 

#55 
New Member
Join Date: Mar 2012
Posts: 27
Rep Power: 14 
Hi
can someone please check if Example 2 v1.5 works? For me it doesnt T=0 instead of the values specified if I read it into Tecplot 360EX 2015 R2. Code:
Example 2: generate a 2D line in (x,y) with temperature T defined on (x,y). Note there is no z in this case. By default line is defined by points of (x,y) pairs, and variable T is a function defined on the line. tdata=[]; tdata.Nvar=3; tdata.varnames={'x','y','T'}; tdata.lines(1).zonename='myline zone'; tdata.lines(1).x=[1,2,3,4,5,6,7,8,9,10]; tdata.lines(1).y=[1,2,3,4,5,6,7,8,9,10]+10; tdata.lines(1).v(1,:)=[10,20,30,30,20,10,10,10,20,20]; mat2tecplot(tdata,'myline2DT_xy.plt') 

October 27, 2015, 15:17 

#56 
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
Hi, Peterputer
The third variable 'T' is treated as z internally and it is given values as zero when z is not explicitly defined. This seems to be a bug for the code. To overcome this problem, you can use: % %test Example 2 % tdata=[]; tdata.Nvar=4; tdata.varnames={'x','y','z','T'}; tdata.lines(1).zonename='myline zone'; tdata.lines(1).x=[1,2,3,4,5,6,7,8,9,10]; tdata.lines(1).y=[1,2,3,4,5,6,7,8,9,10]+10; tdata.lines(1).v(1,=0*[10,20,30,30,20,10,10,10,20,20]; tdata.lines(1).v(2,=[10,20,30,30,20,10,10,10,20,20]; mat2tecplot(tdata,'myline2DT_xy.plt') and use x,y,T instead. Or you can also try instead of getting it in the v, put the T value in z as below: tdata=[]; tdata.Nvar=3; tdata.varnames={'x','y','T'}; tdata.lines(1).zonename='myline zone'; tdata.lines(1).x=[1,2,3,4,5,6,7,8,9,10]; tdata.lines(1).y=[1,2,3,4,5,6,7,8,9,10]+10; tdata.lines(1).z=[10,20,30,30,20,10,10,10,20,20]; mat2tecplot(tdata,'myline2DT_xyT.plt') In essence, only use v if you have more than 3 variable, v(i, is supposed to be corresponding to the i+3'th variable in varnames list 

January 28, 2016, 13:51 
Visualization on tecplot

#57  
New Member
Nicholas Prince
Join Date: Jan 2016
Posts: 1
Rep Power: 0 
Quote:
Thank you. Any other member is welcome to help me out. cheers 

February 3, 2016, 20:06 
mat2tecplot 3d matrix..please help..

#58 
New Member
Erkam BULUR
Join Date: Jan 2016
Posts: 1
Rep Power: 0 
Hi my friends.. I have a data as 3d matrix like A(x,y,z). I have created it in matlab. I want to learn how to draw contour plot according to the variable z and make animation in tecplot. Variables x and y are my datas which are created after running my program. and Variable z is as time or step per calculation(for loop).


February 17, 2016, 15:03 

#59  
New Member
wen long
Join Date: May 2012
Posts: 29
Rep Power: 14 
Quote:
create many zones, each zone give it a solutiontime that corresponds to your z value. Then use value of A for any given z on all (x,y) points. http://www.cfdonline.com/Forums/mis...ments&t=103860 

December 13, 2018, 00:57 
how can i do for matlab to tecplot ?

#60 
New Member
chiang chi yang
Join Date: Dec 2018
Posts: 1
Rep Power: 0 
i have a imformatin 1440*16(x,y,z,u,v,w,dudx....)
i want to make vortex z in tecplot how can i make for this problem help me plz i am tw. 

Thread Tools  Search this Thread 
Display Modes  

