blob: 9c924e34d6c069178ffa7397f284c378d67f922b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
clc();
clear;
// To calculate the energy stored in the condenser and polarizing the dielectric
C=2; //capacitance in micro farad
C=C*10^-6; //capacitance in farad
V=1000; //voltage in Volts
epsilon_r=100;
W=(C*(V^2))/2;
C0=C/epsilon_r;
W0=(C0*(V^2))/2;
W_0=1-W0;
printf("energy stored in the condenser is %f Joule",W);
printf("energy stored in the dielectric is %f Joule",W_0);
|