Exporting using .bas

Moderator: GiD Team

Post Reply
akd
Posts: 7
Joined: Thu Jul 02, 2015 5:35 am

Exporting using .bas

Post by akd »

Hi,

I am trying to loop over nodes over some elements using the .bas file. When I am trying *nodes command inside the *elems loop, it loops over the entire nodes in my domain, is there a way to loop over only the element concerned?

*loop elems
*loop nodes
//only nodes inside the corresponding element are needed
*end nodes
*end elems
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Exporting using .bas

Post by escolano »

the elements connectivities *elemsconec without arguments are directly all nodes of the element (it is possible to specify an integer argument to get only some of its nodes, e.g. *elemsconec(1), for example to print them ordered in a different way)

Code: Select all

*loop elems
*elemsconec
*end elems
akd
Posts: 7
Joined: Thu Jul 02, 2015 5:35 am

Re: Exporting using .bas

Post by akd »

Is the *elemsconnec have ordered information about the nodal connectivities? I mean is the ordering consistent with the direction of the normal for all cases in GID? (clockwise/anticlockwise, talking about 2-d elements)

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

Re: Exporting using .bas

Post by escolano »

The orientation (clockwise/anticlockwise) of surface elements is exactly the same of its source surface geometry.

You must check the orientation of surfaces (View->Normals->Surfaces) and swap is some of them is not like your requirements, and re-mesh again.
Usually when 2D surfaces are created in GiD its normal is oriented pointing to +z.

Note: when drawing normals 'by colors' the yellow color mean the 'back face' and the layer color the 'front face'
Post Reply