Choose the order of a meshing surface

Moderator: GiD Team

Post Reply
VictorDesloges
Posts: 4
Joined: Thu Jan 20, 2022 3:05 pm

Choose the order of a meshing surface

Post by VictorDesloges »

Hello to all,

I am currently working with GID and more particularly on surface meshes. However, I have a problem: when I create the mesh, the nodes created in a surface are not consecutive (see screenshot below). Does anyone know how I can force the mesh to create consecutive points on this surface? I want to be able to define this surface with a "continuous" range of points.

Thanks in advance for your answers!

Image
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Choose the order of a meshing surface

Post by escolano »

Nodes are renumbered at the end of the mesh generation with different algorithms, depending on the value of the GiD variable
RenumberMethod

https://gidsimulation.atlassian.net/wik ... processing

but in fact the kind of numeration that do you want (consecutive on each surface) is in general not possible, because nodes are shared between neighbor surfaces, then the id for a surface could be incompatible with the id for other surface

In any case, independently of the numeration, you can know the nodes of each surface with different approaches. e.g.

a) -you can create a group by surface, and then the nodes will inherit the same group

b)- with a problemtype you can assign to the surfaces a condition with a special question field #FUNC#(NumEntity)
QUESTION: Surface_number#FUNC#(NumEntity)
VALUE: 0

that will be automatically filled with the source surface number
https://gidsimulation.atlassian.net/wik ... +file+.cnd

c) In next GiD 15.1.5d developer version (available in few days) as new the geometric entities will store its mesh entities, and then could ask (without the tricky probemtype condition) for the id of the geometry, with this GiD-Tcl scripting commands:

know the geometry of an element:
GiD_Mesh get element <element_id> geometry_source
(and can also ask for the element's nodes, to know the list of nodes of a surface)

know the mesh of a surface
GiD_Geometry get surface <surface_id> mesh
VictorDesloges
Posts: 4
Joined: Thu Jan 20, 2022 3:05 pm

Re: Choose the order of a meshing surface

Post by VictorDesloges »

Hello Escolano,

Thank you very much for your answer. I have, for the moment, manually typed the coordinates of the nodes and cells corresponding to my surface, but your idea works too. In the future I will have another problem because I will have to look at surfaces that are not the same but belong to the same layer. Do you know if it is possible to export in the same way as "Files/Export/Text data report ...", a file that would allow me to obtain the same formalism as this export (i.e. the coordinates of the nodes under "MESH dimension 3 ElemType Quadrilateral Nnode 8" in the text file for example), the list of cells belonging to a layer?

Thanks in advance for your answer and have a nice day!
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Choose the order of a meshing surface

Post by escolano »

the Files/Export/Text data report
is not printing the layer information for mesh elements or nodes,

but you can have it in multiple ways
e.g.
can write a trivial element_layers.bas template file to print in a file what you want, copied in the folder <GiD>/templates

Code: Select all

*loop elems
*elemsnum *ElemsLayerNum
*end elems
(or *ElemsLayerName if do you prefer the string name of the layer)

and to export go to menu
Files->Export->Using template bas->element_layers (the name you used for your template)

or add the .bas template to your problemtype, if do you have a problemtype (each .bas will create a .dat output file when calculating)
https://gidsimulation.atlassian.net/wik ... late+files

You can also ask the list of ids of the elements of a layer with the Tcl command

Code: Select all

set element_ids [GiD_EntitiesLayers get $layername elements]
to an interactive test write this to show in a window the elements of the layer named Layer0

Code: Select all

-np- W [GiD_EntitiesLayers get Layer0 elements]
https://gidsimulation.atlassian.net/wik ... 3/Entities

off course with Tcl scripting could save the information you want in a file
Post Reply