All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Objective : To understand the imporatance of time step in numerical solution for 1D linear Convection Equation. Terms to be understand : Convection : The flow that combines diffusion and the advection is called convection. Advection : Bulk transfer of mass,momentum,heat of the molecules due to flow of field.…
Epuri Yoga Narasimha
updated on 05 Feb 2021
Objective : To understand the imporatance of time step in numerical solution for 1D linear Convection Equation.
Terms to be understand :
Convection : The flow that combines diffusion and the advection is called convection.
Advection : Bulk transfer of mass,momentum,heat of the molecules due to flow of field.
Diffusion : Diffusion mainly due to momentum of the molecules , from high to low concentration
region of property.
Courant Number (CFL Criteria):
CFL = c⋅ΔtΔxc⋅ΔtΔx.
Used to understand the stability of model.
ΔtΔt = time step.
ΔxΔx = grid size.
CFL < 1 , condition for the model to be stable for explicit time marching problems.
As here grid size is static , and velocity(c) is constant (1m/s) , so CFL resitricted to time step.
As CFL αα time step , CFL increases as time step increases errors get approach to be bounded.
General Equation using discretization and taylor series :
This scheme is First order upwind scheme
∂ϕ∂t=-c⋅∂ϕ∂x+c⋅Δx2⋅(1-λ)⋅∂2ϕ∂x2+O([Δx2])∂ϕ∂t=−c⋅∂ϕ∂x+c⋅Δx2⋅(1−λ)⋅∂2ϕ∂x2+O([Δx2])
As leading term of truncation error here is even power derivative , so dissipation occurs...
Can observe that in results below , as over time loss in momentum (velocity decreases)...
As by defination , dissipation means loss of quanitity over time...
here λλ is courant number.
NOTE :
CFL Criteria is used for explicit method , no matters how much is courant number while doing implicit method.
Discretization can be solved by using Three methods ...,
Stability criterias :
Explanation of code :
Code snippet :
close all ; clear all ;clc
n = 80;
dt = [1e-4,1e-3,1e-2,1e-1];
t = 0.4;
nt = t./dt;
t1 = ones(1,4);
x = linspace(0,1,80);
dx = x(2) - x(1);
u = ones(1,n);
A = logical(x>=0.1 & x<=0.3);
index = find(A==1);
n_start = index(1);
n_end = index(end);
u(n_start:n_end) = 2;
plot(x,u)
hold on
for p = 1:length(dt)
[u1,a] = linear_convection_func2(dt(p),nt(p),length(x),u,dx);
plot(x,u1)
if dt(p) == 1e-3
text(x(36),u1(36),strcat('dt=',num2str(dt(p))));
else
text(x(50),u1(50),strcat('dt=',num2str(dt(p))));
end
axis([0 1 0 2])
t1(p) = a;
end
legend('initial','1e-4','1e-3','1e-2','1e-1')
figure(2)
X = categorical({'1e-4','1e-3','1e-2','1e-1'});
X = reordercats(X,{'1e-4','1e-3','1e-2','1e-1'});
bar(X,t1(1,:))
title('simulation time for ',num2str(80))
xlabel('\delta t')
ylabel('simulation time')
Function snippet :
function [z,a] = linear_convection_func2(dt,nt,k,u,dx)
v = u;
L = 1;
c = 1;
tic
%time loop
for i = 1:nt
% space loop
for j = 2:k
z(j) = v(1,j) - ((c*dt)/dx)*(v(1,j) - v(1,j-1));
end
z(1) = 1;
v = z;
end
a = toc;
end
Results :
Generally , time-step consideration depends on the discretization model we considered.
Here by increasing the time step , stability and rate of convergence increases.
But for 'dt = 0.1' , solution blasted , as it undergoes under instability .(CFL > 1).
For explicit time marching problems , (CFL < 1).
By this graph , as time step increases simulation time decreases , as the number of iterations decreases.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 4
Objective 1. Detect lanes using Hough Transform Method. Steps in lane Detection 1. Detect Edges using Canny Edge Detection Method. 2. Capture the Region of Interest in Image. 3. Detect lines using Hough Transform. 4. Calculate the actual left and right lanes from all lines. 6. Find the coordinates of the lines. 7. Display…
21 Feb 2023 05:22 AM IST
Lane Detection using Hough Transform
Objective 1. Detect lanes using Hough Transform Method. Steps in lane Detection 1. Detect Edges using Canny Edge Detection Method. 2. Capture the Region of Interest in Image. 3. Detect lines using Hough Transform. 4. Calculate the actual left and right lanes from all lines. 6. Find the coordinates of the lines. 7. Display…
21 Feb 2023 05:20 AM IST
Edge Detection and Hough Transform
Objective: Detecting Edges using Canny Edge Detector. Understand and display the outputs of all steps in the canny Edge Detection process. Effect on the output on changing the parameters of the Non-Maximum Suppression. Understand Hough Transform and Lane Detection using Hough Transform. Steps Follow in the Discussion:…
28 Dec 2022 09:58 PM IST
week 2 : Image Filtering
Objective: Apply Prewitt and Laplacian filter on the image Libraries used: Opencv Open Source computer vision library. cross-platform supported. can perform through c, c++, and python. numpy Mathematical library to work in the domain of Linear algebra, Fourier transform, and matrices. Image Filtering…
09 Jul 2022 06:36 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.