Finite element modeling for stress analysis