A swift, massive flow of profits to the large oil companies is documented in a new congressional staff study of the distribution of investment capital between the energy and non-energy sectors of the industrial economy.

The study traced the $19.6 billion increase in combined net income of the 500 largest industrial corporations in the two-year period starting Jan. 1, 1979.

The 20 largest oil and gas companies accounted for 83.7 percent of the $19.6 billion; 24 others plus 12 industry service and supply firms accounted for an additional 14.2 percent. That left only 2.1 percent--$403 million--for the rest of the corporations.

Among the 1,000 largest industrials on the Fortune list the combined increase in net income was $20.4 billion. The 64 oil and 18 industry service and supply companies accounted for 96 percent, the other firms for a mere 4 percent.

The study was done by Milton Lower, staff economist for the House energy subcommittee on oversight and investigations, in connection with a long-term inquiry into capital formation and industrial policy. Subcommittee chairman John D. Dingell (D-Mich.) called Lower's study "rather startling."

Subcommittee chief counsel Michael F. Barrett Jr., commenting on the study, said that the years since the 1973 oil embargo have seen an "alarming" transfer of wealth into the energy sector partially "at the expense of the rest of the industrial base," which like other consumers was hit with soaring fuel prices.

Last year, for the first time, all 20 of the largest oil companies were on the Fortune top 50 list. They accounted for 29.3 percent of the Fortune 500's total sales and 42.2 percent of their combined net income, Lower said.

Of the leading industrials, four of the top five and 13 of the top 20 were oil companies. Exxon, the largest industrial, rang up sales of $103 billion (and net income of $5.65 billion), becoming the first company on the list with 12-digit revenues. By contrast, Exxon's sales in 1978 were $60 billion, $3 billion less than General Motors'.

Mobil, with 1980 sales more than $43 billion under Exxon's, ranked second. Its net income was $3.27 billion.

Other top 20 oil companies, in descending order of rank by sales: Texaco, Standard (California), Gulf, Standard (Indiana), Atlantic Richfield, Shell, Conoco, Phillips, Tenneco, Sun, Occidental, Standard (Ohio), Getty, Union, Marathon (currently targeted by Mobil for a takeover), Ashland, Amerada Hess and Cities Service.

Lower said that the 56 oil and oil-industry companies on the Fortune 500 list accounted for 34 percent of the group's combined sales and for 42.2 percent of their net income.