Search This Blog

Saturday, August 27, 2022

Industrial gas

From Wikipedia, the free encyclopedia
 
A gas regulator attached to a nitrogen cylinder.

Industrial gases are the gaseous materials that are manufactured for use in industry. The principal gases provided are nitrogen, oxygen, carbon dioxide, argon, hydrogen, helium and acetylene, although many other gases and mixtures are also available in gas cylinders. The industry producing these gases is also known as industrial gas, which is seen as also encompassing the supply of equipment and technology to produce and use the gases. Their production is a part of the wider chemical Industry (where industrial gases are often seen as "specialty chemicals").

Industrial gases are used in a wide range of industries, which include oil and gas, petrochemicals, chemicals, power, mining, steelmaking, metals, environmental protection, medicine, pharmaceuticals, biotechnology, food, water, fertilizers, nuclear power, electronics and aerospace. Industrial gas is sold to other industrial enterprises; typically comprising large orders to corporate industrial clients, covering a size range from building a process facility or pipeline down to cylinder gas supply.

Some trade scale business is done, typically through tied local agents who are supplied wholesale. This business covers the sale or hire of gas cylinders and associated equipment to tradesmen and occasionally the general public. This includes products such as balloon helium, dispensing gases for beer kegs, welding gases and welding equipment, LPG and medical oxygen.

Retail sales of small scale gas supply are not confined to just the industrial gas companies or their agents. A wide variety of hand-carried small gas containers, which may be called cylinders, bottles, cartridges, capsules or canisters are available to supply LPG, butane, propane, carbon dioxide or nitrous oxide. Examples are Whipped-cream chargers, powerlets, campingaz and sodastream.

Early history of gases

Blowing air at a spark

The first gas from the natural environment used by humans was almost certainly air when it was discovered that blowing on or fanning a fire made it burn brighter. Humans also used the warm gases from a fire to smoke foods and steam from boiling water to cook foods.

Bubbles of carbon dioxide form a froth on fermenting liquids such as beer

Carbon dioxide has been known from ancient times as the byproduct of fermentation, particularly for beverages, which was first documented dating from 7000–6600 B.C. in Jiahu, China. Natural gas was used by the Chinese in about 500 B.C. when they discovered the potential to transport gas seeping from the ground in crude pipelines of bamboo to where it was used to boil sea water. Sulfur dioxide was used by the Romans in winemaking as it had been discovered that burning candles made of sulfur inside empty wine vessels would keep them fresh and prevent them gaining a vinegar smell.

Early understanding consisted of empirical evidence and the protoscience of alchemy; however with the advent of scientific method and the science of chemistry, these gases became positively identified and understood.

Kipp's apparatus
 
Acetylene flame carbide lamp

The history of chemistry tells us that a number of gases were identified and either discovered or first made in relatively pure form during the Industrial Revolution of the 18th and 19th centuries by notable chemists in their laboratories. The timeline of attributed discovery for various gases are carbon dioxide (1754), hydrogen (1766), nitrogen (1772), nitrous oxide (1772), oxygen (1773), ammonia (1774), chlorine (1774), methane (1776), hydrogen sulfide (1777), carbon monoxide (1800), hydrogen chloride (1810), acetylene (1836), helium (1868) fluorine (1886), argon (1894), krypton, neon and xenon (1898)  and radon (1899).

Carbon dioxide, hydrogen, nitrous oxide, oxygen, ammonia, chlorine, sulfur dioxide and manufactured fuel gas were already being used during the 19th century, and mainly had uses in food, refrigeration, medicine, and for fuel and gas lighting. For example, carbonated water was being made from 1772 and commercially from 1783, chlorine was first used to bleach textiles in 1785 and nitrous oxide was first used for dentistry anaesthesia in 1844. At this time gases were often generated for immediate use by chemical reactions. A notable example of a generator is Kipps apparatus which was invented in 1844  and could be used to generate gases such as hydrogen, hydrogen sulfide, chlorine, acetylene and carbon dioxide by simple gas evolution reactions. Acetylene was manufactured commercially from 1893 and acetylene generators were used from about 1898 to produce gas for gas cooking and gas lighting, however electricity took over as more practical for lighting and once LPG was produced commercially from 1912, the use of acetylene for cooking declined.

Late Victorian Gasogene for producing carbonated water

Once gases had been discovered and produced in modest quantities, the process of industrialisation spurred on innovation and invention of technology to produce larger quantities of these gases. Notable developments in the industrial production of gases include the electrolysis of water to produce hydrogen (in 1869) and oxygen (from 1888), the Brin process for oxygen production which was invented in the 1884, the chloralkali process to produce chlorine in 1892 and the Haber Process to produce ammonia in 1908.

The development of uses in refrigeration also enabled advances in air conditioning and the liquefaction of gases. Carbon dioxide was first liquefied in 1823. The first Vapor-compression refrigeration cycle using ether was invented by Jacob Perkins in 1834 and a similar cycle using ammonia was invented in 1873 and another with sulfur dioxide in 1876. Liquid oxygen and Liquid nitrogen were both first made in 1883; Liquid hydrogen was first made in 1898 and liquid helium in 1908. LPG was first made in 1910. A patent for LNG was filed in 1914 with the first commercial production in 1917.

