Thank you! I have implemented this function to set an initial displacement for the element (eg element translation), but as you said this function is not commonly used.
Then I encountered two new problems.
First, for the loop like the following,
/YD/YDE/I1ELCF *nelem
*loop elems
-1
*end elems
The output obtained is the following,
-1
-1
-1
…
This output is OK, but when there is a large number of elements or node, too many lines will be output. So, I want to output 20 results per line, such as
-1 -1 -1 -1 -1 -1 …
-1 -1 -1 -1 -1 -1 …
-1 -1 -1 -1 -1 -1 …
…
How can I do that?
The second, for the conditions, I want to achieve the following functionality,
There are two objects (eg rock specimen and loading plate in UCS). Assign boundary conditions to all rock nodes, and record the id of this set of boundary conditions as 1. Then assign boundary conditions to the loading plate node and record the id as 2. Finally, by looping through the total number of boundary condition groups, output cond() in each group. Such as,
/ Boundary Conditions */
/velocity-x/
/rock/ *cond(velocity-x)
/platen/ *cond(velocity-x)
/velocity-y/
/rock/ *cond(velocity-y)
/platen/ *cond(velocity-y)
For conditions, there doesn’t seem to be an id that can be used to loop directly, so one needs to loop with *nodes, *elem, *layer, etc. I tried to use two layers, rock is in the layer0 and platen is in the layer1. Then
*Set Cond Surface-Constraints *nodes
*Add Cond Line-Constraints *nodes
*Add Cond Point-Constraints *nodes
*loop layers
*Set Var Ncondsets=LayerNum
*end layers
/YD/YDPN/D1PNAX *Ncondsets
*loop conditions *layers
*Cond(X-Value,real)
*end conditions
I’m not achieving what I want, and the output I get seems to be default values. How can I implement this function? Thank you!