Challenge

Week 7 - Simulation of a 1D Super-sonic nozzle flow simulation using Macormack Method

Aim:

To simulate the isentropic flow through a Quasi 1D subsonic nozzle by deriving both the conservation and non-conservation forms of the governing equations and solve them by implementing the MacCormack’s technique using Octave.

Problem statement:

Determine the steady-state temperature distribution for the flow field variables and to investigate the difference between the two forms of governing equations by comparing their solutions along with plots stated below.

Study-state distribution of primitive variables inside the nozzle.

Time-wise variation of the primitive variables.

Variation of mass rate distribution inside the nozzle at different time steps during the time marching problem.

Comparison of normalized mass flow rate distributions of both forms

Theory:

Any numerical solutions of isentropic flow through a Quasi 1D subsonic –supersonic nozzle is unreasonable, while analytic solution exists for these kind of problems. However we are trying here to establish the broadened capability of CFD in various streams rather in representing the approximated form of analytic solution. Here we implement the numerical solution with conservative and Non-conservative forms.

Governing Equations are marched in terms of PDE for both forms in order to use Time marching solution for the problem. These forms respect in numerical aspect only, if we analytic all the methods are same.

Non-conservative Form:

Continuity Equation:

Momentum Equation:

Energy Equation:

Conservative Form:

Continuity Equation:

Momentum Equation:

Energy Equation:

Non-Dimensional Quantities:

Also as part of the problem setup we represent quantities in term of non-dimensional quantities.

Temperature:

Density:

Non-Dimensional Distance:

Non-Dimensional Velocity where is the local sonic velocity

Non-Dimensional Time: where is the characteristics of time scale

Non-Dimensional Area:

Nozzle Diagram with sections:

Since the problem setup is 1D , we consider only distribution in X-axis Here Nozzle can be spilt into two sections

  • Convergent Section
  • Divergent Section

MacCarmack Method:

