Wilbur Sheffer Foresman, 31, retired head of the mechanical engineering division of the Navy's Bureau of Yards and Docks, died Sunday in a nursing home near Westminster, Md., after a stroke.

A former resident of Washington, he had lived in Westminster since 1967 and had been in the nursing home for about three weeks.

Mr. foresman retired from the Bureau of Yards and Docks in 1963 after 27 years of service there.

He was born in Williamsport. Pa. After serving with the U.S. Navy in World War I, he graduated from Bloomsburg School in Pennsylvania and then earned an engineering degree from Pennsylvania State University.

He came to Washington in the early 1930s and worked for an air-conditioning firm before joining the government.

Mr. Foresman was a member of the American Legion in Westminster and an honorary member of the Kenwood County Club here.

His first wife, Evelyn Susan Bond Foresman, died in 1961.

He is survived by his second wife, the former Ethel Kitty Enso, of the home in Westminister; three daughters, Cordelia Jane Moore, of Binghampton, N.Y., Susan B. Foresman, of Arlington, and Nancy Jo Patton, of Memphis, Tenn; a sister, Ruth Rickert, of Watsontown, Pa., and eight grandchildren.