Chemical Engineering Tutorials

Saturday, 19 September 2026

The Heat Diffusion Equation

It is important to know the temperature distribution as it allows us to see how temperature varies with position inside a medium. Once the distribution is known, Fourier’s law can be used to calculate the conduction heat flux at any point in the medium or on its surface or any other important quantities of interest.

In a solid, temperature distribution allows study of structural integrity by determining thermal stress, expansions and deflections. Temperature distribution can also help to optimize the thickness of an insulating materials, determine the compatibility of special coatings or adhesives used within the material.

In order to determine the temperature distribution, we can follow the same methodology used in the chapter on Relationship to the First Law of Thermodynamics (see here) of applying energy conservation. In this case, we:

  • define a differential control volume,
  • identify the relevant energy transfer processes
  • introduce the appropriate rate equations

All this results in a differential equation whose solution for a set of boundary conditions, provides the temperature distribution in the medium.

Let us consider a homogeneous medium within which there is no advection (bulk motion) and the temperature distribution T(x, y, z) is expressed in Cartesian coordinates. We then define an infinitesimally small differential control volume dx·dy·dz as shown below:

Formulate the first law at an instant of time, followed by considering the energy processes relevant to this control volume. If there is no motion or with uniform motion, there are no changes in the mechanical energy and no work is being done on the system. Thus, only thermal forms of energy need to be considered. If there are temperature gradients, heat transfer through conduction will occur across each of the control surfaces. The conduction heat rates perpendicular to each control surfaces at the x-, y- and z-coordinate locations are expressed by the terms qx, qy, and qz, respectively. Using Taylor series expansion and neglecting higher-order terms, we can express the conduction heat rates at the opposite surfaces as:

Equation 1a, states that the x-component of the heat transfer rate at x + dx is equal to the value of this component at x plus the amount by which is changes with respect to x times dx.

Within the medium there may also be an energy source term associated with the rate of thermal energy generation (Eg). This term is represented as:

Eg = q dx dy dz                 (2)

where q is the rate at which energy is generated per unit volume of the medium (W/m3).

Additionally, changes may occur in the amount of the internal thermal energy stored by the material in the control volume. If the material is not experiencing a change in phase, latent energy effects are not relevant, and the energy storage term may be expressed as:

Est = ρCp(∂T / ∂t) dx dy dz                    (3)

where ρCp(∂T / ∂t) is the time rate of change of the sensible (thermal) energy of the medium per unit volume

The terms Eg and Est represent different physical processes. The energy generation term (Eg) is an indicator of some energy conversion process involving thermal energy on one hand and some other form of energy like chemical, electrical, or nuclear, on the other. The term is positive (a source) if thermal energy is being generated in the material at the expense of some other energy form; it is negative (a sink) if thermal energy is being consumed. In contrast, the energy storage term (Est) refers to the rate of change of thermal energy stored by the matter.

On a rate basis, the general form of the conservation of energy requirement is:

Ein + Eg – Eout  = Est

Hence, recognizing that the conduction rates constitute the energy inflow Ein and outflow Eout, and substituting Equations 2 and 3, we obtain:

Substituting from Equations 1:

The conduction heat rates in an isotropic material may be evaluated using Fourier’s law:

where each heat flux component of Equation 4 has been multiplied by the appropriate control surface (differential) area to obtain the heat transfer rate. Substituting Equations 6 into Equation 5 and dividing out the dimensions of the control volume (dx dy dz), we obtain: 

Equation 7 is the general Cartesian coordinates form of the heat diffusion equation. This equation is referred to as the heat equation and is the basic tool for heat conduction analysis and its solution helps us obtain the temperature distribution T(x, y, z) as a function of time. The heat equation describes the conservation of energy.  In simple words, Equation 7 means that at any point in the medium, the net rate of energy transfer by conduction into a unit volume plus the volumetric rate of thermal energy generation must be equal to the rate of change of thermal energy stored within the volume.

In equation 7, the term ∂(k∂T/∂x)/∂x is related to the net conduction heat flux into the control volume for the x-coordinate direction. That is, multiplying by dx we get:

The flux expressions in the y- and z- directions are similar to equation 8.

It is often possible to simplify Equation 7. For example, if the thermal conductivity is constant, the heat equation is:

where α = k/ρcp is the thermal diffusivity.

Additional simplifications of the general form of the heat equation are also possible. For example, under steady-state conditions, there can be no change in the amount of energy storage; hence Equation 7 reduces to:

If the heat transfer is one-dimensional (e.g., in the x-direction) and there is no energy generation, Equation 10 reduces to:

This shows that, under steady-state, one-dimensional conditions with no energy generation, the heat flux is a constant in the direction of transfer.

The heat equation may also be expressed in cylindrical and spherical coordinates.

i) Cylindrical Coordinates

The differential control volume for cylindrical coordinates is as shown below:

When we express Equation 3 from The Conduction Rate Equation blog entry (see here) in cylindrical coordinates, the general form of the heat flux vector and hence of Fourier’s Law is:

Where equations 13 represent the heat flux components in the radial (r), circumferential (ϕ), and axial directions (z), respectively.

Applying an energy balance to the cylindrical coordinate’s differential control volume, the following general form of the heat equation is obtained:


ii) Spherical Coordinates

The differential control volume for cylindrical coordinates is as shown below:

The general form of the heat flux vector and Fourier’s law in spherical coordinates is:


Equations 16 are the heat flux components in the radial (r), polar (θ), and azimuthal directions (ϕ), respectively.

Applying an energy balance to the spherical coordinate’s differential control volume, the following general form of the heat equation is obtained:




Wednesday, 12 August 2026

Momentum Equation

From the previous chapter, we saw that the continuity equation is a conservation of mass equation with which mass transfers across boundaries and mass storage within control volumes can be accounted for.

Now we can derive a conservation of linear and angular momentum equations using the same technique.

Linear Momentum Equation

Using the general conservation equation below:

(S = System, CV = Control volume, CS = Control surface)

Let N be momentum mV, and n, which is N per unit mass, becomes V. Thus, the general conservation equation becomes:

From Newton’s law for the system, we have:

Combining these equations with Equation 1, we get a conservation of linear momentum equation for the three principal directions:

Two velocity terms appear in the integrals of the last terms on the right-hand sides of equations 2a, 2b and 2c. One of the velocities refers to a principal flow direction; for example, Vx. The other velocity, Vn, is normal to the control surface where mass crosses the boundary. These two velocities are not always equal. Because force and velocity have magnitude and direction, they are vectors.

Thus, Equation 2 can be written in vector form as:

This equation is a conservation of linear momentum equation.

As required by Newton’s law, the term ΣF represents all forces applied externally to the control volume. These include forces due to gravity, electric and magnetic fields, surface tension effects, pressure forces, and viscous forces (friction).

The first term on the right-hand side of equation 3 represents the rate of storage of linear momentum in the control volume. The last term is a net rate out (out minus in) of linear momentum from the control volume. For steady one-dimensional flow, Equation 3 becomes, for any direction i,

For one fluid stream entering and one leaving the control volume, we have the following for one-dimensional flow:

The momentum equation can be used to set up a general equation for frictional effects existing within a pipe, for a certain type of phenomenon in open channel flow, and for other kinds of applications-oriented problems.

Angular Momentum Equation

For some fluid mechanics problems, it is essential to be able to evaluate moments exerted by moving fluid volumes especially for rotating machinery like turbines and pumps. The equation applicable to these instances is known as angular momentum equation and is derived using the linear momentum equation.

Let us consider a control volume located in the xy plane as shown below.

This control volume is located a distance, r, from the origin; and as fluid passes through the control volume, a force is exerted. The force can be resolved into two components: one normal and one tangential to r. The torque exerted by the force equals the product of force and moment arm. In differential form, we have:

where: dT0 is the differential torque exerted about the origin

            dFt is the tangential component of the differential force perpendicular to r

Because the force is regarded as being caused by fluid motion through the control volume, we can use the linear momentum equation (Equation 2) applied in the tangential direction to obtain the following:

The differential torque is then,

Integrating the above expression over all control volumes that contribute to the total torque, we get:

The left-hand side of equation 5 represents the sum of all externally applied torques on the control volume. On the right-hand side, the first term represents a storage of angular momentum in the control volume; the last term is the net rate out (out minus in) of angular momentum from the control volume.

As seen in xy graph above, V sin θ = Vt. Equation 5 can then be expressed as:

If we use vector notation, the cross product is defined as:

r x V = rV sinθ

Now we can express equation 6 in vector form:

Equation 7 is applicable to both 2-dimensional and 3-dimensional cases. 



Wednesday, 22 July 2026

THE CONTINUITY EQUATION

The continuity equation is a statement of conservation of mass (covered in this blog entry as Equation 4.)

The flow quantity N becomes m, and n = m/m = 1. Thus, the general conservation equation becomes:

For a system of particles, since mass is neither created nor destroyed mass remains constant. Thus:

This means that the mass entering the control volume is equal to the summation of the mass stored and the mass leaving. For a steady flow with no storage, the mass entering is equal to the mass leaving. Thus, for a steady flow, equation 1 is expressed as:

For incompressible fluids (liquids), ρ is a constant, and the following equation is used for steady incompressible flow:

From Equation 3 we learn that:

  • the volume of fluid entering the control volume per unit time is equal to the amount leaving.
  • a velocity distribution normal to the control surface must be integrated over the cross-sectional area at inlets and exits to the control volume.

However, for many flow situations, a velocity distribution may not be known or derivable. Thus, in such cases it is more convenient to use average velocity at a cross section that is independent of area – assuming that it is 1-dimensional flow or at least flow that can be estimated as 1-dimensional. Therefore, by definition:

Where V = average velocity. The product AV = Q is known as the volume flow rate with dimensions of L3/T (m3/s or ft3/s). Also used in fluid mechanics is the term ṁ, defined as the mass flow rate, where ṁ = ρQ = ρAV. The mass flow rate has dimensions of M/T (kg/s or slug/s).

To understand average velocity, let us consider a flow in the pipe below with a velocity distribution, Vz:

where R is the pipe radius. The Vz expression or instantaneous velocity, the gives the velocity at any radial location within the pipe. At a control surface normal to the axial direction, Vz = Vn and the average velocity is:

dA = r dr dθ is used in the integral since we are dealing with cylindrical coordinates.

This result means that we can replace the velocity distribution with an average velocity so that the volume flow rate remains unchanged as shown in the velocity distribution figure above. In many practical situations, the volume flow rate and area are known but the velocity distribution isn’t but average velocity can be determined.

When we use the average velocity, the continuity equation becomes:

For steady flow systems where no mass is stored,



 


Tuesday, 16 June 2026

Liquid-Liquid Extraction

Liquid-liquid extraction is the separation of the components in a liquid phase (diluent) by treatment with a solvent in which one or more of the desired components are preferentially soluble. Normally, the diluent + remaining solute is called the raffinate phase while the second solvent + the solute is the extract phase.

It is a process that is suitable to separate materials that may decompose at high temperatures.

Below is an example of an extraction process diagram:

This process is commonly used in the separation of hydrocarbons in the petroleum industry like the separation of aromatics from kerosene-based fuels oils (to improve their burning qualities), separation of aromatics from paraffin and naphthenic compounds (to improve the temperature-viscosity characteristics of lubricating oils), to obtain relatively pure compounds (benzene, toluene and xylene) from catalytically produced reformats.

For liquid-liquid extraction, it is vital that the liquid mixture feed and solvent are at-least partially or completely immiscible and three stages are involved:

a) The feed mixture and solvent are made to contact.
b) Separation of the resulting two phases.
c) Removal and recovery of the solvent from each phase.

Stages (a) and (b) can be combined into a single piece of equipment like a column that operates continuously known as differential contacting. Liquid-liquid extraction is also carried out in a stage-wise equipment like a mixer-settler unit. Extraction can either occur through physical operation or a chemical operation. 

Extraction is a preferred alternative to distillation is cases where:

  • Distillation would require excessive amounts of heat like when the relative volatility is near unity.
  • The components in the feed have very close boiling points
  • The components to be separated are very different in nature.
  • The formation of azeotropes limits the degree of separation obtainable.
  • One of the components is present at a concentration that is too low for distillation to occur.
  • Heating must be avoided.

Mass Balance

If we perform an overall mass balance calculation on the above system from stage 1 to stage N, we get:

F + S = E1 + RN

