# 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.

References

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

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)

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)

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)

refractive_index

Returns refractive index of the medium.

Examples

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

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