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

Has anyone made a success with the 2D FFD optimization?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2015, 07:17
Default Has anyone made a success with the 2D FFD optimization?
  #1
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Dear Everyone,
I tried to run the optimization with 2D FFD several times but not succeeded.Can anyone give me an example?


I would be grateful for any help you could provide.
Thanks!
feiyi is offline   Reply With Quote

Old   September 3, 2015, 10:58
Default
  #2
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by feiyi View Post
Dear Everyone,
I tried to run the optimization with 2D FFD several times but not succeeded.Can anyone give me an example?


I would be grateful for any help you could provide.
Thanks!
Without more detail it's hard to help, but here are a few things to check that might at least eliminate problems:


- Look in the DESIGNS/ folder - output from the CFD and gradient calculations at each step is stored there, and there may be helpful error messages.
- Check to see if SU2_CFD on the same config file will run. Any error messages from that may be helpful
- Check the result of running either finite_difference or continuous_adjoint (whichever one you were using for the optimization - see shape_optimization.py -h). If it can't get a gradient, it won't work.
- Check to see if it works with other DV types
- Set a nonzero value for one of your design variables, and run SU2_DEF with VISUALIZE_DEFORMATION set to YES. Check the output volume file - if no deformation has occurred, something is wrong with the DV parameters. (And the output of SU2_DEF will say what deformation it was attempting)
hlk is offline   Reply With Quote

Old   September 6, 2015, 00:13
Default Thanks for the answer!
  #3
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Thanks for the answer!
Here are several files I got when computing the gradient with FFD.

The FFd_box.png : FFd_box.png
The config file inv_NACA0012_adv_CFD.txt : inv_NACA0012_adv_CFD.txt
The surface_adjoint.xls : surface_adjoint.xls
The of_grad_cd.txt : of_grad_cd.txt

I can't find why the gradient is such high number.
Cheers
feiyi is offline   Reply With Quote

Old   September 6, 2015, 10:23
Default
  #4
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by feiyi View Post
Thanks for the answer!
Here are several files I got when computing the gradient with FFD.

The FFd_box.png : Attachment 41909
The config file inv_NACA0012_adv_CFD.txt : Attachment 41910
The surface_adjoint.xls : Attachment 41911
The of_grad_cd.txt : Attachment 41912

I can't find why the gradient is such high number.
Cheers
The first thing that jumps out at me is that in the config file and in your DV definitions it looks like you're expecting an FFD box with many degrees in the y direction and one degree in the x direction; however from your plot the FFD box has one degree in the y direction and many degrees in the x direction.

As I stated earlier, I would encourage you to apply test deformations on your DVs to see what deformation is actually being applied.
hlk is offline   Reply With Quote

Old   September 7, 2015, 06:31
Default Thanks for the answer!
  #5
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Thanks for the answer!
I changed the DV like this

DV_KIND= FFD_CONTROL_POINT_2D
DV_MARKER= ( airfoil )
DV_PARAM= ( wing, 12.0, 1.0, 0.0, 1.0)
DV_VALUE= 0.001

as you see,a small change with one ffd point.However,the output mesh is such a disordered mesh.

The su2 I run is the exe download form
http://su2.stanford.edu/download.html
,which is the single thread v4 on windows.


The FFd_box :
http://www.cfd-online.com/Forums/att...1&d=1441617847

The config file :
http://www.cfd-online.com/Forums/att...1&d=1441617969

The output mesh:
http://www.cfd-online.com/Forums/att...1&d=1441617932

Cheers!
Attached Images
File Type: png box_change.png (6.5 KB, 86 views)
File Type: png mesh.png (136.7 KB, 85 views)
Attached Files
File Type: txt config_DEF.txt (1.3 KB, 60 views)
feiyi is offline   Reply With Quote

Old   September 10, 2015, 22:52
Default
  #6
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Can anyone help?
feiyi is offline   Reply With Quote

Old   September 10, 2015, 22:54
Default
  #7
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Quote:
Originally Posted by hlk View Post
The first thing that jumps out at me is that in the config file and in your DV definitions it looks like you're expecting an FFD box with many degrees in the y direction and one degree in the x direction; however from your plot the FFD box has one degree in the y direction and many degrees in the x direction.

As I stated earlier, I would encourage you to apply test deformations on your DVs to see what deformation is actually being applied.
Thanks for the answer!
I changed the DV like this

