CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Limit to the amount of FFD boxes? (https://www.cfd-online.com/Forums/su2/149446-limit-amount-ffd-boxes.html)

JanH March 4, 2015 10:36

Limit to the amount of FFD boxes?
 
Hi,

For my master-thesis I am deviding a wing up in multiple spanwise sections and for each section I would like to create a separate FFD-box. However, when I introduce more FFD boxes than 10 I get the "segmentation fault" error while running SU2_DEF in FFD_SETTING mode (regardless of the level I put the FFD boxes in). When I get this error no FFD information is added to the .su2 output mesh.

When I use 10 boxes or less everything works perfectly fine.

Is there a hard limit (10?) to the amount of FFD-boxes introduced to one mesh file?

Thanks in advance,

JanH

awendorff May 12, 2015 16:38

SU2 imposes a limit at "const unsigned int MAX_NUMBER_FFD = 10; /*!< \brief Maximum number of FFDBoxes for the FFD. */" (line 110) in option_structure.hpp inside the Include folder of SU2_Def. You can just go in and change the hard coded limit yourself.

Shreyaskini20 October 14, 2019 05:16

Hi,


I have tried changing the FFD limit as mentioned by Mr. Andrw by editing option_structure.hpp. But I am still getting an error while trying to create more than 10 FFD boxes on a mesh. Could someone please help me out?


Regards
Shreyas

wallym October 15, 2019 18:14

Hi Shreyas,


What error are you getting exactly? I dont know much about the FFD boxes, but may be able to help on the coding side.


Wally

Shreyaskini20 October 16, 2019 08:32

1 Attachment(s)
Hi Wally,


On trying to create more than 10 FFD boxes I am getting the below error message:
Attachment 72797


Regards
Shreyas

wallym October 16, 2019 14:44

Hi Shreyas,

So the code is giving a segfault, which most likely means the MAX_NUMBER_FFD is likely mismatched. How many FFD boxes are you trying to create?


Looking at the develop branch, MAX_NUMBER_FFD = 15 (option_structure.hpp in SU2_CFD/include/). So theoretically you should be able to run 15 FFD boxes.



Are you using the python scripts? There may be some issue with these conflicting.

Sorry I am not more help here.



Wally

Shreyaskini20 October 17, 2019 04:14

Hi Wally,


Yes, theoretically I should be able to create up to 15 FFD boxes. But I am able to create only up to 10 boxes (even though MAX_NUMBER_FFD is set to 15 in option_structure.hpp in SU2_CFD/include/ folder). On trying to create anything more than 10 FFDs, I am getting the error. I even tried increasing the MAX_NUMBER_FFD to 50, but still i am getting the same error.


No, I am not using any python scripts. I am using SU2_DEF to set the FFD boxes. Is there any other way to achieve this? Do you think there is any other location where the FFD limit is set and needs to be changed?



Regards
Shreyas

bmunguia October 17, 2019 12:38

Hi Shreyas,

Could you please post your config file so we can have a look? It's hard to tell from your output where exactly the issue is, so maybe running with valgrind could provide more information.

Looking at the config structure, it looks like the variable nFFDBox is set by both the FFD_DEFINITION and FFD_DEGREE options, so perhaps one of these isn't being set properly and they're defined for different numbers of FFD boxes?

Cheers,
Brian

Shreyaskini20 October 18, 2019 04:41

2 Attachment(s)
Dear Brian,


Sorry, the information I provided was partially incorrect. I was actually trying to create more than 15 FFD's after changing the MAX_NUMBER_FFD to 50 in option_structure.hpp in SU2_CFD/include/ folder.

Below is the config file which I used while trying to create 16 FFD boxes:


% ----------------------- BOUNDARY CONDITION DEFINITION -----------------------%
MARKER_EULER = ( WING_TIP, WING_LOWER, WING_UPPER )
MARKER_FAR = ( WALL_INFLOW, WALL_LOWER, WALL_OUTFLOW, WALL_OUTER, WALL_UPPER )
MARKER_SYM = ( SYMMETRY_PLANE )
MARKER_PLOTTING = ( WING_TIP, WING_LOWER, WING_UPPER )
MARKER_MONITORING = ( WING_TIP, WING_LOWER, WING_UPPER )
MARKER_DESIGNING = ( WING_TIP, WING_LOWER, WING_UPPER )
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
MESH_FILENAME= mesh.su2
MESH_FORMAT= SU2
MESH_OUT_FILENAME= mesh_MBSCB.su2
% -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------%n
FFD_TOLERANCE= 1E-10
FFD_ITERATIONS= 500
FFD_DEFINITION= (SCB1, 2.9, 0, 0.51, 6.45, 0, 0.51, 6.5, 0.7925, 0.5587, 3.2437, 0.7925, 0.5587, 2.9, 0, 0, 6.45, 0, 0, 6.5, 0.7925, 0.08, 3.2437, 0.7925, 0.08); SCB2, 3.243700000000000e+00, 7.925000000000000e-01, 5.587000000000000e-01, 6.500000000000000e+00, 7.925000000000000e-01, 5.587000000000000e-01, 6.550000000000000e+00, 1.585100000000000e+00, 6.075000000000000e-01, 3.587500000000000e+00, 1.585100000000000e+00, 6.075000000000000e-01, 3.243700000000000e+00, 7.925000000000000e-01, 8.000000000000000e-02, 6.500000000000000e+00, 7.925000000000000e-01, 8.000000000000000e-02, 6.550000000000000e+00, 1.585100000000000e+00, 1.600000000000000e-01, 3.587500000000000e+00, 1.585100000000000e+00, 1.600000000000000e-01); (SCB3, 3.587500000000000e+00, 1.585100000000000e+00, 6.075000000000000e-01, 6.550000000000000e+00, 1.585100000000000e+00, 6.075000000000000e-01, 6.600000000000000e+00, 2.377700000000000e+00, 6.562000000000000e-01, 3.931300000000000e+00, 2.377700000000000e+00, 6.562000000000000e-01, 3.587500000000000e+00, 1.585100000000000e+00, 1.600000000000000e-01, 6.550000000000000e+00, 1.585100000000000e+00, 1.600000000000000e-01, 6.600000000000000e+00, 2.377700000000000e+00, 2.400000000000000e-01, 3.931300000000000e+00, 2.377700000000000e+00, 2.400000000000000e-01); (SCB4, 3.931300000000000e+00, 2.377700000000000e+00, 6.562000000000000e-01, 6.600000000000000e+00, 2.377700000000000e+00, 6.562000000000000e-01, 6.650000000000000e+00, 3.170200000000000e+00, 7.050000000000000e-01, 4.275000000000000e+00, 3.170200000000000e+00, 7.050000000000000e-01, 3.931300000000000e+00, 2.377700000000000e+00, 2.400000000000000e-01, 6.600000000000000e+00, 2.377700000000000e+00, 2.400000000000000e-01, 6.650000000000000e+00, 3.170200000000000e+00, 3.200000000000000e-01, 4.275000000000000e+00, 3.170200000000000e+00, 3.200000000000000e-01); (SCB5, 4.275000000000000e+00, 3.170200000000000e+00, 7.050000000000000e-01, 6.650000000000000e+00, 3.170200000000000e+00, 7.050000000000000e-01, 6.700000000000000e+00, 3.962700000000000e+00, 7.538000000000000e-01, 4.618800000000000e+00, 3.962700000000000e+00, 7.538000000000000e-01, 4.275000000000000e+00, 3.170200000000000e+00, 3.200000000000000e-01, 6.650000000000000e+00, 3.170200000000000e+00, 3.200000000000000e-01, 6.700000000000000e+00, 3.962700000000000e+00, 4.000000000000000e-01, 4.618800000000000e+00, 3.962700000000000e+00, 4.000000000000000e-01); (SCB6, 4.618800000000000e+00, 3.962700000000000e+00, 7.538000000000000e-01, 6.700000000000000e+00, 3.962700000000000e+00, 7.538000000000000e-01, 6.750000000000000e+00, 4.755300000000000e+00, 8.025000000000000e-01, 4.962500000000000e+00, 4.755300000000000e+00, 8.025000000000000e-01, 4.618800000000000e+00, 3.962700000000000e+00, 4.000000000000000e-01, 6.700000000000000e+00, 3.962700000000000e+00, 4.000000000000000e-01, 6.750000000000000e+00, 4.755300000000000e+00, 4.800000000000000e-01, 4.962500000000000e+00, 4.755300000000000e+00, 4.800000000000000e-01); (SCB7, 4.962500000000000e+00, 4.755300000000000e+00, 8.025000000000000e-01, 6.750000000000000e+00, 4.755300000000000e+00, 8.025000000000000e-01, 6.800000000000000e+00, 5.547800000000000e+00, 8.512999999999999e-01, 5.306300000000000e+00, 5.547800000000000e+00, 8.512999999999999e-01, 4.962500000000000e+00, 4.755300000000000e+00, 4.800000000000000e-01, 6.750000000000000e+00, 4.755300000000000e+00, 4.800000000000000e-01, 6.800000000000000e+00, 5.547800000000000e+00, 5.600000000000001e-01, 5.306300000000000e+00, 5.547800000000000e+00, 5.600000000000001e-01); (SCB8, 5.306300000000000e+00, 5.547800000000000e+00, 8.512999999999999e-01, 6.800000000000000e+00, 5.547800000000000e+00, 8.512999999999999e-01, 6.850000000000000e+00, 6.340400000000000e+00, 9.000000000000000e-01, 5.650000000000000e+00, 6.340400000000000e+00, 9.000000000000000e-01, 5.306300000000000e+00, 5.547800000000000e+00, 5.600000000000001e-01, 6.800000000000000e+00, 5.547800000000000e+00, 5.600000000000001e-01, 6.850000000000000e+00, 6.340400000000000e+00, 6.400000000000000e-01, 5.650000000000000e+00, 6.340400000000000e+00, 6.400000000000000e-01); (SCB9, 5.650000000000000e+00, 6.340400000000000e+00, 9.000000000000000e-01, 6.850000000000000e+00, 6.340400000000000e+00, 9.000000000000000e-01, 7.054200000000000e+00, 7.012000000000000e+00, 9.833000000000000e-01, 5.870800000000000e+00, 7.012000000000000e+00, 9.833000000000000e-01, 5.650000000000000e+00, 6.340400000000000e+00, 6.400000000000000e-01, 6.850000000000000e+00, 6.340400000000000e+00, 6.400000000000000e-01, 7.054200000000000e+00, 7.012000000000000e+00, 7.325000000000000e-01, 5.870800000000000e+00, 7.012000000000000e+00, 7.325000000000000e-01); (SCB10, 5.870800000000000e+00, 7.012000000000000e+00, 9.833000000000000e-01, 7.054200000000000e+00, 7.012000000000000e+00, 9.833000000000000e-01, 7.258300000000000e+00, 7.683700000000000e+00, 1.066700000000000e+00, 6.091700000000000e+00, 7.683700000000000e+00, 1.066700000000000e+00, 5.870800000000000e+00, 7.012000000000000e+00, 7.325000000000000e-01, 7.054200000000000e+00, 7.012000000000000e+00, 7.325000000000000e-01, 7.258300000000000e+00, 7.683700000000000e+00, 8.250000000000000e-01, 6.091700000000000e+00, 7.683700000000000e+00, 8.250000000000000e-01); (SCB11, 6.091700000000000e+00, 7.683700000000000e+00, 1.066700000000000e+00, 7.258300000000000e+00, 7.683700000000000e+00, 1.066700000000000e+00, 7.462500000000000e+00, 8.355300000000000e+00, 1.150000000000000e+00, 6.312500000000000e+00, 8.355300000000000e+00, 1.150000000000000e+00, 6.091700000000000e+00, 7.683700000000000e+00, 8.250000000000000e-01, 7.258300000000000e+00, 7.683700000000000e+00, 8.250000000000000e-01, 7.462500000000000e+00, 8.355300000000000e+00, 9.175000000000000e-01, 6.312500000000000e+00, 8.355300000000000e+00, 9.175000000000000e-01); (SCB12, 6.312500000000000e+00, 8.355300000000000e+00, 1.150000000000000e+00, 7.462500000000000e+00, 8.355300000000000e+00, 1.150000000000000e+00, 7.666700000000000e+00, 9.026899999999999e+00, 1.233300000000000e+00, 6.533300000000000e+00, 9.026899999999999e+00, 1.233300000000000e+00, 6.312500000000000e+00, 8.355300000000000e+00, 9.175000000000000e-01, 7.462500000000000e+00, 8.355300000000000e+00, 9.175000000000000e-01, 7.666700000000000e+00, 9.026899999999999e+00, 1.010000000000000e+00, 6.533300000000000e+00, 9.026899999999999e+00, 1.010000000000000e+00); (SCB13, 6.533300000000000e+00, 9.026899999999999e+00, 1.233300000000000e+00, 7.666700000000000e+00, 9.026899999999999e+00, 1.233300000000000e+00, 7.870800000000000e+00, 9.698600000000001e+00, 1.316700000000000e+00, 6.754200000000000e+00, 9.698600000000001e+00, 1.316700000000000e+00, 6.533300000000000e+00, 9.026899999999999e+00, 1.010000000000000e+00, 7.666700000000000e+00, 9.026899999999999e+00, 1.010000000000000e+00, 7.870800000000000e+00, 9.698600000000001e+00, 1.102500000000000e+00, 6.754200000000000e+00, 9.698600000000001e+00, 1.102500000000000e+00); (SCB14, 6.754200000000000e+00, 9.698600000000001e+00, 1.316700000000000e+00, 7.870800000000000e+00, 9.698600000000001e+00, 1.316700000000000e+00, 8.074999999999999e+00, 1.037020000000000e+01, 1.400000000000000e+00, 6.975000000000000e+00, 1.037020000000000e+01, 1.400000000000000e+00, 6.754200000000000e+00, 9.698600000000001e+00, 1.102500000000000e+00, 7.870800000000000e+00, 9.698600000000001e+00, 1.102500000000000e+00, 8.074999999999999e+00, 1.037020000000000e+01, 1.195000000000000e+00, 6.975000000000000e+00, 1.037020000000000e+01, 1.195000000000000e+00); (SCB15, 6.975000000000000e+00, 1.037020000000000e+01, 1.400000000000000e+00, 8.074999999999999e+00, 1.037020000000000e+01, 1.400000000000000e+00, 8.279199999999999e+00, 1.104180000000000e+01, 1.483300000000000e+00, 7.195800000000000e+00, 1.104180000000000e+01, 1.483300000000000e+00, 6.975000000000000e+00, 1.037020000000000e+01, 1.195000000000000e+00, 8.074999999999999e+00, 1.037020000000000e+01, 1.195000000000000e+00, 8.279199999999999e+00, 1.104180000000000e+01, 1.287500000000000e+00, 7.195800000000000e+00, 1.104180000000000e+01, 1.287500000000000e+00); (SCB16, 7.195800000000000e+00, 1.104180000000000e+01, 1.483300000000000e+00, 8.279199999999999e+00, 1.104180000000000e+01, 1.483300000000000e+00, 8.483300000000000e+00, 1.171350000000000e+01, 1.566700000000000e+00, 7.416700000000000e+00, 1.171350000000000e+01, 1.566700000000000e+00, 7.195800000000000e+00, 1.104180000000000e+01, 1.287500000000000e+00, 8.279199999999999e+00, 1.104180000000000e+01, 1.287500000000000e+00, 8.483300000000000e+00, 1.171350000000000e+01, 1.380000000000000e+00, 7.416700000000000e+00, 1.171350000000000e+01, 1.380000000000000e+00)
FFD_DEGREE= (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1); (9,4,1)
FFD_CONTINUITY= 2ND_DERIVATIVE
FFD_SYMMETRY_PLANE= YES
% ---------------------- DESIGN VARIABLE PARAMETERS --------------------------%
DV_MARKER= ( WING_TIP, WING_LOWER, WING_UPPER )
DV_KIND= FFD_SETTING
DV_PARAM= 1
DV_VALUE= 0





The terminal result and error was as follows:
Attachment 72836
Here you can see than FFD limit has been correctly changed:
Attachment 72834
Is there any other location where I need to change the limit, in order to be able to create more than 15 FFD boxes?



Regards
Shreyas

pcg October 18, 2019 12:19

Hi Shreyas,

Just to be sure before we try to debug this, did you recompile the code after changing the limit?

Cheers,
Pedro


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