To discretize the numerical solution we use the technique called macCarmack method. The MacCarmack method is a variation of the two-step Lax –Wendroff scheme but is much simpler in application.

  • Predictor step: In the predictor step a ”provisional ” value of at time level n+1(denoted by is estimated obtained by replacing the spatial and temporal derivatives in the previous first order equation using forward differencing scheme is used for time step.
  • Corrector Step: in the corrector step, the predicted value is corrected according to the equation. Note that the corrector step uses backward difference scheme for spatial derivative. The time-step used in the corrector step isin contrast to theused in the predictor step.

Non-conservative Form:

Continuity Equation:


Main Program for solving Quasi 1D subsonic & supersonic Nozzle

% main program of solving Quasi 1D subsonic-supersonic nozzle
clear all
close all
clc

% Solving Quasi 1D Supersonic nozzle flow equations
% Inputs parameters
% No.of,grid points
n=31;
gamma=1.4;
x=linspace(0,3,n);
dx=x(2)-x(1);

% No.of Time-step
nt=1400;

% Courant number
c=0.5;

% Function for Non Conservative form
tic;
[Mass_flow_rate_NC,Pressure_NC,Mach_number_NC,rho_NC,V_NC,T_NC,rho_throat_NC,V_throat_NC,T_throat_NC,Mass_flow_rate_throat_NC,Pressure_throat_NC,Mach_number_throat_NC]=Non_conservative_form(x,dx,n,gamma,nt,c);
Time_elapsed_NC=toc;
fprintf('Time Elapsed for Non_conservative_form : %0.4f',Time_elapsed_NC);
hold on

% Plotting
% Time step variaqtion of properties at throat area in Non Conservative form
figure(2)

% Density
subplot(4,1,1)
plot(linspace(1,nt,nt),rho_throat_NC,'color','m');
ylabel('Density')
legend({'Density at throat'});
axis([0 1400 0 1.3]);
grid minor;
title('Timestep variation at throat area -NON CONSERVATIVE FORM')


% Temperature
subplot(4,1,2)
plot(linspace(1,nt,nt),T_throat_NC,'color','c');
ylabel('Temperature')
legend({'Temperature at throat'});
axis([0 1400 0.6 1]);
grid minor;


% Pressure
subplot(4,1,3)
plot(linspace(1,nt,nt),Pressure_throat_NC,'color','g');
ylabel('Pressure')
legend({'Pressure at throat'});
axis([0 1400 0.4 1.1]);
grid minor;

% Mach number
subplot(4,1,4)
plot(linspace(1,nt,nt),Mach_number_throat_NC,'color','y');
xlabel('Time Steps')
ylabel('Mach Number')
legend({'Mach Number at throat'});
axis([0 1400 0.6 1.4]);
grid minor;


% steady state simulation for primitve values for Non Conservative form
figure(3);


% Density
subplot(4,1,1)
plot(x,rho_NC,'color','m')
ylabel('Density')
legend({'Density '});
axis([0 3 0 1]);
grid minor;
title('Variation of Flow Rate Distribution-NON CONSERVATIVE')


% Temperature
subplot(4,1,2)
plot(x,T_NC,'color','c')
ylabel('Temperature')
legend({'Temperature'});
axis([0 3 0 1]);
grid minor;


% Pressure
subplot(4,1,3)
plot(x,Pressure_NC,'color','g');
ylabel('Pressure')
legend({'Pressure'});
axis([0 3 0 1]);
grid minor;

% Mach number
subplot(4,1,4)
plot(x,Mach_number_NC,'color','y');
xlabel('Nozzle Length')
ylabel('Mach Number')
legend({'Mach Number'});
axis([0 3 0 4]);
grid minor;

% Function for Conservative form
tic;
[Mass_flow_rate_C,Pressure_C,Mach_number_C,rho_C,V_C,T_C,rho_throat_C,V_throat_C,T_throat_C,Mass_flow_rate_throat_C,Pressure_throat_C,Mach_number_throat_C]=conservative_form(x,dx,n,gamma,nt,c);
Time_elapsed_C=toc;
fprintf('Time Elapsed for Conservative_form : %0.4f',Time_elapsed_C);
hold on

% Plotting
% Time step variaqtion of properties at throat area in Conservative form
figure(5)

% Density
subplot(4,1,1)
plot(rho_throat_C,'color','m');
ylabel('Density')
legend({'Density at throat'});
axis([0 1400 0 1]);
grid minor;
title('Timestep variation at throat area CONSERVATIVE FORM')


% Temperature
subplot(4,1,2)
plot(T_throat_C,'color','c');
ylabel('Temperature')
legend({'Temperature at throat'});
axis([0 1400 0.6 1]);
grid minor;


% Pressure
subplot(4,1,3)
plot(Pressure_throat_C,'color','g');
ylabel('Pressure')
legend({'Pressure at throat'});
axis([0 1400 0.2 0.8]);
grid minor;

% Mach number
subplot(4,1,4)
plot(Mach_number_throat_C,'color','y');
xlabel('Time Steps')
ylabel('Mach Number')
legend({'Mach Number at throat'});
axis([0 1400 0.6 1.4]);
grid minor;


% steady state simulation for primitve values for Conservative form
figure(6);


% Density
subplot(4,1,1)
plot(x,rho_C,'color','m')
ylabel('Density');
legend({'Density '});
axis([0 3 0 1]);
grid minor;
title('Variation of Flow Rate Distribution-CONSERVATIVE Form')


% Temperature
subplot(4,1,2)
plot(x,T_C,'color','c')
ylabel('Temperature')
legend({'Temperature'});
axis([0 3 0 1]);
grid minor;


% Pressure
subplot(4,1,3)
plot(x,Pressure_C,'color','g');
ylabel('Pressure');
legend({'Pressure'});
axis([0 3 0 1]);
grid minor;

% Mach number
subplot(4,1,4)
plot(x,Mach_number_C,'color','y');
xlabel('Nozzle Length');
ylabel('Mach Number')
legend({'Mach Number'});
axis([0 3 0 4]);
grid minor;


% comparison plot Normalized Mass Flow Rate of Both Forms
figure(7)
hold on
plot(x,Mass_flow_rate_NC,'r','linewidth',1.25)
hold on
plot(x,Mass_flow_rate_C,'b','linewidth',1.25)
hold on
grid on

legend('NON CONSERVATIVE','CONSERVATIVE');
xlabel('LENGTH OF THE DOMAIN')
ylabel('MASS FLOW RATE')
title('Comparison of Normalized Mass Flow Rate of Both forms')

Explanation:

Code is started with clear all, close all and clc to enable a fresh start without the manipulation of previous values.

Input parameters are assigned for the variable x, dx, n, gamma, nt and c.

Non conservative and conservative forms are created as separate functions with the necessary inputs which is detailed below the sections.

tic toc command is used for calculating the time elapsed between the function.

Plotting is done for the following solutions.

1.) Time step variations at throat area for both forms.

