SimiLie
Loading...
Searching...
No Matches
electromagnetic_coupling.ElectromagneticInteraction Class Reference
Collaboration diagram for electromagnetic_coupling.ElectromagneticInteraction:
Collaboration graph

Public Member Functions

 __init__ (self)
 

Public Attributes

 position = Matrix(symbols("x0:3", real=True))
 
 time = symbols("t", real=True)
 
 momentum = Matrix(symbols("p0:3", real=True))
 
 velocity = Matrix(symbols("v0:3", real=True))
 
 charge
 
 mass = symbols("q m", nonzero=True, real=True)
 
 potential = Function("phi")(*self.position, self.time)
 
 vector_potential
 
 hamiltonian = mechanical.dot(mechanical) / (2 * self.mass)
 
 canonical_velocity = self.hamiltonian.diff(self.momentum)
 
 canonical_force = -self.hamiltonian.diff(self.position)
 
 electric_field = Matrix(symbols("E0:3", real=True))
 
 induction = Matrix(symbols("B0:3", real=True))
 
 mechanical_force
 
 electric_force
 
 magnetic_force = self.mechanical_force - self.electric_force
 
 electric_power = self.velocity.dot(self.electric_force)
 
 magnetic_power = simplify(self.velocity.dot(self.magnetic_force))
 
 charge_density = symbols("charge_density", real=True)
 
 current = Matrix(symbols("J0:3", real=True))
 
 electric_force_density
 
 magnetic_force_density
 
 fluid_energy_source = simplify(self.electric_power.subs(carrier_sum))
 

Detailed Description

Definition at line 27 of file electromagnetic_coupling.py.

Constructor & Destructor Documentation

◆ __init__()

electromagnetic_coupling.ElectromagneticInteraction.__init__ ( self)

Definition at line 28 of file electromagnetic_coupling.py.

Member Data Documentation

◆ position

electromagnetic_coupling.ElectromagneticInteraction.position = Matrix(symbols("x0:3", real=True))

Definition at line 29 of file electromagnetic_coupling.py.

◆ time

electromagnetic_coupling.ElectromagneticInteraction.time = symbols("t", real=True)

Definition at line 30 of file electromagnetic_coupling.py.

◆ momentum

electromagnetic_coupling.ElectromagneticInteraction.momentum = Matrix(symbols("p0:3", real=True))

Definition at line 31 of file electromagnetic_coupling.py.

◆ velocity

electromagnetic_coupling.ElectromagneticInteraction.velocity = Matrix(symbols("v0:3", real=True))

Definition at line 32 of file electromagnetic_coupling.py.

◆ charge

electromagnetic_coupling.ElectromagneticInteraction.charge

Definition at line 33 of file electromagnetic_coupling.py.

◆ mass

electromagnetic_coupling.ElectromagneticInteraction.mass = symbols("q m", nonzero=True, real=True)

Definition at line 33 of file electromagnetic_coupling.py.

◆ potential

electromagnetic_coupling.ElectromagneticInteraction.potential = Function("phi")(*self.position, self.time)

Definition at line 34 of file electromagnetic_coupling.py.

◆ vector_potential

electromagnetic_coupling.ElectromagneticInteraction.vector_potential
Initial value:
= Matrix(
[Function(f"A{i}")(*self.position, self.time) for i in range(3)]
)

Definition at line 35 of file electromagnetic_coupling.py.

◆ hamiltonian

electromagnetic_coupling.ElectromagneticInteraction.hamiltonian = mechanical.dot(mechanical) / (2 * self.mass)

Definition at line 39 of file electromagnetic_coupling.py.

◆ canonical_velocity

electromagnetic_coupling.ElectromagneticInteraction.canonical_velocity = self.hamiltonian.diff(self.momentum)

Definition at line 41 of file electromagnetic_coupling.py.

◆ canonical_force

electromagnetic_coupling.ElectromagneticInteraction.canonical_force = -self.hamiltonian.diff(self.position)

Definition at line 42 of file electromagnetic_coupling.py.

◆ electric_field

electromagnetic_coupling.ElectromagneticInteraction.electric_field = Matrix(symbols("E0:3", real=True))

Definition at line 57 of file electromagnetic_coupling.py.

◆ induction

electromagnetic_coupling.ElectromagneticInteraction.induction = Matrix(symbols("B0:3", real=True))

Definition at line 58 of file electromagnetic_coupling.py.

◆ mechanical_force

electromagnetic_coupling.ElectromagneticInteraction.mechanical_force
Initial value:
= mechanical_force.subs(
substitutions, simultaneous=True
).applyfunc(simplify)

Definition at line 71 of file electromagnetic_coupling.py.

◆ electric_force

electromagnetic_coupling.ElectromagneticInteraction.electric_force
Initial value:
= self.mechanical_force.subs(
dict.fromkeys(self.velocity, 0)
)

Definition at line 74 of file electromagnetic_coupling.py.

◆ magnetic_force

electromagnetic_coupling.ElectromagneticInteraction.magnetic_force = self.mechanical_force - self.electric_force

Definition at line 77 of file electromagnetic_coupling.py.

◆ electric_power

electromagnetic_coupling.ElectromagneticInteraction.electric_power = self.velocity.dot(self.electric_force)

Definition at line 78 of file electromagnetic_coupling.py.

◆ magnetic_power

electromagnetic_coupling.ElectromagneticInteraction.magnetic_power = simplify(self.velocity.dot(self.magnetic_force))

Definition at line 79 of file electromagnetic_coupling.py.

◆ charge_density

electromagnetic_coupling.ElectromagneticInteraction.charge_density = symbols("charge_density", real=True)

Definition at line 80 of file electromagnetic_coupling.py.

◆ current

electromagnetic_coupling.ElectromagneticInteraction.current = Matrix(symbols("J0:3", real=True))

Definition at line 81 of file electromagnetic_coupling.py.

◆ electric_force_density

electromagnetic_coupling.ElectromagneticInteraction.electric_force_density
Initial value:
= self.electric_force.subs(
self.charge, self.charge_density
)

Definition at line 85 of file electromagnetic_coupling.py.

◆ magnetic_force_density

electromagnetic_coupling.ElectromagneticInteraction.magnetic_force_density
Initial value:
= self.magnetic_force.subs(carrier_sum).applyfunc(
simplify
)

Definition at line 88 of file electromagnetic_coupling.py.

◆ fluid_energy_source

electromagnetic_coupling.ElectromagneticInteraction.fluid_energy_source = simplify(self.electric_power.subs(carrier_sum))

Definition at line 91 of file electromagnetic_coupling.py.


The documentation for this class was generated from the following file: