# Convergence study_Computational fluid dynamics

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 September 13, 2013, 05:18 Convergence study_Computational fluid dynamics #1 New Member   Miel Join Date: Sep 2013 Posts: 1 Rep Power: 0 Hello guys! I am a beginner in Matlab, I am currently a student in Computational fluid dynamics and i am struggling badly with the codes. We started with a script that uses Taylor's series expansion to compute coefficients of one-dimensional Finite Difference schemes on an even stencil using 'a' points to the left and 'b' points to the right for a total of 'r = a + b + 1' points in the stencil. I was able to develop this script and afterwards, i made it a function as i should use it for another exercise. That's where i am stuck. I have to use a double 'for'-loop to run over all combinations of grid points in N and stencils in STENCIL to compute the max. trunc. errors in ERROR. %% Input L = 1; % length of domain N = [5 10 20 40 80 160 320]; % vector with num. of grid points STENCIL = [ 0 1 ; 1 1 ; 2 2 ]; % stencil size array %% Initialize k = 2*pi/L; % wave number Dx = L./(N-1); % vector with grid spacings ERROR = zeros(size(STENCIL,1),length(N)); % array to hold maximum errors ROC = zeros(size(STENCIL,1),1); % vector to hold rates of conv. TL = zeros(size(STENCIL,1),length(N)); % array to hold tendency line val. Can anyone help? I would appreciate.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post volo87 CFX 5 June 14, 2013 17:44 gogohusky CFX 4 May 23, 2012 06:08 charles_west OpenFOAM 2 September 15, 2009 04:31 Gary Jong FLUENT 0 February 25, 2008 21:46

All times are GMT -4. The time now is 11:27.

 Contact Us - CFD Online - Top