UPFs can range from a simple element output routine for custom output to a complex user optimization. Before you start programming, ask yourself these questions:
Does the capability you want already exist in Mechanical APDL? Remember, a capability may not be obvious at first, especially to a novice user.
Does your proposed subroutine fit into the Mechanical APDL program architecture and specifications? For example, you can not program a user element that has more than 32 degrees of freedom per node.
Use your experience and judgment to answer these questions. If you need help to do so, consult your Ansys technical support representative. If you can respond "no" to the first question and "yes" to the second question, then the user routine you are planning will be both useful and feasible.