Although no one event marks the beginning of the industrial gas industry, many would take it to be the 1880s with the construction of the first high pressure gas cylinders. Initially cylinders were mostly used for carbon dioxide in carbonation or dispensing of beverages. In 1895 refrigeration compression cycles were further developed to enable the liquefaction of air, most notably by Carl von Linde allowing larger quantities of oxygen production and in 1896 the discovery that large quantities of acetylene could be dissolved in acetone and rendered nonexplosive allowed the safe bottling of acetylene.

A particularly important use was the development of welding and metal cutting done with oxygen and acetylene from the early 1900s. As production processes for other gases were developed many more gases came to be sold in cylinders without the need for a gas generator.

Gas production technology

Distillation column in a cryogenic air separation plant

Air separation plants refine air in a separation process and so allow the bulk production of nitrogen and argon in addition to oxygen - these three are often also produced as cryogenic liquid. To achieve the required low distillation temperatures, an Air Separation Unit (ASU) uses a refrigeration cycle that operates by means of the Joule–Thomson effect. In addition to the main air gases, air separation is also the only practical source for production of the rare noble gases neon, krypton and xenon.

Cryogenic technologies also allow the liquefaction of natural gas, hydrogen and helium. In natural-gas processing, cryogenic technologies are used to remove nitrogen from natural gas in a Nitrogen Rejection Unit; a process that can also be used to produce helium from natural gas where natural gas fields contain sufficient helium to make this economic. The larger industrial gas companies have often invested in extensive patent libraries in all fields of their business, but particularly in cryogenics.

Gasification

The other principal production technology in the industry is Reforming. Steam reforming is a chemical process used to convert natural gas and steam into a syngas containing hydrogen and carbon monoxide with carbon dioxide as a byproduct. Partial oxidation and autothermal reforming are similar processes but these also require oxygen from an ASU. Synthesis gas is often a precursor to the chemical synthesis of ammonia or methanol. The carbon dioxide produced is an acid gas and is most commonly removed by amine treating. This separated carbon dioxide can potentially be sequestrated to a carbon capture reservoir or used for Enhanced oil recovery.

Air Separation and hydrogen reforming technologies are the cornerstone of the industrial gases industry and also form part of the technologies required for many fuel gasification ( including IGCC), cogeneration and Fischer-Tropsch gas to liquids schemes. Hydrogen has many production methods and may be almost a carbon neutral alternative fuel if produced by water electrolysis (assuming the electricity is produced in nuclear or other low carbon footprint power plant instead of reforming natural gas which is by far dominant method). One example of displacing the use of hydrocarbons is Orkney; see hydrogen economy for more information on hydrogen's uses. liquid hydrogen is used by NASA in the Space Shuttle as a rocket fuel.

A nitrogen generator
 
Membrane nitrogen generator

Simpler gas separation technologies, such as membranes or molecular sieves used in pressure swing adsorption or vacuum swing adsorption are also used to produce low purity air gases in nitrogen generators and oxygen plants. Other examples producing smaller amounts of gas are chemical oxygen generators or oxygen concentrators.

In addition to the major gases produced by air separation and syngas reforming, the industry provides many other gases. Some gases are simply byproducts from other industries and others are sometimes bought from other larger chemical producers, refined and repackaged; although a few have their own production processes. Examples are hydrogen chloride produced by burning hydrogen in chlorine, nitrous oxide produced by thermal decomposition of ammonium nitrate when gently heated, electrolysis for the production of fluorine, chlorine and hydrogen, and electrical corona discharge to produce ozone from air or oxygen.

Related services and technology can be supplied such as vacuum, which is often provided in hospital gas systems; purified compressed air; or refrigeration. Another unusual system is the inert gas generator. Some industrial gas companies may also supply related chemicals, particularly liquids such as bromine and ethylene oxide.

Gas distribution

Mode of gas supply

Compressed hydrogen tube trailer

Most materials that are gaseous at ambient temperature and pressure are supplied as compressed gas. A gas compressor is used to compress the gas into storage pressure vessels (such as gas canisters, gas cylinders or tube trailers) through piping systems. Gas cylinders are by far the most common gas storage  and large numbers are produced at a "cylinder fill" facility.

However not all industrial gases are supplied in the gaseous phase. A few gases are vapors that can be liquefied at ambient temperature under pressure alone, so they can also be supplied as a liquid in an appropriate container. This phase change also makes these gases useful as ambient refrigerants and the most significant industrial gases with this property are ammonia (R717), propane (R290), butane (R600), and sulfur dioxide (R764). Chlorine also has this property but is too toxic, corrosive and reactive to ever have been used as a refrigerant. Some other gases exhibit this phase change if the ambient temperature is low enough; this includes ethylene (R1150), carbon dioxide (R744), ethane (R170), nitrous oxide (R744A), and sulfur hexafluoride; however, these can only be liquefied under pressure if kept below their critical temperatures which are 9 °C for C2H4 ; 31 °C for CO2 ; 32 °C for C2H6 ; 36 °C for N2O ; 45 °C for SF6. All of these substances are also provided as a gas (not a vapor) at the 200 bar pressure in a gas cylinder because that pressure is above their critical pressure.

