# Medium¶

Contains

• Medium

class sympy.physics.optics.medium.Medium[source]

This class represents an optical medium. The prime reason to implement this is to facilitate refraction, Fermat’s principle, etc.

An optical medium is a material through which electromagnetic waves propagate. The permittivity and permeability of the medium define how electromagnetic waves propagate in it.

Parameters

name: string

The display name of the Medium.

permittivity: Sympifyable

Electric permittivity of the space.

permeability: Sympifyable

Magnetic permeability of the space.

n: Sympifyable

Index of refraction of the medium.

Examples

>>> from sympy.abc import epsilon, mu
>>> from sympy.physics.optics import Medium
>>> m1 = Medium('m1')
>>> m2 = Medium('m2', epsilon, mu)
>>> m1.intrinsic_impedance
149896229*pi*kilogram*meter**2/(1250000*ampere**2*second**3)
>>> m2.refractive_index
299792458*meter*sqrt(epsilon*mu)/second


References

R574

https://en.wikipedia.org/wiki/Optical_medium

property intrinsic_impedance

Returns intrinsic impedance of the medium.

The intrinsic impedance of a medium is the ratio of the transverse components of the electric and magnetic fields of the electromagnetic wave travelling in the medium. In a region with no electrical conductivity it simplifies to the square root of ratio of magnetic permeability to electric permittivity.

Examples

>>> from sympy.physics.optics import Medium
>>> m = Medium('m')
>>> m.intrinsic_impedance
149896229*pi*kilogram*meter**2/(1250000*ampere**2*second**3)

property permeability

Returns magnetic permeability of the medium.

Examples

>>> from sympy.physics.optics import Medium
>>> m = Medium('m')
>>> m.permeability
pi*kilogram*meter/(2500000*ampere**2*second**2)

property permittivity

Returns electric permittivity of the medium.

Examples

>>> from sympy.physics.optics import Medium
>>> m = Medium('m')
>>> m.permittivity
625000*ampere**2*second**4/(22468879468420441*pi*kilogram*meter**3)

property refractive_index

Returns refractive index of the medium.

Examples

>>> from sympy.physics.optics import Medium
>>> m = Medium('m')
>>> m.refractive_index
1

property speed

Returns speed of the electromagnetic wave travelling in the medium.

Examples

>>> from sympy.physics.optics import Medium
>>> m = Medium('m')
>>> m.speed
299792458*meter/second
>>> m2 = Medium('m2', n=1)
>>> m.speed == m2.speed
True