Criteria for Selecting a Solvent for Liquid–Liquid Extraction

  • Selectivity: A solvent's ability to separate components A and C (desired compound) is determined by comparing the concentration ratio of C to A in the solvent-rich phase with that in the A-rich phase at equilibrium. For extraction to be effective, the selectivity must be greater than one; higher values indicate better separation efficiency. If the selectivity equals one, separation cannot be achieved.
  • Recoverability: The chosen solvent should be easy to recover and recycle using methods that are both safe and cost-effective.
  • Density: A significant difference in the densities of the two saturated liquid phases is desirable, as it facilitates phase separation.
  • Interfacial Tension: High interfacial tension is generally preferred because it promotes the coalescence of emulsified droplets. However, it can also make the dispersion of one liquid into another more difficult.
  • Safety & Cost: An ideal solvent should be non-toxic, non-flammable, and economical to use.
  • Chemical Stability: The solvent should be chemically stable and non-reactive toward the components being separated as well as the materials used in the equipment.
  • Viscosity, Vapor Pressure & Freezing Point: Low viscosity, low vapor pressure, and a low freezing point are advantageous because they simplify handling, storage, and processing operations.

Uses of Liquid-liquid Extraction

  • Extraction of valuable products from a fermentation broth.
  • Purification of heat sensitive materials like pharmaceuticals, fragrances etc.
  • Removal of high boiling organics like phenol, aniline etc., from waste water.
  • Recovery of reaction products. 

Limitations of Liquid-liquid Extraction

  • Time consuming and laborious.
  • Consumes a large amount of organic solvents hence environmentally polluting. 
  • Generates a large amount of waste.
  • Selectivity is low.
  • Can result in the formation of hard to break emulsions.

Differences Between Liquid-liquid Extractions and Distillation.

  • Liquid-liquid extraction uses differences in solubilities of solutes in two solvents while distillation uses differences of boiling points of components in a mixture
  • Liquid-liquid extraction uses selective solubility as a degree of separation while distillation uses relative volatility as a degree of separation
  • Liquid-liquid extraction doesn’t produce pure products while distillation produces almost pure products
  • Liquid-liquid extraction uses a separating funnel while a distillation apparatus is used for distillation
  • No new phases created during liquid-liquid extraction while new phases are created by addition of heat during distillation
  • Liquid-liquid extraction doesn’t require heating and cooling provisions while distillation does






Friday, 5 June 2026

GAS CHROMATOGRAPHY (GC)

Gas chromatography (GC) also sometimes known as vapor-phase chromatography (VPC), or gas–liquid partition chromatography (GLPC) is a common type of chromatography used in analytical chemistry for separating and analyzing compounds that can be vaporized without decomposition. It is a term used to describe the group of analytical separation techniques used to analyze volatile substances in the gas phase.

Typical uses of GC include:

  • Testing the purity of a particular substance
  • Separating the different components of a mixture.
  • It can also be used to prepare pure compounds from a mixture.

In GC, components of a sample are dissolved in a solvent and vaporized in order to separate the analytes by distributing the samples between a stationary phase and a mobile phase.

  • Mobile phase: This is where a chemically inert gas or an unreactive gas such as helium, argon, nitrogen or hydrogen serves to carry the molecules of the analyte through the heated column. GC is one of the sole forms of chromatography that does not utilize the mobile phase for interacting with the analyte.
  • Stationary phase: This is a microscopic layer of viscous liquid on a surface of solid particles on an inert solid support inside a piece of glass or metal tubing called a column. The stationary phase is either a solid adsorbent, termed gas-solid chromatography (GSC), or a liquid on an inert support, termed gas-liquid chromatography (GLC)

Advantages of using GC

  1. Short Analysis Time
  2. Wide Choice of Stationary Phase
  3. Wide Choice of Detectors
  4. Ease of Operation
  5. High sensitivity
  6. Good separation efficiency
  7. Suitable for trace analysis
  8. Both qualitative and quantitative analysis possible

Limitations of GC

  1. Mainly suitable for volatile and thermally stable compounds
  2. Some samples require preparation or derivatization
  3. Non-volatile compounds are difficult to analyze directly

Types of GC

  • Gas-solid chromatography (GSC): It based upon a stationary phase on which retention of analysis consequence of physical adsorption
  • Gas-liquid chromatography (GLC): Is useful for separating ions or molecules that are dissolved at absolvent.

Main Components of a GC

Source: MSc. Yassen .H.jassim & MSc. Elham Faisa - Analytical Chemistry Lecture 6


i) Carrier gas reservoir

