|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
KUMAR SAURABH
Join Date: Sep 2014
Posts: 6
Rep Power: 12 ![]() |
I discretized an unsteady state convection diffusion equation and solved it with both CDS and upwind scheme and Crank Nicholson time step. But the solution of CDS and upwind are same till certain time interval (exactly speaking till 60 iterations) but after that upwind tends to give wrong solution. Is there something wrong with my code or is it because of less accurate upwind scheme.
Please help. Thanks in advance. |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
Quote:
Provide also a graph of the solution |
||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 ![]() |
Unless artificial dissipation has been added, the central difference method will be unstable.
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
||
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
KUMAR SAURABH
Join Date: Sep 2014
Posts: 6
Rep Power: 12 ![]() |
The problem is as follows:
[(∂∅)/∂t+ u (∂∅)/∂x+ v (∂∅)/∂y=D((∂^2∅)/(∂x^2 )+ (∂^2∅)/(∂y^2 )) u = cos((pi*(x - 0.5))*sin(pi*(y - 0.5)) v = -sin(pi*(x - 0.5))*cos(pi*(y - 0.5)) D=1 Boundary condition: phi = 0 at boundaries. Initial Condition: phi = cos(pi*(x - 0.5))*cos(pi*(y - 0.5)) I am not able to attach the results because of size constraint but what happens is that after 67 time iterations the result in case of upwind begins to diverge from the exact solution. But in CDS, it is exactly the same. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 ![]() |
I could be wrong on all of it. All I can say for sure is that if I don't use enough of it in my 2nd order central difference N.S. code, it blows up and it is independent of the CFL number.
|
|
![]() |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
Quote:
I worked using CN+AB time integration and second order central discretization and obtained a stability region (see attachment). When you add artificial dissipation you are just working at small Reh, the same effect should be obtained by increasing the mesh resolution |
||
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
KUMAR SAURABH
Join Date: Sep 2014
Posts: 6
Rep Power: 12 ![]() |
Once the steady state is reached, does the upwind scheme has the problem ov overestimation or something like that if we continue for more period of time.
|
|
![]() |
![]() |
![]() |
![]() |
#9 |
New Member
KUMAR SAURABH
Join Date: Sep 2014
Posts: 6
Rep Power: 12 ![]() |
I have attached an image where clearly some perturbation is seen when the upwind is run for more time.
|
|
![]() |
![]() |
![]() |
![]() |
#10 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
Quote:
your solution is of order 10^-9, practically you have a vanished solution, the oscillation you see are simply due to the fact that you are approaching the limit of the threshold for the convergence... You have no numerical instability |
||
![]() |
![]() |
![]() |
![]() |
#11 | |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 ![]() |
Quote:
Regardless, the original posters equation set seems to be manufactured so I guess it's set up to work correctly. |
||
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implementation of 2nd order upwind scheme | jaason | OpenFOAM Running, Solving & CFD | 4 | February 6, 2015 17:40 |
Upwind Vs Central Difference | saurabh007 | Main CFD Forum | 1 | September 26, 2014 07:26 |
Periodic Boundary Condition for upwind difference | yohey44 | Main CFD Forum | 0 | October 27, 2010 13:10 |
the effect of upwind difference | hades | Main CFD Forum | 8 | March 14, 2009 23:43 |
Central Difference vs Upwind Defference | S. Balasubramanyam | Main CFD Forum | 5 | January 16, 2002 01:58 |