I'm trying to solve the equation(adsbygoogle = window.adsbygoogle || []).push({});

$$

\frac{\partial u}{\partial t} + \frac{\partial}{\partial x}\left(Cu\right) - \frac{\partial}{\partial x}\left(D\frac{\partial u}{\partial x}\right) = f(x,t)

$$

where C and D allow for linearity. I'm using a discontinuous Galerkin method in space and Backward Euler for the time-stepping. I currently have a working code for the equation WITHOUT the convection term:

$$

\frac{\partial u}{\partial t} - \frac{\partial}{\partial x}\left(D\frac{\partial u}{\partial x}\right) = f(x,t)

$$

However, I am unsure of how to properly implement the convection term. I currently have

$$

\int_{\Omega}\frac{\partial}{\partial x}(Cu)v = -\int_{\Omega}Cu\frac{\partial v}{\partial x} + \{Cu^{up}\}\left[v\right]

$$

where the { } indicate the average and the [ ] indicate the jump. My professor told me to implement the upwinding method like this:

if $${C} \ge 0$$

$$u^{up} = u(x^{-})$$

else

$$u^{up} = u(x^{+})$$

I've implemented this as best as I can but it's already pretty terrible for the case when C = D = 1. I can get better accuracy with the plain old CG method for this case.

I know no one can help me with the code but is this scheme even correct?

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Upwinding method for convection terms 2nd order PDE

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for Upwinding method convection |
---|

A Intermediate Axis Theorem - Lyapunov's Indirect Method |

A Solving an ODE Eigenvalue Problem via the Ritz method |

I Neural Networks vs Traditional Numerical Methods |

I Method for solving gradient of a vector |

A Can Newton's method work with an approximated integral |

**Physics Forums | Science Articles, Homework Help, Discussion**