CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Ffd_control_point_2d (https://www.cfd-online.com/Forums/su2/156930-ffd_control_point_2d.html)

feiyi July 15, 2015 11:51

Ffd_control_point_2d
 
4 Attachment(s)
Hello everyone,
I used the FFD_CONTROL_POINT_2D method to perform a mesh deformation,but the output mesh is disordered.
I used the version SU2-4.0.000-Windows-x64-Single-Threaded.exe.



I set the FREE-FORM DEFORMATION PARAMETERS like this:

%
% Tolerance of the Free-Form Deformation point inversion
FFD_TOLERANCE= 1E-10
%
% Maximum number of iterations in the Free-Form Deformation point inversion
FFD_ITERATIONS= 500
%
% FFD box definition: 2D case (FFD_BoxTag, X1, Y1, 0.0, X2, Y2, 0.0, X3, Y3, 0.0, X4, Y4, 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)
FFD_DEFINITION= ( wing, 0.0, -0.8, 0.0, 1, -0.8, 0.0, 1, 0.8, 0.0, 0.0, 0.8, 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))

% FFD box degree: 2D case (x_degree, y_degree, 0)
FFD_DEGREE= (25, 1, 0)
% Surface continuity at the intersection with the FFD (1ST_DERIVATIVE, 2ND_DERIVATIVE)
FFD_CONTINUITY= 1ST_DERIVATIVE







Here is the output FFD_CONTROL_POINTS for FFD_BOx
FFD_CONTROL_POINTS= 104
0 0 0 0 -0.8 -0.5
0 0 1 0 -0.8 0.5
0 1 0 0 0.8 -0.5
0 1 1 0 0.8 0.5
1 0 0 0.04 -0.8 -0.5
1 0 1 0.04 -0.8 0.5
1 1 0 0.04 0.8 -0.5
1 1 1 0.04 0.8 0.5
2 0 0 0.08 -0.8 -0.5
2 0 1 0.08 -0.8 0.5
2 1 0 0.08 0.8 -0.5
2 1 1 0.08 0.8 0.5
3 0 0 0.12 -0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 0.8 -0.5
16 1 1 0.64 0.8 0.5
17 0 0 0.68 -0.8 -0.5
17 0 1 0.68 -0.8 0.5
17 1 0 0.68 0.8 -0.5
17 1 1 0.68 0.8 0.5
18 0 0 0.72 -0.8 -0.5
18 0 1 0.72 -0.8 0.5
18 1 0 0.72 0.8 -0.5
18 1 1 0.72 0.8 0.5
19 0 0 0.76 -0.8 -0.5
19 0 1 0.76 -0.8 0.5
19 1 0 0.76 0.8 -0.5
19 1 1 0.76 0.8 0.5
20 0 0 0.8 -0.8 -0.5
20 0 1 0.8 -0.8 0.5
20 1 0 0.8 0.8 -0.5
20 1 1 0.8 0.8 0.5
21 0 0 0.84 -0.8 -0.5
21 0 1 0.84 -0.8 0.5
21 1 0 0.84 0.8 -0.5
21 1 1 0.84 0.8 0.5
22 0 0 0.88 -0.8 -0.5
22 0 1 0.88 -0.8 0.5
22 1 0 0.88 0.8 -0.5
22 1 1 0.88 0.8 0.5
23 0 0 0.92 -0.8 -0.5
23 0 1 0.92 -0.8 0.5
23 1 0 0.92 0.8 -0.5
23 1 1 0.92 0.8 0.5
24 0 0 0.96 -0.8 -0.5
24 0 1 0.96 -0.8 0.5
24 1 0 0.96 0.8 -0.5
24 1 1 0.96 0.8 0.5
25 0 0 1 -0.8 -0.5
25 0 1 1 -0.8 0.5
25 1 0 1 0.8 -0.5
25 1 1 1 0.8 0.5











Then in the optimization

