|
[Sponsors] |
Creating an output file with primitive variable |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 24, 2014, 03:30 |
Creating an output file with primitive variable
|
#1 |
New Member
Join Date: May 2013
Posts: 8
Rep Power: 13 |
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. |
|
December 24, 2014, 13:06 |
|
#2 |
Senior Member
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13 |
you will get rho, rho*u , rho*v, rho*E in output file. from this u can get u,v (2D).
|
|
December 25, 2014, 03:56 |
|
#3 |
New Member
Join Date: May 2013
Posts: 8
Rep Power: 13 |
I think maybe I wasn't clear. I need dv/dx, dv/dy, dv/dz
|
|
December 25, 2014, 04:33 |
|
#4 |
Senior Member
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13 |
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. |
|
December 26, 2014, 00:45 |
|
#5 |
New Member
Join Date: May 2013
Posts: 8
Rep Power: 13 |
Paraview crashes when it tries to calculate vorticity.
I want to know exactly how to get the derivatives and write them. |
|
December 26, 2014, 02:46 |
|
#6 |
Senior Member
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13 |
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.
|
|
December 26, 2014, 07:22 |
|
#7 |
New Member
Join Date: May 2013
Posts: 8
Rep Power: 13 |
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++; } |
|
December 26, 2014, 08:43 |
|
#8 |
Senior Member
Vino
Join Date: Mar 2013
Posts: 130
Rep Power: 13 |
Looks fine to me.!!!
|
|
June 3, 2021, 13:40 |
Doubt In the above given code
|
#9 |
New Member
Jainam
Join Date: Apr 2020
Posts: 2
Rep Power: 0 |
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 |
|
June 4, 2021, 16:24 |
|
#10 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 676
Rep Power: 21 |
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
|
|
|
|
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 |