CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Diffusion Using Gauss-seidel Method

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2014, 07:21
Unhappy Diffusion Using Gauss-seidel Method
  #1
New Member
 
Jason
Join Date: Oct 2014
Posts: 17
Rep Power: 11
J.Y.Won is on a distinguished road
Hello all,
I'm making a C++ code solving diffusion equation gauss-seidel method.
It's just 2D problem and domain has length of 1 in x, y direction.

Solving this problem, I found something strange.

As my cell numbers gets larger(16x16, 32x32, 64x64 ... 1024x1024), the error between exact solution and my code goes down and up again.
I mean, error gets smaller until 128x128 and after that, error gets bigger...

So, until now I tried to find something wrong in my code.
And when I just translate my C++ code into matlab code, Error gets smaller without increasing again.....

I can't understand why this happen... can someone help me?
I attached my C++ code and matlab script.

Thanks,
Attached Files
File Type: txt Diffusion_2D_C++.txt (1.6 KB, 54 views)
File Type: txt Diffusion_2D_matlab.txt (1.6 KB, 20 views)
J.Y.Won is offline   Reply With Quote

Old   November 5, 2014, 00:59
Default
  #2
New Member
 
Jason
Join Date: Oct 2014
Posts: 17
Rep Power: 11
J.Y.Won is on a distinguished road
problem solved...
It was because of the tolerance..
J.Y.Won is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Steady-State and Transient Solvers 70m1 OpenFOAM Running, Solving & CFD 21 May 8, 2021 07:09
Free Surface Ship Flow timfranke OpenFOAM Running, Solving & CFD 322 March 3, 2021 09:04
diverge in low courant number immortality OpenFOAM Running, Solving & CFD 1 April 11, 2013 08:41
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40
solution diverges when linear upwind interpolation scheme is used subash OpenFOAM 0 May 29, 2010 01:23


All times are GMT -4. The time now is 19:49.