CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ICEM] Script file runs slowly (https://www.cfd-online.com/Forums/ansys-meshing/181078-script-file-runs-slowly.html)

macfly December 6, 2016 14:38

Script file runs slowly
 
Hi,

I run a script that creates hundreds of surfaces with the command ic_surface 4pts:
Code:

ic_geo_new_family SURFACES
ic_surface 4pts SURFACES surf.0001 {{0.2500 0.3000 0.2500} {0.2500 0.5000 0.2500} {0.2500 0.5000 0.9080} {0.2500 0.3000 0.9080}}
ic_surface 4pts SURFACES surf.0002 {{1.7680 0.3000 0.2500} {1.7680 0.5000 0.2500} {1.7680 0.5000 0.9080} {1.7680 0.3000 0.9080}}
ic_surface 4pts SURFACES surf.0003 {{0.2500 0.5000 0.2500} {0.2500 0.7000 0.2500} {0.2500 0.7000 0.9080} {0.2500 0.5000 0.9080}}
...
...
...

The script runs fast at the beginning but it slows down as the number of surfaces grows. At some point it gets very slow, it can take 1 second to generate a single surface. It's like ICEM is clogging up as more and more surfaces are created. My CPU or memory use doesn't increase, the problem seems to be within ICEM.
Is there a way to 'unclog' ICEM when running a large script file?

Antanas December 7, 2016 00:06

Quote:

Originally Posted by macfly (Post 628540)
Hi,

I run a script that creates hundreds of surfaces with the command ic_surface 4pts:
Code:

ic_geo_new_family SURFACES
ic_surface 4pts SURFACES surf.0001 {{0.2500 0.3000 0.2500} {0.2500 0.5000 0.2500} {0.2500 0.5000 0.9080} {0.2500 0.3000 0.9080}}
ic_surface 4pts SURFACES surf.0002 {{1.7680 0.3000 0.2500} {1.7680 0.5000 0.2500} {1.7680 0.5000 0.9080} {1.7680 0.3000 0.9080}}
ic_surface 4pts SURFACES surf.0003 {{0.2500 0.5000 0.2500} {0.2500 0.7000 0.2500} {0.2500 0.7000 0.9080} {0.2500 0.5000 0.9080}}
...
...
...

The script runs fast at the beginning but it slows down as the number of surfaces grows. At some point it gets very slow, it can take 1 second to generate a single surface. It's like ICEM is clogging up as more and more surfaces are created. My CPU or memory use doesn't increase, the problem seems to be within ICEM.
Is there a way to 'unclog' ICEM when running a large script file?

Maybe it's because of drawing?

Kapi December 7, 2016 00:15

Ansys can handle given number of edges and faces at a given time which has improved considerably over the years with every new update.

I would suggest you to break your script in multiple parts and run it.
Also if you are doing like named selection and selecting all the faces you want and in exceeds certain limit then you should re-think that as well and break in into multiple named selection.

You can see when it is selection faces and edges in the bar below, mark after how many faces or edges it is slowing down and you can use that as number.

personally I dont have any trouble handling 4K+ faces at a given time with Ansys 17

macfly December 7, 2016 02:51

Quote:

Originally Posted by Kapi (Post 628582)
I would suggest you to break your script in multiple parts and run it.

You mean break my script into multiple scripts? Load part 1 of the script, run it, then load part 2 of the script, run it, and so on..? I had thought of that but didn't try yet.

bluebase December 7, 2016 08:49

Quote:

Originally Posted by macfly (Post 628596)
You mean break my script into multiple scripts? Load part 1 of the script, run it, then load part 2 of the script, run it, and so on..? I had thought of that but didn't try yet.

Make sure, you don't record the commands when you run a script.



Another option is to run your script in batch mode. Just add a few commands that the script will save the geometry. To run icem in batchmode you have to start it from command line in the following structure "icemcfd -batch -script myscript.tcl". Then you may avoid all the drawing necessary, which might have slowed down your script.

With regards,
Sebastian

Kapi December 7, 2016 17:53

yes Macfly,

thats exactly what I mean.
I break my model in different set of bodies.
Draw them all thru different script via batch file one after other.

give it a go and see how it pans out for ya!


All times are GMT -4. The time now is 21:29.