GiD - The personal pre and post processor

Nodes listing declaration

First, we set the necessary conditions, as was done in the previous section.

 
*Set Cond Surface-Constraints *nodes *or(1,int) *or(3,int)
*Add Cond Line-Constraints *nodes *or(1,int) *or(3,int)
*Add Cond Point-Constraints *nodes *or(1,int) *or(3,int)
NPRES=*CondNumEntities


After the data initialization and declarations, the solver requires a list of nodes with boundary conditions and the fields that have been assigned.
In this example, all the selected nodes will be output and the 3 conditions will also be printed. The columns will be output with no apparent format.
Once again, the code begins with a subsection header for the solver program and a commentary line for the user:

 
BOUNDARY CONDITIONS
$ RESTRICTED NODES


Then comes the first line of the output list, the header:

 
$ NODE CODE PRESCRIPTED VALUES


The next part the loop instruction, in this case over nodes, and with the specification argument *OnlyInCond, to iterate only over the entities that have the condition assigned. This is the condition that has been set on the previous lines.

 
*loop nodes *OnlyInCond


The next line is the format command, followed by the lines with the commands to fill the fields of the list.

 
*format "%5i%1i%1i%f%f"
*NodesNum *cond(1,int) *cond(3,int) *\


The *format command influence also includes the following two if sentences. If the degrees of freedom field contains an integer equal or greater than 3, the number of properties will be output.

 
*if(GenData(Degrees_Freedom_Nodes,int)>=3)
*cond(5,int) *\
*endif


And if the value of the same field is equal to 5 the output will be a pair of zeros.

 
*if(GenData(Degrees_Free,int)==5)
0 0 *\
*endif


The next line ouputs the values contained in the second and fourth fields, both real numbers.

 
*cond(2,real) *cond(4,real) *\


In a similar manner to the previous if sentences, here are some lines of code which will output the sixth condition field value if the number of degrees of freedom is equal or greater than three, and will output a pair of zeros if it is equal to five.

 
*if(GenData(Degrees_Free,int)>=3)
*cond(6,real) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0.0 0.0 *\
*endif

Finally, to end the section, the *end command closes the previous *loop. The last line is the label of the end of the section.


*end 
END_BOUNDARY CONDITIONS
$-------------------------------------------------------

The full set of commands included in this section are as follows:

BOUNDARY CONDITIONS
$ RESTRICTED NODES
$ NODE CODE         PRESCRIPTED VALUES
*loop nodes *OnlyInCond
*format "%5i%1i%1i%f%f"
   *NodesNum *cond(1,int) *cond(3,int)  *\
*if(GenData(Degrees_Free,int)>=3)
*cond(5,int) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0 0  *\
*endif
*cond(2,real) *cond(4,real) *\
*if(GenData(Degrees_Free,int)>=3)
*cond(6,real) *\
*endif
*if(GenData(Degrees_Free,int)==5)
0.0 0.0  *\
*endif
*end
END_BOUNDARY CONDITIONS
$-----------------------------------------------------


COPYRIGHT © 2022 · GID · CIMNE