CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Creating an output file with primitive variable

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

Like Tree1Likes
  • 1 Post By viit3

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2014, 03:30
Default Creating an output file with primitive variable
  #1
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 12
viit3 is on a distinguished road
I am doing internal flow simulations using Euler and want to visualize vorticity. How do I write vx, vy and vz to an output file.

I can see that vorticity is calculated for NS and I guess the same methods have to be added to the Euler part.

Last edited by viit3; December 24, 2014 at 07:03.
viit3 is offline   Reply With Quote

Old   December 24, 2014, 13:06
Default
  #2
Senior Member
 
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13
Vino is on a distinguished road
Quote:
Originally Posted by viit3 View Post
I am doing internal flow simulations using Euler and want to visualize vorticity. How do I write vx, vy and vz to an output file.

I can see that vorticity is calculated for NS and I guess the same methods have to be added to the Euler part.
you will get rho, rho*u , rho*v, rho*E in output file. from this u can get u,v (2D).
Vino is offline   Reply With Quote

Old   December 25, 2014, 03:56
Default
  #3
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 12
viit3 is on a distinguished road
I think maybe I wasn't clear. I need dv/dx, dv/dy, dv/dz
viit3 is offline   Reply With Quote

Old   December 25, 2014, 04:33
Default
  #4
Senior Member
 
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13
Vino is on a distinguished road
ok fine. if you need vorticity, you can utilize some flow visualizer like Tecplot. It just needs velocity components as input, right?

But if you need derivatives of velocity components, you need to find a way to write it in a data file from SU2. Derivatives will be calculated for Euler, if you use 2nd order.
Vino is offline   Reply With Quote

Old   December 26, 2014, 00:45
Default
  #5
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 12
viit3 is on a distinguished road
Paraview crashes when it tries to calculate vorticity.

I want to know exactly how to get the derivatives and write them.
viit3 is offline   Reply With Quote

Old   December 26, 2014, 02:46
Default
  #6
Senior Member
 
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13
Vino is on a distinguished road
I have not tried anything like that. But you explore the output related source files (SU2_CFD/src/*output) and add variables to write into flow files. I hope its possible.
Vino is offline   Reply With Quote

Old   December 26, 2014, 07:22
Default
  #7
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 12
viit3 is on a distinguished road
I added the following lines in output_structure. I am now getting values of vorticity from them. I just want to confirm that the values I am getting are those of vorticity.

if ((Kind_Solver == EULER) || (Kind_Solver == NAVIER_STOKES) || (Kind_Solver == RANS)) {
/*--- Vorticity ---*/
nVar_Total += nDim;
}


double **gradsWrite = solver[FLOW_SOL]->node[iPoint]->GetGradient_Primitive();
double *vort = new double[nDim];
vort[0] = gradsWrite[3][1]-gradsWrite[2][2];
vort[1] = gradsWrite[1][2]-gradsWrite[3][0];
vort[2] = gradsWrite[2][0]-gradsWrite[1][1];
for(int i=0;i<nDim;i++)
{
Data[jVar][jPoint] = vort[i]; jVar++;
}
Vino likes this.
viit3 is offline   Reply With Quote

Old   December 26, 2014, 08:43
Default
  #8
Senior Member
 
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13
Vino is on a distinguished road
Looks fine to me.!!!
Vino is offline   Reply With Quote

Old   June 3, 2021, 13:40
Default Doubt In the above given code
  #9
New Member
 
Jainam
Join Date: Apr 2020
Posts: 2
Rep Power: 0
jainam1259 is on a distinguished road
Can someone please explain the above code written. I am trying to calculate vorticity for my domain. Using, SU2_CFD -d <your_config_file.cfg> I got to know that vorticity can be written in output format.
Thanks
jainam1259 is offline   Reply With Quote

Old   June 4, 2021, 16:24
Default
  #10
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 476
Rep Power: 17
bigfootedrockmidget is on a distinguished road
If you want to look at vorticity, you can just use the keyword "VORTICITY" in the config file as one of the keywords for the volume output
bigfootedrockmidget is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 20:43
2.0.x on Mac OSX niklas OpenFOAM Installation 74 March 28, 2012 17:46
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46


All times are GMT -4. The time now is 05:46.