Modeling magnetostriction in RCu2 compounds using McPhase