
[Sponsors] 
March 9, 2023, 22:58 
Getting U and V from rms[RhoV] and rms[RhoU]

#1 
New Member
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 2 
Hi everyone, The "rms[RhoU]", "rms[RhoV]", and "rms[Rho]" values in the history_direct.csv file are generated after i perform shape optimisation for the NACA 0012 2D airfoil, in a transonic and inviscid flow. How can i get the values of U and V alone? Can i just use the following approach?
U = rms[RhoU] / rms[Rho] V = rms[RhoV] / rms[Rho] I am not confident if the above formula gives me the values of U and V, which are the x and y components of the flow velocity, which is what I am required to analyse. I do appreciate any help and thank you! 

March 10, 2023, 01:58 

#2 
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 341
Rep Power: 15 
No, RMS[..] are the root mean square values of the residuals, so they only give information about how far you are from the exact numerical solution. You should construct velocity from the momentum in the volume output. You can see all options for screen, history and volume output using:
Code:
SU2_CFD d config.cfg Code:
OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK VOLUME_OUTPUT= PRIMITIVE And you view the paraview_multiblock solution file xx.vtm in paraview. With the calculator you can construct velocity by dividing the momentum by density. 

March 11, 2023, 14:18 

#3 
New Member
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 2 
Thank you for your help! Does that mean that I have to edit the inv_NACA0012_basic.cfg file to include the code of "OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK & VOLUME_OUTPUT= PRIMITIVE" ?
This would also mean that I would have to rerun my simulations again? Unfortunately, I may not have time to rerun my simulations, and hence, is there any way I can get the U and V values, with the data alr present from my history_project.csv or history_direct.csv or surface_flow.csv? 

March 12, 2023, 06:18 

#4 
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 341
Rep Power: 15 
Hi,
If you have a restart file, you can restart from that and run 1 iteration. I am assuming you have a steady state solution, not time dependent. And that you want to view the final, optimized geometry + flow solution of the naca profile. Copy your testcase into a separate folder, so you do not accidentally overwrite your simulations. Then add/change in the .cfg file these lines: Code:
RESTART_SOL= YES SOLUTION_FILENAME= solution.dat ITER= 1 Just copy your restart file (restart.dat?) to solution.dat and restart it. I am assuming you actually want the flow field solution for velocity? The history file contains convergence information and some mean data on selected surfaces like lift and drag. If your solution has converged, the RMS values should be really low and the lift/drag should have reached a constant value. 

March 12, 2023, 07:54 

#5 
New Member
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 2 
Actually, with regards to your initial reply, you asked me to open the paraview file. I realized that my output files already has a paraview file called flow.vtu. Therefore, would I be able to use the calculation that you said of "momentum/density" to get the flow field solution for velocity? Also, could you elaborate on why momentum divided by density gives me velocity? Is that any equation?


March 12, 2023, 12:15 

#6 
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 341
Rep Power: 15 
Yes, if you already have a paraview file, just open it and use the calculator function. Momentum is defined as density times velocity.


March 16, 2023, 13:13 

#7 
New Member
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 2 
thank you for your help! I managed to obtain the velocity values. Specifically, I got the x and y components of the velocity. However, I need to plot a velocity distribution graph for the airfoil. Online, it say's that i would need v/V(freestream). But how do I get the freestream velocity? Or is there another way to plot the velocity distribution over the airfoil? Because, simply plotting the x and y components of the velocity is giving me a nonsensical graph.


March 17, 2023, 03:42 

#8 
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 341
Rep Power: 15 
The velocity is divided by freestream velocity to get a nice nondimensional value. It's just a scaling by a constant value.
The freestream velocity is the velocity 'far away' from the airfoil. It is the velocity that is imposed at the boundary of your domain, usually defined as a 'far field' boundary. So what does your geometry look like? If you have placed a 2D airfoil inside a circular domain and define the edge of the circle as a far field boundary using MARKER_FAR, then the free stream velocity is the velocity on this marker. What this far field velocity is depends on your setup (for compressible computed from the Mach number). The far field velocity determines your entire solution, you should know what it is. 

Tags 
rms, shape optimisation, su2, u and v 
Thread Tools  Search this Thread 
Display Modes  

