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

On Mar 31, 2021, at 11:42 PM, Nabiel Abuyazid 
<[email protected]<mailto:[email protected]>> wrote:

Hi Jon,

I am continuing a conversation that was started on stack overflow about charged 
particle flow in 
plasmas<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F66875318%2Ffipy-for-charged-particle-flow%2F66880022%2366880022&data=04%7C01%7Cjonathan.guyer%40nist.gov%7Cf8bb43405cd044291d6708d8f4c029a5%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637528453465841681%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=o14pMUjteZzGsBrQGeU92vb8cPNppjxU728UTMu8U9A%3D&reserved=0>.

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

--
To unsubscribe from this group, send email to 
[email protected]<mailto:[email protected]>

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

-- 
To unsubscribe from this group, send email to [email protected]

View this message at https://list.nist.gov/fipy
--- 
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].

Reply via email to