Page 1 of 1

Exporting using .bas

Posted: Tue Jul 07, 2015 7:24 pm
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

Re: Exporting using .bas

Posted: Tue Jul 07, 2015 7:40 pm
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

Re: Exporting using .bas

Posted: Tue Jul 07, 2015 8:44 pm
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

Re: Exporting using .bas

Posted: Tue Jul 07, 2015 9:11 pm
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'