|
[Sponsors] |
[ANSYS Meshing] Writing a Code for meshing in ICEM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 26, 2012, 19:21 |
Writing a Code for meshing in ICEM
|
#1 |
Senior Member
david
Join Date: Oct 2012
Posts: 142
Rep Power: 13 |
Hello,
I am just about to undertake a huge task in terms of meshing. I am meshing a city. That's a lot of curves! I was wondering if there was a way to input in a code where you tell ICEM for example, I want x number of nodes on a curve of x metres. If I can do this, it will make life a whole lot merrier. Many thanks in advance. |
|
October 27, 2012, 10:27 |
|
#2 |
Senior Member
Stuart Buckingham
Join Date: May 2010
Location: United Kingdom
Posts: 267
Rep Power: 25 |
If you want x number of nodes on ALL curves, try this:
set no_nodes 20 foreach curves [ic_geo_get_objects curve ""] {ic_set_meshing_params curve $curves emax [expr "[ic_geo_crv_length $curves] / ($no_nodes - 1)"] emin 0 ehgt 0 edev 0 hrat 0 ] } If you just want all curves to have a max size of x meters, try this: set max_size 0.1 foreach curves [ic_geo_get_objects curve ""] {ic_set_meshing_params curve $curves emax $max_size emin 0 ehgt 0 edev 0 hrat 0 ] } Obviously the first line in both codes is just the variable to be set, change it to whatever you need. Stu |
|
October 29, 2012, 18:35 |
|
#3 |
Senior Member
david
Join Date: Oct 2012
Posts: 142
Rep Power: 13 |
Thanks, Stu. I will give it a go. Hopefully it will work.
|
|
October 29, 2012, 19:13 |
|
#4 |
Senior Member
david
Join Date: Oct 2012
Posts: 142
Rep Power: 13 |
Hi Stu,
I loaded your script file for a simple 3d cube inside of a cube and it didnt work. It worked only for 2 curves. Is there anything else I need to do? I've uploaded the picture of the mesh.the outer box complied with your code but the inner one does not for some reason Last edited by davidwilcox; October 30, 2012 at 01:22. |
|
November 26, 2012, 03:29 |
ICEM SCRIPT no curve found
|
#5 |
Senior Member
david
Join Date: Oct 2012
Posts: 142
Rep Power: 13 |
Hi Stu,
Thanks for your help. One more question. If let's say I have a curve named "oval", how do I put that into a command script in icem to let that curve have 20 nodes? I have tried many ways but I always get an error saying " no curve named "oval". I am confused because I named a curve in my geometry oval but the ICEM script could not recognize it. Any suggestions? Many thanks in advance. |
|
November 26, 2012, 13:59 |
|
#6 |
Senior Member
Stuart Buckingham
Join Date: May 2010
Location: United Kingdom
Posts: 267
Rep Power: 25 |
David,
How did you create the curve? I use the following command to create a line: ic_curve FAMILY_NAME CURVE_NAME {point_name_1 point_name_2} For an oval, you might have to do a B-spline (or stretch a circle) Using the command line implicitly creates the curve with the specified name. I am not sure how you have named your curves though. To check the names, right click on lines under geometry and click "show names" Good Luck Stu |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PEM Fuel cell module meshes. ICEM vs workbench | aarvay | FLUENT | 24 | March 2, 2020 06:50 |
Design Modeler to ICEM..... | Joe | CFX | 0 | January 24, 2008 03:39 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 15:56 |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 08:10 |
own Code vs. commercial code | Bernhard Mueck | Main CFD Forum | 10 | February 16, 2000 10:07 |