# University Physics open source

Keywords: Java Spring Windows Eclipse

Part of the knowledge points of College Physics (chapters 16-19) summarized are code. Now open source.

The code runs on sun JDK1.8. For convenience, Chinese is widely used in the code.

# Constant table

Constant table.java

public class Constant table {

public static double Earth radius =6.371*Math.pow(10,6);
public static double universal gravitational constant  =6.67259*Math.pow(10,-11);
public static double Basic charge =1.602*Math.pow(10,-19);
public static double Earth mass =5.965*Math.pow(10,24);
public static double Acceleration of gravity =9.8;
public static double Electrostatic constant =9*Math.pow(10,9);
public static double Electronic mass =9.109*Math.pow(10,-31);
public static double Neutron mass =1.675*Math.pow(10,-27);
public static double Proton mass =1.673*Math.pow(10,-27);
public static double epsilon0 = 8.85*Math.pow(10,-12);
public static double Amount of substance = 6.02214076*Math.pow(10,23);
public static double Vacuum permeability = 4*Math.PI*Math.pow(10,-7);
}

# Interface

## Verbal description.java

The description of public interface{

void description ();

}

## Brain teaser.java

public interface{
void judgment ();
}

# Chapter 16

## Charge.java

public class charge implements A verbal description,brain twists{

@Override
public void describe() {

System.out.println("3 Charged mode:1.Friction electrification 2.Contact charge transfer 3.Inductive power on");
System.out.println("Rub rubber stick with fur->negative electricity. Rubbing the glass rod with silk->positive electricity.");
System.out.println("nature:Basic properties of charge--Same sex repels, opposite sex attracts.");
System.out.println("Law of conservation of charge:In an isolated system,No matter what kind of physical process happened,Charge doesn't create,It won't go away,Can only be transferred from one object to another.\n");
System.out.println("It's a big saying above:The net charge of a system is the algebraic sum of the charges of all particles in the system. The net charge of an electrically neutral object is zero.");
System.out.println("Electric quantity:q=ne(n Is a multiple; e Is the basic charge)");
System.out.println("polarization:It's an electrically neutral object, and the balance is broken. All the positive ones run to one side, while the negative ones run to one side. A point shows polarity");
System.out.println("Conceptual differentiation:conductor,Charge can move inside(It can be a positive charge or a negative charge)");
System.out.println("Conceptual differentiation:insulator,It's hard to move the charge in it, it's tightly bound");
System.out.println("Conceptual differentiation:Conducting ions show conductors under certain conditions／Properties of insulator.");

}

@Override
public void judge() {

}
public static void main(String[] args) {

//Charge charge = new charge();
//charge.describe();

}
}

## Electric field.java

public class electric field implements A verbal description,brain twists {

public double Calculate the electric field intensity of a point charge to the point(double Field source charge,double The square of the distance between the charge and the point){
double electric field intensity = Constant table.Electrostatic constant * Field source charge / The square of the distance between the charge and the point;
return electric field intensity;
}

@Override
public void describe() {
System.out.println("Symbol:E");
System.out.println("formula:F=Eq");
System.out.println("Company:N/C");
System.out.println("Electrostatic balance--Electron does not move");
System.out.println("Charge distribution in electrostatic equilibrium:Confined to a point or projection. It can be understood that the point charge is a crowd, which is difficult to move when people are crowded on the ground. Only to those catwalks can we go.");
System.out.println("Using this principle,(In the state of electrostatic equilibrium, the charge is easily concentrated at the tip of the conductor)，Can be used as lightning rod--In fact, it is to lead the thunder to the ground.");
System.out.println("And electrostatic precipitator. It is to polarize the dust and then collect the dust at the tip.");
System.out.println("physical model :The cavity is not grounded, shielding the external electric field. The cavity is grounded to shield the external electric field and internal electric field.");
System.out.println("flux:Φ=EScosθ.cosθIt's because of the multiplication of two vector points.--High school mathematics.");
System.out.println("Gauss theorem:It's simple, it'sΦ=EScosθ=q/ε.εIt is a symbol introduced by Gauss himself creatively. Because it is convenient to study magnetic flux later,--Because the integral product is a ball.");
System.out.println("εAnd in Cullen k It's related.ε=1/4πk.εIt is a dimensionless quantity, purely because of the symbols produced by the convenience of mathematical substitution.");
System.out.println("The inspiration of Gauss theorem is to make a Gauss surface. Your electric flux is always equal to the charge ratio.");
System.out.println("The electric field on the Gauss surface is 0");
System.out.println("Why is the electric flux passing through positive?cosθ,Through, and normal(Normal Provisions refer to outward)Angle between<90 Degree, so it is positive");
System.out.println("Model:Spherical conductor, in<=R Distance of,E=0.>R Distance of(r It's the radius of the Gaussian surface),(Φ=E*4πr^2=q/ε;E=q/4πr^2*ε)");

}

@Override
public void judge() {

}

public static void main(String[] args) {
//Electric field = new electric field();
//electric field.describe();
}
}

It's very simple. Go through it quickly. Do 2 examples.

# Chapter 17

## Electric potential energy.java

