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

How is the normal unit vector calculated for 2D airfoil surface gradients?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2016, 17:23
Default How is the normal unit vector calculated for 2D airfoil surface gradients?
  #1
New Member
 
Ryan Barrett
Join Date: May 2015
Posts: 15
Rep Power: 10
Ry10 is on a distinguished road
I am finding the surface gradient of a 2D airfoil. I have read that the surface gradient that surface_adjoint.csv gives you is the gradient in the normal direction at each point. I want to know how you calculate that normal direction. Is the normal direction at each point the summation of the normal vectors from the lines to the two adjacent points? Or is the normal vector calculated in some other way? I am using my own shape design variable (CST) and I need to know which direction the surface gradient is pointing at all the points.

Thanks!
Ry10 is offline   Reply With Quote

Old   May 2, 2016, 13:06
Default
  #2
Member
 
Mandar Kulkarni
Join Date: Nov 2013
Location: Virginia Tech, Blacksburg, VA
Posts: 52
Rep Power: 12
kmandar is on a distinguished road
Take a lot at this thread:
http://www.cfd-online.com/Forums/su2...y-normals.html
kmandar is offline   Reply With Quote

Old   February 21, 2018, 05:41
Question CST configure file
  #3
Member
 
João Lourenço
Join Date: Jan 2017
Posts: 32
Rep Power: 9
JPBLourenco is on a distinguished road
Hi everyone.

Does anyone know how to use CST method (class shape transformation) in SU2? In the configure file it's not clear how to do it. I try this configuration
DEFINITION_DV= (20, 1.0 |airfoil| 0, 1, 8) for shape optimization airfoil but nothing change in the airfoil.

I'm using the SU2 version5.0

Thanks everyone
JPBLourenco is offline   Reply With Quote

Old   February 22, 2018, 09:14
Default
  #4
New Member
 
Philip Hewitt
Join Date: Oct 2013
Posts: 4
Rep Power: 12
PawHewitt is on a distinguished road
I'm not entirely sure if the CST has been fully implemented for deformation yet. It seems the subroutine exits in the grid_movement_structure file but I don't see a call to it in the SetSurface_Deformation function which works out the displacements.
You might have add the call yourself, following the same pattern as the Hicks Hennes
PawHewitt is offline   Reply With Quote

Old   February 24, 2018, 09:57
Default
  #5
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
Yep, it is an interesting hidden (?) capability implemented by Ryan Barrett. Looking at the code it seems almost complete:
void CSurfaceMovement::SetCST(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef) is there
it is also in the python scripts (DV number 51) in tools.py
and I see the reference in SU2_DOT and SU2_GEO...
however it is not in the config_template config dile.

If I were you I'll try again but using number 51 instead of 20 and checking what are the input parameters. If you make it work then it would be great if you could create a pull request in GitHub and add the info to the config template.

I'm looking at SU2 v6.0. Another excellent possibility is to contact Ryan Barrett (look for his pull request in GitHub).

By the way, we are organizing the SU2 community of developers in the SU2 IDS. If you have a while please take a look at www.su2devsociety.org

Best,
Francisco
fpalacios is offline   Reply With Quote

Old   February 27, 2018, 06:28
Post
  #6
Member
 
João Lourenço
Join Date: Jan 2017
Posts: 32
Rep Power: 9
JPBLourenco is on a distinguished road
Thank you for your quick reply Philip Hewitt and Francisco Palacios.

From what I realized, the code doesn't have the CST fully implemented. The subroutine exists in the grid_movement_structure file and also some python files. When I try to run a shape optimization simulations the objective function still with the same value in all functions evaluated because the CST method isn't called. In fact, CST is SU2_DOT and SU2_GEO but something is missing. I will look to Hicks Hennes and try to follow the same procedure.

In SU2 v5.0, when I look to the tools.py file, the DV number is set to 20 and not to 51 (like v6.0). Case I make it works, I will create a pull request in Github and add the info.

Thanks to share the information. I will contact if I have some doubts and check the SU2 community of developers.

Best,
João Lourenço
JPBLourenco is offline   Reply With Quote

Reply

Tags
gradients, normal vector, su2


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
How to get the surface normal vector ohrmond CFX 3 February 1, 2018 05:45
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 09:53
Problem with restart solution in shape_optimization.py robyTKD SU2 Shape Design 21 May 29, 2013 09:26
Normal - Helical Surface m. malik Main CFD Forum 3 February 3, 2006 12:56
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


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