Author |
Message |
Ronald Kox (android)
New member Username: android
Post Number: 1 Registered: 04-2006
| Posted on Tuesday, April 18, 2006 - 07:55 am: | |
Hi, I'm trying to make a drift diffusion model for a microfluidics simulation. I have a system where there's a potential (psi) and an electrolyte solution with ions (K and Cl). I've defined the following equations, which are often used for drift diffusion: EQUATIONS ! Poisson Equation psi: eps_0*eps_r*div(grad(psi)) + z_Cl*e*Cl + z_K*e*K = 0 ! Nernst Planck Equations K: div(D_K*grad(K)+z_K*m_K*K*grad(psi))=0 Cl: div(D_Cl*grad(Cl)+z_Cl*m_Cl*Cl*grad(psi))=0 Here the flux of an ionic species is defined as for example J_k = D_K*grad(K)+z_K*m_K*K*grad(psi). I need to specify that the flux through a wall is equal to zero, so the normal component of J_K has to be zero. A natural boundary condition for both psi and K is to strict; all I need is some sort of balance between the gradient of K and the gradient of psi. Any ideas as to how I can implement this in flexPDE? Ronald |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 583 Registered: 06-2003
| Posted on Tuesday, April 18, 2006 - 03:39 pm: | |
The Natural boundary condition for the K equation specifies the outward normal component of D_K*grad(K)+z_K*m_K*K*grad(psi) [see "Natural" in the Help Index] So Natural(K)=0 provides precisely the condition you say you want.
|
Ronald Kox (android)
New member Username: android
Post Number: 2 Registered: 04-2006
| Posted on Tuesday, April 18, 2006 - 05:38 pm: | |
Thank you for your answer. But what you suggest is what I tried at first, but somehow the code didn't converge. I monitored the results, and the script didn't seem to set the normal component of J to zero. Now I've set the conditions to the following: NATURAL(K) = -z_K*m_K*normal(K*grad(psi)) NATURAL(Cl) = -z_Cl*m_Cl*normal(Cl*grad(psi)) From the results it would seem that this is the way to go. I've attached my script below, and in the solution the J vectors seem to follow the walls of my structure nicely. If you set the conditions to zero, there's no convergence... So it would appear that natural(K) gives the normal component of K, multiplied by the factor D_K... Or what do you think?
|
|