Using PhysDeriv() for gradient-based source terms
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
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<mailto: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<mailto:lackhove@ekt.tu-darmstadt.de><grad_dg.pdf>_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto: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 s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
Hi Spencer, having a C0-continuous source term allows for treating the governing equations as homogeneous in the Riemann solver, or at least decreases the error enough to not cause instabilities. So that’s probably the simplest solution to my problem. I also tried using a splitting scheme (as described in Toro's book) to handle the inhomogeneous part, but that does not seem to have any significant effect. I think i am going to experiment with other Riemann solvers a bit more and resort to the averaging you suggested as a plan B! Cheers, Kilian Am Freitag, 16. Dezember 2016, 08:43:23 CET schrieb Sherwin, Spencer J:
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<mailto: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<mailto:lackhove@ekt.tu-darmstadt.de><grad_dg.p df>_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto: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
s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
-- 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
participants (2)
- 
                
                Kilian Lackhove
- 
                
                Sherwin, Spencer J