CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Has anyone made a success with the 2D FFD optimization? (https://www.cfd-online.com/Forums/su2/158643-has-anyone-made-success-2d-ffd-optimization.html)

feiyi August 31, 2015 07:17

Has anyone made a success with the 2D FFD optimization?
 
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!

hlk September 3, 2015 10:58

Quote:

Originally Posted by feiyi (Post 561759)
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)

feiyi September 6, 2015 00:13

Thanks for the answer!
 
4 Attachment(s)
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

hlk September 6, 2015 10:23

Quote:

Originally Posted by feiyi (Post 562590)
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.

feiyi September 7, 2015 06:31

Thanks for the answer!
 
3 Attachment(s)
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 September 10, 2015 22:52

Can anyone help?

feiyi September 10, 2015 22:54

Quote:

Originally Posted by hlk (Post 562623)
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!

hlk September 13, 2015 14:00

Quote:

Originally Posted by feiyi (Post 563417)
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.

feiyi September 14, 2015 04:58

5 Attachment(s)
Quote:

Originally Posted by hlk (Post 563757)
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 : 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!

hlk September 14, 2015 11:51

Quote:

Originally Posted by feiyi (Post 563833)
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.

feiyi September 15, 2015 11:06

5 Attachment(s)
Quote:

Originally Posted by hlk (Post 563914)
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 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!

hlk September 15, 2015 13:34

Quote:

Originally Posted by feiyi (Post 564096)
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?

feiyi September 16, 2015 00:48

Quote:

Originally Posted by hlk (Post 564126)
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!

cfdjetman September 30, 2019 14:47

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.

atelcikti1 October 9, 2019 09:24

Quote:

Originally Posted by cfdjetman (Post 745902)
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.

yuezehua October 11, 2019 10:12

looking for reply
 
hey xiongdi
you are a zhongguo ren duiba, i am using SU2 too, ruguo you wanna some jiaoliu, lianxi me!
yuezehua@buaa.edu.cn


All times are GMT -4. The time now is 10:50.