DV_KIND= FFD_CONTROL_POINT_2D
DV_MARKER= ( airfoil )
DV_PARAM= ( wing, 12.0, 1.0, 0.0, 1.0)
DV_VALUE= 0.001

as you see,a small change with one ffd point.However,the output mesh is such a disordered mesh.

The su2 I run is the exe download form
http://su2.stanford.edu/download.html
,which is the single thread v4 on windows.


The FFd_box :
http://www.cfd-online.com/Forums/att...1&d=1441617847

The config file :
http://www.cfd-online.com/Forums/att...1&d=1441617969

The output mesh:
http://www.cfd-online.com/Forums/att...1&d=1441617932

Cheers!
feiyi is offline   Reply With Quote

Old   September 13, 2015, 14:00
Default
  #8
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by feiyi View Post
Thanks for the answer!
I changed the DV like this

DV_KIND= FFD_CONTROL_POINT_2D
DV_MARKER= ( airfoil )
DV_PARAM= ( wing, 12.0, 1.0, 0.0, 1.0)
DV_VALUE= 0.001

as you see,a small change with one ffd point.However,the output mesh is such a disordered mesh.

The su2 I run is the exe download form
http://su2.stanford.edu/download.html
,which is the single thread v4 on windows.


The FFd_box :
http://www.cfd-online.com/Forums/att...1&d=1441617847

The config file :
http://www.cfd-online.com/Forums/att...1&d=1441617969

The output mesh:
http://www.cfd-online.com/Forums/att...1&d=1441617932

Cheers!
You will also want to check the terminal output: it will say what deformation is being applied to what surface, and how much the residual of the linear solver was reduced. This is also where helpful warnings are output.

Settings that can effect the deformation (which were not included in your config file, for some reason)

- DEFORM_STIFFNESS_TYPE usually INVERSE_VOLUME, but you might also try CONSTANT_STIFFNESS or WALL_DISTANCE.
- DEFORM_TOL_FACTOR usually 0.001, controls how far the solver tries to converge
- DEFORM_LINEAR_SOLVER usually FGMRES
- MARKER_MOVING should get set by DV_MARKER in optimization, and it looks like something is being moved, but just to be extra sure why not.
hlk is offline   Reply With Quote

Old   September 14, 2015, 04:58
Default
  #9
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Quote:
Originally Posted by hlk View Post
You will also want to check the terminal output: it will say what deformation is being applied to what surface, and how much the residual of the linear solver was reduced. This is also where helpful warnings are output.

Settings that can effect the deformation (which were not included in your config file, for some reason)

- DEFORM_STIFFNESS_TYPE usually INVERSE_VOLUME, but you might also try CONSTANT_STIFFNESS or WALL_DISTANCE.
- DEFORM_TOL_FACTOR usually 0.001, controls how far the solver tries to converge
- DEFORM_LINEAR_SOLVER usually FGMRES
- MARKER_MOVING should get set by DV_MARKER in optimization, and it looks like something is being moved, but just to be extra sure why not.

Thanks for the answer!
It doesn't work.
The terminal output : terminal_output.txt
The config file : inv_NACA0012_adv.txt
The original surface : original_surface.png
The deformed surface : deformed_surface.png
The deformed mesh : deformed_mesh.png

If you have got a successful test case with FFD control point 2d ,can you give me an example?

Sorry to bother you again!
Many thanks!
feiyi is offline   Reply With Quote

Old   September 14, 2015, 11:51
Default
  #10
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by feiyi View Post
Thanks for the answer!
It doesn't work.
The terminal output : Attachment 42101
The config file : Attachment 42102
The original surface : Attachment 42103
The deformed surface : Attachment 42104
The deformed mesh : Attachment 42106

If you have got a successful test case with FFD control point 2d ,can you give me an example?

Sorry to bother you again!
Many thanks!
Try re-making the FFD box using the FFD_SETTNG that you must have done earlier.
hlk is offline   Reply With Quote

Old   September 15, 2015, 11:06
Default
  #11
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Quote:
Originally Posted by hlk View Post
Try re-making the FFD box using the FFD_SETTNG that you must have done earlier.
Thanks for the answer!

I changed the FFD_DEFINITION,but it doesn't work.
inv_NACA0012_adv.txt inv_NACA0012_adv.txt

