Вы находитесь на странице: 1из 3

CAPACITANCE

Written Report

John Alec Mari Abstract Cosico


Jam.cosico@gmail.com Graph of Capacitance

Introduction Capacitance is the ability of a body to store an electrical charge. Any object that can be electrically charged exhibits capacitance. A common form of energy storage device is a parallel-plate capacitor. In a parallel plate capacitor, capacitance is directly proportional to the surface area of the conductor plates and inversely proportional to the separation distance between the plates. If the charges on the plates are +q and q, and V gives the voltage between the plates, then the capacitance C is given by

Which gives the voltage/current relationship

The capacitance is a function only of the physical dimensions (geometry) of the conductors and the permittivity of the dielectric. It is independent of the potential difference between the conductors and the total charge on them. The SI unit of capacitance is the farad (symbol: F), named after the English physicist Michael Faraday; a 1 farad capacitor when charged with 1 coulomb of electrical charge will have a potential difference of 1 volt between its plates.[1] Historically, a farad was regarded as an inconveniently large unit, both electrically and physically. Its subdivisions were invariably used, namely the microfarad, nanofarad and picofarad. More recently, technology has advanced such that capacitors of 1 farad and greater can be constructed in a structure little larger than a coin battery (socalled 'supercapacitors'). Such capacitors are principally used for energy storage replacing more traditional batteries.

Program Code
FontRenderContext frc = g2.getFontRenderContext(); package capacitance; LineMetrics lm = font.getLineMetrics("0", frc); double y2 = h - PAD - scale*data[i+1]; float sh = lm.getAscent() + lm.getDescent(); g2.draw(new Line2D.Double(x1, y1, x2, y2)); f.setLocation(200,200); import java.awt.*; // Ordinate label. } f.setVisible(true); import java.awt.font.*; String s = "y-axis"; // Mark data points. {data [0]= 8.86*5.4*10/0.1;} import java.awt.geom.*; float sy = PAD + ((h - 2*PAD) - s.length()*sh)/2 + lm.getAscent(); g2.setPaint(Color.RED); import javax.swing.*; for(int i = 0; i < s.length(); i++) { for(int i = 0; i < data.length; i++) { for (int i = 1; i<100; i++) String letter = String.valueOf(s.charAt(i)); double x = PAD + i*xInc; {data [i]= 8.86*5.4*10/i;} public class extends JPanel { float Capacitance sw = (float)font.getStringBounds(letter, frc).getWidth(); double y = h - PAD - scale*data[i]; static double [] (PAD data = float sx = sw)/2; g2.fill(new Ellipse2D.Double(x-2, y-2, 4, 4)); new double [100]; g2.drawString(letter, sx, sy); } } sy += sh; } final } int PAD = 20; } // Abcissa label. private double getMax() { @Override s = "x-axis"; double max = -Integer.MAX_VALUE; protected g) { sy = h -void PAD paintComponent(Graphics + (PAD - sh)/2 + lm.getAscent(); for(int i = 0; i < data.length; i++) { super.paintComponent(g); float sw = (float)font.getStringBounds(s, frc).getWidth(); if(data[i] > max) { Graphics2D g2 = (Graphics2D)g; float sx = (w - sw)/2; max = data[i]; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, g2.drawString(s, sx, sy); } RenderingHints.VALUE_ANTIALIAS_ON); // Draw lines. } int w = xInc getWidth(); double = (double)(w - 2*PAD)/(data.length-1); return max; int h = scale getHeight(); double = (double)(h - 2*PAD)/getMax(); } // Draw ordinate. g2.setPaint(Color.blue.darker()); g2.draw(new PAD, for(int i = 0; i Line2D.Double(PAD, < data.length-1; i++) { PAD, h-PAD)); Program public static void main(String[] args) { // Draw abcissa. double x1 = PAD + i*xInc; Flow JFrame f = new JFrame(); g2.draw(new Line2D.Double(PAD, h-PAD, w-PAD, h-PAD)); Chart double y1 = h - PAD - scale*data[i]; f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Draw labels. double x2 = PAD + (i+1)*xInc; f.add(new Capacitance()); Font font = g2.getFont(); double y2 = h - PAD - scale*data[i+1]; f.setSize(400,400); FontRenderContext frc = g2.getFontRenderContext(); g2.draw(new Line2D.Double(x1, y1, x2, y2)); f.setLocation(200,200); Graph out LineMetrics lm = font.getLineMetrics("0", frc); } f.setVisible(true); START float sh data = lm.getAscent() + lm.getDescent(); // Mark points. {data [0]= 8.86*5.4*10/0.1;} // Ordinate label. End

Вам также может понравиться