CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (http://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ICEM] Problem in geometry creation by script (http://www.cfd-online.com/Forums/ansys-meshing/73514-problem-geometry-creation-script.html)

lavoz March 10, 2010 07:54

Problem in geometry creation by script
 
1 Attachment(s)
Dear Forum,

I'm trying to set up a geometry by script and ran into a problem when I tried to create surfaces by "4 Points". A small example, where the first surface is created and the second one isn't:

ic_geo_new_family INT_Z-F
ic_surface 4pts INT_Z-F srf.03 {POINTS.03 POINTS.04 POINTS.08 POINTS.07}
ic_surface 4pts INT_Z-F srf.04 {POINTS.02 POINTS.03 POINTS.07 POINTS.06}

Through the entire script, the first few surface creations run smoothly, but now and then, though giving the hopefully correct and exactly same command once more, nothing happens. And no error message is plotted, there's just no new surface.

To make it funnier, it doesn't happen everytime, only when ICEM was just started anew. And the problem goes away, when I mess around a little bit with the view in the model tree.

By the way, I couldn't find a possibility to create surfaces of more than 4 points or curves, icem always complains and does nothing or creates ugly surfaces...

I'd really appreciate any help very much.

PSYMN March 11, 2010 19:50

Hmm?
 
Yes, surfaces 4, 5, 7, 8 and 10 were missing when I ran it the first time...

Perhaps you are missing some initialization stuff...

Try recording a live session where you create points and surfaces... Do you see any extra initialization commands that you may want to include?

I will ask around here and see if I get any good feedback...

lavoz March 12, 2010 08:54

solved
 
First of all, thank you for your answer Mr. Pereira.

The problem wasn't in the script, and it took me a while to get it, but it's simply the magnitude of the variable input. ICEM has problems with surfaces, that are too small. I thought of a hundred else things but this is a little bit uncommon.

The script I attached above is working, when you change the sizes of the input values to a higher magnitude. In any other case you'd have to use a real workaround.

Anorky March 12, 2010 09:35

Hi lavoz,

I have been playing around with your script.
Indeed the problem was the small values you used as input for your variables.
One way indeed is to increase them to a higher value however there is another way around.
If you want to use your original input values, put the following code in the beginning of your script:

ic_set_meshing_params global 0
ic_undo_group_begin
ic_set_meshing_params global 0 gttol 0.001 gtrel 1
ic_regenerate_tris
ic_undo_group_end

Or manually set the model topo tolerance to a lower value.
Go to settings>model>topo tolerance
The value 2e-06 worked for me.

If you don't do this and you run the original script the value is 2e-05.

Anyway resetting the model topo tolerance and recording the action in the replay window will result in the code above.

Good luck,

lavoz March 12, 2010 10:56

Thanks
 
Thank you Anorky, for this smoother solution.


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