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

problem simulating an advection equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2015, 15:51
Default problem simulating an advection equation
  #1
New Member
 
Terry Tensinsky
Join Date: Feb 2010
Posts: 14
Rep Power: 16
hami9293 is on a distinguished road
Send a message via Skype™ to hami9293
Hello,

I am struggling with a very simple problem for the past few days. I won't be surprised if the answer is terribly simple.

I want to simulate a simple advection equation:

du/dt + U du/dx =0
u(t=0) = sin(x)
u(x=0, x = pi) =0

I wrote a simple finite difference upwind spatial discretization with explicit time advance
u^{n+1}_{j} = u^{n}_{j} - \Deltat .U/ \Deltax ( u^{n}_{j}- u^{n}_{j-1})

The problem is that the amplitude of the waves shrinks as time goes by, while I expect the wave shape is preserved and only translated to the left (assuming U>0). (see figure 1)


https://www.dropbox.com/s/nrvadimqenf2uxx/1.bmp?dl=0


Alternatively, I can use a more sophisticated scheme such as beam_warming.
The shrinking problem here is fixed, but I get some wobbling noises.
see figure


https://www.dropbox.com/s/ric984qv73xvh9w/2.bmp?dl=0
Any idea/explanation/suggestion/comment would be great.

Thanks for reading.
hami9293 is offline   Reply With Quote

Old   July 17, 2015, 16:01
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,832
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
what you discovered is the well known presence of artificial viscosity in the first order upwind method....I suggest a carefull reading of a good text of CFD to study the theoretical reasons by means of the modified equation.

higher order schemes are not monotone and can generate wiggles
FMDenaro 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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Use advection step and Dispersion step to solve advection diffusion equation cooljd Main CFD Forum 0 October 15, 2012 15:44
Problem with a leapfrog scheme for wave equation Shiranui Main CFD Forum 0 June 22, 2010 09:19
continuity equation Rafal Main CFD Forum 4 November 29, 2006 09:27
Energy equation convergence problem Reza Main CFD Forum 0 August 27, 2003 13:09


All times are GMT -4. The time now is 20:52.