![]() ![]() Bus 2 is a PQ bus, for which the load power is given, but the voltage and angle need to be. Bus 1 is a slack bus, for which the voltage and angle are given. of Unsteady Gauss-Seidel Iterations(IMPLICIT) = %d', Gauss_Seidel_iteration)) pause(0. The code Ive written so far is the following: In the following code the Gauss-Seidel method will be used in both parts (1) and (2) to calculate the power flow in a two-bus system. %Calculation of 2D steady heat conduction EQUATION by Gauss-seidel methodįor k = 1:nt error = 9e9 while(error > tolerance) for i = 2:nx - 1 for j = 2:ny - 1 T(i,j)= T_intial(i,j).*(1-4*A) + A *(T(i-1,j)+ T_old(i+1,j)+T(i,j+1)+T_old(i,j-1)) end end error = max(max(abs(T_old - T))) T_old = T Gauss_Seidel_iteration = Gauss_Seidel_iteration + 1 end T_intial = T %Plotting figure(1) contourf(x,y,T) clabel(contourf(x,y,T)) colorbar colormap(jet) set(gca, 'ydir', 'reverse') xlabel('X-Axis') ylabel('Y-Axis') title(sprintf('No. %Calculating Average temperature at corners %Solving the Unsteady state 2D heat conduction by Gauss Seidel Method(IMPLICIT SCHEME) I Wrote the code for 2d unsteady state using jacobi method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |