CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [ICEM] Exporting Grid Volumes/Areas from ICEM to Calculate Discretization Error (

Josh May 18, 2010 14:12

Exporting Grid Volumes/Areas from ICEM to Calculate Discretization Error
Hi -

I'm trying to calculate the discretization error of my CFD simulations using Richardson's method as outlined in the Journal of Fluids Engineering:

I created my "2D" (one element deep) structured mesh using ICEM 12. If you observe Equation 2 (fourth page of the above link), you'll see that a representative cell size is required. Basically, I need the following parameters to solve the equation:

N = total number of cells
Ai = area of each cell (the i'th cell)
Vi = volume of each cell

I know how to get N, but I don't know how to export a file from ICEM with the area (or volume) of each cell.

Is it possible to export a file from ICEM with the volume of each cell? If so, how?

Thanks for any help!

PSYMN May 19, 2010 12:05

There are diagnostics that create a historgram for a property such as volume, but I don't know how to do exactly what you want. I will look into it and get back to you...

Josh May 19, 2010 19:48

Thanks, as always, Simon.

PSYMN May 20, 2010 11:58

Not sure how comfortable you are with scripting, but I think it will be the only way to produce a file with this info for each element.

You will need to look into the programmers guide and tcl scripting in general, but I asked one of my friendly neighborhood developers (actually he is on a different continent) for some tips and he sent me this...

At least it looks easy for the surface elements.


There exists 2 commands to get volume/area information.

set area [ic_uns_area $subset_name]
set vol [ic_uns_volume $subset_name]

What the user needs to do is to create a subset ($subset_name) for each element in the mesh and to write this information into a file.

The following existing ic_ command writes the area information (only for shell elements) into a file:

ic_uns_write_elem_list all ./my_file_name

Output format of the file is

"element number" "area" "element node numbers"

Hope that helps a little.

Josh May 20, 2010 13:40

Thanks, Simon. Chances are I'll never get around to doing this, but it's good to have this as a reference should I have the time to try it.

All times are GMT -4. The time now is 16:10.