Permanent gases (those with a critical temperature below ambient) can only be supplied as liquid if they are also cooled. All gases can potentially be used as a refrigerant around the temperatures at which they are liquid; for example nitrogen (R728) and methane (R50) are used as refrigerant at cryogenic temperatures.

Exceptionally carbon dioxide can be produced as a cold solid known as dry ice, which sublimes as it warms in ambient conditions, the properties of carbon dioxide are such that it cannot be liquid at a pressure below its triple point of 5.1 bar.

Acetylene is also supplied differently. Since it is so unstable and explosive, this is supplied as a gas dissolved in acetone within a packing mass in a cylinder. Acetylene is also the only other common industrial gas that sublimes at atmospheric pressure.

Gas delivery

Photos gas cabinet inventory

The major industrial gases can be produced in bulk and delivered to customers by pipeline, but can also be packaged and transported.

Most gases are sold in gas cylinders and some sold as liquid in appropriate containers (e.g. Dewars) or as bulk liquid delivered by truck. The industry originally supplied gases in cylinders to avoid the need for local gas generation; but for large customers such as steelworks or oil refineries, a large gas production plant may be built nearby (typically called an "on-site" facility) to avoid using large numbers of cylinders manifolded together. Alternatively, an industrial gas company may supply the plant and equipment to produce the gas rather than the gas itself. An industrial gas company may also offer to act as plant operator under an operations and maintenance contract for a gases facility for a customer, since it usually has the experience of running such facilities for the production or handling of gases for itself.

Some materials are dangerous to use as a gas; for example, fluorine is highly reactive and industrial chemistry requiring fluorine often uses hydrogen fluoride (or hydrofluoric acid) instead. Another approach to overcoming gas reactivity is to generate the gas as and when required, which is done, for example, with ozone.

The delivery options are therefore local gas generation, pipelines, bulk transport (truck, rail, ship), and packaged gases in gas cylinders or other containers.

Bulk liquid gases are often transferred to end user storage tanks. Gas cylinders (and liquid gas containing vessels) are often used by end users for their own small scale distribution systems. Toxic or flammable gas cylinders are often stored by end users in gas cabinets for protection from external fire or from any leak.

What defines an industrial gas

Industrial gas is a group of materials that are specifically manufactured for use in industry and are also gaseous at ambient temperature and pressure. They are chemicals which can be an elemental gas or a chemical compound that is either organic or inorganic, and tend to be low molecular weight molecules. They could also be a mixture of individual gases. They have value as a chemical; whether as a feedstock, in process enhancement, as a useful end product, or for a particular use; as opposed to having value as a "simple" fuel.

The term “industrial gases” is sometimes narrowly defined as just the major gases sold, which are: nitrogen, oxygen, carbon dioxide, argon, hydrogen, acetylene and helium. Many names are given to gases outside of this main list by the different industrial gas companies, but generally the gases fall into the categories "specialty gases", “medical gases”, “fuel gases” or “refrigerant gases”. However gases can also be known by their uses or industries that they serve, hence "welding gases" or "breathing gases", etc.; or by their source, as in "air gases"; or by their mode of supply as in "packaged gases". The major gases might also be termed "bulk gases" or "tonnage gases".

In principle any gas or gas mixture sold by the "industrial gases industry" probably has some industrial use and might be termed an "industrial gas". In practice, "industrial gases" are likely to be a pure compound or a mixture of precise chemical composition, packaged or in small quantities, but with high purity or tailored to a specific use (e.g. oxyacetylene). Lists of the more significant gases are listed in "The Gases" below.

There are cases when a gas is not usually termed an "industrial gas"; principally where the gas is processed for later use of its energy rather than manufactured for use as a chemical substance or preparation.

The oil and gas industry is seen as distinct. So, whilst it is true that natural gas is a "gas" used in "industry" - often as a fuel, sometimes as a feedstock, and in this generic sense is an "industrial gas"; this term is not generally used by industrial enterprises for hydrocarbons produced by the petroleum industry directly from natural resources or in an oil refinery. Materials such as LPG and LNG are complex mixtures often without precise chemical composition that often also changes whilst stored.

The petrochemical industry is also seen as distinct. So petrochemicals (chemicals derived from petroleum) such as ethylene are also generally not described as "industrial gases".

Sometimes the chemical industry is thought of as distinct from industrial gases; so materials such as ammonia and chlorine might be considered "chemicals" (especially if supplied as a liquid) instead of or sometimes as well as "industrial gases".

Small scale gas supply of hand-carried containers is sometimes not considered to be industrial gas as the use is considered personal rather than industrial; and suppliers are not always gas specialists.

These demarcations are based on perceived boundaries of these industries (although in practice there is some overlap), and an exact scientific definition is difficult. To illustrate "overlap" between industries:

Manufactured fuel gas (such as town gas) would historically have been considered an industrial gas. Syngas is often considered to be a petrochemical; although its production is a core industrial gases technology. Similarly, projects harnessing Landfill gas or biogas, Waste-to-energy schemes, as well as Hydrogen Production all exhibit overlapping technologies.

Helium is an industrial gas, even though its source is from natural gas processing.

Any gas is likely to be considered an industrial gas if it is put in a gas cylinder (except perhaps if it is used as a fuel)

