Comments (9)
ex_order_T=0.1.pdf
ex_order_T=1.pdf
from gempic.jl.
Thanks for reporting this, could you share the code to reproduce this problem ?
from gempic.jl.
liyz2.zip
Thanks.
steps:
- 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]
- comment lines 64, 65, 66, 67 to store initial data.
- 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].
- 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].
- get the order of 'ex' by (ex_all_0_001 .- ex_all_0_01)./(ex_all_0_001 .- ex_all_0_005).
- 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.
I am with my kids at home due to the lockdown but I'll do my best.
from gempic.jl.
Thank you so much. I am also checking it now.
from gempic.jl.
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.
updating e_dofs[1] by solving Poisson equation should not be there. I'll take a look.
from gempic.jl.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gempic.jl.