User macro to flip the boundary codes
Consider the problem of mimicking the behavior of a standard load/unload experiment that is displacement controlled up to the point where the load cell reads zero force and the machine then switches to load control. In a FEAP computation the boundary codes on the driven nodes can be dynamically changed by changing the values in the ID(ndf,numnp,1:2)
array. In particular if for a given dof and node number the value of ID( , , 2)
is set to zero then FEAP will treat the dof as active and look for forced values as set by the FORCe
command in the input file. If these have been omitted, then the force will be taken as zero.
Here is an example of a MACRo command that will achieve this purpose. It allows one to identify the nodes to be switched using a simple search on a given plane. Then it allows one to switch the boundary codes once the reactions on the selected nodes drop below a specified tolerance for times greater than some given value.
Here is an input file that will use the MACRo called ULNM