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

Getting U and V from rms[RhoV] and rms[RhoU]

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2023, 22:58
Default Getting U and V from rms[RhoV] and rms[RhoU]
  #1
New Member
 
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 3
elninoft9 is on a distinguished road
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!
elninoft9 is offline   Reply With Quote

Old   March 10, 2023, 01:58
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 615
Rep Power: 18
bigfootedrockmidget is on a distinguished road
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
To analyze velocity you do:

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.
bigfootedrockmidget is offline   Reply With Quote

Old   March 11, 2023, 14:18
Default
  #3
New Member
 
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 3
elninoft9 is on a distinguished road
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 re-run my simulations again? Unfortunately, I may not have time to re-run 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?
elninoft9 is offline   Reply With Quote

Old   March 12, 2023, 06:18
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 615
Rep Power: 18
bigfootedrockmidget is on a distinguished road
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.
bigfootedrockmidget is offline   Reply With Quote

Old   March 12, 2023, 07:54
Default
  #5
New Member
 
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 3
elninoft9 is on a distinguished road
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?
elninoft9 is offline   Reply With Quote

Old   March 12, 2023, 12:15
Default
  #6
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 615
Rep Power: 18
bigfootedrockmidget is on a distinguished road
Yes, if you already have a paraview file, just open it and use the calculator function. Momentum is defined as density times velocity.
bigfootedrockmidget is offline   Reply With Quote

Old   March 16, 2023, 13:13
Default
  #7
New Member
 
El Nino
Join Date: Jan 2023
Posts: 8
Rep Power: 3
elninoft9 is on a distinguished road
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.
elninoft9 is offline   Reply With Quote

Old   March 17, 2023, 03:42
Default
  #8
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 615
Rep Power: 18
bigfootedrockmidget is on a distinguished road
The velocity is divided by freestream velocity to get a nice non-dimensional 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.
bigfootedrockmidget is offline   Reply With Quote

Reply

Tags
rms, shape optimisation, su2, u and v

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



All times are GMT -4. The time now is 00:36.