orginal_box_and_mesh.png orginal_box_and_mesh.png

deformed_box_and_mesh.png deformed_box_and_mesh.png

origial_surface.png origial_surface.png

deformed_surface.png deformed_surface.png

As you can see in the deformed surface , the node id is jumped from 98 to 42 then to 95. I'm wondering there are some bugs in the program.

Sorry to bother you again!
Many thanks!
feiyi is offline   Reply With Quote

Old   September 15, 2015, 13:34
Default
  #12
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by feiyi View Post
Thanks for the answer!

I changed the FFD_DEFINITION,but it doesn't work.
inv_NACA0012_adv.txt Attachment 42141

orginal_box_and_mesh.png Attachment 42142

deformed_box_and_mesh.png Attachment 42143

origial_surface.png Attachment 42144

deformed_surface.png Attachment 42145

As you can see in the deformed surface , the node id is jumped from 98 to 42 then to 95. I'm wondering there are some bugs in the program.

Sorry to bother you again!
Many thanks!
Did you change DV_KIND to FFD_SETTING, run SU2_DEF, and then try the 2D FFD deformation using the resulting mesh_out?
hlk is offline   Reply With Quote

Old   September 16, 2015, 00:48
Default
  #13
New Member
 
fanghai
Join Date: Sep 2014
Posts: 14
Rep Power: 12
feiyi is on a distinguished road
Quote:
Originally Posted by hlk View Post
Did you change DV_KIND to FFD_SETTING, run SU2_DEF, and then try the 2D FFD deformation using the resulting mesh_out?
The old setting
FFD_DEFINITION= ( wing, -0.025, -0.08, 0.0, 1.025, -0.08, 0.0, 1.025, 0.08, 0.0, -0.025, 0.08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))

The new setting
FFD_DEFINITION= ( wing, -0.025, -0.1, 0.0, 1.025, -0.1, 0.0, 1.025, 0.1, 0.0, -0.025, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))

I changed the y coordinate from 0.08 to 0.1,change DV_KIND to FFD_SETTING, run SU2_DEF, and then try the 2D FFD deformation using the resulting mesh_out.

As you can see in the deformed surface , the node id is jumped from 98 to 42 then to 95.I can't find why the id node of the surface is disordered.

Sorry to bother you again!
Many thanks!
feiyi is offline   Reply With Quote

Old   September 30, 2019, 14:47
Default
  #14
New Member
 
cfdjetman
Join Date: Mar 2019
Posts: 25
Rep Power: 7
cfdjetman is on a distinguished road
How do you view the FFD control points along with the mesh?



I know how to view the mesh, just not the FFD control points.
cfdjetman is offline   Reply With Quote

Old   October 9, 2019, 09:24
Default
  #15
Member
 
atelcikti1's Avatar
 
Join Date: Mar 2017
Posts: 61
Rep Power: 9
atelcikti1 is on a distinguished road
Quote:
Originally Posted by cfdjetman View Post
How do you view the FFD control points along with the mesh?



I know how to view the mesh, just not the FFD control points.



Just run your .cfg file with SU2_DEF and it creates FFD box mesh file. You can append FFD mesh into your original mesh in paraview.
atelcikti1 is offline   Reply With Quote

Old   October 11, 2019, 10:12
Default looking for reply
  #16
New Member
 
Yue Zehua
Join Date: Apr 2019
Posts: 10
Rep Power: 7
yuezehua is on a distinguished road
hey xiongdi
you are a zhongguo ren duiba, i am using SU2 too, ruguo you wanna some jiaoliu, lianxi me!
yuezehua@buaa.edu.cn
yuezehua is offline   Reply With Quote

Reply


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
2D FFD Optimization RLangtry SU2 2 August 5, 2014 10:48
Parallel error when doing M6 optimization in Tutorial 9 sxhqjfl SU2 2 January 12, 2014 07:01
Multiple FFD box definition for shape optimization study diwakaranant SU2 1 November 5, 2013 18:46
Problem with FFD-based shape optimization: all gradients are zero praveen SU2 Shape Design 10 October 7, 2013 22:21
COMSOL: optimization applied to a laminar flow tdh89 COMSOL 0 April 30, 2012 09:57


All times are GMT -4. The time now is 09:02.