x

ADONIS:
Version 3.90.9 (Released at 10/19/2024)
- Minor bugs in mesh generation module has been fixed.
- Gmsh is upgraded to version 4.13.1.

HYRCAN:
Version 2.0.18 (Released at 10/26/2024)
- Minor bug in translation has been fixed.
- Minor bug in geometry creation is fixed.


'Bad geometry' problem and others(Read 9194 times)
'Bad geometry' problem and others on: March 30, 2023, 10:09:24 am
Hi there!

I found that the following script causes the ''Bad geometry' error, and there will be no result.
Code: [Select]
extboundary(0.000000,-1.000000, 0.000000,-15.297441, -30.358104,-15.297441, -30.358104,9.153238, -29.670000,8.962559, -29.240000,8.822559, -25.358104,8.147809, -24.655281,7.679260, -24.460281,7.029260, -23.700281,7.029260, -23.505281,7.679260, -23.005281,7.829260, -21.005281,7.802514, -20.622517,7.772628, -20.247428,7.690708, -19.887050,7.558307, -19.548142,7.377909, -19.237060,7.152896, -16.701585,5.040000, -15.701585,5.000000, -14.705167,4.169652, -12.260973,0.677946, -11.950000,0.056000, -11.450000,0.036000, -11.250000,-0.434000, -10.910251,-1.232410, -9.700000,-1.184000, -9.200000,-1.164000, -8.700000,-1.154000, -5.100000,-1.082000, -1.500000,-1.010000, -1.000000,-1.000000, 0.000000,-1.000000)
matboundary(-30.358104,5.653238, -29.670000,5.462559, -29.240000,5.322559, -24.580000,4.512559, -24.310000,4.352559, -22.070000,4.312559, -19.950000,4.292559, -17.790000,4.292559, -17.650000,4.272559, -15.500000,4.162559, -14.702853,4.166346)
matboundary(-30.358104,2.153238, -29.670000,1.962559, -29.240000,1.822559, -24.580000,1.012559, -24.310000,0.852559, -22.070000,0.812559, -19.950000,0.792559, -17.790000,0.792559, -17.650000,0.772559, -15.500000,0.662559, -12.260973,0.677946)

I tried to input the command line by line, and the error message appeared after inputting the second material boundary. However, if I change the sequence of the two material boundary commands, no error message appears, and the analysis works. I wonder why this happens. Is there anything wrong with the command or any bug in the tool?


In addition, I met the following two small problems.
1. I used Python to carry out batch analyses. I used 'hy.min_fos' to extract the FOS for each analysis and wrote that to an EXCEL file, following the instructions in tutorial 09. However, when there is an error in the analysis, the value extracted by 'hy.min_fos' will repeat the last analysis FOS. This happens for errors like 'bad geometry' and 'EXTERNAL BOUNDARY cannot cross itself'. When the error is 'No valid slip surface with the lowest factor of safety could be determind!' (<--btw, it seems a typo here), the extracted FOS value will be '#NULL!'. Is it possible to write '#NULL' as the FOS value for all the analyses with errors?
2. As described above, I used Python to carry out batch analyses. I used 'compute('silence')' to avoid the result pop-up window. However, Some error messages, e.g., 'bad geometry' and 'External boundary is nonconvex....', still pop up during the analysis. But some other messages will not pop up if I use 'compute('silence')', e.g., 'No valid slip surface with the lowest factor of safety could be determind!'.  Is it possible to mute all the error messages if 'compute('silence')' is used? Maybe the error message can be shown in the command line or just show no result for the analysis, and the actual error message can appear by running with 'compute()'.

Thanks!

Best,
Zoe




Re: 'Bad geometry' problem and others Reply #1 on: March 30, 2023, 11:11:09 am
Hi,

thanks for the comments. I think there is a bug in the program that need to be fixed. I temporarily switched the second and third lines and for some reason this runs without issue (take a look at attached script).  Meanwhile I'll try to figure out the issue.

regarding the silence mode, logically when there is a bad geometry error everything should stop until it gets fixed since rest of the script is going to be meaningless. The silence mode during python scripting is valid during the computation only not creating the model itself. Currently, users need to make sure model is valid before getting into computation. For now this the rule until I find a solution for this big change in the future.

-Roozbeh



Re: 'Bad geometry' problem and others Reply #2 on: March 30, 2023, 09:38:22 pm
Hi,

Bad geometry bug is fixed in the latest version (i.e. 2.0.10). Thanks a gain for the comment.

-Roozbeh



Re: 'Bad geometry' problem and others Reply #3 on: April 02, 2023, 06:46:46 am
Hello Roozbeh,

Thanks a lot for fixing the bug!