Exporting cdb-File

Hey,
I want to export a mesh as an cdb-file, but the wrong global-element-ids are assigned to the regions “design_ind” and “design_air”

In more Detail:
I wrote an python-script, which choice arbitrary elements from the group “design_domain” and assign that to the variable “design_ind”. The difference between the “design_domain” and “design_ind” gets stored in “design_air”.

Group “design_ind” and “design_air” is used to create the blocks with the same name. After this procedure, the updated Trelis-file is exported to an cdb-File.

But, comparing the Element-Numbers in the cdb-File with the Element-Numbers in the Trelis-file, different ids are assigned for the block/group “design_air” and “design_ind”

Below I upload the python-script and the input-Trelis-file.

Best regards
Andreas

GA_trelis.py (2.8 KB) mesh_design_2d.trelis (96.6 KB)

I haven’t looked at your specific code yet. However, I noticed that in the simple case I gave you with two cubes, the element numbering appeared to be correct.

I will look at your python file tomorrow.

Karl

Hi Andreas,

I can confirm that there is an issue here. The element ids in the cdb file are not being assigned to the elementid correctly. I would expect that using the command

label face elementid

would give the same ids as in the export file. This is a bug. I will create a bug report and get back to you on this issue.

I note that a trivial case.

reset
create surf rectangle width 10
surf 1 int 5
mesh surf 1
block 1 surf 1
block 1 element type quad
export ansys cdb ‘junk.cdb’ over
label face elementid
draw face all

Seems to work correctly. Setting duplicate block elements on also seems to work in the trivial case.

reset
create surf rect width 10
surf 1 int 5
mesh surf 1
set duplicate block elements on
block 1 surf 1
block 2 face 1 to 5
block 1 element type quad
block 2 element type quad
export ansys cdb ‘junk.cdb’ over
label face elementid
draw face all

I have looked at this further. It looks like the correct elements are being placed in the randomly generated block. The element ids output to the cdb file are sequentially generated. If I look at one of your generated meshes, The cdb file always has elements 66 to 71 as the design_ind block elements.

image

If I export this mesh to Exodus and then re-import it, the correct elements are assigned to the block and Exodus preserves the global ids.

image

We currently do not have the option to export the cdb file using the global element ids.

Hey Karl,

thanks for your response and your help.

Let me know if you have any news.

Best regards
Andreas