2.) Variation of flow rate distribution of both forms.

3.) Comparison of normalized mass flow rate of both forms.

Each plot is computed as subplots of four primitive variables such as Density temperature Pressure and Mach number at throat as well as convergent and divergent section.

Function code for Non Conservative Form:

% Function for Non-conservative format
function[Mass_flow_rate_NC,Pressure_NC,Mach_number_NC,rho_NC,V_NC,T_NC,rho_throat_NC,V_throat_NC,T_throat_NC,Mass_flow_rate_throat_NC,Pressure_throat_NC,Mach_number_throat_NC]=Non_conservative_form(x,dx,n,gamma,nt,c)

%initial boundary conditions

rho_NC=1-0.3146*x;
T_NC=1-0.2341*x;
V_NC=(0.1+1.09*x).*T_NC.^0.5;

% Area of throat profiles
a=1+2.2*(x-1.5).^2;
throat=find(a==1);

% Outer Time loop
for k=1:nt
  
  %Time-step control
  dt=min(c.*dx./(sqrt(T_NC)+V_NC));
  
  % saving the copy of old values
  rho_old=rho_NC;
  T_old=T_NC;
  V_old=V_NC;
  
  
  % predictor methods
    for j=2:n-1
    
    % simplifying the equations spatial terms
    dv_dx=(V_NC(j+1)-V_NC(j))/dx;
    drho_dx=(rho_NC(j+1)-rho_NC(j))/dx;
    dT_dx=(T_NC(j)-T_NC(j-1))/dx;
    dlog_a_dx=(log(a(j+1))-log(a(j)))/dx;
    
    
    % continuity equations
    drho_dt_P(j)=-rho_NC(j)*dv_dx-rho_NC(j)*V_NC(j)*dlog_a_dx-V_NC(j)*drho_dx;
    
    % momentum equations
    dv_dt_P(j)=-V_NC(j)*dv_dx-(1/gamma)*(dT_dx+(T_NC(j)*drho_dx/rho_NC(j)));
    
    % Energy equations
    dT_dt_P(j)=-V_NC(j)*dT_dx-(gamma-1)*T_NC(j)*(dv_dx+V_NC(j)*dlog_a_dx);
    
    % solution update
    rho_NC(j)=rho_NC(j)+drho_dt_P(j)*dt;
    V_NC(j)=V_NC(j)+dv_dt_P(j)*dt;
    T_NC(j)=T_NC(j)+dT_dt_P(j)*dt;
  end
  
  
  % corrector methods
  for j=2:n-1
    
    % simplifying the equations spatial terms
    dv_dx=(V_NC(j)-V_NC(j-1))/dx;
    drho_dx=(rho_NC(j)-rho_NC(j-1))/dx;
    dt_dx=(T_NC(j)-T_NC(j-1))/dx;
    dlog_a_dx=(log(a(j))-log(a(j-1)))/dx;
    
    
    % continuity equations
    drho_dt_C(j)=-rho_NC(j)*dv_dx-rho_NC(j)*V_NC(j)*dlog_a_dx-V_NC(j)*drho_dx;
    
    % momentum equations
    dv_dt_C(j)=-V_NC(j)*dv_dx-(1/gamma)*(dT_dx+(T_NC(j)*drho_dx/rho_NC(j)));
    
    % Energy equations
    dT_dt_C(j)=-V_NC(j)*dT_dx-(gamma-1)*T_NC(j)*(dv_dx+V_NC(j)*dlog_a_dx);
    
    % solution update
    rho_NC(j)=rho_NC(j)+drho_dt_C(j)*dt;
    V_NC(j)=V_NC(j)+dv_dt_C(j)*dt;
    T_NC(j)=T_NC(j)+dT_dt_C(j)*dt;
  end
  
  
  % compute the average time derivative
  drho_dt=0.5.*(drho_dt_P+drho_dt_C);
  dv_dt=0.5.*(dv_dt_P+dv_dt_C);
  dT_dx=0.5.*(dT_dt_P+dT_dt_C);
  
  % final solution update
  for i=2:n-1
    rho_NC(i)=rho_old(i)+drho_dt(i)*dt;
    V_NC(i)=V_old(i)+dv_dt(i)*dt;
    T_NC(i)=T_old(i)+dT_dx(i)*dt;
    
  end
  
  % Applying boundary conditions
  % At Inlet
  rho_NC(1)=1;
  V_NC(1)=2*V_NC(2)-V_NC(3);
  T_NC(1)=1;
  
  
  % At Outlet
  rho_NC(n)=2*rho_NC(n-1)-rho_NC(n-2);
  V_NC(n)=2*V_NC(n-1)-V_NC(n-2);
  T_NC(n)=2*T_NC(n-1)-T_NC(n-2);
  
  % Defining the Mass flow rate,Pressure and Mach number
  Mass_flow_rate_NC=rho_NC.*a.*V_NC;
  Pressure_NC=rho_NC.*T_NC;
  Mach_number_NC=(V_NC./sqrt(T_NC));
  
  % Calculating the variables at throat section
  rho_throat_NC(k)=rho_NC(throat);
  T_throat_NC(k)=T_NC(throat);
  V_throat_NC(k)=V_NC(throat);
  Mass_flow_rate_throat_NC(k)=Mass_flow_rate_NC(throat);
  Pressure_throat_NC(k)=Pressure_NC(throat);
  Mach_number_throat_NC(k)=Mach_number_NC(throat);
  
  
  % plotting
  % comparison of non-dimensional mass flow rate atdifferenttime steps
  figure(1);
  if k==50
  plot(x,Mass_flow_rate_NC,'m','linewidth',1.25);
  hold on
