CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Is there code to plot stream function from u & v velocities

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2017, 08:13
Default
  #21
Senior Member
 
kbaker's Avatar
 
Khalid Baker
Join Date: Mar 2009
Location: IRAQ
Posts: 168
Rep Power: 17
kbaker is on a distinguished road
Quote:
Originally Posted by leflix View Post
First how many points do you have in x direction (i) and in y direction (j) ?
I opened the file in excel and it clearly shows that its in i direction its 4624 (reaches end of file) and in y direction just 4 because I have 4 columns (j is loop for the variables which are x,y,u,v)
Attached Images
File Type: jpg 1.jpg (154.8 KB, 6 views)
kbaker is offline   Reply With Quote

Old   August 6, 2017, 08:38
Default
  #22
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
no what you read is the total number of nodes.
Imagine NI (number of nodes in I direction) is 20 and NJ ((number of nodes in J direction) is 45. Then you will have 900 total number of grid points.
this corresponds to your 4624
leflix is offline   Reply With Quote

Old   August 6, 2017, 09:09
Default
  #23
Senior Member
 
kbaker's Avatar
 
Khalid Baker
Join Date: Mar 2009
Location: IRAQ
Posts: 168
Rep Power: 17
kbaker is on a distinguished road
My data consists of 4 columns each column has 4624 point please look to the the excel file I was uploaded it.
Attached Files
File Type: xlsx velo.xlsx (155.1 KB, 1 views)
kbaker is offline   Reply With Quote

Old   August 6, 2017, 09:35
Default
  #24
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
yes but it is not what I asked you. First you need to understand that in a 2D structured grid each node is referred to a couple of indice (i,j) ranging from 1 to NI and 1 to NJ respectively. Then you have a total number of nodes NI*NJ whhich correspond to the number of lines of you excell or .txt file.
Now if you want to use Tecplot you need to give him some information such as NI and NJ, the coordinnates of each point X(i,j), Y(i,j) and then the velocity componnents on each of these node U(i,j) and V(i,j). If you d'ont have these information you cannot use Tecplot.Having the total number of nodes (4624) is not sufficient.
kbaker likes this.
leflix is offline   Reply With Quote

Old   August 6, 2017, 12:27
Default
  #25
Senior Member
 
kbaker's Avatar
 
Khalid Baker
Join Date: Mar 2009
Location: IRAQ
Posts: 168
Rep Power: 17
kbaker is on a distinguished road
Quote:
Originally Posted by leflix View Post
yes but it is not what I asked you. First you need to understand that in a 2D structured grid each node is referred to a couple of indice (i,j) ranging from 1 to NI and 1 to NJ respectively. Then you have a total number of nodes NI*NJ whhich correspond to the number of lines of you excell or .txt file.
Now if you want to use Tecplot you need to give him some information such as NI and NJ, the coordinates of each point X(i,j), Y(i,j) and then the velocity components on each of these node U(i,j) and V(i,j). If you don't have these information you cannot use Tecplot.Having the total number of nodes (4624) is not sufficient.
Sorry for the misunderstanding. The number of nodes in x direction is 67 and in y direction is 67 . I am not too familiar with programing so I do not know how to start with the steps you mentioned and redefine the data into each node to let can be used in Tecplot?
kbaker is offline   Reply With Quote

Old   August 6, 2017, 16:15
Default
  #26
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
I guess it is rather 68 and 68 as you have 4624 points
leflix is offline   Reply With Quote

Old   August 6, 2017, 16:29
Default
  #27
Senior Member
 
kbaker's Avatar
 
Khalid Baker
Join Date: Mar 2009
Location: IRAQ
Posts: 168
Rep Power: 17
kbaker is on a distinguished road
As I understood from your reply I need now to convert the 4624 values of each variable in my txt file into (68*68) matrix ? Hence I need to save each variable in single file then I need four files in Tech plot? right? I will be grateful if you have an illustrated program ?
kbaker is offline   Reply With Quote

Old   August 6, 2017, 16:59
Default
  #28
Senior Member
 
kbaker's Avatar
 
Khalid Baker
Join Date: Mar 2009
Location: IRAQ
Posts: 168
Rep Power: 17
kbaker is on a distinguished road
I did it at last without need for fortran program using Tecplot but the problem legend not appear ? how I can show it?
Attached Images
File Type: jpg dd.jpg (101.5 KB, 17 views)
kbaker is offline   Reply With Quote

Old   August 6, 2017, 17:03
Default
  #29
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
no you don't need 4 files, only one.
Here is a program that reads tour stream.txt file and will generate the velocity.plt file to be used with tecplot.
I don't know if in your file stream.txt it should be read with
DO I
DO J

or
DO J
DO I

I don't have Tecplot on my computer presently so I cannot verify the result, but the file velocity.plt seems good excepted that the first point( x=0, y=0) is at the end of the file...

Try to understant what is done in this program
Attached Files
File Type: f rewrite.f (542 Bytes, 6 views)
kbaker likes this.
leflix is offline   Reply With Quote

Old   August 6, 2017, 17:12
Default
  #30
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Kbaker you need to read the tecplot documentation or ask someone next to you who knows this kind of stuff. It is not something easy to explain tchating.
leflix is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
Simple stream function vorticity formulation for flow past a rectangle [Matlab] a99 Main CFD Forum 2 March 5, 2016 04:04
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 06:32.