-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advection-diffusion of passive tracer using a turbulent flow #53
Conversation
Run again. Probably need a more illuminating example, or change the colourbar limits as the animation is plotted.
Hopefully increase code coverage
@jbisits I made some changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made a few remarks
I will have a closer look over the weekend!
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
@navidcy thanks for making the changes above, all of the package organisation is new to me! |
taking the absolute value of the tracer doesn't seem right... :( |
stepforward!(ADprob)
stepforward!(params.MQGprob)
MultiLayerQG.updatevars!(params.MQGprob) the This seems to have fixed it. Have a look: turbulentflow_advection-diffusion.mp4The proper solution would be to define an abstract type of a CoupledProblem that would include both the function stepforward!(coupled_prob::CoupledProblem)
stepforward!(coupled_prob.ADprob)
stepforward!(coupled_prob.MQGprob)
MultiLayerQG.updatevars!(coupled_prob.MQGprob)
end But we can defer this for a future PR? |
…TracerFlows.jl into turb_advection-diffusion
@jbisits feel free to merge when tests pass if you don't have anything else to add. Sorry it took so long. |
oh I guess you probably don't have the right to merge? I'll do it ;) |
Yeah taking absolute value was something we did on larger domains at the start of simulations where some values were really small and negative. |
This is great!!
Agreed. |
Did not take too long! Thanks for all your help!!! |
I can have a look at some of these tests in a bit |
This PR adds the ability to advect-diffuse a passive tracer using a flow generated by the
MultiLayerQG
module from theGeophysicalFlows.jl
package with a constant diffusivity. To implement this another method has been added toTracerAdvectionDiffusion.Problem
that takes in aMultiLayerQG.Problem
as an argument. TheTracerAdvectionDiffusion.Problem
is then setup on the same size grid and number of layers as theMultiLayerQG.Problem
. Additional arguments are\kappa
and\eta
, the constant diffusivity, thestepper
and thetracer_release
. Thetracer_release
argument allows the user to specify some length of time to run the flow for (e.g. so the flow reaches a statistical equilibrium) prior to releasing the tracer into the flow.I have written an example ,
turbulent_advection-diffusion.jl
, showing how the module works. In doing this I have addedPlots.jl
to theProject.toml
which I did not want to do (nor does it need to be there). I have no experience setting up the example to be run and rendered into a GitHub page so this is why it has occured.I have not implemented it yet but as a test for the function I will set the
MultilayerQG.Problem
to producenoflow
(i.e. flow fields are 0 for the whole simulation) and check the diffusion of a tw-dimensional Gaussian in a similar manner to one of the tests that is already in thetest_traceradvectiondiffusion.jl
file.I am not sure if this is the best way to implement this functionality into the
PassiveTracerFlows.jl
package but I have used it a lot over the last year or so and it has been very reliable and reasonably quick even on the much larger domains I was using.