elseif k==100
  plot(x,Mass_flow_rate_NC,'c','linewidth',1.25);
  hold on
elseif k==200
  plot(x,Mass_flow_rate_NC,'g','linewidth',1.25);
  hold on
elseif k==500
  plot(x,Mass_flow_rate_NC,'y','linewidth',1.25);
  hold on
elseif k==900
  plot(x,Mass_flow_rate_NC,'k','linewidth',1.25);
  hold on
end

% labelling
title('Mass flow rates at different timesteps-Non conservative form)');
xlabel('Distance');
ylabel('Mass flow rate');
%legend('50^t^h Time steps','100^t^h Time steps','200^t^h Time steps','500^t^h Time steps','900^t^h Time steps');
axis([0 3 0 2]);
grid on
end


end

Explanation:

The purpose of the function is to calculate the values of mass flow rate, pressure ,Mach number, Density, Velocity, Temperature, Density at throat, Velocity at throat, Temperature at throat, Mass flow rate at throat, Pressure at throat, Mach number at throat by knowing equations for all the grid points.

For the initial boundary conditions are established for Density, Temperature and Velocity and profiles for calculating area and throat.

Now Outer time loop is computed for for loop to calculate all the grid points for various formulas inside the loop.

MacCarmack technique is used to solve the numerical solutions of governing equations such as continuity, Momentum and Energy equations.

The technique implies two methods for solving namely predictor method followed by corrector method.

Predictor and corrector method are assigned within the for loop individually for calculating values.

The calculated values are averaged in the next time step and updating the solution with old values.

Boundary Conditions are applied within the for loop and subsequently used for calculating the mass flow rate, Mach number and pressure also calculated at the throat section.

Finally plotting is done for Distance (x) and Mass flow rate for different time steps.

Conclusion

Function code for Conservative form:

%Function for Conservative form
function[Mass_flow_rate_C,Pressure_C,Mach_number_C,rho_C,V_C,T_C,rho_throat_C,V_throat_C,T_throat_C,Mass_flow_rate_throat_C,Pressure_throat_C,Mach_number_throat_C]=conservative_form(x,dx,n,gamma,nt,c)

% Determining initial profile of Density and Temperature 
for i=1:n
  if (x(i)>=0 && x(i)<=0.5)
    rho_C(i)=1;
    T_C(i)=1;
  elseif (x(i)>=0.5 && x(i)<=1.5)
    rho_C(i)=1-0.366*(x(i)-0.5);
    T_C(i)=1-0.167*(x(i)-0.5);
  elseif  (x(i)>=1.5 && x(i)<=3)
    rho_C(i)=0.634-0.3879*(x(i)-1.5);
    T_C(i)=0.833-0.3507*(x(i)-1.5);
    end
    
    
end


