# Extract 2D velocity values

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 18, 2010, 13:19 Extract 2D velocity values #1 New Member   andre alho Join Date: Nov 2009 Posts: 14 Rep Power: 10 Hi. I'm trying to extract the values of the velocity vectors of a 2D simulation but i don't know how to do it... I want to write those values into a file to read in other program to simulate a robot navigation. At this moment i can make an animation of the vectors but what i really want is the steady-state values of that vectors written in a file... Someone knows how if it is possible to do it and how???? Thanks

 February 18, 2010, 17:32 #2 New Member   Susan Join Date: Oct 2009 Posts: 26 Rep Power: 10 you can create a line in surfaces or use an edge you already have defined. You then extract the values in Plot, XY plot, there you can write to file. You can also do the same by define a profile on the edge and write the values

February 19, 2010, 07:57
#3
New Member

andre alho
Join Date: Nov 2009
Posts: 14
Rep Power: 10
Quote:
 Originally Posted by hvem10 you can create a line in surfaces or use an edge you already have defined. You then extract the values in Plot, XY plot, there you can write to file. You can also do the same by define a profile on the edge and write the values
For example i have this environment with the vectors of velocity:

What i want is a file with the position and the values of those vectors...
for example:
X=0.1; Y=0.5; VX=1.23; VY=0.14;
for all the 2D positions...

thanks...

 February 19, 2010, 10:42 #4 New Member   andre alho Join Date: Nov 2009 Posts: 14 Rep Power: 10 Hi. I already discover how to do it... Using the option File -> Export -> ASCII It creates a file with the XY position and the value of the velocity but only in one instant of time. Anyone knows how to do this to all instants of the time of simulation??

February 24, 2010, 12:25
#5
New Member

Elahe
Join Date: Oct 2009
Posts: 21
Rep Power: 10
Quote:
 Originally Posted by hvem10 you can create a line in surfaces or use an edge you already have defined. You then extract the values in Plot, XY plot, there you can write to file. You can also do the same by define a profile on the edge and write the values

hi

i do like this for extracting velocity profile but it is wrong and do not match with velocity vectors, do you have any idea about it?

best
elahe

 February 28, 2010, 21:57 time instance data export / variables' names at data export #6 New Member   jas z Join Date: Dec 2009 Location: athens Posts: 4 Rep Power: 10 hi, a little bit late responce, but this caused me a lot of trouble, till i found out how to do it, so let it be posted... 1} export your data for each instant of time by executing a command: Solve --> Execute Commands --> ... there you define the rest of the export parameters (how,when...). 2} command is entered in the following form: file/export/ file-type file name [list-of-surfaces ()] [list-of-scalars q] (for more look at 4.12.18 Fluent Documentation) the tricky thing with this is to find out how should you enter the variables' names??? and the answer is: 3} write the variables' names, depending on the filetype you want to export your data at..... that means you must have a clue of how the specific program calls each variable you want to export (hint: find it out by opening a steady-state simulation data file with the certain program!!!) ------------------------------ to sum up, here's an example of a command exporting data (axisymmetric duct) in tecplot filetype: file/export/tecplot Re=100 axis.8 default-interior outflow.7 velocity_inlet.5 wall.6 () pressure velocity-magnitude axial-velocity radial-velocity strem-function velocity-angle vorticity-mag viscocity-lam wall-shear axial-wall-shear radial-wall-shear strain-rate-mag daxial-velocity-dx dradial-velocity-dx daxial-velocity-dy dradial-velocity-dy dp-dx dp-dy q data filename: Re=100 surfaces: axis.8 , default-interior , outflow.7 , velocity_inlet.5 , wall.6 variables' examples: [tecplot name]-->[fluent export name] pressure --> Static Pressure vorticity-mag --> Vorticity axial-wall-shear --> Axial Wall Shear (be careful:... for a 2D duct there would be x-velocity and no axial-velocity) ( if you wanted the file name to be changing after each timestep, then you'd put as filename: Re=100-%f.ps (more options about that: 4.12.18 Fluent Documentation) ) .................................................. .................................................. ..

March 1, 2010, 12:30
#7
New Member

andre alho
Join Date: Nov 2009
Posts: 14
Rep Power: 10
Quote:
 Originally Posted by jas_z hi, a little bit late responce, but this caused me a lot of trouble, till i found out how to do it, so let it be posted... 1} export your data for each instant of time by executing a command: Solve --> Execute Commands --> ... there you define the rest of the export parameters (how,when...). 2} command is entered in the following form: file/export/ file-type file name [list-of-surfaces ()] [list-of-scalars q] (for more look at 4.12.18 Fluent Documentation) the tricky thing with this is to find out how should you enter the variables' names??? and the answer is: 3} write the variables' names, depending on the filetype you want to export your data at..... that means you must have a clue of how the specific program calls each variable you want to export (hint: find it out by opening a steady-state simulation data file with the certain program!!!) ------------------------------ to sum up, here's an example of a command exporting data (axisymmetric duct) in tecplot filetype: file/export/tecplot Re=100 axis.8 default-interior outflow.7 velocity_inlet.5 wall.6 () pressure velocity-magnitude axial-velocity radial-velocity strem-function velocity-angle vorticity-mag viscocity-lam wall-shear axial-wall-shear radial-wall-shear strain-rate-mag daxial-velocity-dx dradial-velocity-dx daxial-velocity-dy dradial-velocity-dy dp-dx dp-dy q data filename: Re=100 surfaces: axis.8 , default-interior , outflow.7 , velocity_inlet.5 , wall.6 variables' examples: [tecplot name]-->[fluent export name] pressure --> Static Pressure vorticity-mag --> Vorticity axial-wall-shear --> Axial Wall Shear (be careful:... for a 2D duct there would be x-velocity and no axial-velocity) ( if you wanted the file name to be changing after each timestep, then you'd put as filename: Re=100-%f.ps (more options about that: 4.12.18 Fluent Documentation) ) .................................................. .................................................. ..
thanks

i'm using the command:
file/export/ascii cont_c2h6 default-interior () yes mass-fraction-of-c2h6 q yes

but it only exports the X and Y coordinates..
what i have to change to export the mass fraction values ???
how can i create various files for diferent instant of time?

 March 1, 2010, 19:24 variable name in export commands / files for diferent instants of time #8 New Member   jas z Join Date: Dec 2009 Location: athens Posts: 4 Rep Power: 10 hi again, i'm not sure what exactly is the problem with your command, but two are the possible errors... @ the variable's name you gave... --> change the name of the variable (ex. mass-fraction-ethane) { to find out for sure, run a simple simulation, with no commands in the middle, export your data in an ascii file and see how this variable is written in the specific dataset } @ the surface's name --> write the surface with its number extension (ex. default-interior.2) { it's the one you gave to it at the meshing procedure } try both changes and each one seperately. about creating various files for diferent instants of time there are a lot of options... copy from the 4.1.17 Fluent Documentation: For unsteady-state calculations, you can save files with names that reflect the flow-time at which they are saved by including the character string %f in the file name. The usage is similar to %t. For example, when you specify filename-%f.ps for the file name, the solver will save a file with the appropriate name (e.g., filename-005.000000.ps for a solution at a flow-time of 5 seconds). By default, the flow-time that is included in the file name will have a field width of 10 and 6 decimal places. To modify this format, use the character string %x.yf, where x and y are the preferred field width and number of decimal places, respectively. FLUENT will automatically add zeros to the beginning of the flow-time to achieve the prescribed field width. To eliminate these zeros and left align the flow-time, use the character string %-x.yf instead. so if you write: file/export/ascii cont_c2h6-%7.3f.ps default-interior () yes mass-fraction-of-c2h6 q yes data from time step dt=1sec are written in file: cont_c2h6-001.000.ps hope i shed some light to your questions... unfortunately, when there is lack of specified information about a topic in fluent, you have to go through a try-error procedure to find out the right way to do what you want.

March 2, 2010, 09:57
#9
New Member

andre alho
Join Date: Nov 2009
Posts: 14
Rep Power: 10
Quote:
 Originally Posted by jas_z hi again, i'm not sure what exactly is the problem with your command, but two are the possible errors... @ the variable's name you gave... --> change the name of the variable (ex. mass-fraction-ethane) { to find out for sure, run a simple simulation, with no commands in the middle, export your data in an ascii file and see how this variable is written in the specific dataset } @ the surface's name --> write the surface with its number extension (ex. default-interior.2) { it's the one you gave to it at the meshing procedure } try both changes and each one seperately. about creating various files for diferent instants of time there are a lot of options... copy from the 4.1.17 Fluent Documentation: For unsteady-state calculations, you can save files with names that reflect the flow-time at which they are saved by including the character string %f in the file name. The usage is similar to %t. For example, when you specify filename-%f.ps for the file name, the solver will save a file with the appropriate name (e.g., filename-005.000000.ps for a solution at a flow-time of 5 seconds). By default, the flow-time that is included in the file name will have a field width of 10 and 6 decimal places. To modify this format, use the character string %x.yf, where x and y are the preferred field width and number of decimal places, respectively. FLUENT will automatically add zeros to the beginning of the flow-time to achieve the prescribed field width. To eliminate these zeros and left align the flow-time, use the character string %-x.yf instead. so if you write: file/export/ascii cont_c2h6-%7.3f.ps default-interior () yes mass-fraction-of-c2h6 q yes data from time step dt=1sec are written in file: cont_c2h6-001.000.ps hope i shed some light to your questions... unfortunately, when there is lack of specified information about a topic in fluent, you have to go through a try-error procedure to find out the right way to do what you want.
thanks

the correct command is:
file/export/ascii cont_c2h6-%5.3f default-interior () yes c2h6 q yes

to export the mass fraction of c2h6

 June 2, 2017, 05:23 How to write xy plot file at specific interval??? #10 New Member   Ketan Madane Join Date: Aug 2015 Posts: 3 Rep Power: 4 Hello!! I am running a transient 2D simulation of a flow. i have a Line where in i need to monitor the change in velocity profile over time. I wanna ask how can i write my XY plot file after every time step or specific interval?? Automatically???

 Tags fluent, vector manipulation

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post bornspur CFX 0 February 7, 2009 09:38 J CFX 11 November 3, 2008 17:46 Steve FLUENT 0 January 18, 2005 13:11 gaurav FLUENT 7 May 17, 2004 17:07 Lily Kabanj FLUENT 1 March 13, 2000 20:21

All times are GMT -4. The time now is 14:35.