thetisproject / thetis

Finite element flow solver for simulating coastal and estuarine flows.
Other
70 stars 28 forks source link

Negative tracer values #188

Closed jwallwork23 closed 3 years ago

jwallwork23 commented 4 years ago

Apparently a few people are looking for a steady state passive tracer example in Thetis. So I thought I would code up the TELEMAC-2D 'point discharge with diffusion' test case which I considered using a standalone SUPG P1 solver in this paper: https://zenodo.org/record/3653373#.Xlkdaumnw5k

I made the new branch passive-tracer-example, where there is a coupled 'SteadyState' solver. If I run examples/passiveTracer/passiveTracer.py, it gives a very encouraging plot:

negative_tracer

Visually, it agrees nicely with the asymptotic solution and SUPG approximation as plotted in the paper (Figure 1, p.92). However, the values are significantly negative! Does anyone have an idea what is going wrong?

tkarna commented 4 years ago

Hmm, no idea. Is the (elevation, velocity) solution correct? One way to debug is to run the time dependent solution and make sure it works correctly.

tkarna commented 3 years ago

@jwallwork23 is this issue still active/relevant?

jwallwork23 commented 3 years ago

Thanks for the reminder @tkarna! I just merged master into the branch and the negative tracer values have miraculously gone away (to order 1e-07).

fixed

I'll clean up the branch and make a PR to enable the coupled 2D steady state solver (which currently gets a NotImplementedError because it isn't tested).