# Difference between revisions of "Simulating tCS Electric Fields in the Brain"

We discuss here first the methodology for computing electric fields in the brain as implementd in our software. We then provide and overview as well as tips on use of our StimWeaver software and service.

The mechanisms underlying the after-effects of tDCS are still the subject of investigation, but in all cases these local changes are brought about by the accumulated action of the applied electric field over time, directly or indirectly. For this reason we focus here on electric field optimization.

Moreover, given that that there are strong directional effects in the interaction of electric fields and neurons, i.e., neurons are influenced mostly by the component of the electric field parallel to their trajectory (\cite{Ranck:1975aa, Rattay:1986aa, Rushton:1927aa, Roth:1994aa, Bikson:2004aa, Frohlich:2010aa}), and that the effects of tDCS depend on its polarity, knowledge about the orientation of the electric field is crucial in predicting the effects of stimulation. The components of the field perpendicular and parallel to the cortical surface are of special importance, since pyramidal cells are mostly aligned perpendicular to the surface, while many cortical interneurons and axonal projections of pyramidal cells tend to align tangentially (\cite{Day:1989aa, Fox:2004aa, Kammer:2007aa}). Thus, an important element in modeling is to provide the electric field distribution and orientation relative to the grey matter (GM) and white matter (WM) surfaces (the latter might be important to study the possibility of polarizing corticospinal axons, their collaterals and other projection neurons). In order to do this, we work here with a realistic head model derived from structural MRI images (\cite{Miranda:2013aa}) to calculate the tCS electric field components rapidly from arbitrary EEG 10-20 montages. Importantly, this modeling approach allows for fast calculation of electric field components normal and parallel to the GM and WM surfaces.

## StimViewer

StimViewer is the software component embedded in NIC for StarStim. StimViewer is a fast simulation engine to produce electric fields in the brain associated with a particular tCS montage.

The electric field calculations were performed using the realistic head model described in \cite{Miranda:2013aa}. Briefly, tissue boundaries were derived from MR images (scalp, skull, cerebrospinal fluid (CSF) – including ventricles, Grey Matter and White Matter) and the Finite Element Method was used to calculate the electric potential in the head, subject to the appropriate boundary conditions. Tissues were assumed to be uniform and isotropic and values for their electric conductivity were taken from the literature.

In order to compute electric fields rapidly, we have made use of the principle of superposition. This states that with appropriate boundary conditions, the solution to a general $N$-electrode problem can be expressed as a linear combination of $N-1$ bipolar ones. A fixed reference electrode is first chosen, and then all the bipolar solutions using this electrode are computed. A general solution with an arbitrary number of $N$ electrodes can then easily be computed.

In the convention used here, a positive value for the component of the electric field normal to the cortical surface $E^\bot$ means the electric field component normal is pointing {\em into} the cortex. As we discuss below, such a field would be excitatory. On the other hand, an electric field pointing out of the cortex (negative normal component) would be inhibitory.

## StimWeaver

StimView is an optimization tool based on StimViewer technology.

Using StimWeaver you can define stimulation targets in the cortex and test different montages using matching measures.

You can also use this software to define an optimization problem and send it to Neuroelectrics. Our staff will produce a mathematically optimized montage based on your specifications.