Inert gases like argon, helium, nitrogen may be used as a carrier gas. Hydrogen gas is less preferred because of it poses explosion hazards. Selection of carrier gas depends on the nature of the mixture to be separated, purity required and detector used for the analysis.

The main purpose of the gas in GC is to move the solutes along the column thus mobile phase is often referred to as carrier gas.

Carrier gas should be:

  • Inert, Free from fire and explosion hazard
  • Suitable for detector
  • Easily available
  • Have good flow rate

ii) Injector

Liquid sample is injected by means of a calibrated micro syringe and is injected through a rubber septum at the head of the column.

If the sample is gaseous then 1 to 10ml is injected while for liquid sample 0.1 to 10 micro liter is injected.

At the temperature of the injection port liquid sample is readily converted to vapors without decomposition.

iii) Column

This is the backbone of chromatography. Column is made up of stainless steel or glass and is 2 to 3 meter long and has an internal diameter 2 to 4 mm.

Types of columns

Packed column: It is made up of Teflon having internal diameter 2 to 4 mm and length 5 meter. Column is packed with finely divided solid as absorbent in gas solid chromatography.

Capillary column: These columns are 15 meters to 100 meter long and have internal diameter less than 1 mm (i.e., 0.25 to 0.30 mm). This column does not contain packing but contain stationary phase coated on their inner wall.

iv) Detectors

The most commonly used detectors in a GC machine are:

Flame Ionization Detector (FID): This detector has high sensitivity and selectivity for carbon containing compounds. FID has the following characteristics:

    • This detector is 1000 times more sensitive than Thermal conductivity detector (TCD)
    • It can detect component at ppb (parts per billion) level
    • Fast sensitive and give response to almost all organic compound
    • Not sensitive to inorganic compound
    • It is widely used detector of Gas chromatography

Thermal Conductivity Detector (TCD): It works under the principles of:

    • As the composition of gas changes the thermal conductivity also changes.
    • Resistance of wire is the measure of it’s temperature.

Characteristics of TCD include:

    • Simple and accurate
    • Response is reproducible
    • Give response to both organic and inorganic species
    • Nondestructive (i.e., effluent can be collected and reused)

Electron Capture Detector (ECD): Detector consists of metal box acting as cathode (negative electrode). Inside this box there is beta (β) emitting source (i.e., 3H or 63Ni). Collector electrode act as anode (Positive electrode).

Characteristics of ECD include:

    • Very good detector for electronegative elements.
    • Nitrogen gas can be used as carrier gas.
    • Give very little response to electropositive elements.
    • Can be used up to 350°C
    • Less electronegative compounds can be detected by preparing their derivatives.

Suitable and good detector must have following properties:

  • Good sensitivity
  • Stability
  • Selectivity
  • Linearity
  • Easy to use

v) Software / Data system

The software being used analyzes and displays a chromatograph for analysis and interpretation.

How a Gas Chromatography Works

Step 1: Sample Injection

A small amount of sample is injected into the system. If sample is solid, it is converted to liquid form by dissolving in suitable solvent.

Step 2: Vaporization

The sample is heated and converted into vapor inside the injector.

Step 3:  Carrier Gas Transport

An inert carrier gas (commonly helium, nitrogen, or hydrogen) carries the vaporized sample through the column.

Step 4: Separation inside the Column

Inside the column, compounds separate because they interact differently with the stationary phase based on:

  • Volatility (boiling point)
  • Polarity
  • Molecular interactions

Step 5: Detection

Separated compounds reach a detector (such as FID, TCD, ECD, or MS) at different times.

Step 6: Chromatogram Generation

The detector response is converted into peaks called a chromatogram. Each peak corresponds to a compound, and the retention time helps identify it.

Chromatogram

This is a plot of the detector response against time. The number of peaks represents the number of components presents in the sample (mixture).

Separation of component is based on their partition coefficient. The separated component exit along with the mobile phase at the end of the column. These components are then passed through the detector and detector give response to read out device. Magnitude of the response depends upon the concentration of the component.

Example: 

Mixture of four components is analyzed by gas chromatography. Peak area corresponding to component A, B, C, D is 30cm2, 15cm2, 20cm2, 25cm2 respectively. Calculate % of each component.

Solution

Total peak area = 30 +15 +20 +25 = 90cm2

