Dear Andy,

When you have the potential, the electric field can be obtained as a
post-treatment since it is (minus) the gradient of the electric
potential. You can simply interpolate it with

E = gf_model_get(md, 'interpolation', "-Grad_V', mfi);

once you solved your problem (mfi is the fem on which the interpolation
is performed). You have to be aware that the gradient of the potential
being discontinuous across the element edges for Lagrange elements, an
average is taken when interpolating on a continuous Lagrange fem (you
can interpolate on a discontinuous one to have the true gradient).
 
Yves.


Le 09/06/2017 à 04:55, Yu (Andy) Huang a écrit :
> Dear getFEM users,
>
> I'm entirely new to getFEM, and I'm trying to simulate the electric
> field distribution in the human brain when direct electric current is
> applied on the scalp surface. I know it's just a Laplacian equation of
> the electric potential, and I managed to simulate the voltage
> distribution on a toy (a cube). 
>
> Now my question is: how do I simulate the electric field? should I add
> another variable of electric field? or can I just get the field from
> the voltage solution? I tried both but without any luck. I added the
> electric field as a new variable but did not figure out how to
> properly add boundary condition using gf_model_set(). If calculating
> field from voltage, I didn't find out which function to use to
> establish a relation between the field variable and voltage variable.
>
> Any suggestion is appreciated! The examples in the documentation are
> generally mechanical problems, and there are very limited online
> resources, so I really get stuck here.
>
> Thanks a lot!
>
> -- 
> Yu (Andy) Huang, Ph.D.
> Postdoc fellow at Dept. of Biomedical Engineering, City College of New
> York
> Center for Discovery and Innovation, Rm. 3.320,
> <http://neuralengr.com/directions-to-cdi-center-for-discovery-and-innovation/>
> 85 St Nicholas Terrace, New York, NY 10027
> <http://neuralengr.com/directions-to-cdi-center-for-discovery-and-innovation/>
> Tel: 1-646-509-8798
> Email: [email protected] <mailto:[email protected]>
>       [email protected]_ <mailto:[email protected]>__
> http://www.parralab.org/people/yu-andy-huang/


-- 

  Yves Renard ([email protected])       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------

Reply via email to