# Advection equation using the finite element method

I want to solve this simple advection equation using the finite element method.

$$\frac{dc}{dt}+v\cdot\nabla c = f$$

What's the best FEM discretization for this? I have tried using the standard/primitive least-squares finite element method for this but it seems I still get oscillations.

• I would say the standard finite element method is a discontinuous Galerkin method; this is discussed in detail for your equation in Chapter 3 of DiPietro and Ern, Mathematical Aspects of Discontinuous Galerkin Methods, Springer 2012. Sep 23, 2015 at 9:08

One way or the other, you need to stabilize every discretization for this equation. Traditionally, this was done using methods such as artificial viscosity or its slightly smarter sibling SUPG. But there are many other alternatives to make things work if you'd like to stick with the FEM framework -- e.g., discontinuous Galerkin methods.

My summary of this issue can be found in lecture 31 here: http://www.math.tamu.edu/~bangerth/videos.html

• Thanks for the link to the video, what you say makes sense. It seems to me that LSFEM without any stabilization exhibits the same "oscillations" as the SUPG formulation. That is, my solution violates the Discrete Maximum Principles and is not monotonic everywhere. Unlike SUPG, LSFEM is naturally an unconstrained minimization/optimization problem so could I enforce bounded/inequality constraints to "fix" my solution? Would this be mathematically sound? Sep 23, 2015 at 23:11
• I don't know. It's certainly possible to try something like this. It's a different question whether it works. Sep 24, 2015 at 12:50
• Okay, I guess I will just give it a try then. Thanks Sep 24, 2015 at 18:39
• I can't say anything about the mathematics, but you can prevent negative solution oscillations with a penalty in a Galerkin method. I never published anything on it, but I have tried it successfully. Sep 24, 2015 at 23:18
• @BillBarth can you elaborate on this a little more? I know it's now going off topic so I can create another thread if necessary Sep 27, 2015 at 9:22

I definitely advocate for discontinuous galerkin methods, as others have noted.

You might want to consider Space-Time Discontinuous Galerkin methods (I developed some codes for this at UIUC). Using this approach, you could potentially mesh your elements in a way that would allow for parallelizing your code and avoiding having to solve large matrices.
{"ft_lang_label":"__label__en","ft_lang_prob":0.88524234,"math_prob":0.4677189,"size":287,"snap":"2022-27-2022-33","text_gpt3_token_len":71,"char_repetition_ratio":0.12014134,"word_repetition_ratio":0.0,"special_character_ratio":0.21254355,"punctuation_ratio":0.057692308,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9621158,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-27T11:51:58Z\",\"WARC-Record-ID\":\"<urn:uuid:d83406dd-4eee-4447-88eb-378cfff4f21a>\",\"Content-Length\":\"238117\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a1525bb3-0a59-4794-8485-30f4b7d462d4>\",\"WARC-Concurrent-To\":\"<urn:uuid:2ae0e349-bc3e-4046-b33f-a96dce516a30>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://scicomp.stackexchange.com/questions/20802/advection-equation-using-the-finite-element-method\",\"WARC-Payload-Digest\":\"sha1:ZBYOHCFGVGOCTMJSRFAM62D63JF54ZVQ\",\"WARC-Block-Digest\":\"sha1:EXHUD2EAJDK3REOQRAU2FHMOW6PQ4WH2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103331729.20_warc_CC-MAIN-20220627103810-20220627133810-00558.warc.gz\"}"}