|September 13, 2013, 05:18||
Convergence study_Computational fluid dynamics
Join Date: Sep 2013
Posts: 1Rep Power: 0
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.
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
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||Thread Starter||Forum||Replies||Last Post|
|An error has occurred in cfx5solve:||volo87||CFX||5||June 14, 2013 17:44|
|FSI/MFX: resutls after using fluid mass flux to achieve convergence||gogohusky||CFX||4||May 23, 2012 06:08|
|Fluid dynamics in zero-g||charles_west||OpenFOAM||2||September 15, 2009 04:31|
|Fluid Dynamics Eng - PAX Mixer - San Rafael, CA||Gary Jong||FLUENT||0||February 25, 2008 21:46|