The city of Philadelphia and its blue-collar employes' union reached a tentative contract agreement yesterday that would raise wages 10 percent over two years -- an increase denounced by the union president 10 days ago as "stinking" and unacceptable.

The pact, which also would allow Mayor W. Wilson Goode to audit the union's health and welfare fund, was reached the day after District Council 33 members ended a 20-day walkout.

The strike was broken Saturday when garbage collectors returned to work under court order rather than test Goode's threat to fire them.

Eighty million pounds of garbage eventually piled up in officially designated emergency dumps and illegal sites. The accumulation inspired a cartoon in yesterday's Philadelphia Daily News that portrayed Goode as a "phoenix rising from the trashes."

According to politicians, newspapers and business, civic and even union leaders, Goode's handling of the strike has been excellent and may have shored him up politically. His standing was shaken, and his political future clouded, after a mayoral commission criticized his handling last year of a police confrontation with the radical group MOVE in which 11 persons died.

Several observers said Goode stood up to a union with a bad reputation for leading the city around by the nose, saying he was fair, deliberate and got most of what he wanted. Thacher Longstreth, a Republican city council member, agreed that the strike gave Goode a boost but said it was only a temporary halt in a "precipitous downfall."

The pact must be ratified by the union membership. Earl Stout, head of District Council 33 of the American Federation of State, County and Municipal Employes, which represents the city's blue-collar workers, was unavailable for comment on the settlement or Goode.

Elected in 1983, Goode ran on his reputation as the city's managing director. His popularity in public opinion polls was very high in the first year, when he was under scrutiny as the city's first black mayor.

But the panel he appointed to investigate the MOVE disaster concluded last March that he had "abdicated his responsibility" during the incident, in which police dropped a bomb and started a fire that destroyed 61 homes.

Although the Daily News was harshly critical of Goode's conduct at the beginning of the strike, an editorial yesterday called his handling of the crisis "elegant."

Emergency dumps were criticized by residents, who found them inconvenient, embarrassing and malodorous. Goode turned their complaints to his advantage in court, seeking a back-to-work order July 16 for the garbage collectors on grounds that the emergency "trash transfer stations" were dangerous.

One argument, made in eloquent testimony aided by videotapes, was the potential for violence between people living near the dumps and those who wanted to use them.

When District Council 33 and its affiliate, the garbage collectors' Local 427, ignored the order, Common Pleas Court Judge Edward J. Blake held the union, its leaders and members in contempt. Goode, having won another round and Blake's approval, threatened to fire the garbage collectors unless they returned to work the next day at 7 a.m.

They did. Three days later, the union settled.

One sticking point had been Goode's insistence on the city's right to audit the union's books. In 1975 Mayor Frank L. Rizzo agreed to contribute city funds to its health and welfare fund without auditing rights. Stout asked during recent negotiations for $48 million in city money for the fund and Goode refused unless the union agreed to an audit.

Stout announced Friday without explanation that the issue had been resolved, and reports yesterday said the union had agreed to auditing. A 1983 audit by the City Comptroller, which is now the subject of a libel suit by the union, said union funds had been used improperly.

The result is that the city whose trash has been pictured in nationwide broadcasts for nearly three weeks is largely pleased.

Edward G. Rendell, former district attorney and a former Democratic gubernatorial candidate, said Philadelphians were angry at Goode for some of his dump site choices but added that the union earned much of the anger directed against it.

Ralph R. Widner, executive director of the Philadelphia First Corporation, a group of the city's 22 largest corporations, said Goode was "doing just the right thing. I would say that support for him on this strike issue is around 70 percent."

Henry Nicholas, president of the National Union of Hospital and Health Care Employes in Philadelphia, said the union "got outfoxed." Stout's stand against auditing, he said, "wasn't a sellable item from the public-relations point of view."

Labor figured heavily in Goode's election, with Stout one of his strong supporters. He may retain some of that support.

Tom Cronin, head of District 47 of AFSCME, the white-collar union that also struck July 1, said carefully that although "it has been a long and bitter strike, now's the time for healing" and "we're hopeful that we can mend the fences."

If union leadership believes that he's going to win reelection," said Neil Oxman, a political consultant to Goode, "they will be with him, even if he took a tough stand on this.