public class electric potential energy implements{
@Override
public void description (){
System.out.println("potential energy: energy stored in the field");
System.out.println("electric potential energy: energy stored in an electric field");
System.out.println("symbol: ∆ u, -∆ U");
System.out.println("relationship between potential energy and work done: ∆ U=-W(field)");
System.out.println("relationship between potential energy and work done: W(MN) = - △ U=-(U(N)-U(M))=U(M)-U(N)");
System.out.println("work and energy transform each other. Who makes him do positive work? There is no choice but to give him part of the potential energy;
System.out.println("similarly, electric field forces do negative work. How can the electric field force be reduced? Who reduced him? Did he convert his energy into electric potential energy;
System.out.println("reference picture: a vivid example of electric field force and electric potential energy");
System.out.println("the relationship between potential energy and work done: when the electric field force does positive work, the electric potential energy decreases; when the electric field force does negative work, the electric potential energy increases. "";
System.out.println("how to calculate the electric potential energy of a point: if the electric potential energy at infinity is taken as zero, then: U(M)=U(M)-U(∞) = W(M ∞), that is, the electric potential energy of charge q0 at a point in the electric field is numerically equal to the work done by the electric field force to move q0 from that point to infinity. "";
System.out.println("property: electric potential energy is related to the position of the object, not to the path. "";
System.out.println("property: the difference of electric potential energy has physical significance, and the selection of zero potential is arbitrary. The value of electric potential energy is affected by the zero point, but the difference of electric potential energy is not affected. "";
System.out.println("property: for two objects, U=0 is usually chosen as the infinite distance. "";
System.out.println("property: gravity and electric force have inverse square ratio, and their potential energy has similar distance dependence");
System.out.println("picture: relationship between electric potential energy and gravitational potential energy. png");
System.out.println("why does it matter? Two objects, they naturally receive electric force. Nature has to work. Whether they are the same or different sign, they will naturally receive the positive work of the electric field force. Therefore, their electric potential energy will be reduced. "";
System.out.println("like gravitational potential energy and electric potential energy, the farther away you are, the greater your potential energy will be. I compare potential energy to the energy accumulated in a certain field. "";
System.out.println("the same-sex charge, then, is like a spring. The closer you get to him, the greater his potential energy will be;

System.out.println("~ ~ ~ ~ description");
}

public static void main(String[] args) {
Electric potential energy electric potential energy = new electric potential energy ();
Electric potential energy. Description ();
Electric potential energy. Phenomenon_ Thunderstorm cloud ();
Electric potential energy. Judgment ();

System.out.println(4 * constant table. Electrostatic constant* Math.pow(10,-6));

//double a = constant table. Electrostatic constant *8*Math.pow(10,-9)*2*Math.pow(10,-9)/(0.04);
//double b = constant table. Electrostatic constant * (- 8*Math.pow(10,-9))*2*Math.pow(10,-9)/(0.16);
//        System.out.println(a+b);

}

public void phenomenon_ Thunderbolt (){
System.out.println("in thunderstorms, the charge is separated by a complex mechanism triggered by the sun. We can use a simple model to express the charge in thunderstorm cloud: positive charge gathers at the top, negative charge gathers at the bottom, just like a pair of point charges. "";
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
}

public void calculates the electric potential energy between two point charges (the charge quantity of double charge 1, double charge 2, and the distance between two point charges){
double electric potential energy = charge quantity of charge 1 * charge quantity of charge 2 * constant table. Electrostatic constant / distance between two point charges;
System.out.println("electric potential energy between two point charges is:" + electric potential energy);
}

/*@param: parameter the charge quantity of the first charge, the charge quantity of the second charge, if there is the charge quantity of the nth charge.
*Then input the distance of 1, 2, 1, 3, 2, 3 in turn. Suppose there are three. And so on.
* */
/*Note that this formula only calculates the electric potential energy of a system. Not the potential energy of a certain charge.
Electric potential energy is a scalar. The electric potential energy of point a at point B, C and D is required. Only the electric potential energy of point B, C and D is required.
** / below
public void calculates the electric potential energy between multiple point charges (int how many point charges, double... Parameter){
int cycles = 0;
For (int i = 1;i < = how many point charges - 1;i + +){
Number of cycles + = i;
}
//q1,q2,q3... r1,r2,r3... Suppose there are three
Double [] charge auxiliary array = new double [how many point charges];
Double [] distance auxiliary array = new double [number of cycles];
System.arraycopy (parameter, 0, charge auxiliary array, 0, how many point charges);
System.arraycopy (parameter, how many point charges, distance auxiliary array, 0, parameter. length - how many point charges);
Total electric potential energy of double = 0;
int k = 0;
For (int i = 1; I < = charge assisted array. length;++i){
For (int j = I + 1; J < = charge assisted array. length;++j){
++k;
double electric potential energy = charge assisted array [i-1] * charge assisted array [j-1] * constant table. Electrostatic constant / distance assisted array [k-1];
Total electric potential energy + = electric potential energy;
}
}
System.out.println (how many point charges + "total electric potential energy is:" + total electric potential energy);
}
@Override
public void judgment (){
System.out.println("in an electric field generated by a point charge, the electric potential energy is related to the position of a point, but not to the amount of charge of a point");
System.out.println("analysis: electric potential energy is related to work, and work involves energy conversion. From the point of view of energy, it must be related to the point charge. "";
System.out.println("and electric field strength is an intrinsic property, like mass. "";
System.out.println("~ ~ ~ ~ judge");
}
}

You can use my code in main to calculate by referring to the code I commented out. Therefore, when you do the problem, you just need to list the formula, the data will all be converted to international units, and you can give it directly to the code.
I also wrote several functions that can be called directly to calculate the physical quantities used in experiments. This part can be innovated. I just add each part. There are detailed comments on each function to teach people how to use it.
For the sake of expressiveness, the code inevitably adds pictures. Now put the picture below each code.
Supplementary pictures:

A vivid example of electric field force and electric potential energy

Relationship between electric potential energy and gravitational potential energy.png

## Equipotential surface.java

public class Equipotential surface implements A verbal description,brain twists{

@Override
public void describe() {
System.out.println("What is equipotential surface?");
System.out.println("Connect the field points with equal potential into a surface. picture:What is equipotential surface");
System.out.println("The potential difference between adjacent equipotential surfaces is fixed,∆Vab=∆Vbc=∆Vcd");
System.out.println("Properties of equipotential surface:The electric charge moves along the equipotential surface, and the electric force does not work. W=-q∆V=0");
System.out.println("Properties of equipotential surface:Electric field strength and equipotential plane are vertical everywhere");
System.out.println("The above property is for property 1. If the electric field intensity is not perpendicular to the equipotential surface, there will be components parallel to the equipotential surface. So when the electric charge moves on the equipotential surface, it must do work. Then property 1 doesn't hold.");
System.out.println("The intensity of electric field in the area with dense equipotential surface is large. The value of sparsity is small. As shown in the figure,Equipotential surface of point charge. It can be seen that the closer the point charge is, the denser the equipotential surface is and the stronger the electric field is. By formula:V=kQ/r and E=kQ/r^2 You can see.");
System.out.println("Properties of equipotential surface:The electric field line points from the place with high potential to the place with low potential. That's right. Because the electric potential decreases where the electric field line points.");
System.out.println("physical model :Look at the picture:Electric dipole");
System.out.println("physical model :Look at the picture:Parallel plate capacitor");
System.out.println("The model above:The electric potential decreases along the direction of the electric field. And because of the uniform electric field, the electric potential is uniformly reduced.(The equipotential surface of the model above is not three-dimensional, because point charge is an abstract concept. The magnetic coupling machine is different. It's three-dimensional.)");
}
@Override
public void judge() {

}
public static void main(String[] args) {
//Equipotential surface = new Equipotential surface();
//Equipotential surface.describe();
}
}

What is equipotential surface.png

Equipotential surface of point charge
Electric dipole

Parallel plate capacitor

## Potential.java

public class potential implements A verbal description,brain twists{

@Override
public void describe() {
System.out.println("Electric potential energy per unit charge");
System.out.println("Analogy rate:The distance per unit time. So it must be in the form of ratio. That is, a physical quantity represented by a ratio");
System.out.println("Potential difference:∆V=V(f)-V(i)=V(B)-V(A)");
System.out.println("Electric potential energy difference:∆U(E)=q∆V");
System.out.println("nature:The electric potential decreases along the electric field line");
System.out.println("formula:V=U(E)/q Company:V (J/C)|(N*m/C)");
System.out.println("What is the relation between the positive and negative of electric potential:Related to potential zero");
System.out.println("formula:Potential of point charge:V=kQ/r，Because the electric potential energy of point charge is:U=kQq/r,From the definition of electric potential");
System.out.println("formula:Potential superposition:Vp = V1 + V2 + ... + Vn = sum<i:1~n>(qi / 4πεri)");
System.out.println("Principle of potential superposition:from N Point charge at P The electric potential produced by the point is equal to the electric charge at each point P The sum of the potentials generated by the point alone.");
System.out.println("Model:In the uniformly charged spherical charge, the electric field is 0.External electric field=Q/4πεr^2.This formula is based on Gauss theorem. R Is the radius of the ball.");
System.out.println("Model:(Field source charge outside the sphere)r>R,V=4πεr;r<=R,V=Q/4πεR");
System.out.println("Model:(Field source charge outside the sphere)r>R,V=kQ/r;r<=R,V=kQ/R");
System.out.println("Take infinity as potential zero. Since the distribution of electric field strength is the same as that of the point charge whose charge is concentrated in the center of the sphere, the distribution of electric potential at any point outside the sphere is the same as that of the point charge whose charge is concentrated in the center of the sphere.");
System.out.println("In order to express the electric potential of the spherical charged body more intuitively, the cable property is represented by graph. Look, the potential of a spherical conductor");
System.out.println("~~~~describe");
}

public static void main(String[] args) {
//Potential potential = new potential();
//potential.describe();
//potential.judge();
double Potential difference of multiple charges at one point = potential.Potential difference of multiple charges at one point(8*Math.pow(10,-9),-8*Math.pow(10,-9),0.04,0.16);

}

@Override
public void judge() {
System.out.println("In general, infinity U=0. So, is the potential at infinity zero?");
System.out.println("The potential of point charge is related to its own charge?");
System.out.println("analysis:According to the formula:V=kQ/r,It has nothing to do with the amount of charge");
System.out.println("Because the electric field is 0, the electric potential is 0; because the electric potential is 0, the electric field is 0");
System.out.println("analysis:It's not right. for instance:");
System.out.println("See figure, example 1");
System.out.println("The condition is that four point charges are exactly the same.");
System.out.println("First, according to the formula of electric field:E=kQ/r^2,As you can see, E It must have been offset. So the electric field at their midpoint is zero");
System.out.println("According to the superposition principle of electric potential, the superposition of electric potential generated by a point charge whose electric potential is 4 times of that of the point");
System.out.println("So the first half is wrong");
System.out.println("Let's look at example 2. The electric potential at his midpoint is 0.According to the calculation formula of electric potential:∅=kQ/r，So the midpoint potential is zero.");
System.out.println("But the neutral electric field is not zero.According to the principle of electric field superposition, the electric field at the midpoint should point to the negative charge, which is twice the size kQ/r^2");

}

/*@param:The energy difference between the beginning and the end refers to the change of energy, which is the conversion of electric charge into other energy -- > negative
Or other energy into charge
@param:The amount of charge is in the process,
The magnitude of the transferred charge and whether the charge is positive or negative
* */
public double Potential difference(double Energy difference between beginning and end,double Charge quantity){
System.out.println("The potential difference is:"+Energy difference between beginning and end/Charge quantity);
return Energy difference between beginning and end/Charge quantity;
}

/*@param:The charge quantity of charge 1, charge quantity of charge 2, charge quantity of charge n,
Distance between charge 1 and point p, distance between charge 2 and point p, distance between charge n and point p
* */
public double Potential difference of multiple charges at one point(double... parameter){

int How many charges = parameter.length/2;
double Total potential difference = 0;
for(int i=0;i<How many charges;i++){
double Potential difference = Constant table.Electrostatic constant * parameter[i]/parameter[i+How many charges];
//Total potential difference += Potential difference;
}
System.out.println(How many charges + "The potential difference of is:" + Total potential difference);
}
}

Example 1

Example 2

## Capacitance.java

public class capacitance implements A verbal description,brain twists{
@Override
public void describe() {
System.out.println("Capacitance, see Fig:");
System.out.println("Capacitance, used to store electric potential energy and charge(It also stores charges. It can be seen from its formula). It's actually a battery. It stores electrical potential energy. The electric potential energy will make the charge do work, which will be converted into the kinetic energy of the charge. The charge therefore has a velocity, which forms a current.");
System.out.println("Capacitance, because of its long history, has many formulas.");
System.out.println("Equation 1:C=q/∆V(F Farah),Indicates the amount of charge required to raise the unit potential.");
System.out.println("Equation 2:(Capacitance of isolated conducting sphere in vacuum): C=4πεR,The isolated sphere is equivalent to a point charge, and its potential is V=kQ/r,Gauss to:V=Q/4πεr,And then it came out");
System.out.println("Equation 3:(Electric field close to the outside of conductor):E=4πkδ=δ/ε.");
System.out.println("Derivation formula 3:Look at the picture.Make a cylindrical Gaussian surface. Then, the normal of the side is perpendicular to the electric field line, E.S.cosӨ=0.There are only two bottoms left.");
System.out.println("And the lower of the two bottom surfaces is directly inside the conductor, and then there's no charge moving, and then E=0,Then only the upper and lower surfaces are required.");
System.out.println("formula:flux=E.∆S=q/ε;So, E=q/(ε.∆S);then q/∆S='Charge per unit area'=δ(delta)=q/∆A.");
System.out.println("Equation 4:Parallel plate capacitor(Look at the picture).E=δ/ε,∆V=Ed=δ.d/ε=Q.d/ε.A,C=Q/∆V=ε.A/d");
System.out.println("It can be seen from formula 4 that capacitance is the inherent property of an object");
System.out.println("Charging of capacitors:Please see the picture, the derivation formula of electric potential energy stored in capacitor");
System.out.println("formula:W=Q^2/2C=C*(∆V^2)/2=(∆V*Q)/2,Please see the picture, the derivation of electric potential energy formula");
System.out.println("~~~describe");
}

@Override
public void judge() {
System.out.println("Definition of capacitance:C=q/∆V. So does capacitance represent the amount of charge stored?");
System.out.println("Analysis: the reason for this illusion is that if we connect a South floating battery and a parallel plate capacitor in series, we find that both sides of the capacitor are charged. So I think the charge is from the battery.");
System.out.println("That's how the Rhine bottle used to be. They charge the Rhine bottle to form a potential difference. Let a lot of people hold hands and connect with the Rhine bottle. A lot of people are flying by electricity.");
System.out.println("Can this thing discharge electricity? So we naturally think of Rhine bottles--We're talking about batteries, which store charge.");
System.out.println("Actually? The process of charging the Rhine bottle is to make the electrons on both sides of the Rhine bottle move, forming a negative charge on one side and a positive charge on the other. In this way, the potential difference is formed.");
System.out.println("The Rhine bottle of history is a capacitor. It can charge and discharge. It's no different from the battery itself");
System.out.println("analysis:By looking up the information, we will answer this question. Battery is the conversion of chemical energy into electrical energy. It's like a capacitor when it's converted to electricity.");
System.out.println("The conversion process is usually longer than the direct charging and discharging of capacitors. But batteries can store higher energy density.");
System.out.println("The current research is how to improve the charge and discharge speed of the battery and increase the amount of charge that the capacitor can store");
System.out.println("Parallel connection of capacitors:Equivalent capacitance=Add each capacitance");
System.out.println("Series connection of capacitors:Equivalent capacitance=1/Reciprocal sum of each capacitor");
System.out.println("The total parallel capacitance increases, and the withstand voltage depends on the capacitance with low withstand voltage");
System.out.println("The total capacitance in series decreases and the withstand voltage increases");

}
public static void main(String[] args) {
//Capacitance = new capacitance();
//capacitance.describe();
//capacitance.judge();
}
}

A variety of capacitors

Capacitance of parallel plate capacitor

Derivation formula of electric potential energy stored in capacitor

## Dielectric.java

public class dielectric implements A verbal description,brain twists{

@Override
public void describe() {

System.out.println("There are some insulating materials in the capacitor called dielectrics");
System.out.println("formula:Dielectric is added in the middle of the capacitor, C=k(kappa--Greek alphabet)*ε.A/d=kε.A/d");
System.out.println("explain:kappa Is the relative permittivity, kappa=C/C(0)=E(0)/E=ε/ε(0)=Among them, C(0)and E(0)They are the values without dielectric, that is kappa Value at dimension 1");
System.out.println("Dielectric strength:It is the electric field strength corresponding to the occurrence of electrostatic breakdown and material becoming conductor.(Insulator to conductor)");
System.out.println("The relative permittivity determines how much charge is stored at a given potential difference. It indicates the influence degree of dielectric on electrostatic field. It is an important parameter of reactor capacitor property");
System.out.println("The dielectric constant determines the maximum potential difference that the capacitor can bear before breakdown.∆V=Ed");
System.out.println("The relative permittivity of materials is a measure of the difficulty of polarization of insulating materials. The larger the material is, the easier it is to polarize.");
System.out.println("Please see the picture-Polarization of dielectric. Why insulator--Capacitance, it's the conductor that breaks down.");
System.out.println("What is polarization?It's two levels of differentiation. The charge in the insulating body runs to one side of the negative plate of the capacitor, and the negative charge is the same.");
System.out.println("Why is the larger the relative permittivity, the easier it is to be polarized?Because the larger the relative permittivity is(The relative permittivity is generally considered to be>1 Of)，The larger the capacitance, the more insulated the insulator is in the middle.");
System.out.println("In order to be more insulated, it needs to polarize more, so as to form an electric field resistant to the electric field strength, thus blocking the desire of both sides of the electrode plate to connect to one piece.");
System.out.println("The effect of polarization:Heating effect of electromagnetic furnace. ECG effect. Characteristics: reflection, penetration, absorption");
}
@Override
public void judge() {

}
public static void main(String[] args) {
//Dielectric dielectric = new dielectric();
//dielectric.describe();
}

}

polarization of dielectric

# Chapter 18

## Current.java

public class electric current implements A verbal description,brain twists{

@Override
public void describe() {
System.out.println("formula:I=∆q/∆t,The amount of charge per unit time passing through a cross section");
System.out.println("Company:c/s,mA");
System.out.println("Constant current:The magnitude and direction of the current do not change with time. This property also produces a magnetic field, which is a special, very stable magnetic field. Such a thing is only produced in a closed circuit.");
System.out.println("Please see the picture:Current 1. The current can only reflect the flow through one surface, not the whole. In the figure, the current in the conductor with uneven thickness is not constant.\n In order to describe this problem accurately, we introduce a new physical quantity--Current density (current per unit area perpendicular to current direction)");
System.out.println("Current definition:A large number of charged particles are formed by directional movement.");
System.out.println("Carrier: charged particle that forms an electric current. Such as: free electron, ion, hole, etc.\n" +
"The carrier of a conductor is an electron. The carriers in ionic solution are positive and negative ions.\n" +
"In semiconductor materials, there are both positive and negative carriers. A negative carrier is an electron; a positive carrier is a hole, equivalent to a charge of+e The particles of. Electrons and holes drift in the opposite direction, both contributing to the current.");
System.out.println("Direction of current:In the field of physics, the direction of the motion of the positive charge is the direction of the current.");
System.out.println("An effective application of current is neon. Neon gas in neon lamp glass tube is ionized by a large potential difference between two electrodes, and the collision between electrons and ions produces the characteristic red light of neon lamp.\n In the fluorescent lamp, the collision produces ultraviolet radiation, which can be absorbed by the coating on the inner wall of the glass container and emit visible light.");
System.out.println("See the picture, neon example");
System.out.println("In the sense of question 2, the current can also be a scalar. If the moving direction of the positive charge is determined, the reverse direction of the negative charge is the direction of the current, no matter what.");
System.out.println("Function of power supply and battery:From the perspective of current:picture:Function of power supply and battery.");
System.out.println("When the battery is discharged, the free electrons on the wire move to the positive pole of the battery. In order to keep the potential difference constant, the energy converted from chemical energy constantly transports electrons from the positive electrode to the negative electrode.");
System.out.println("Electromotive force of battery(emf):The potential difference between two ends of an ideal battery. The work done to move the unit positive charge from the negative electrode of the battery to the positive electrode of the battery is the electromotive force of the battery.");
System.out.println("Electromotive force is scalar. It is specified that the direction from the negative pole to the positive pole of the power supply is the direction of the battery electromotive force.(Like current, it's the direction in which positive ions move.--In fact, it is against the direction of the electric field.--Provides a force against the inside of the electric field)");
System.out.println("Electromotive force is actually the potential difference.");
System.out.println("Power Supply:Any device that moves a positive charge from a low potential to a high potential. All power sources are energy devices that can convert other forms of energy into electricity.");
System.out.println("For a vivid example of current, please refer to the figure:Current 2.In this diagram, a person carries a positive charge from a low potential to a high potential.");
System.out.println("Micro image of current in metal:Free electron model.");
System.out.println("Number of conduction electrons per unit volume: n，In volume A vD Δt The number of electrons in is N = nA vD Δt,The electric quantity is: ΔQ=Ne= neA vD Δt,Therefore, the magnitude of the current in the conductor is: I=ΔQ/Δt=neAV(D),The formula can be extended to any carrier system.");
System.out.println("In semiconductors, there are both positive carriers (holes) and negative carriers (electrons), which contribute to the current. The current can be expressed as: I=n(+)eAV(+)+n(-)eAV(-)");
System.out.println("Electrons and holes drift in the opposite direction, both contributing to the current.");
System.out.println("~~~~~~~~~~~~~~");
}

@Override
public void judge() {
System.out.println("Graham's battery is dead and the car can't start. He decides to use eight ones.5V 12 in series V Can this plan be realized by replacing the battery of the car with the battery of the car?");
System.out.println("Analysis: it is not difficult to analyze this problem. First of all, we have the intuitive impression that current is the directional movement of charge. Batteries are like capacitors.");
System.out.println("The positive electrode on the capacitor constantly attracts electrons to counteract its field strength, so how long can the battery last? And not to mention the battery discharge also needs its own chemical energy into electrical energy.");
System.out.println("It's like you're in Windows Open a virtual machine, and then use the eclipse. ");
System.out.println("since Ne It's all ionized into electricity. What about water? There are a lot of ions in the water. Isn't water ionized with a little dismantling?");
System.out.println("Is there electric current in the water?");
System.out.println("analysis:The current is q/t. Direction is the direction in which the positive charge moves. The current runs to a place, and the current is cancelled out.");
System.out.println("This is offset. So the water is not charged.");
}
public static void main(String[] args) {
//Current current = new electric current();
//electric current.describe();
//electric current.judge();
double e = Constant table.Basic charge;
double q = 1.65 * Math.pow(10,21);
double v = 12;
double an = q*v /2;
System.out.println(an);
}
}

Current 1

Neon example

Function of power supply and battery

Current 2

## Electric power.java

public class electric power implements A verbal description,brain twists{

@Override
public void describe() {

System.out.println("formula:P=∆VI=I^2R=u^2/R");
System.out.println("Company:J(joule) | V*A | whatever");
System.out.println("Battery power:P = (E(emf)*I) - (I^2*R)");
System.out.println("Voltmeter and ammeter.");
System.out.println("I hope the more resistance the ideal voltmeter has, the better. The lower the ammeter resistance, the better.");
System.out.println("Therefore, the extension of voltmeter will be connected with a shunt resistor in series.");
System.out.println("Therefore, the expansion of ammeter will generally be connected with a shunt resistor in parallel.");
System.out.println("The smaller it is, the better it is not to say it is too small. dwm(dynamic window manager--suckless)It's also very small. But it needs to exist, otherwise how can I use the desktop?");
System.out.println("It's like the infinitesimal in mathematics, but I know it's OK. But it doesn't mean No. So it's a lot easier.");
}
@Override
public void judge() {

}
public static void main(String[] args) {
//Electric power = new electric power();
//electric power.describe();
}
}

## Resistance.java

public class resistance implements A verbal description,brain twists{
@Override
public void describe() {

System.out.println("Ohm's theorem is not a universal law of physics.");
System.out.println("Why? Because for Ohm's law, no matter how the external environment changes, the resistance is always constant.");
System.out.println("But is it? No, the familiar semiconductor is a typical substance whose resistance changes with temperature.");
System.out.println("definition:R=∆V/I" );
System.out.println("definition(resistivity):R=ρl/a");
System.out.println("First of all, we should have a perceptual understanding of resistance. When a conductor conducts electricity, the protons inside it vibrate, and electrons flow between them.");
System.out.println("It is their such a vibration that leads to a blocking effect.");
System.out.println("Resistivity of water:The resistivity of water mainly depends on the concentration of ions in water. Pure water is an insulator.");
System.out.println("Water is also a good solvent, even if you put a little mineral, it will greatly reduce the resistivity of water.");
System.out.println("Please see the picture:SOI. By adding impurities to the fixed area of the semiconductor, some areas become conductors, insulators and transistors.");
System.out.println("Factors affecting metal resistivity: 1.The number of carriers in a conductor. Two.The probability of the carrier colliding with the conducting molecule. Very sensitive to temperature changes");
System.out.println("ρ=ρ0(1+α*∆T),Among them,ρ0 Is the initial resistivity,∆T=T-T0");
System.out.println("Resistivity does not depend on the size or shape of the material, but it does depend on temperature. The higher the temperature, the greater the internal energy and the greater the ion vibration amplitude. As a result, electrons collide with ions more frequently.\n The shorter the acceleration time between two collisions, the smaller the drift velocity they get; therefore, the smaller the current for a given electric field. Therefore, with the increase of metal temperature, its resistivity increases.");
System.out.println("application:Resistance temperature record. A thermometer that uses the resistivity of a material to vary with temperature.");
System.out.println("application:water.Pure waterαNegative at room temperature.");
System.out.println("application:semiconductor");
System.out.println("Internal resistance of battery: r express");
System.out.println("definition:Terminal voltage--Battery(It's not a capacitor)Potential difference at both ends.--V = E(emf(Electromotive force of battery)) - Ir");
System.out.println("application:Superconductor, low temperature, 0 resistivity.");
}

@Override
public void judge() {

}
public static void main(String[] args) {
//Resistance resistance = new resistance();
//resistance.describe();
}
}

SOI

## Series parallel current.java

public class Series parallel circuit  implements  A verbal description,brain twists{

@Override
public void describe() {

System.out.println("definition:The sum of the currents of all branches flowing into a node is equal to the sum of the currents of all branches flowing out of the node.");
System.out.println("The place where the potential increases is positive, and the place where the potential decreases is negative.");
System.out.println("Please see the picture:Series parallel. If you choose A Point.");
System.out.println("Go clockwise once, then -IR1 + (-IR2) + E = 0");
System.out.println("Go one turn counter clockwise,that  -E + IR2 + IR1 = 0");
System.out.println("Pay attention to the order.");
for (int i = 0;i<100;i++)
System.out.print("~");
System.out.println();
System.out.println("Rules of series parallel circuit:");
System.out.println("Electric quantity Q:Two resistances in series share the same amount of charge. The sum of the electric quantity of two resistors in parallel is the total electric quantity.");
System.out.println("capacitance C:Series 1/c = 1/c1 + 1/c2 + ... + 1/cn. parallel connection: c = c1 + c2 + c3 + c4 + ... + cn");
System.out.println("resistance R:series connection R = R1 + R2 + ... + Rn. parallel connection:1/R = 1/R1 + 1/R2 + ... + 1/Rn");
System.out.println("electric current:The current of each point in series is equal. parallel connection:The sum of the currents of each parallel is equal to the total current.");
System.out.println("Voltage:The voltage of each point in series is different. In parallel, the parallel voltages are the same.");
for (int i = 0;i<100;i++)
System.out.print("~");
System.out.println();
System.out.println("More battery and electromotive force differences:");
System.out.println("Same as: can produce current. Although capacitors do not seem to be able to generate electricity by transferring electrons. But don't forget the potential difference at both ends. It can generate instantaneous current.");
System.out.println("different:Electromotive force is the only concept of battery. Formula corresponding to electromotive force E(emf)=q∆V.There is a formula for the potential energy stored in the capacitor:W=∆U=(∆V*Q)/2");
System.out.println("You can refer to another blog about the above:https://blog.csdn.net/u010563350/article/details/106869076");
System.out.println("Different: the battery has internal resistance. Therefore, only the terminal voltage is the actual voltage. And the discharge speed is slow. The internal resistance will increase with the conversion of chemical energy.");
System.out.println("In contrast, the discharge of the capacitor depends entirely on the directional movement of free electrons. So the discharge speed block. The potential difference between the two ends is also great.");
System.out.println("Parallel connection of two batteries does not increase the voltage, but reduces the internal resistance. Because the resistance will decrease in parallel.");
System.out.println("The series connection of two battery heads and tails will increase the voltage.");
System.out.println("Do not connect two battery heads in series.");
System.out.println("Parallel connection of two batteries with different potential difference is prohibited.");
}
@Override
public void judge() {

}
public static void main(String[] args) {
//Series parallel circuit series parallel circuit = new Series parallel circuit();
//Series parallel circuit.describe();
}
}

Series parallel connection

# Chapter 19

## Magnetic field.java

public class magnetic field implements A verbal description,brain twists {
@Override
public void describe() {
System.out.println("law:N,S Pole. Interaction,Same sex repels, opposite sex attracts. There is no magnetic monopole.--There is no monopole for point charge.");
System.out.println("Magnetic dipole:Bar magnet. See figure, bar magnet.");
System.out.println("The magnetic induction line is from N Extreme outgoing flow direction S And then back inside N Pole. Compared with electric dipole, magnetic dipole is closed loop. The electric dipole is quite polar.");
System.out.println("Please see the picture:The magnetic pole of the earth.");
System.out.println("What does the earth's magnetic pole say? The geographical North Pole happens to be the magnetic south pole. Look, compass");
System.out.println("Electricity and magnetism");
System.out.println("The current and current are attracted in the same direction and repel each other in different directions.");
System.out.println("The energized solenoid is equivalent to the bar magnet.");
System.out.println("Unit of magnetic field strength T(Tesla)--Tesla is an international unit | Gs(Gaussian) | N/(C*m/s)");
System.out.println("Preface of Lorentz force:Ampere's'Molecular current hypothesis'It mainly tells us that current can form magnetic field. That is to say, the electron must have speed and move.");
System.out.println("The origin of Lorentz force:A man named Lorentz improved the theory and gave the formula to calculate the magnetic force. So it brings great convenience to physical experiment. Magnetic force is also called Lorentz force. Recall that electric force is also called Coulomb force.");
System.out.println("The direction of Lorentz force(Right hand spiral rule):Pick up your right hand and straighten your fingers into palms. Four fingers point to the direction of speed, and the palm slowly rotates to the direction of magnetic induction line(The result of the rotation is that the magnetic induction line goes through the back of the hand)，If the charge is positive at this time, the direction of the thumb is the direction of the force. Negative charge, and positive charge force direction can be reversed.");
System.out.println("In order to thoroughly understand the direction of the magnetic field, do three questions:Look at the picture, magnetic field direction question 1,Find the direction of the magnetic force of the red arrow");
System.out.println("Analysis 1:Four fingers of the right hand point to the direction of speed, and the palm of the hand slowly turns to the direction of the magnetic field. Because it is positive, the thumb is the direction of the force.[Χ]");
System.out.println("Picture reading, magnetic field direction question 2,The direction of the magnetic force and the direction of the magnetic field are known, and the approximate direction of the velocity of the electron is obtained.");
System.out.println("Analysis 2:If the force is reversed, it is the direction of negative charge, and then the palm of hand turns to the direction of magnetic field, it can be roughly inferred that the direction of electron velocity is northwest. But it may also be the northwest and southwest, which has to be calculated.");
System.out.println("Picture reading, magnetic field direction question 3,Find the direction of 1 and 3(Particles are negatively charged).");
System.out.println("Analysis 3:`1`Because the velocity direction is parallel to the magnetic field, the magnetic force is 0.`3`--[Χ]");
System.out.println("The formula of Lorentz force:F=|q|vB*sinө");
System.out.println("An important example of Lorentz force formula:If the velocity is parallel to the direction of the magnetic field, then F=0. To think F At the maximum, the velocity needs to be perpendicular to the direction of the magnetic field.");
System.out.println("Indication of magnetic field direction:[Χ--Vertical paper injection][●--Vertical paper out]{Fork in and out}");
System.out.println("Please see the picture:The steps of solving Lorentz force.png");
System.out.println("Uniform circular motion~~~");
System.out.println("The charged ions in the magnetic field sit in a uniform circular motion.");
System.out.println("|q|vb=ma=mv^2/R; a=|q|vb/m; R=mv/qb; T=2πR/v=2πR/(Rqb/m)=2πm/qb; f=1/T=qb/2πm");
System.out.println("about T，R,They all need to be memorized, because they really use a lot.");
System.out.println("Mass spectrometer:Thinking of Lorentz, it's him who made the invention.");
System.out.println("This device is very simple. Use the battery to accelerate, so that particles get speed. Entering the magnetic field, Lorentz force makes a circular motion and hits the plate.");
System.out.println("What I can't hit is not the particle I want. Then measure the radius and calculate the Lorentz force. The point is that all of this can be entered into the computer and done automatically.");
System.out.println("The main measurement is the mass of particles.");
System.out.println("The picture is more subtle. By making the mass of proton equal to Lorentz force, some impurity particles are eliminated. And then pass through the different radius of deflection (why the radius is different?--Isotope) to determine specific charge(Charge to mass ratio)");
System.out.println("Specific charge is the basic property of particles");
System.out.println("What kind of equipment is a cyclotron? It is accelerated by a space in the middle that provides the electric field. T=2πm/qB. So the time when the particles go out will not change. So the particles accelerate. Every acceleration, according to the formula R=mv/qB. The radius will expand. No matter how big it gets, it will eventually speed up.");
System.out.println("Application of cyclotron:In medicine, it is used to produce some nuclide isotopes with short decay period.");
}
@Override
public void judge() {

}
public static void main(String[] args) {
//Magnetic field = new magnetic field();
//magnetic field.describe();

}
}

Magnetic substance

Bar magnet

The magnetic pole of the earth

compass

Magnetic field direction question 1
Magnetic field direction question 2

Magnetic field direction question 3

The steps of solving Lorentz force

Mass spectrometer

Speed selector

cyclotron

## Torque of current carrying coil.java

public class Current carrying coil moment implements A verbal description,brain twists{
@Override
public void describe() {

System.out.println("formula:F=BILsinθ");
System.out.println("The origin of the moment. The physical formula is very interesting. Many symbol sources are useful for this variable. The experiment proves that it is useful. When we think of the lever, we naturally think that the longer the lever is, the greater the force is, the easier it is to pry it.");
System.out.println("That's how the torque comes. Please see the picture--Current carrying coil");
System.out.println("Analyze the current carrying coil,2 The force distance is BIa(b/2)*sinθ. --1,3 There is no force at all.");
System.out.println("Extend your right hand, bend it, point your finger in the direction of the coil current, and point your thumb in the direction of the normal. The angle between this direction and the magnetic field isθ");
System.out.println("In this case, the coil is parallel to the magnetic field, and the included angle is 90／270，Maximum moment.");
System.out.println("Similarly, when the coil is perpendicular to the magnetic field, the torque is 0");
}
@Override
public void judge() {

}
public static void main(String[] args) {
//Moment of current carrying coil moment of current carrying coil = new Current carrying coil moment();
//Current carrying coil moment.describe();
}
}

Current carrying coil

## Magnetic field excited by current.java

public class Magnetic field excited by current implements A verbal description,brain twists{
@Override
public void describe() {

System.out.println("Summary of electric field and magnetic field excited by charge:");
System.out.println("The moving charge is magnetized and excites the magnetic field.");
System.out.println("Static charge is not subject to magnetic force and does not excite magnetic field");
System.out.println("The electric charge receives the electric field force and excites the electric field, whether it moves or not.");
System.out.println("Magnetic field of long straight wire:direction:The thumb points in the direction of the current, and the four fingers point in the direction of the magnetic field");
System.out.println("Excited magnetic field:B=μ0 I/2πr.μ0 Is the vacuum permeability.");
System.out.println("Please see the picture:Why does the same direction current attract each other.There is a magnetic field on the left to the right pointing into the page's magnetic field. Right to left creates a magnetic field indicating the page. From the point of view of Lorentz force, they are attracted to each other.");
System.out.println("The magnetic field of the ring. B=Nμ0 I/2r,N Is the number of turns of the coil");

}
@Override
public void judge() {

}

public static void main(String[] args) {
//Magnetic field excited by current = new Magnetic field excited by current();
//Magnetic field excited by current.describe();
}
}

Why does the same direction current attract each other

## Ampere theorem.java

public class Ampere's theorem implements A verbal description,brain twists{
@Override
public void describe() {

System.out.println("The number of magnetic induction lines passing through one side of the magnetic field");
System.out.println("See Figure: magnetic flux angle");
System.out.println("θIs the angle between the normal of the face and the magnetic induction line");
System.out.println("Φ=BScosθ");
System.out.println("magnetic flux unit:Wb(weber)");
System.out.println("See Figure: Gauss theorem of constant magnetic field");
System.out.println("Because the magnetic field is a passive field, the magnetic induction lines that pass in and out must exist. If there is no passing in one point, it will not come out.");
System.out.println("Ampere loop theorem:In vacuum, magnetic induction intensity B Along any closed curve L Is equal to the closed curve L The algebraic sum of the currents surrounded and passed: Bl = μ. I");
System.out.println("formula:Bl = μ. I,See Figure: Ampere loop theorem");
System.out.println("Direction: as long as it is the same as the right hand helix, it is positive, otherwise it is negative");

}

@Override
public void judge() {

}

public static void main(String[] args) {
//Ampere theorem = new Ampere's theorem();
//Ampere's theorem.describe();
}
}

Magnetic flux angle

Gauss theorem of constant magnetic field

Ampere loop theorem

Posted by varghesedxb on Wed, 24 Jun 2020 01:31:14 -0700