Hi Francis, I'm very sceptical that it is anything to do with the solver. Either: (1) The input to the solver is already bad, or, (2) The mesh is messed up somehow, or (3) The equations are messed up somehow. Just checking, you didn't keep non-zero beta did you? That would not work with double periodic. all the best --cjc On 7 May 2016 at 22:33, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Hello,
Sorry Lawrence for sending my email to the wrong address but thanks for forwarding it. I will be more careful in the future.
Thanks for the suggestion Colin. I had tried reducing it by a factor of 10 and it still failed. Now I tried a factor of 10^5 and it still fails.
If my implementation is correct, which is a big if, then I wonder if the Helmholtz problem that I'm solving is much more poorly conditioned on a doubly periodic domain than just a periodic domain.
Is there another solver that might be a bit better at converging?
Cheers, Francis
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: Saturday, May 07, 2016 11:41 AM To: <firedrake@imperial.ac.uk> Subject: [firedrake] periodic boundary conditions?
This message reached me as a list administrator from Francis Poulin (but I couldn't figure out how to release it onto the list, so instead, it's copied below).
Lawrence
Hello,
Glad to see the posters are looking great. Sorry that I won't get to see them in person this year but glad I could contribute a little. Hopefully I'll get to attend next year with a grad student.
I have a question on how to convert the QG code from a channel to periodic boundary conditions. You can find a demo version of the code at
https://github.com/francispoulin/firedrake/blob/qg_demo/demos/quasigeostroph...
I have removed the jet and only have random initial conditions.
The good news is that 2D turbulence does happen and structures merge but in a channel. To reproduce classical results I would like it to be doubly periodic.
I made two changes:
1) I asked it to be periodic in this line by switching "x" to "both".
mesh = PeriodicRectangleMesh(n0, n0, Lx, Ly, direction="both", quadrilateral=True, reorder=None )
2) We should not impose Dirichlet boundary conditions. To do this I removed bcs=bc1 in the following
psi_problem = LinearVariationalProblem(Apsi,Lpsi,psi0)
It occurs to me that perhaps one needs to explicitly impose periodic boundary conditions. Is that the case? If yes then do I need to change the following somehow?
bc1 = [DirichletBC(Vcg, 0., 1 ), DirichletBC(Vcg, 0., 2 )]
When I run the code it does run but it doesn't converge (after 42 steps) and dies. This is for the same resolution and everything else that does converge for the channel case. Could it be that the periodic case is not as well conditioned if it is periodic in both directions?
I hope to make a nice simulation of this to see the structures merging and increasing in size.
What's really nice is that if I wanted to do 3D turbulence in the context of 3D the changes are pretty small. I need to define the grid to be 3D and impose Neumann BCs at the top and bottom. That I will ask about at a later time.
Cheers, Francis
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
-- http://www.imperial.ac.uk/people/colin.cotter www.cambridge.org/9781107663916