% of component A = (Peak area / Total area) x 100 = (30/90) x 100 = 33.33%

% of component B = (15 / 90) x 100 = 16.66%

% of component C = (20 / 90) x 100 = 22.22%

% of component D = (25 / 90) x 100 = 27.77%

Retention time (tR)

This is the time taken by the sample to come out from the column after it’s injection

tR = t2 - t1

t2 = time of elution

t1 = time of injection

Common Applications

  • Solvent analysis
  • Petrochemicals
  • Food flavor compounds
  • Environmental pollutants
  • Pharmaceutical impurities
  • Textile auxiliaries and finishing chemicals
  • Forensic investigations

x

Saturday, 16 May 2026

The Thermal Properties of Matter

To be able to use Fourier’s law, the thermal conductivity of the material must be known. This property, referred to as a transport property, gives an indication of the rate at which energy is transferred by the diffusion process and it depends on the physical structure of matter, atomic and molecular, which is related to the state of the matter.

Thermal Conductivity

From Fourier’s law (equation 6 from this blog entry), we can define the thermal conductivity associated with conduction in the x-direction as:

Analogous definitions are associated with thermal conductivities in the y- and z-directions (ky, kz), but for an isotropic material, the thermal conductivity is independent of the direction of transfer, kx = ky = kz ≡ k.

Thus, for a given temperature gradient, the conduction heat flux increases with increasing thermal conductivity.

In general, the thermal conductivity of a solid is larger than that of a liquid, which is larger than that of a gas i.e., ksolid > kliquid > kgas. The thermal conductivity of a solid may be more than four orders of magnitude larger than that of a gas. This is largely due to differences in intermolecular spacing for the two states.

The Solid State: A solid may be comprised of free electrons and atoms bound in a periodic arrangement called a lattice. Therefore, transport of thermal energy may be due to two effects: the migration of free electrons and lattice vibrational waves (phonons). In pure metals, the electron contribution to conduction heat transfer dominates, whereas in nonconductors and semiconductors, the phonon contribution is dominant.

The Fluid State: This includes both liquids and gases.  The thermal energy transport is less effective in fluids due to the much larger intermolecular spacing and more random motion of molecules as compared to the solid state. Thus, the thermal conductivity of gases and liquids is generally smaller than that of solids.

The kinetic theory of gases can be used to explain the effect of temperature, pressure and chemical species on the thermal conductivity of a gas. From this theory, we know that thermal conductivity is directly proportional to the density of the gas,

From this theory it is known that the thermal conductivity is directly proportional to the density of the gas, the mean molecular speed c, and the mean free path λmfp, which is the average distance traveled by a molecule before experiencing a collision:

For an ideal gas, the mean free path may be expressed as:

Where: kB is the Boltzmann’s constant, kB = 1.381 x 10-23 J/K and d is the diameter of the gas molecule.

As is expected, the mean free path is small for high pressure or low temperature due to the densely packed molecules. The mean free path also depends on the diameter of the molecule where larger molecules are more likely to experience collisions than small molecules; in the rare case of an infinitesimally small molecule, the molecules cannot collide, resulting in an infinite mean free path.

Other Relevant Properties

In the analysis of heat transfer problems, it is necessary to use several properties of matter. These properties are often referred to as thermophysical properties. These properties include two distinct categories:

  • Transport Properties: includes the diffusion rate coefficients such as the thermal conductivity, k (for heat transfer), and the kinematic viscosity, ν (for momentum transfer).
  • Thermodynamics Properties: These relate to the equilibrium state of a system. Examples include density (ρ) and specific heat (cp). The volumetric heat capacity, ρcp (J/m3K), measures the ability of a material to store thermal energy. Since substances, like solids and liquids, with large densities are characterized by small specific heats they are very good energy storage media while gases which have small densities are poor for thermal energy storage.

In heat transfer analysis, the ratio of the thermal conductivity to the heat capacity is an important property termed the thermal diffusivity α, with the units of m2/s:

Thermal diffusivity measures the ability of a material to conduct thermal energy relative to its ability to store thermal energy.

Materials of large α will respond quickly to changes in their thermal environment, while materials with small α will respond more slowly, taking longer to reach a new equilibrium condition.


The Heat Diffusion Equation

It is important to know the temperature distribution as it allows us to see how temperature varies with position inside a medium. Once the d...