NOVELTY - Superstructure for refinery comprises synthesis gas production unit configured to produce synthesis gas selected from biomass synthesis gas production unit, coal synthesis gas production unit/natural gas synthesis gas production unit, synthesis gas cleanup unit to remove undesired gases from synthesis gas, liquid fuels production unit selected from Fischer-Tropsch unit and a methanol synthesis unit, liquid fuels upgrading unit, hydrogen production unit, oxygen production unit, wastewater treatment network, and carbon dioxide separation unit are configured to be combined to form refinery.    USE - As superstructure for a refinery (claimed).    ADVANTAGE - The combination of feedstocks allows to draw on key advantages of each feedstock that would not be otherwise obtainable. The low cost of coal, the greenhouse gas reduction potential of biomass, and the high hydrogen content of natural gas can combine to design the most efficient and economic refinery possible. The process has the capability to convert any fraction of the input carbon in the coal, biomass, and natural gas to liquid fuels. The process produces liquid fuels using a variety of process technologies. Current processes utilize only a small number of these technologies within the plant design and can ultimately lead to inefficient process designs. The current process produces a more efficient design based on the inclusion of additional process considerations.    DETAILED DESCRIPTION - A superstructure for a refinery comprises at least one synthesis gas production unit configured to produce at least one synthesis gas selected from biomass synthesis gas production unit, a coal synthesis gas production unit and a natural gas synthesis gas production unit, where the synthesis gas is determined by a mixed-integer linear optimization model solved by a global optimization framework; a synthesis gas cleanup unit configured to remove undesired gases from the synthesis gas; a liquid fuels production unit selected from Fischer-Tropsch unit and a methanol synthesis unit, the Fischer-Tropsch unit being configured to produce a first output from the synthesis gas, the methanol synthesis unit being configured to produce a second output from the synthesis gas, where the selection of liquid fuels production unit is determined by the mixed-integer linear optimization model solved by the global optimization framework; a liquid fuels upgrading unit configured to upgrade the first output or the second output, where the liquid fuels upgrading unit is determined by the mixed-integer linear optimization model solved by the global optimization framework; a hydrogen production unit configured to produce hydrogen for the refinery; an oxygen production unit configured to produce oxygen for the refinery; a wastewater treatment network configured to process wastewater from the refinery and input freshwater into the refinery, where the wastewater treatment network is determined by a mixed-integer linear optimization model solved by a global optimization framework, a utility plant configured to produce electricity for the refinery and process heat from the refinery, where the utility plant is determined by a mixed-integer linear optimization model solved by a global optimization framework; and carbon dioxide separation unit configured to recycle gases containing carbon dioxide in the refinery, where the synthesis gas production unit, the synthesis gas cleanup unit, the liquid fuels production unit, the liquid fuels upgrading unit, the hydrogen production unit, the oxygen production unit, the wastewater treatment network, the utility plant and the carbon dioxide separation unit are configured to be combined to form the refinery. INDEPENDENT CLAIMS are included for the following:    (1) optimal refinery design system comprising the superstructure database, and a processor configured to solve the mixed-integer linear optimization model by the global optimization framework;    (2) designing an optimal refinery involving providing the superstructure, inserting a data set on each of the synthesis gas production unit, the liquid fuels production unit, the liquid fuels upgrading unit, the wastewater treatment network and the utility plant into the mixed-integer linear optimization model, solving the mixed-integer linear optimization model by the global optimization framework, and determining each of the synthesis gas production unit, the liquid fuels production unit, the liquid fuels upgrading unit, the wastewater treatment network and the utility plant to produce an optimal refinery design; and    (3) producing liquid fuels involving producing liquid fuels with a refinery having an optimal refinery design, where the optimal refinery design was arrived at by providing the superstructure; inserting a data set on each of the synthesis gas production unit, the liquid fuels production unit, the liquid fuels upgrading unit, the wastewater treatment network and the utility plant into the mixed-integer linear optimization model, solving the mixed-integer linear optimization model by the global optimization framework, and determining each of the synthesis gas production unit, the liquid fuels production unit, the liquid fuels upgrading unit, the wastewater treatment network and the utility plant to produce an optimal refinery design.