Propane would be considered an industrial gas when used as a refrigerant, but not when used as a refrigerant in LNG production, even though this is an overlapping technology.

Gases

Elemental gases

Elemental gases in the periodic table
Hydrogen
Helium
Lithium Beryllium
Boron Carbon Nitrogen Oxygen Fluorine Neon
Sodium Magnesium
Aluminium Silicon Phosphorus Sulfur Chlorine Argon
Potassium Calcium
Scandium Titanium Vanadium Chromium Manganese Iron Cobalt Nickel Copper Zinc Gallium Germanium Arsenic Selenium Bromine Krypton
Rubidium Strontium

Yttrium Zirconium Niobium Molybdenum Technetium Ruthenium Rhodium Palladium Silver Cadmium Indium Tin Antimony Tellurium Iodine Xenon
Caesium Barium Lanthanum Cerium Praseodymium Neodymium Promethium Samarium Europium Gadolinium Terbium Dysprosium Holmium Erbium Thulium Ytterbium Lutetium Hafnium Tantalum Tungsten Rhenium Osmium Iridium Platinum Gold Mercury (element) Thallium Lead Bismuth Polonium Astatine Radon
Francium Radium Actinium Thorium Protactinium Uranium Neptunium Plutonium Americium Curium Berkelium Californium Einsteinium Fermium Mendelevium Nobelium Lawrencium Rutherfordium Dubnium Seaborgium Bohrium Hassium Meitnerium Darmstadtium Roentgenium Copernicium Nihonium Flerovium Moscovium Livermorium Tennessine Oganesson

The known chemical elements which are, or can be obtained from natural resources (without transmutation) and which are gaseous are hydrogen, nitrogen, oxygen, fluorine, chlorine, plus the noble gases; and are collectively referred to by chemists as the "elemental gases". These elements are all primordial apart from the noble gas radon which is a trace radioisotope which occurs naturally since all isotopes are radiogenic nuclides from radioactive decay. These elements are all nonmetals.

(Synthetic elements have no relevance to the industrial gas industry; however for scientific completeness, note that it has been suggested, but not scientifically proven, that metallic elements 112 (Copernicium) and 114 (Flerovium) are gases.)

The elements which are stable two atom homonuclear molecules at standard temperature and pressure (STP), are hydrogen (H2), nitrogen (N2) and oxygen (O2), plus the halogens fluorine (F2) and chlorine (Cl2). The noble gases are all monatomic.

In the industrial gases industry the term "elemental gases" (or sometimes less accurately "molecular gases") is used to distinguish these gases from molecules that are also chemical compounds.

Radon is chemically stable, but it is radioactive and does not have a stable isotope. Its most stable isotope, 222Rn, has a half-life of 3.8 days. Its uses are due to its radioactivity rather than its chemistry and it requires specialist handling outside of industrial gas industry norms. It can however be produced as a by-product of uraniferous ores processing. Radon is a trace naturally occurring radioactive material (NORM) encountered in the air processed in an ASU.

Chlorine is the only elemental gas that is technically a vapor since STP is below its critical temperature; whilst bromine and mercury are liquid at STP, and so their vapor exists in equilibrium with their liquid at STP.

Other common industrial gases

This list shows the other most common gases sold by industrial gas companies.

There are many gas mixtures possible.

Important liquefied gases

Dewar being filled with LIN from storage tank

This list shows the most important liquefied gases:

Industrial gas applications

A cutting torch is used to cut a steel pipe.

The uses of industrial gases are diverse.

The following is a small list of areas of use:

Friday, August 26, 2022

Aviation fuel

From Wikipedia, the free encyclopedia
 
An aviation fuel truck
 
At some airports, underground fuel pipes allow refueling without the need for tank trucks. Trucks carry the necessary hoses and pumping equipment, but no fuel.

Aviation fuels are petroleum-based fuels, or petroleum and synthetic fuel blends, used to power aircraft. They have more stringent requirements than fuels used for ground use, such as heating and road transport, and contain additives to enhance or maintain properties important to fuel performance or handling. They are kerosene-based (JP-8 and Jet A-1) for gas turbine-powered aircraft. Piston-engined aircraft use gasoline and those with diesel engines may use jet fuel (kerosene). By 2012 all aircraft operated by the U.S. Air Force had been certified to use a 50-50 blend of kerosene and synthetic fuel derived from coal or natural gas as a way of stabilizing the cost of fuel.

Specific energy is an important criterion in selecting fuel for an aircraft. The much higher energy storage capability of hydrocarbon fuels compared to batteries has so far prevented electric aircraft using electric batteries as the main propulsion energy store becoming viable for even small personal aircraft.

As aviation moves into the renewables era, hydrogen-powered aircraft might enter common use. Hydrogen fuel cells do not produce CO2 or other emissions (besides water). However, hydrogen combustion does produce NOx emissions. Cryogenic hydrogen can be used as a liquid at temperatures below 20 K. Gaseous hydrogen involves pressurized tanks at 250–350 bar. With materials available in the 2020s, the mass of tanks strong enough to withstand this kind of high pressure will greatly outweigh the hydrogen fuel itself, largely negating the weight to energy advantage of hydrogen fuel over hydrocarbon fuels. Hydrogen has a severe volumetric disadvantage relative to hydrocarbon fuels, but future blended wing body aircraft designs might be able to accommodate this extra volume without greatly expanding the wetted area.

