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] Exporting Grid Volumes/Areas from ICEM to Calculate Discretization Error (http://www.cfd-online.com/Forums/ansys-meshing/76229-exporting-grid-volumes-areas-icem-calculate-discretization-error.html)

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:
http://journaltool.asme.org/Template...umAccuracy.pdf

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)
or...
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

Hmm...
 
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

Scripting...
 
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.

Enjoy...

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.
Jari

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 12:22.