Giter Site home page Giter Site logo

Comments (18)

ali-ramadhan avatar ali-ramadhan commented on August 19, 2024

Out of curiousity what resolution or grid spacing are you using?

I'm wondering if the second-order advection scheme is just being inaccurate at coarse resolutions.

from eadyturbulence.

navidcy avatar navidcy commented on August 19, 2024

Same as the simple_eady.jl script.

from eadyturbulence.

ali-ramadhan avatar ali-ramadhan commented on August 19, 2024

Hmmm, yeah I'll let @glwagner answer this but I'm not super surprised to see numerical artifacts at 64x64x32 grid points on a 1000x1000x4 km domain.

Oceananigans might need better numerical methods (better advection scheme?). Climbing on the priority of things to do...

from eadyturbulence.

navidcy avatar navidcy commented on August 19, 2024

I'm actually not surprised to see numerical artifacts at this resolution. But I'm surprises they go away if you integrate for more... Usually when that happens NaNs are not far away.

from eadyturbulence.

ali-ramadhan avatar ali-ramadhan commented on August 19, 2024

Ah interesting. I wonder if the Laplacian + biharmonic diffusivity are smoothing things out just in time, but not sure...

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

@navidcy this is one of the dangerous aspects of a finite volume method. Grid noise can resolve itself.

There's no way to anticipate numerical artifacts from domain size and grid resolution alone. For example, a resting solution of u=0 is perfectly resolved at 64x64x32 whether the domain is 1 mm or 1 parsec wide. We need to know the spatial scales we expect to appear in the simulation. One of the challenges of this setup is predicting the spatial scales that appear. The Rossby radius of deformation is obviously one scale, but depending parameters, much smaller scales may arise, I think.

from eadyturbulence.

navidcy avatar navidcy commented on August 19, 2024

Of course @glwagner, I agree....

But still, isn't it weird that artifacts appear and then go away?

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

Yeah --- why would that be? Is it a time-stepping error?

from eadyturbulence.

navidcy avatar navidcy commented on August 19, 2024

Well that's why I put up the issue in the first place! I find it rather strange. I've never seen it in any other turbulence simulation. Usually when grid-point noise appears then NaN values are eminent...

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

Usually when grid-point noise appears then NaN values are eminent...

That's not my experience with finite volume methods! It is my experience with spectral methods (it also seems DG exhibits similar behavior).

But the question I thought you might be asking is: what process drives the generation of grid-scale noise at some specific time? For example, the physics might require scales below the grid scale. However, its surprising such physics would arise and then disappear later in the simulation.

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

We use adaptive time-stepping, so a time stepper error is possible. Let's try lowering the CFL.

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

@navidcy try changing this line:

wizard = TimeStepWizard(cfl=0.05, Δt=20.0, max_change=1.1, max_Δt=5minute)

to

wizard = TimeStepWizard(cfl=0.02, Δt=20.0, max_change=1.1, max_Δt=2minute)

possibly its an error associated with the diffusion time-scale? 3 minute time step may be too long.

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

I mean, that shouldn't be the case because the diffusive time-scale is fixed at a tenth of a day, so longer than an hour. But AB2 I think is actually particularly sensitive to diffusive CFL instabilities. Biharmonic is especially tricky. It's definitely worth understanding this problem thoroughly.

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

Actually, I need to limit the time-step to 1 minute for stability.

from eadyturbulence.

navidcy avatar navidcy commented on August 19, 2024

hm, after this discussion playing around a bit with TimeStepWizard input params I also tend to think that this is probably diffusive instability.

from eadyturbulence.

ali-ramadhan avatar ali-ramadhan commented on August 19, 2024

If you suspect diffusivity instability it might be worth printing out the "diffusive CFL" number with something like

using Oceananigans.Diagnostics: AdvectiveCFL, DiffusiveCFL
...
dcfl = DiffusiveCFL(wizard)
print("Diffusive CFL: $dcfl")

but I think it might require PR CliMA/Oceananigans.jl#557 and it doesn't support multiple closures so might have to calculating it manually might be easiest for this issue.

Is the stability criterion for biharmonic diffusivty stricter than Laplacian diffusivity?

from eadyturbulence.

navidcy avatar navidcy commented on August 19, 2024

Is this issue pertinent?

from eadyturbulence.

glwagner avatar glwagner commented on August 19, 2024

doubtful

from eadyturbulence.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.