Even if finally practical, the industry timeline for adopting hydrogen is fairly lengthy. Alternatives to conventional aviation fuel available in the near term include aviation biofuel and synthetically created fuel (aka "e-jet"). These fuels are collectively referred to as "Sustainable Aviation Fuel" (SAF).

Types of aviation fuel

Conventional aviation fuels

Jet fuel

Ground fueling of a MiG-29 from a URAL tanker (2011).

Jet fuel is a clear to straw-colored fuel, based on either an unleaded kerosene (Jet A-1), or a naphtha-kerosene blend (Jet B). Similar to diesel fuel, it can be used in either compression ignition engines or turbine engines.

Jet-A powers modern commercial airliners and is a mix of extremely refined kerosene and burns at temperatures at or above 49 °C (120 °F). Kerosene-based fuel has a much higher flash point than gasoline-based fuel, meaning that it requires significantly higher temperature to ignite. It is a high-quality fuel; if it fails the purity and other quality tests for use on jet aircraft, it is sold to ground-based users with less demanding requirements, such as railroads.

Avgas

Avgas (aviation gasoline) is used by small aircraft, light helicopters and vintage piston-engined aircraft. Its formulation is distinct from the conventional gasoline (UK: petrol, or "aviation spirit" in this context) used in motor vehicles which is commonly called mogas or autogas in aviation context. Although it comes in many different grades, its octane rating is higher than that for "regular" motor gasoline.

Emerging aviation fuels

Biofuels

Alternatives to conventional fossil-based aviation fuels, new fuels made via the biomass to liquid method (like sustainable aviation fuel) and certain straight vegetable oils can also be used.

Fuels such as sustainable aviation fuel have the advantage that few or no modifications are necessary on the aircraft itself, provided that the fuel characteristics meet specifications for lubricity and density as well as adequately swelling elastomer seals in current aircraft fuel systems. Sustainable aviation fuel and blends of fossil and sustainably-sourced alternative fuels yield lower emissions of particles and GHGs. They are, however, not being used heavily, because they still face political, technological, and economic barriers, such as currently being more expensive than conventionally produced aviation fuels by a wide margin.

Compressed natural gas and liquified natural gas

Compressed natural gas (CNG) and liquified natural gas (LNG) are fuel feedstocks that aircraft may use in the future. Studies have been done on the feasibility of using natural gas and include the "SUGAR Freeze" aircraft under NASA's N+4 Advanced Concept Development program (made by Boeing's Subsonic Ultra Green Aircraft Research (SUGAR) team). The Tupolev Tu-155 was an alternative fuel testbed which was fuelled on LNG. The low specific energy of natural gas even in liquid form compared to conventional fuels gives it a distinct disadvantage for flight applications.

Production of aviation fuel

The production of aviation fuel falls into two categories: fuel suitable for turbine engines and fuel suitable for spark-ignition piston engines. There are international specifications for each.

Jet fuel is a gas turbine fuel used in propeller and jet aircraft and helicopters. It has a low viscosity at low temperature, has limited ranges of density and calorific value, burns cleanly, and remains chemically stable when heated to high temperature.

Aviation gasoline, often referred to as "avgas" or 100-LL (low-lead), is a highly refined form of gasoline for aircraft, with an emphasis on purity, anti-knock characteristics and minimization of spark plug fouling. Avgas must meet performance guidelines for both the rich mixture condition required for take-off power settings and the leaner mixtures used during cruise to reduce fuel consumption. Aviation fuel can be used as CNG fuel.

Avgas is sold in much lower volume than jet fuel, but to many more individual aircraft operators; whereas jet fuel is sold in high volume to large aircraft operators, such as airlines and militaries.

Energy content

The net energy content for aviation fuels depends on their composition. Some typical values are:

  • BP Avgas 80, 44.65 MJ/kg, density at 15 °C is 690 kg/m3 (30.81 MJ/litre).
  • Kerosene type BP Jet A-1, 43.15 MJ/kg, density at 15 °C is 804 kg/m3 (34.69 MJ/litre).
  • Kerosene type BP Jet TS-1 (for lower temperatures), 43.2 MJ/kg, density at 15 °C is 787 kg/m3 (34.00 MJ/litre).

Density

In performance calculations, airliner manufacturers use a density of jet fuel around 6.7 lb/USgal or 0.8 kg/l.

Specific cases are:

  • Bombardier Aerospace: The Challenger Multi-role Aircraft is a special mission variant of the Bombardier Challenger 650 business jet platform. Bombardier bases performance on the use of fuel with an average lower heating value of 18,550 BTU/lb (43.147 MJ/kg) and a density of 0.809 kg/l (6.75 lb/US gal).
  • Embraer: In its airport planning manual for the E195 uses an adopted fuel density of 0.811 kg/l (6.77 lb/US gal).

Chemical composition

Aviation fuels consist of blends of over two thousand chemicals, primarily hydrocarbons (paraffins, olefins, naphthenes, and aromatics), additives such as antioxidants and metal deactivators, biocides, static reducers, icing inhibitors, corrosion inhibitors, and impurities. Principal components include n-heptane and isooctane. Like other fuels, aviation fuel for spark-ignited piston engines are described by their octane rating.

