Most CAD systems can create thread geometry and that is done for this detail model of the strain in the threads of a cast part that is created by the tension in a power screw (not shown) that is threaded into the hole in the cast part. This model was created to estimate the tension that would break off a thread in this casting of a brittle material.
The thread faces have frictional contact defined and the coefficient of friction and the pitch of the screw ensures that the screw will not slip with no applied torque when the tension in the screw is applied. The picture below shows a section view through a cast part where the screw is hidden. This shows that as the load is increased, the first thread will fracture, since the strain at fracture is 0.01 for this material. Above that value, the strain is colored red.
The second image shows higher force in the screw and how the second thread will fail next.
The material used in this simulation is described in this post.