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 priciple, 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

[R408]http://en.wikipedia.org/wiki/Optical_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*kg*m**2/(1250000*A**2*s**3)
>>> m2.refractive_index
299792458*m*sqrt(epsilon*mu)/s
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*kg*m**2/(1250000*A**2*s**3)
permeability

Returns magnetic permeability of the medium.

Examples

>>> from sympy.physics.optics import Medium
>>> m = Medium('m')
>>> m.permeability
pi*kg*m/(2500000*A**2*s**2)
permittivity

Returns electric permittivity of the medium.

Examples

>>> from sympy.physics.optics import Medium
>>> m = Medium('m')
>>> m.permittivity
625000*A**2*s**4/(22468879468420441*pi*kg*m**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*m/s