Alcohol, alcohol mixtures, and other alternative fuels may be used experimentally, but alcohol is not permitted in any certified aviation fuel specification. In Brazil, the Embraer Ipanema EMB-202A is a version of the Ipanema agricultural aircraft with a modified Lycoming IO-540-K1J5 engine so as to be able to run on ethanol. Other aircraft engines that were modified to run on 100% ethanol were several other types of Lycoming engines (including the Lycoming 235N2C, and Lycoming IO-320) and certain Rotax engines.

Tax

The Convention on International Civil Aviation (ICAO) (Chicago 1944, Article 24) exempts air fuels already loaded onto an aircraft on landing (and which remain on the aircraft) from import taxes. Bi-lateral air services agreements govern the tax exemption of aviation fuels. In the course of an EU initiative, many of these agreements have been modified to allow taxation. Also, the motion for a European parliament resolution on a European Strategy for Low-emission Mobility has stated that "the possibilities for harmonised international measures for kerosene taxation for aviation" needs to be explored. Australia and the United States oppose a worldwide levy on aviation fuel, but a number of other countries have expressed interest. During a debate in the UK Parliament, the forgone tax income due to the exemption of tax on aviation fuel was estimated at £10 billion annually. Furthermore, the planned inclusion of international aviation into the European Union Emission Trading Scheme in 2014 has been called an 'illegal tax' by countries including the US and China, which cite the Chicago Convention.

Certification

Fuels have to conform to a specification in order to be approved for use in type certificated aircraft. The American Society for Testing and Materials (ASTM) developed specifications for automobile gasoline as well as aviation gasoline. These specifications are ASTM D910 and ASTM D6227 for aviation gasoline and ASTM D439 or ASTM D4814 (latest revision) for automobile gasoline.

In use

Aviation fuel storage tanks at George Bush Intercontinental Airport, Houston, Texas

Aviation fuel generally arrives at the airport via pipeline systems, such as the CEPS. It is then pumped over and dispensed from a tanker or bowser. The fuel is then driven up to parked aircraft and helicopters. Some airports have pumps similar to filling stations to which aircraft must taxi. Some airports have permanent piping to parking areas for large aircraft.

Aviation fuel is transferred to an aircraft via one of two methods: overwing or underwing.

Overwing

Overwing fueling is used on smaller planes, helicopters, and all piston-engine aircraft. Overwing fueling is similar to car fueling — one or more fuel ports are opened and fuel is pumped in with a conventional pump.

Underwing

Most widebody aircraft use a double single-point

Underwing fueling, also called single-point refueling or pressure refueling where not dependent on gravity, is used on larger aircraft and for jet fuel exclusively.

For pressure refueling, a high-pressure hose is attached and fuel is pumped in at 275 kPa (40 psi) and a maximum of 310 kPa (45 psi) for most commercial aircraft. Pressure for military aircraft, especially fighters, ranges up to 415 kPa (60 psi). Air being displaced in the tanks is usually vented overboard through a single vent on the aircraft. Because there is only one attachment point, fuel distribution between tanks is either automated or it is controlled from a control panel at the fueling point or in the cockpit. An early use of pressure refueling was on the de Havilland Comet and Sud Aviation Caravelle. Larger aircraft allow for two or more attachment points; however, this is still referred to as single-point refueling, as either attachment point can refuel all of the tanks. Multiple attachments allow for a faster flowrate.

Misfueling

Because of the danger of confusing the fuel types, precautions are taken to distinguish between avgas and jet fuel beyond clearly marking all containers, vehicles, and piping. The aperture on fuel tanks of aircraft requiring avgas cannot be greater than 60 millimetres in diameter. Avgas is often dyed and is dispensed from nozzles with a diameter of 40 mm (49 mm in the United States).

Jet fuel is clear to straw-colored, and is dispensed from a special nozzle called a J spout or duckbill that has a rectangular opening larger than 60 mm diagonally, so as not to fit into avgas ports. However, some jet and turbine aircraft, such as some models of the Astar helicopter, have a fueling port too small for the J spout, and thus require a smaller nozzle.

Safety precautions

Any fueling operation can be very dangerous, and aviation operations have characteristics which must be accommodated. As an aircraft flies through the air, it can accumulate static electricity. If this is not dissipated before fueling, an electric arc could occur and ignite fuel vapors. To prevent this, aircraft are electrically bonded to the fueling apparatus before fueling begins, and are not disconnected until after fueling is complete. Some regions require the aircraft and/or fuel truck to be grounded too. Pressure fueling systems incorporate a dead man's switch to preclude unmonitored operation.

Aviation fuel can cause severe environmental damage; all fueling vehicles must carry equipment to control fuel spills. Fire extinguishers must be present at any fueling operation. Airport firefighting forces are specially trained and equipped to handle aviation fuel fires and spills. Aviation fuel must be checked daily and before every flight for contaminants such as water or dirt.

Avgas is the only remaining lead-containing transportation fuel. Lead in avgas prevents damaging engine knock, or detonation, that can result in a sudden engine failure.

A Carson Helicopters S-61N Fire King being refueled during firefighting operations in Southern River, Western Australia

Nested function