% Area and throat profiles

  a=1+2.2*(x-1.5).^2;
  throat= find(a==1);
  
  % Initial Profile for Velocity and Pressue
  V_C=0.59./(rho_C.*a);
  Presure_C=rho_C.*T_C;
  
  % calculating the initial solution vectors(u)
U1=rho_C.*a;
U2=rho_C.*a.*V_C;
U3=rho_C.*a.*(T_C/(gamma-1))+((gamma/2).*V_C.^2);

% Outer time loop

for k=1:nt
  % Time-step control
  dt=min(c.*dx./(sqrt(T_C)+V_C)); 
  
  % saving a copy of old values
  U1_old=U1;
  U2_old=U2;
  U3_old=U3;
  
  % calculating the flux vector(F)
  F1=U2;
  F2=((U2.^2)./U1)+((gamma-1)/gamma)*(U3-(gamma/2)*((U2.^2)./U1));
  F3=((gamma*U2.*U3)./U1)-(gamma*(gamma-1)*((U2.^3)./(2*U1.^2)));
  
  % Predictor methods
  for j=2:n-1
    
    % calculating the source term(j)
    J2(j)=(1/gamma)*rho_C(j)*T_C(j)*((a(j+1)-a(j))/dx);
    
    % continuity Equation
    dU1_dt_P(j)=-((F1(j+1)-F1(j))/dx);
    
    % MomentumEquation
    dU2_dt_P(j)=-((F2(j+1)-F2(j))/dx)+J2(j);
    
    % Energy Equation
    dU3_dt_P(j)=-((F3(j+1)-F3(j))/dx);
    
    % Updating new values
    U1(j)=U1(j)+dU1_dt_P(j)*dt;
    U2(j)=U2(j)+dU2_dt_P(j)*dt;
    U3(j)=U3(j)+dU3_dt_P(j)*dt;
    
  end
  % Updating the Flux vectors
  F1=U2;
  F2=((U2.^2)./U1)+((gamma-1)/gamma)*(U3-((gamma*0.5*(U2.^2))./(U1)));
  F3=((gamma*U2.*U3)./U1)-((gamma*0.5*(gamma-1)*(U2.^3))./(U1.^2));
  
  
  
  % Corrector methods
  for j=2:n-1
    
    % calculating the source term(j)
    J2(j)=(1/gamma)*rho_C(j)*T_C(j)*((a(j)-a(j-1))/dx);
    
    % continuity Equation
    dU1_dt_C(j)=-((F1(j)-F1(j-1))/dx);
    
    % MomentumEquation
    dU2_dt_C(j)=-((F2(j)-F2(j-1))/dx)+J2(j);
    
    % Energy Equation
    dU3_dt_C(j)=-((F3(j)-F3(j-1))/dx);
    
    end
    % Compute average Time derivative
    dU1_dt=0.5*(dU1_dt_P+dU1_dt_C);
    dU2_dt=0.5*(dU2_dt_P+dU2_dt_C);
    dU3_dt=0.5*(dU3_dt_P+dU3_dt_C);
    
    % Final Solution values
    for i=2:n-1
   
    U1(i)=U1_old(i)+dU1_dt(i)*dt;
    U2(i)=U2_old(i)+dU2_dt(i)*dt;
    U3(i)=U3_old(i)+dU3_dt(i)*dt;
    
  end
  % Applying boundary conditions
  % At inlet
  U1(1)=rho_C(1)*a(1);
  U2(1)=2*U2(2)-U2(3);
  
  V_C(1)=U2(1)./U1(1);
  U3(1)=U1(1)*((T_C(1)/(gamma-1))+((gamma/2)*(V_C(1)).^2));
  
  % At outlet
  U1(n)=2*U1(n-1)-U1(n-2);
  U2(n)=2*U2(n-1)-U2(n-2);
  U3(n)=2*U3(n-1)-U3(n-2);
  
  % Final Primitive value update
  rho_C=U1./a;
  V_C=U2./U1;
  T_C=(gamma-1)*((U3./U1-(gamma/2)*(V_C).^2));
  
  
  % Defining the Mass flow rate,Pressure and Mach number
  Mass_flow_rate_C=rho_C.*a.*V_C;
  Pressure_C=rho_C.*T_C;
  Mach_number_C=(V_C./sqrt(T_C));
  
  % Calculating the variables at throat section
  rho_throat_C(k)=rho_C(throat);
  T_throat_C(k)=T_C(throat);
  V_throat_C(k)=V_C(throat);
  Mass_flow_rate_throat_C(k)=Mass_flow_rate_C(throat);
  Pressure_throat_C(k)=Pressure_C(throat);
  Mach_number_throat_C(k)=Mach_number_C(throat);
  
  
  % plotting
  % comparison of non-dimensional mass flow rate atdifferenttime steps
  figure(4);
  if k==50
  plot(x,Mass_flow_rate_C,'m','linewidth',1.25);
  hold on
