Creating an output file with primitive variable
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. |
Quote:
|
I think maybe I wasn't clear. I need dv/dx, dv/dy, dv/dz
|
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. |
Paraview crashes when it tries to calculate vorticity.
I want to know exactly how to get the derivatives and write them. |
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.
|
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++; } |
Looks fine to me.!!!
|
Doubt In the above given code
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 |
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
|
All times are GMT -4. The time now is 16:11. |