From Wikipedia, the free encyclopedia

In computer programming, a nested function (or nested procedure or subroutine) is a function which is defined within another function, the enclosing function. Due to simple recursive scope rules, a nested function is itself invisible outside of its immediately enclosing function, but can see (access) all local objects (data, functions, types, etc.) of its immediately enclosing function as well as of any function(s) which, in turn, encloses that function. The nesting is theoretically possible to unlimited depth, although only a few levels are normally used in practical programs.

Nested functions are used in many approaches to structured programming, including early ones, such as ALGOL, Simula 67 and Pascal, and also in many modern dynamic languages and functional languages. However, they are traditionally not supported in the (originally simple) C-family of languages.

Effects

Nested functions assumes function scope or block scope. The scope of a nested function is inside the enclosing function, i.e. inside one of the constituent blocks of that function, which means that it is invisible outside that block and also outside the enclosing function. A nested function can access other local functions, variables, constants, types, classes, etc. that are in the same scope, or in any enclosing scope, without explicit parameter passing, which greatly simplifies passing data into and out of the nested function. This is typically allowed for both reading and writing.

Nested functions may in certain situations (and languages) lead to the creation of a closure. If it is possible for the nested function to escape the enclosing function, for example if functions are first class objects and a nested function is passed to another function or returned from the enclosing function, then a closure is created and calls to this function can access the environment of the original function. The frame of the immediately enclosing function must continue to be alive until the last referencing closure dies and non-local automatic variables referenced in closures can therefore not be stack allocated. This is known as the funarg problem and is a key reason why nested functions was not implemented in some simpler languages as it significantly complicates code generation and analysis, especially when functions are nested to various levels, sharing different parts of their environment.

Examples

An example using Pascal syntax (with ALGOL, Modula 2, Oberon, Ada, etc. similar):

function E(x: real): real;
    function F(y: real): real;
    begin
        F := x + y
    end;
begin
    E := F(3) + F(4)
end;

The function F is nested within E. Note that E's parameter x is visible also in F (as F is a part of E) while both x and y are invisible outside E and F respectively.

Similarly, in Standard ML:

fun e (x : real) =
  let
    fun f y = x+y
  in
    f 3 + f 4
  end;

One way to write the same example in Haskell syntax:

e :: Float -> Float
e x = f 3 + f 4 where f y = x + y

The same example in GNU C syntax (C extended with nested functions):

float E(float x)
{
    float F(float y)
    {
        return x + y;
    }
    return F(3) + F(4);
}

Quicksort

A more realistic example is this implementation of quicksort:

void sort(int *items, int size) {
    void quickSort(int first, int last) {
        void swap(int p, int q) {
            int tmp = items[p];
            items[p] = items[q];
            items[q] = tmp;
        }
        
        int partition() {
            int pivot = items[first], index = first;
            swap(index, last);
            for (int i = first; i < last; i++)
                if (items[i] < pivot)
                    swap(index++, i);
            swap(index, last);
            return index;
        }

        if (first < last) {
            int pivotIndex = partition();
            quickSort(first, pivotIndex - 1);
            quickSort(pivotIndex + 1, last);
        }
    }
    quickSort(0, size - 1);
}

Another example is the following implementation of the Hoare partition based quicksort using C++11 lambda expression syntax:

template<typename RandomAccessIterator>
auto Sort(RandomAccessIterator Begin, RandomAccessIterator End)->void {
	auto Partition = [&]() {
		//Hoare partition scheme
		auto &Pivot = *Begin;
		auto ForwardCursor = Begin;
		auto BackwardCursor = End - 1;
		auto PartitionPositionFound = false;
		auto LocatePartitionPosition = [&]() {
			while (*ForwardCursor < Pivot)
				++ForwardCursor;
			while (Pivot < *BackwardCursor)
				--BackwardCursor;
			if (ForwardCursor >= BackwardCursor)
				PartitionPositionFound = true;
			else
				Swap(*ForwardCursor, *BackwardCursor);
		};
		//Trivial helper function
		auto MoveOnAndTryAgain = [&]() {
			++ForwardCursor;
			--BackwardCursor;
		};
		//Brief outline of the actual partition process
		while (true) {
			LocatePartitionPosition();
			if (PartitionPositionFound)
				return BackwardCursor + 1;
			else
				MoveOnAndTryAgain();
		}
	};
	//Brief outline of the quicksort algorithm
	if (Begin < End - 1) {
		auto PartitionPosition = Partition();
		Sort(Begin, PartitionPosition);
		Sort(PartitionPosition, End);
	}
}

Purpose

Lexically nested function definitions are a form of information hiding and are useful for dividing procedural tasks into subtasks which are only meaningful locally. This avoids cluttering other parts of the program with functions and variables that are unrelated to those parts.

They are typically used as helper functions or as recursive functions inside another function (as in the quicksort example above). This has the structural benefit of organizing the code, avoids polluting the scope, and also allows functions to share state easily. As nested function can access local variables of the enclosing function, sharing of state is possible without passing parameters to the nested function or use a global variable, simplifying code.

In languages with nested functions, functions may normally also contain local constants, and types (in addition to local variables, parameters, and functions), encapsulated and hidden in the same nested manner, at any level of depth. This may further enhance the code structuring possibilities.

