Giter Site home page Giter Site logo

Comments (9)

liyz92 avatar liyz92 commented on June 2, 2024

ex_order_T=0.1.pdf
ex_order_T=1.pdf

from gempic.jl.

pnavaro avatar pnavaro commented on June 2, 2024

Thanks for reporting this, could you share the code to reproduce this problem ?

from gempic.jl.

liyz92 avatar liyz92 commented on June 2, 2024

liyz2.zip
Thanks.
steps:

  1. run strong_landau_damping.jl in notebooks to get reference solution, dt = 0.001, steps = 1000. save 'ex' at T=1 by ex_all_0_001 = propagator.e_dofs[1]
  2. comment lines 64, 65, 66, 67 to store initial data.
  3. in line 173 of strong_landau_damping.jl, set dt = 0.01, steps = 100, then run strong_landau_damping.jl, then save 'ex' at T=1 by ex_all_0_01 = propagator.e_dofs[1].
  4. in line 173, set dt = 0005, steps = 200, then run strong_landau_damping.jl, then save 'ex' at T=1 by ex_all_0_005 = propagator.e_dofs[1].
  5. get the order of 'ex' by (ex_all_0_001 .- ex_all_0_01)./(ex_all_0_001 .- ex_all_0_005).
  6. we can also plot((ex_all_0_001 .- ex_all_0_01)./(ex_all_0_001 .- ex_all_0_005)) to the order.

from gempic.jl.

pnavaro avatar pnavaro commented on June 2, 2024

I am with my kids at home due to the lockdown but I'll do my best.

from gempic.jl.

liyz92 avatar liyz92 commented on June 2, 2024

Thank you so much. I am also checking it now.

from gempic.jl.

liyz92 avatar liyz92 commented on June 2, 2024

After commenting solve_poisson!( efield_poisson, particle_group, kernel_smoother0, maxwell_solver, rho) in the loop,
second order can be obtained, and very small energy error is also obtained. This function updates e_dofs[1] by solving Poisson equation, but in the splitting method, e_dofs[1] is updated by solving Ampere equation. In the code, these two approaches are equivalent only when the integral average of Ex is 0.

from gempic.jl.

pnavaro avatar pnavaro commented on June 2, 2024

updating e_dofs[1] by solving Poisson equation should not be there. I'll take a look.

from gempic.jl.

pnavaro avatar pnavaro commented on June 2, 2024

It is because you set

e_dofs = [ efield_poisson, zeros(nx), zeros(nx)]

e_dofs[1] is a reference of efield_poisson, you should instead do

e_dofs = [ zeros(x), zeros(nx), zeros(nx)]
e_dofs[1] .= efield_poisson

e_dofs[1] is a copy of efield_poisson and a different array

from gempic.jl.

liyz92 avatar liyz92 commented on June 2, 2024

Ok, I see. Thanks. That explains why the values of e_dofs[1] are also updated after running solve poisson equation (which updates efield_poisson).

from gempic.jl.

Related Issues (6)

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.