Hi Killian,

It is not necessarily wrong to have a discontinuous forcing function since the projection of the RHS term is dealt with by the way you handle the LHS terms.

If we were using a DG scheme on the LHS then one issue might be how the Reimann solver sees the forcing term. When you have a very energetic forcing term (i.e. your c*grad(v) ) you may have to take this into consideration in your Riemann solver as a source term if it is very large compared to the v *grad(u) term. If the RHS term is not significantly larger than the v* grad(u) term then I would have through just adding the term as you have suggested should be stable at least. 

Is there a reason you want it to be C0 continuous? You can project it onto a C0 space by inverting a mass matrix but this is obviously expensive. Alternatively you could average the value at the interface which is not so mathematically consistent but I think  may work anyway.

Cheers,
Spencer.

On 14 Dec 2016, at 13:43, Kilian Lackhove <lackhove@ekt.tu-darmstadt.de> wrote:

Dear List,

i am trying to implement a source term based on the gradient of an auxiliary
field in the APESolver. My problem is quite general, so i in terms of the
simpler ADR solver, a minimal example would look like this:

du / dt + v * grad(u) = c * grad(v)

with u being a transported variable, v the advection velocity and c a
constant.

The problem is the gradient on the right hand side. I tried computing it by
using ExpList::PhysDeriv(), but since the projection is not C1-continuous,
this fails at the element edges. I attached an example plot to illustrate the
problem. p0/rho0 uses the left axis, the gradient the right hand side one.

Do you have any suggestions on how to handle the gradient term? Is there some
other method i should use?

Cheers,

Kilian

--
Kilian Lackhove, M.Sc.
Fachgebiet für Energie- und Kraftwerkstechnik
L1|08 114
Technische Universität Darmstadt
Jovanka-Bontschits-Straße 2
D-64287 Darmstadt
Germany

Tel.: +49 6151 16 - 28915
Fax: +49 6151 16 - 6555
e-mail: lackhove@ekt.tu-darmstadt.de<grad_dg.pdf>_______________________________________________
Nektar-users mailing list
Nektar-users@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/nektar-users

Spencer  Sherwin
McLaren Racing/Royal Academy of Engineering Research Chair, 
Professor of Computational Fluid Mechanics,
Department of Aeronautics,
Imperial College London
South Kensington Campus
London SW7 2AZ

+44 (0) 20 759 45052