elseif k==100
  plot(x,Mass_flow_rate_C,'c','linewidth',1.25);
  hold on
elseif k==200
  plot(x,Mass_flow_rate_C,'g','linewidth',1.25);
  hold on
elseif k==500
  plot(x,Mass_flow_rate_C,'y','linewidth',1.25);
  hold on
elseif k==900
  plot(x,Mass_flow_rate_C,'k','linewidth',1.25);
  hold on
end

% labelling
title('Mass flow rates at different timesteps- Conservative form)')
xlabel('Distance')
ylabel('Mass flow rate')
%legend({'50^t^h Timestep','100^t^h Timestep','200^t^h Timestep','500^t^h Timestep','800^t^h Timestep'})
axis([0 3 0.4 1])
grid on
end


end

Explanation:

The purpose of the function is to calculate the values of mass flow rate, pressure ,Mach number, Density, Velocity, Temperature, Density at throat, Velocity at throat, Temperature at throat, Mass flow rate at throat, Pressure at throat, Mach number at throat by known equations for all the grid points. To determine the initial profile of density and temperature for loop is used inputting the known conditions with an else –if command.

For the initial boundary conditions are established for Density, Temperature and Velocity and profiles for calculating area and throat.

In Order to simplify and avoid errors, equation is spitted into Solution Vector (U), Flux Vector (F) and Source Vector (J).

Now Outer time loop is computed for for loop to calculate all the grid points for various formulas inside the loop.

MacCarmack technique is used to solve the numerical solutions of governing equations such as continuity, Momentum and Energy equations.

The technique implies two methods for solving namely predictor method followed by corrector method.

Predictor and corrector method are assigned within the for loop individually for calculating values.

The calculated values are averaged in the next time step and updating the solution with old values.

Boundary Conditions are applied within the for loop and subsequently used for calculating the mass flow rate, Mach number and pressure also calculated at the throat section.

Finally plotting is done for Distance (x) and Mass flow rate for different time steps.

Conclusion

PLOTS:
Timestep Variation of Primitive Variable at throat area:

Non-Conservative Form:

Conservative Form:

From the above plot we can conclude that initial variations are observed in Non-conservative form for a period of time takes, it consumes higher amount of time to achieve stable solution when compared to conservative form.

Variation of FlowRate Distribution:

Non-Conservative Form:

Conservative Form:

Here we observe the above plots of both the forms are in same phase giving the exact same solution for all the values

Mass Flowrate at Different Timesteps:

Non-conservative Form:

Conservative Form:

The above plots shows the Mass flow rate of different timesteps along the distance oscillate initially However the solution becomes stable after the 500 th time step for boththe forms from a constant value.

Comparison Plot of Normalized Mass flow Rate of both Non Conservative and Conservative Forms:

Even though the final solution of both the forms are almost similar. The Non conservative form oscillates much when compared toconservative form.The figure also gives almost stable solution along the length.By this we can conclude that conservative form attains stability in lesser number of iterations with earliest time.

GRID DEPENDENCE SOLUTION:

TYPE OF FORMS Grid Numbers(n) Density Temperature Pressure Mach Number Time Elapsed
Non Conservative Form n=31 0.99796 1.0118 1.0097 0.09635 29.456
n=61 0.99925 1.0053 1.0046 0.10206 48.317
Non Conservative Form n=31 0.99874 0.99951 0.99825 0.098341 27.551
n=61 0.99943 0.99977 0.9992 0.10365 37.317
Solution 0.9988 1.00409 1.00293 0.1001

Grid dependence is a important factor to determine whether the problem can be solved faster.So here we increased the grid points from 31 to 61 and populated them in a sheet.

Conclusion:

From the above results we observe that Convergence Form converges slightly faster than Non convergence For offering stable solution along the simulation.Yet both the formsare dependable in calculating the solutions.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.