Other uses

Control flow

Nested functions can also be used for unstructured control flow, by using the return statement for general unstructured control flow. This can be used for finer-grained control than is possible with other built-in features of the language – for example, it can allow early termination of a for loop if break is not available, or early termination of a nested for loop if a multi-level break or exceptions are not available.

Higher-order functions

As in most languages functions are valid return types, it is possible to create a nested function that accesses a set of parameters from the outer function and have that function be the outer function's return value. Thus it is possible to return a function that is set to fulfill a certain task with little or no further parameters given to it, which can increase performance quite significantly.

Alternatives

The main alternative to nested functions in languages that lack support for them is to place all relevant functions and variables in a separate module (file) and expose only the top-level wrapper function publicly. In C this will generally be done by using static functions for encapsulation and static variables for communication. This achieves encapsulation and sharing of state, though not the logical organization given by lexical nesting of functions, and comes at the cost of having a separate file. It is also not possible in more than a single level.

Another alternative is to share state between the functions through function parameters, most often passing references as arguments to avoid the cost of copying. In C this is generally implemented by a pointer to a structure containing the context. This significantly increases the complexity of the function calls.

In PHP and other languages the anonymous function is the only alternative: the nested function is declared not as usual function, but by reference, as a local variable. To use local variables in the anonymous function, use closure.

Languages

Well known languages supporting lexically nested functions include:

Functional languages

In most functional programming languages, such as Scheme, nested functions are a common way of implementing algorithms with loops in them. A simple (tail) recursive inner function is created, which behaves as the algorithm's main loop, while the outer function performs startup actions that only need to be done once. In more complex cases, a number of mutually recursive functions may be created as inner functions.

Some languages without direct support

Certain languages do not have straightforward syntactic and semantic support to implement nested functions. Nevertheless, for some of them the idea of nested functions can be simulated with some degree of difficulty through the use of other language constructs. The following languages can approximate nested functions through the respective strategies:

  • C++
    • before C++11: allows definition of classes within classes, providing the ability to use class methods in a way similar to nested functions in one level (see Function object in C++).
    • since C++11: by using lambda expressions as the quicksort example above.
  • Eiffel explicitly disallows nesting of routines. This is to keep the language simple, and also allows the convention of using a special variable, Result, to denote the result of a (value-returning) function.
  • Visual Basic, by using anonymous methods or lambda expressions.
  • Java, by using lambda expressions (see Anonymous functions in Java) (since Java 8) or through a workaround that consists in an anonymous class containing a single method. A named class declared local to a method may also be used.

Implementation

Implementation of nested functions can be more involved than it may appear, as a reference to a nested function that references non-local variables creates a closure. For this reason nested functions are not supported in some languages such as C, C++ or Java as this makes compilers more difficult to implement. However, some compilers do support them, as a compiler specific extension. A well known example of this is the GNU C implementation of C which shares code with compilers for languages such as Pascal, Ada and Modula.

Access of non-local objects

There are several ways to implement nested procedures in a lexically scoped language, but the classic way is as follows:

Any non-local object, X, is reached via access-links in the activation frames on the machine stack. The caller, C, assists the called procedure, P, by pushing a direct link to the latest activation of P's immediate lexical encapsulation, (P), prior to the call itself. P may then quickly find the right activation for a certain X by following a fixed number (P.depth – X.depth) of links (normally a small number).
The caller creates this direct link by (itself) following C.depth – P.depth + 1 older links, leading up to the latest activation of (P), and then temporarily bridging over these with a direct link to that activation; the link later disappears together with P, whereby the older links beneath it may come into use again.
Note that P is visible for, and may therefore be called by, C if (P) = C / (C) / ((C)) / etc.

This original method is faster than it may seem, but it is nevertheless often optimized in practical modern compilers (using displays or similar techniques).

Another way to implement nested functions that is used by some compilers is to convert ("lift") nested functions into non-nested functions (where extra, hidden, parameters replace the access links) using a process known as lambda lifting during an intermediate stage in the compilation.

Functions as values

In order for local functions with lexically scoped nonlocals to be passed as results, the language runtime code must also implicitly pass the environment (data) that the function sees inside its encapsulating function, so that it is reachable also when the current activation of the enclosing function no longer exists. This means that the environment must be stored in another memory area than (the subsequently reclaimed parts of) a chronologically based execution stack, which, in turn, implies some sort of freely dynamic memory allocation. Many older Algol based languages (or dialects thereof) does therefore not allow local functions that access nonlocals to be passed as return values, or do they not allow functions as return values at all, although passing of such functions as arguments may still be possible.

No-execute stacks

At least one implementation of nested functions cause a loss of No-execute stacks (NX stack). GCC's nested function implementation calls nested functions through a jump instruction put in the machine stack at runtime. This requires the stack to be executable.

No execute stacks and nested functions are mutually exclusive under GCC. If a nested function is used in the development of a program, then the NX Stack is silently lost. GCC offers the -Wtrampoline warning to alert of the condition.

Software engineered using Secure Development Lifecycle often do not allow the use of nested functions in this particular compiler (GCC) due to the loss of NX Stacks.

Censorship in the United States

From Wikipedia, the free encyclopedia https://en.wikipedia.org/wiki/Censorshi...