It has taken James H. Phillips Jr. 18 years, but he has begrudgingly accepted the massive, 100-acre petroleum tank farm 400 yards from his Northern Virginia home as a fact of suburban life.

"You get used to it. You lose your leg. You don't want to, but you get used to that, too . . . just to survive," said the 52-year-old Phillips. "I remember when people stopped a cemetery from being built there. Bad for the kids, they said. The cemetery would be better than this, a lot better."

Living near the Fairfax City tank farm, a sprawling depot that pumps 1.1 billion gallons of flammable liquids into the Washington area each year, has been likened to residing near an ammunition dump, Three Mile Island and the slopes of Mount St. Helens.

Fairfax City officials foreseeing a windfall for the small city's tax base, welcomed the tank farm in 1962 although detractors predicted tank truck accidents, petroleum spills, major fires and other dangers. Both sides, as it turned out, have been correct.

Only Ballou-Wood inc., owner of a large town house complex, surpasses the combined real estate taxes of nearly $150,000 annually paid by the tank farm. City official Tom Welle said the figure does not include an additional $17,330 in personal property taxes. Nor does it include an estimated $500,000 annually in business license taxes paid by the tank farm.

Huge gray and white storage tanks with capacities that reach 80,000 barrels dominate the farm's manicured grounds and fuel-loading racks near a 25-year-old neighborhood and a recently built town house complex less than 100 yards away.

Until June 24, 1977, incidents at the tank farm were confined to petroleum product leaks that seeped into nearby Daniel's Run.

At 6:58 a.m. on that day a tank truck at an Amoco loading rack spilled fuel that ignited when a second truck backfired. A series a explosions shook homes a mile away and forced the evacuation of nearby communities.

The $1.5 million fire killed one truck driver and seriously injured five others and two firefighters. Although the nearby homes were unharmed, the incident raised serious doubts about safety and the ability of the tank farm and local fire departments to deal with disasters of larger proportions.

About 800 18-wheel tank trucks throughout each day and as many as 50 during peak hours rumble past homes, two large shopping malls and a high school, traveling to the Capital Beltway or west to Interstate 66, according to oil company estimates.

The traffic density and several tank truck accidents, including one that killed a second trucker and closed a Capital Beltway bridge to traffic for four months, led a recent Virginia Polytechnic Institute and State University study to conclude that Fairfax leads all Virginia jurisdictions in the potential for hazardous cargo truck accidents.

The tank farm is supplied entirely by pipelines, and the most recent concern about safety was spawned in March when the state's largest and most serious inland oil spill occurred along two Virginia sections of the Colonial Pipeline Co.'s 1,675-mile pipe from the Gulf of Mexico to New York Harbor.

Spokesman for the U.S. Environmental Protection Agency said more than 300,000 gallons of toxic aviation kerosene (jet fuel) and heating oil leaked into the Occoquan and Rappahannock river systems, threatening the water supplies of 660,000 Northern Virginians.

Colonial Pipeline officials call the Fairfax City terminal "one of our largest delivery stations," and local politicians and firefighters maintain it also is one of the safest tank farms in the state. Several safety devices, including a fire-suppressing system using foam made from chicken feathers, were installed after the 1977 fire, they note.

But the possibility of conflagration recently persuaded city officials to have Police Chief Larry Wines prepare an elaborate evacuation plan for the 244-unit Comstock town house development on the tank farm's western border.

And the City Council, much to the irritation of truckers, recently banned them from parking their rigs inside the city unless they are making deliveries. t"Most people think we're a necessary evil," complains Herb Scott, 38, a driver for Dayton Transport Lines.

"They want us here and they don't want us here."

Indeed the rigorous enmity that marked the facility's early development has given way to an uneasy coexistence.

"We're still very sorry that it is there," said Sally Ormsby, a past president of the nearby Mantua Hills subdivision. "A residential area is an inappropriate place for a tank farm, but now we have to live with it."

"The tank farm was here before Comstock was here," said Burr Sienkiewicz, a nearby resident. "Our home is less than a quarter-mile from the farm. It's sort of ominous, but it really doesn't bother us."

Colonial, the world's largest underground pipeline, is the creation of nine major oil companies. Four of those "shippers," Texaco, Gulf, Cities Service, and Amoco, built 15- to 20-acre storage tank facilities at the farm.

The pipeline terminal, governed by computers there and in Atlanta, operates a 22-inch-diameter extension that extends seven miles from Colonial's mainline pumping station at Chantilly to the farm. The terminal also operates a smaller, 6-inch jet fuel pipeline that supplies Dulles International Airport.

Batches of various petroleum products that range in size from 75,000 to 1,250,000 barrels are pushed through the 32-inch mainline pipe continuously by huge pumps, terminal manager Bob Golay said.

A typical batch flowing into the farm's tanks might appear on an operating log as "Txp-39-111."

"Txp" denotes a Texaco shipment, while the "39" is one of three codes indicating unleaded gasoline types. The "111" is a production cycle number used to locate the refinery that produced the gasoline in case there are quality control problems.

"Txp-39-111" ran for 2 hours 25 minutes at a rate of 6,000 barrels an hour on a recent day. For the next 35 minutes, other unleaded gasoline types came through the stub line, followed by a three-hour flow of fuel oil.

"Rubber spheres filled with a water and antifreeze solution and weighing about 350 pounds are used to prevent the mixing of different product types and are added to the beginning of the stub line at Chantilly and removed at the terminal with an elevated trap," Golay said.

He said the product is then sent through fine-steel-mesh strainers to remove debris.

"In the fifteen years of our operation," Golay said, "There had never been a serious accident at the terminal part of this facility.That's a pretty damn good safety record."

Fairfax City has Northern Virginia's only polar solvent foam truck for fighting major petroleum fires. It cost $131,000 of which $75,000 was donated by the tank farm oil companies, according to Fire Chief Gene Daily.

"It will hold 600 gallons of concentrated foam," Daily said. "As of now, we're convinced that this tank farm is one of the safest in the state."

The farm itself is surrounded by 7-foot-high chain-like fences topped by three strands of barbed wire. City police patrol the area regularly and a pipeline spokesman says gates leading to the terminals are locked "from dusk to dawn."

But the calm of the neighborhood is uneasy. Jeremy Sharpe, 31, a Comstock resident, says security isn't tight enough.

"I just walked around there the other night and had gotten all the way back home before I realized that no one had stopped me from walking around near the tanks. I'd feel a lot better if someone had," he said.