GEO_MARKER= ( airfoil )
DV_KIND= FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D, FFD_CONTROL_POINT_2D
DV_MARKER= ( airfoil )
DV_PARAM= ( wing, 1.0, 0.0, 0.0, 1.0) ; ( wing, 2.0, 0.0, 0.0, 1.0) ; ( wing, 3.0, 0.0, 0.0, 1.0) ; ( wing, 4.0, 0.0, 0.0, 1.0) ; ( wing, 5.0, 0.0, 0.0, 1.0) ; ( wing, 6.0, 0.0, 0.0, 1.0) ; ( wing, 7.0, 0.0, 0.0, 1.0) ; ( wing, 8.0, 0.0, 0.0, 1.0) ; ( wing, 9.0, 0.0, 0.0, 1.0) ; ( wing, 10.0, 0.0, 0.0, 1.0) ; ( wing, 11.0, 0.0, 0.0, 1.0) ; ( wing, 12.0, 0.0, 0.0, 1.0) ; ( wing, 13.0, 0.0, 0.0, 1.0) ; ( wing, 14.0, 0.0, 0.0, 1.0) ; ( wing, 15.0, 0.0, 0.0, 1.0) ; ( wing, 16.0, 0.0, 0.0, 1.0) ; ( wing, 17.0, 0.0, 0.0, 1.0) ; ( wing, 18.0, 0.0, 0.0, 1.0) ; ( wing, 19.0, 0.0, 0.0, 1.0) ; ( wing, 20.0, 0.0, 0.0, 1.0) ; ( wing, 21.0, 0.0, 0.0, 1.0) ; ( wing, 22.0, 0.0, 0.0, 1.0) ; ( wing, 23.0, 0.0, 0.0, 1.0) ; ( wing, 24.0, 0.0, 0.0, 1.0) ; ( wing, 25.0, 0.0, 0.0, 1.0) ; ( wing, 1.0, 1.0, 0.0, 1.0) ; ( wing, 2.0, 1.0, 0.0, 1.0) ; ( wing, 3.0, 1.0, 0.0, 1.0) ; ( wing, 4.0, 1.0, 0.0, 1.0) ; ( wing, 5.0, 1.0, 0.0, 1.0) ; ( wing, 6.0, 1.0, 0.0, 1.0) ; ( wing, 7.0, 1.0, 0.0, 1.0) ; ( wing, 8.0, 1.0, 0.0, 1.0) ; ( wing, 9.0, 1.0, 0.0, 1.0) ; ( wing, 10.0, 1.0, 0.0, 1.0) ; ( wing, 11.0, 1.0, 0.0, 1.0) ; ( wing, 12.0, 1.0, 0.0, 1.0) ; ( wing, 13.0, 1.0, 0.0, 1.0) ; ( wing, 14.0, 1.0, 0.0, 1.0) ; ( wing, 15.0, 1.0, 0.0, 1.0) ; ( wing, 16.0, 1.0, 0.0, 1.0) ; ( wing, 17.0, 1.0, 0.0, 1.0) ; ( wing, 18.0, 1.0, 0.0, 1.0) ; ( wing, 19.0, 1.0, 0.0, 1.0) ; ( wing, 20.0, 1.0, 0.0, 1.0) ; ( wing, 21.0, 1.0, 0.0, 1.0) ; ( wing, 22.0, 1.0, 0.0, 1.0) ; ( wing, 23.0, 1.0, 0.0, 1.0) ; ( wing, 24.0, 1.0, 0.0, 1.0) ; ( wing, 25.0, 1.0, 0.0, 1.0)
DV_VALUE= 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0499395905431, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0500021620299
DEFORM_LINEAR_ITER= 500
DEFORM_NONLINEAR_ITER= 1
DEFORM_CONSOLE_OUTPUT= YES
DEFORM_TOL_FACTOR= 0.001
DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME
VISUALIZE_DEFORMATION= YES


MESH_FILENAME= NACA0012_FFD.su2
MESH_FORMAT= SU2
MESH_OUT_FILENAME= NACA0012_FFD_deform.su2

OUTPUT_FORMAT= TECPLOT

