Charged particle flow (continuation from stack overflow)

24 views
Skip to first unread message

Nabiel Abuyazid

unread,
Mar 31, 2021, 11:42:20 PM3/31/21
to fi...@list.nist.gov

Hi Jon,

 

I am continuing a conversation that was started on stack overflow about charged particle flow in plasmas.

 

Where we left off was solving the electrostatic Poisson equation before trying the transient Poisson equation. Commenting on the importance of transience raised in stack overflow, describing the transience of the electric field is indeed important to describe the plasma system of interest. Code is attached as a .ipynb file and a .py file (whichever one is more convenient for you).

 

The current output of the code is an error:

ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 2 has 2 dimension(s)

I am confused why this error comes up, do you have any idea? The equations stated and fed into FiPy all reduce to scalars, so I don’t understand where the fault may be.

 

I am following your suggestion of expressing the Poisson equation in terms of the electric potential rather than in terms of electric field. I will update as I make progress.

 

I really appreciate your help. Let me know if there is any information missing.

 

Thanks,

Nabiel


--
Nabiel Hilmy Abuyazid
Graduate Student Researcher, SPEC Lab
Department of Chemical and Biomolecular Engineering
University of Illinois, Urbana-Champaign
fipy charged particle flow.py
fipy charged particle flow.ipynb

Guyer, Jonathan E. Dr. (Fed)

unread,
Apr 1, 2021, 12:27:33 PM4/1/21
to FIPY
Nabiel -

The issue is that H is a vector field, but N and P are scalar fields. FiPy can solve for vector fields, but not when coupled with scalar fields.

I don’t know whether the results are sensible, but you can solve eqn1, eqn2, and eqn3 in succession without error. This is probably a good idea anyway, to start. Coupling equations *can* help convergence, but it can also produce very large, poorly conditioned matrices that don’t solve at all. Solving sequentially is often a good idea when you’re first trying to get things to work.

The coefficient of a ConvectionTerm should be a vector. gamma/delta is scalar. I’m not sure what this does, but it’s probably not what you want.

If you solve for the potential, instead of the electric field, then you’ll want a DiffusionTerm and the coefficient gamma/delta is fine.

- Jon

--
To unsubscribe from this group, send email to fipy+uns...@list.nist.gov
 
View this message at https://list.nist.gov/fipy
---
To unsubscribe from this group and stop receiving emails from it, send an email to fipy+uns...@list.nist.gov.
<fipy charged particle flow.py><fipy charged particle flow.ipynb>

Reply all
Reply to author
Forward
0 new messages