LONG BEACH, Calif. — From the outside, the intricately woven amalgam of metal pipes and tanks built and owned by FuelCell Energy Inc. alongside the entrance to Toyota‘s main California port here could pass for a miniature old-school oil refinery.

But looks can be deceiving, because the products — hydrogen, electricity and water — coming out of this first-of-a-kind processing facility are as clean as oil is dirty. They are distilled from a naturally occurring byproduct of rotting waste that otherwise would end up fouling the atmosphere, and in a unique pilot program, will be used by Toyota for the next 20 years to aid its port operations here, just a short distance from the Pacific Ocean.

Called Tri-gen, the small plant transforms biogas — methane polluted with other contaminants captured and carried by pipeline from a nearby anaerobic digester — into an adjustable combination of up to 2.3 megawatts of electricity, 1,200 kg of hydrogen and 1,400 gallons of usable water each day.

The electricity will be used to help power operations at Toyota Logistics Services in Long Beach, where imported vehicles are readied for distribution in the U.S. and upfitted with ordered accessories, as well as to charge BEVs arriving by ship from Japan.

The hydrogen is pressurized and used to fuel both the imported Toyota Mirai fuel cell vehicle as well as fuel cell-powered semis operating at the port. The water will be used to wash off-loaded vehicles as they are prepared for distribution, said Mark Yamauchi, sustainability manager for Toyota Motor North America.

Will it be enough to power and supply necessary hydrogen to the whole facility? No, he said, but it’s a start. And it’s scalable.

“This is a wondrous opportunity to meet multiple challenges with this new, innovative integration of technologies,” Yamauchi said.

The seeds of the project were planted nearly a decade ago as Toyota assessed its future needs for its Long Beach port facility, as well as its corporate carbon-reduction promises, Yamauchi said. That led the automaker to FuelCell Energy, which was then involved in a smaller, federally subsidized pilot project to prove its technologies at the nearby Fountain Valley wastewater treatment plant in Orange County, Calif.

“We started having discussions with how we can work together, and what resulted was this hydrogen power purchase agreement where we can take advantage of these three value streams: renewable electricity, renewable hydrogen and water that we will use to wash our vehicles … with no capital investment from Toyota,” Yamauchi said. “So it was a very high-value proposition for us.”

The Tri-gen plant sits on a 2-foot thick concrete pad about the size of three full-sized basketball courts near the main entrance to Toyota Logistics Services.

The biogas, which is 60 percent methane and 40 percent carbon dioxide, arrives by pipeline from a facility in Victorville, Calif. The sulfur compounds are removed, and the gas is immediately saturated with water to help remove other contaminants. It’s then heated to more than 1,000 degrees using waste heat from the fuel cell stacks. The humidified methane then flows into fuel cell modules, where it is converted to hydrogen and electricity, said Paul Fukumoto, director of technology and product solutions with FuelCell Energy.

The mix of hydrogen and electricity production can be adjusted as needed and as demand warrants, Fukumoto said.

“If we weren’t diverting [energy] to processing the hydrogen, we would be producing enough electricity to be able to power about 2,800 homes,” Fukumoto said. In previous models, the hydrogen generated “would be recirculated for heat and efficiency” within the fuel cell modules, “but now there’s a need for that hydrogen outside of the fuel cell” to power both the imported Mirais and semis used at the port.

“This is truly a zero-emission fueling center,” Fukumoto said. “Low carbon electricity, low carbon hydrogen, and they’re both renewable, with virtually zero [nitrogen oxide], the precursor to smog.”

Yamauchi said the success and scalability of the Tri-gen plant in Long Beach has Toyota looking at the technology for larger applications, including at its North American manufacturing operations, where similar plants, scaled up, could dramatically impact their carbon footprint, as well as serve as a hedge against inflation.

“We love the sustainability value chain, but from a financial standpoint, from a cost standpoint, the fixed price for power [from Tri-gen] is a 20-year contract, and it’s just about half of what we’d be paying Southern California Edison. We know where their prices are going to go over time,” Yamauchi said. “This is a great hedge for us.”