DEFINITION_DV= ( 15 , 1.0 | airfoil | wing , 1.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 2.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 3.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 4.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 5.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 6.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 7.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 8.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 9.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 10.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 11.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 12.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 13.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 14.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 15.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 16.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 17.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 18.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 19.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 20.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 21.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 22.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 23.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 24.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 25.0 , 0.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 1.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 2.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 3.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 4.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 5.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 6.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 7.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 8.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 9.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 10.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 11.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 12.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 13.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 14.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 15.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 16.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 17.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 18.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 19.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 20.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 21.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 22.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 23.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 24.0 , 1.0 , 0.0 , 1.0 ); ( 15 , 1.0 | airfoil | wing , 25.0 , 1.0 , 0.0 , 1.0 )
DV_VALUE_NEW= 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0499395905431, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0506394149025, 0.0500021620299
DV_VALUE_OLD= 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, 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, 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, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0






I got a disordered mesh.I show the result in the image.

The original mesh and deformed mesh
Attachment 40849,

The original surface
Attachment 40851,

The deformed surface
Attachment 40852,

The original mesh and FFD_BOX
Attachment 40853


Any sort of help would be appreciated.
Thanks in advance.

hlk July 16, 2015 15:58

That is some odd behavior.
A few things to try that might narrow down the problem, in no particular order:

- deform a single control point and view the output mesh as well as the deformed ffd box. (aka, use SU2_DEF and a config file with settings similar to what appear in the automatically generated config file from the optimization, but with one design variable instead of many )
- push the bounds of the box just outside the chord - aka [-0.1, 1.1] instead of [0,1] to eliminate any issues with the box intersecting the geometry.
- move the control points closer to the geometry (why +/- 0.8? )

Things that might help with the volume mesh but only after the surface deformation is fixed:
- change the deformation settings: aka, try CONSTANT_STIFFNESS or WALL_DISTANCE instead of INVERSE_VOLUME.
- view the deformation output: if the residual is not decreasing by several orders of magnitude, decrease the tolerance and/or increase the number of iterations used by the deformation. You might have to change a config file setting to output the residuals during the deformation. If it is "solved" on the first step, that usually means no deformation was applied.

louisdf May 16, 2017 13:05

1 Attachment(s)
Hi there,

I am having experiencing a similar behavior (with spikes all across the place), with 3D meshes. Did you find any solution?

I believe the problem comes from when SU2_DEF is executed with DV_KIND = FDD_SETTING, and generates the new .su2 mesh, with the FDD box definition at the end. If I use the meshes with the FDD definitions, then any CONTROL_POINT deformation goes nicely, but if I try to generate myself the FDD boxes, then it just makes a big mess.

I have found that using test cases and also custom meshes: I have tried with the files from the test cases (for instance deformation/brick_prism) and my own geometries. The test cases work fine with the mesh provided, but if I remove the end that defines the FFD boxes, and re-generate it using SU2_DEF with DV_KIND = FDD_SETTING, it does not.

(I am using V5.0 by the way).

I you have any idea, it would be most than helpful, thanks in advance!

Louis

louisdf May 17, 2017 09:41

Hi again,

I have found a workaround concerning my issue (described in the previous message), and although it is certainly not the best way to do it, I'll still describe it, perhaps someone will find it useful.

So, I have tried different versions of SU2 (V5.0, V4.1, V4.0, V3.2.9 and V3.2.0). The only way I managed to make it work it to use V3.2.0 to generate the mesh with the FFD information (doing like it is shown in the pointwise-su2 videos on the supersonic aircraft - adding the description of the boxes at the end of the mesh file, then running SU2_DEF with DV_KIND = SETTING).

The issues seems to come from negative volumes; however with V3.2.0 I still got the warnings that I have negative volumes, but for some reason it still works (and it doesn't with 3.2.9 if I recall my experiments correctly).

Then, I used the newly generated mesh on a newer version of SU2 (because I need functionnalities that are not available in V3). However. it appears that from V4.3 onwards the definition for the FFD in the mesh file changes - when I tried to open the mesh with ffd information generated with V3.2.0, I got an error saying that the ffd data was not compatible, that I should generate it with 4.3+.

So, in the end, I'm working with V3.2.0 AND V4.1.1 installed (under Windows 7), and I am using V3.2.0 to generate the ffd data, and V4.1.1 to do the rest.

It works, but it's quite ugly indeed :/ Anyway, if I find the way to generate the ffd boxes with a newer version, I'll edit this post.

cfdjetman September 30, 2019 13:42

How did you manage to visualize the FFD box in your figure FFD_BOX.jpg?


All times are GMT -4. The time now is 08:05.