Medium
Medium¶
Contains
Medium
- class sympy.physics.optics.medium.Medium(name, permittivity=None, permeability=None, n=None)[source]¶
This class represents an optical medium. The prime reason to implement this is to facilitate refraction, Fermat’s principle, etc.
- 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.
Explanation
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.
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
- 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