electromagnetics package

Submodules

electromagnetics.charge module

Charge : Charge is a property of matter that creates force.

electromagnetics.charge.negative_charge(weight)[source]

This calculates the total amount of negative charge in a item

Parameters:weight – weight in kgs
Returns:charge: charge in coulomb
electromagnetics.charge.positive_charge(weight)[source]

This calculates the total amount of positive in a item

Parameters:weight – weight in kgs
Returns:charge: charge in coulomb

electromagnetics.constants module

Constants : This will contain all the constants used in Electromagnetics.

electromagnetics.coulombs_law module

Coulomb’s law : a law stating that like charges repel and opposite charges attract, with a force proportional to the product of the charges and inversely proportional to

the square of the distance between them.
electromagnetics.coulombs_law.accumulative_force_on_charge_by_other(main_charge, charges_dict_with_distance)[source]

This returns the accumulative force on charge one by other charges.

Parameters:
  • main_charge – Charge on which we are measuring force. (unit : C)
  • charges_dict_with_distance

    list of charges with their distance and charge example= [

    {charge: amount, distance: amount, unit_vector: 1}, {charge: amount, distance: amount, unit_vector: -1}, {charge: amount, distance: amount, unit_vector: 1}, ]
Returns:

Total Accumulative force on main charge. (unit : N)

Example :

accumulative_force_on_charge_by_other(

10e-6, [

{‘charge’:10e-6,’distance’:.15,’unit_vector’:-1}, {‘charge’:10e-6,’distance’:.6,’unit_vector’:1}, {‘charge’:10e-6,’distance’:math.sqrt(.6*.6+.15*.15),’unit_vector’:-1}

]

)

electromagnetics.coulombs_law.two_charges_vector_force(charge_1, charge_2, unit_vector, distance)[source]

This will calculate the amount of repulsion or attraction force between two charges. This returns the vector force from charge_1 to charge_2

Parameters:
  • charge_1 – Charge 1 (unit : C)
  • charge_2 – Charge 2 (unit : C)
  • unit_vector – Direction of force
  • distance – Distance between both charges (unit : m)
Returns:

Total amount of repulsion or attraction force between charges. (unit : N)

Example :
two_charges_vector_force(10e-6, 10e-6 ,-1, .13)
electromagnetics.coulombs_law.two_charges_vector_force_magnitude_only(charge_1, charge_2, distance)[source]

This will calculate the amount of repulsion or attraction force between two charges.

Parameters:
  • charge_1 – Charge 1 (unit : C)
  • charge_2 – Charge 2 (unit : C)
  • distance – Distance between both charges (unit : m)
Returns:

Total amount of repulsion or attraction force between charges. (unit : N)

Example:
two_charges_vector_force(10e-6, 10e-6, .10)

Module contents

Top-level package for Electromagnetics.