# PIC (particle-in-cell), space charge tracking simulation?

**URL:** https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077
**Category:** Numerics
**Tags:** package
**Created:** [July 6, 2019, 8:34pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077 "2019-07-06T20:34:03Z")
**Posts on this page:** 13
**Page:** 2

<div class="post-metadata">

### Author: ![jcook](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jcook/32/18211_2.png) [@jcook](https://discourse.julialang.org/u/jcook)
#### Post date: [July 13, 2019, 1:27pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/21 "2019-07-13T13:27:09Z")

</div>

Perhaps the conversation is getting a bit narrow, but I’m hoping it will catch some attention and gather some momentum.

> The FDTD method relies on the “staggered” (or nested) grids for the dual quantities. That works well when the grid is Cartesian.

The same outcome can be achieved with FEM grids via a careful choice of basis functions or choice of weak form.

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [July 13, 2019, 1:27pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/22 "2019-07-13T13:27:53Z")

</div>

So far I think there are very few alternatives to FDTD.

---

<div class="post-metadata">

### Author: ![c42f](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c42f/32/52842_2.png) [@c42f](https://discourse.julialang.org/u/c42f)
#### Post date: [July 13, 2019, 8:42pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/23 "2019-07-13T20:42:23Z")

</div>

> [@PetrKryslUCSD](#):
>
> I am possibly making an unjustified assumption that this is a topic of general interest, as it is only tangentially related to Julia. Perhaps this should be discussed through private messages?

Personally I find these kind of topics fascinating and the scientific/numerical domain knowledge that people bring to the Julia forum is what makes it really interesting, not just another programming forum. So thanks for what you’ve posted so far; I for one appreciate it being posted publicly.

I’d also point out that discourse gives fairly powerful tools for people to mute threads they don’t find interesting.

---

<div class="post-metadata">

### Author: ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)
#### Post date: [July 16, 2019, 2:30pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/24 "2019-07-16T14:30:45Z")

</div>

I agree. In fact, I keep learning about new (to me) kinds of math and simulation by learning about Julia.

---

<div class="post-metadata">

### Author: ![weymouth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/weymouth/32/15839_2.png) [@weymouth](https://discourse.julialang.org/u/weymouth)
#### Post date: [June 21, 2020, 11:46am UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/25 "2020-06-21T11:46:07Z")

</div>

Did you complete that geometric multigrid routine? I’m currently using the AlgebraicMultigrid.jl, but geometric MG applies to my use case and is much faster in my experience.

---

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [June 21, 2020, 1:42pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/26 "2020-06-21T13:42:06Z")

</div>

Yes I did but I it still require some packaging work. Would you be interested to test it ? I am away from my computer but I can send it to you tomorrow.

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [June 21, 2020, 2:39pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/27 "2020-06-21T14:39:13Z")

</div>

I would be interested too. Many thanks.

---

<div class="post-metadata">

### Author: ![weymouth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/weymouth/32/15839_2.png) [@weymouth](https://discourse.julialang.org/u/weymouth)
#### Post date: [June 21, 2020, 7:18pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/28 "2020-06-21T19:18:18Z")

</div>

That would be great! I’ve coded a few of these before, but it seems wasteful to keep doing them individually if a nearly identical code could be used by more people.

---

<div class="post-metadata">

### Author: ![pnavaro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pnavaro/32/5008_2.png) [@pnavaro](https://discourse.julialang.org/u/pnavaro)
#### Post date: [June 23, 2020, 12:24pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/29 "2020-06-23T12:24:19Z")

</div>

Hi, i also have already coded PIC codes for plasma physics and fluid mechanics (VIC). I will be happy to help and contribute.

---

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [June 24, 2020, 8:30am UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/30 "2020-06-24T08:30:13Z")

</div>

Hi @PetrKryslUCSD and @weymouth, I finally put the repo containing the GMG prototype on github.

> [@Multigrid solver prototype (GMG) and simple Lid Cavity solver](https://discourse.julialang.org/t/multigrid-solver-prototype-gmg-and-simple-lid-cavity-solver/41969):
>
> The following [GitHub - triscale-innov/LidJul.jl: GMG, Poisson solver and Lid cavity](https://github.com/triscale-innov/LidJul.jl) repo contains a simple Julia implementation of a Geometric Multi-Grid (GMG) solver. This solver is compared with available Julia linear solvers (AMG, iterative, direct,…) and used in a toy 2D CFD simulation. Note that it is a WIP developed for training/educational purpose and is not a tool ready for serious computing. The solver is adapted from the Harald Köstler’s implementation: “Multigrid HowTo: A simple M…

---

<div class="post-metadata">

### Author: ![weymouth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/weymouth/32/15839_2.png) [@weymouth](https://discourse.julialang.org/u/weymouth)
#### Post date: [June 24, 2020, 8:39am UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/31 "2020-06-24T08:39:18Z")

</div>

Great, thanks @LaurentPlagne! I’m writing a separate fluid solver so general flows, so maybe we could see about developing a GMG solver which works for both?

---

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [June 24, 2020, 9:13am UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/32 "2020-06-24T09:13:39Z")

</div>

Would be awesome !

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [June 24, 2020, 2:29pm UTC](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077/33 "2020-06-24T14:29:44Z")

</div>

I am currently working on CFD and full potential solver using my geometric algebra foundation [Grassmann.jl](https://github.com/chakravala/Grassmann.jl). Will take a look at your work as well, but will not be contributing because I am developing a universal foundation for CFD based on geometric algebra from scratch and have my own repositories for that. Also solved the lid cavity problem already as well. Don’t know much about multi grid, I’m still learning. If anyone is interested in using `Grassmann` as the geometric foundation for CFD, let me know.

[Previous page](https://discourse.julialang.org/t/pic-particle-in-cell-space-charge-tracking-simulation/26077.md?page=1)
