summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-magneticfield/pst-magneticfield-docEN.tex
blob: 56d872d40afe66200e484550938b247a306618e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
%% $Id: pst-magneticfield-docEN.tex 322 2010-05-16 08:07:26Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
    headexclude,footexclude,oneside]{pst-doc}
\usepackage[latin1]{inputenc}
\usepackage{pst-magneticfield}
\let\pstMFfv\fileversion
\lstset{pos=t,language=PSTricks,
    morekeywords={psmagneticfield,psmagneticfieldThreeD},basicstyle=\footnotesize\ttfamily}
\newcommand\Cadre[1]{\psframebox[fillstyle=solid,fillcolor=black,linestyle=none,framesep=0]{#1}}
\def\bgImage{%
\psset{unit=0.5cm}
\begin{pspicture}(-7,-6)(7,6)
\psmagneticfieldThreeD[N=2,R=2,L=2,linecolor=blue](-7,-8)(7,8)
\ThreeDput{\rput(0,-7){\textbf{Bobines de HELMHOLTZ}}}
\end{pspicture}
}
%
\begin{document}

\title{\texttt{pst-magneticfield}}
\subtitle{Magnetic field lines of a solenoid; v.\pstMFfv}
\author{Juergen Gilg\\ Manuel Luque\\Herbert Vo\ss}
%\docauthor{Juergen Gilg\\Manuel Luque\\Herbert Vo\ss}
\date{\today}
\maketitle


\clearpage% 
\begin{abstract}
The package \LPack{pst-magneticfield} aims to trace the shape of field lines
af a solenoid. The physical parameters are the radius of the solenoid, the number of
turns and the length, the default values are given below:

\begin{enumerate}
  \item the number of turns: \LKeyset{N=6} ;
  \item the radius : \LKeyset{R=2} ;
  \item the length : \LKeyset{L=4}.
\end{enumerate}

The line was calculated with the Runge-Kutta 2 algorithm, which, after several tries, 
seems to be the best compromise between speed and accuracy of calculations of the path.
The calculation of elliptic integrals for the evaluation of magnetic field
was achieved by polynomial approximations from the "Handbook of Mathematical
Functions With Formulas, Graph, And Mathematical Tables" by Milton Abramowitz and
Irene.A. Stegun (\url{http://www.math.sfu.ca/~cbm/aands/}).~\cite{abramowitz}
\end{abstract}

\clearpage
\tableofcontents


\clearpage

\section{Introduction}

The route options, with the default values are as follows:
\begin{enumerate}
  \item The maximum number of points on each line of the entire coil: \LKeyset{pointsB=500};
  \item the maximum number of points on lines around turns selected: \LKeyset{pointsS=1000};
  \item the number of lines of the entire coil: \LKeyset{nL=8};
  \item not the route for the lines of the entire coil: \LKeyset{PasB=0.02};
  \item not the route for the lines around turns selected: \LKeyset{PasS=0.00275};
  \item the choice of individual coils to improve the rendering of
      layout: \LKeyset{numSpires=\{\}}, we place following the sign "=" the numbers of turns \textsf{1 2 3 etc.} 
      starting from the top of the spire. By default, all the turns are targeted.
  \item The number of field lines around the turns selected: \LKeyset{nS=1}.
  \item We may decide not to represent the solenoid with the option \LKeyset{drawSelf=false}
      is useful for 3D representation.
  \item the route options of the turns (color, thickness, arrows) are:
  \begin{enumerate}
        \item The color and thickness of the coils: \Lkeyset{styleSpire=styleSpire};
        \item the current direction signs: \Lkeyset{styleCourant=sensCourant}.
  \end{enumerate}
\begin{verbatim}
\newpsstyle{styleSpire}{linecap=1,linecolor=red,linewidth=2\pslinewidth}
\newpsstyle{sensCourant}{linecolor=red,linewidth=2\pslinewidth,arrowinset=0.1}
\end{verbatim}
      
 \item The color and thickness of the field lines can be adjusted with the parameters
      usual \LPack{pstricks}: \Lkeyword{linecolor} and  \Lkeyword{linewidth}
\end{enumerate}

A command \Lcs{psmagneticfieldThreeD} allows 3D visualization of the solenoid and
field lines. 

\clearpage
\section{Influence of physical parameters on the map magnetic field}
\subsection{The length of the solenoid}

\begin{LTXexample}[pos=t]
\psset{unit=0.5cm}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{006633}},N=3,R=2,nS=1]
\psframe*[linecolor={[HTML]{99FF66}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{L=4}},N=3,R=2,nS=1]}
\end{pspicture*}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{006633}},L=8,N=3,R=2,nS=1,PasB=0.0025,pointsB=5500]
\psframe*[linecolor={[HTML]{99FF66}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{L=8}},N=3,R=2,nS=1]}
\end{pspicture*}
\end{LTXexample}

\textbf{Note:} To refine the layout of the second solenoid, we had to increase the
points and lower the pitch of the route: \Cadre{\textcolor{white}{pointsB=5500,PasB=0.0025}}, which
lengthens the calculations.



\clearpage

\subsection{The number of turns}
\begin{LTXexample}[pos=t]
\psset{unit=0.5}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{006633}},N=1,R=2,nS=0]
\psframe*[linecolor={[HTML]{99FF66}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{N=1}},R=2,nS=0]}
\end{pspicture*}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{006633}},N=2,R=2,L=2,PasS=0.003,nS=2]
\psframe*[linecolor={[HTML]{99FF66}}](-7,7)(7,8)
\rput(0,7.5){\Cadre{\textcolor{white}{Bobines de Helmholtz}}}
\psframe*[linecolor={[HTML]{99FF66}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{N=2}},R=2,L=2,PasS=0.003,nS=2]}
\end{pspicture*}
\end{LTXexample}

\begin{LTXexample}[pos=t]
\psset{unit=0.5}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{006633}},N=4,R=2,numSpires=2 3]
\psframe*[linecolor={[HTML]{99FF66}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{N=4}},R=2,L=4]}
\end{pspicture*}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{006633}},N=5,R=2,L=5,PasS=0.004,nS=2 3 4]
\psframe*[linecolor={[HTML]{99FF66}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{N=5}},R=2,L=5]}
\end{pspicture*}
\end{LTXexample}


\clearpage
\section{The three route options}
\subsection{The number of field lines}

Due to the symmetry of the problem the number of field lines given
\Lkeyword{nL} option is half the number actually represented with an added line
confused with the axis of revolution. We must also add the lines around the turns \Lkeyword{nS},
these turns can be selected individually \Lkeyword{numSpires}.



\begin{LTXexample}[pos=t]
\psset{unit=0.5}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{000099}},N=1,R=2]
\psframe*[linecolor={[HTML]{3399FF}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{nL=8}},N=1,R=2]}
\end{pspicture*}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{000099}},N=1,R=2,nL=12]
\psframe*[linecolor={[HTML]{3399FF}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{nL=12}},N=1,R=2]}
\end{pspicture*}
\end{LTXexample}

\clearpage
\subsection{The number of points for the path}
  The plot of field lines is achieved by a numerical method (RK2) and
follows the step of the route and the number of selected points affect the accuracy of the route,
as in the two examples below:


\begin{LTXexample}[pos=t]
\psset{unit=0.5}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{660066}},N=2,R=2,L=2,PasB=0.1,nS=0,nL=7,pointsB=100]
\psframe*[linecolor={[HTML]{996666}}](-7,7)(7,8)
\rput(0,7.5){\Cadre{\textcolor{white}{Bobines de Helmholtz}}}
\psframe*[linecolor={[HTML]{996666}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{PasB=0.1,nL=4,pointsB=100}}]}
\end{pspicture*}
\begin{pspicture*}[showgrid](-7,-8)(7,8)
\psmagneticfield[linecolor={[HTML]{660066}},N=2,R=2,L=2,PasB=0.4,nS=0,nL=7,pointsB=100]
\psframe*[linecolor={[HTML]{996666}}](-7,7)(7,8)
\rput(0,7.5){\Cadre{\textcolor{white}{Bobines de Helmholtz}}}
\psframe*[linecolor={[HTML]{996666}}](-7,-8)(7,-7)
\rput(0,-7.5){[\Cadre{\textcolor{white}{PasS=0.4,pointsB=100}}]}
\end{pspicture*}
\end{LTXexample}


If the defaults do not suit it must be found by testing the
values that give a correct path.



\clearpage

\section{The parameter \nxLkeyword{numSpires}}
\begin{LTXexample}[pos=t,wide]
\psset{unit=0.5}
\begin{pspicture*}[showgrid](-8,-10)(8,10)
\psset{linecolor=blue}
\psmagneticfield[R=2,L=12,N=8,pointsS=500,nL=14,nS=1,numSpires=1 3 6 8,PasB=0.075]
\psframe*[linecolor={[HTML]{99FF66}}](-8,-10)(8,-9)
\rput(0,-9.5){[\Cadre{\textcolor{white}{numSpires=1 3 6 8}},R=2,L=14]}
\multido{\i=0+1}{8}{\rput[l](!6 6 12 7 div \i\space mul sub){\the\multidocount}}
\end{pspicture*}\quad
\begin{pspicture*}[showgrid](0,-10)(16,10)
\psset{linecolor=blue}
\psmagneticfield[R=2,L=12,N=8,pointsS=500,nL=14,numSpires=,nS=1,PasB=0.075]
\psframe*[linecolor={[HTML]{99FF66}}](0,-10)(16,-9)
\rput(8,-9.5){[\Cadre{\textcolor{white}{numSpires=all}},R=2,L=14]}
\multido{\i=0+1}{8}{\rput[l](!6 6 12 7 div \i\space mul sub){\the\multidocount}}
\end{pspicture*}
\end{LTXexample}

\clearpage
\section{The parameter \nxLkeyword{AntiHelmholtz}}
\begin{LTXexample}[pos=t]
\psset{unit=0.75,AntiHelmholtz,
  R=2,pointsB=500,pointsS=2000,PasB=0.02,PasS=0.00275,nS=10,
  nL=2,drawSelf=true,styleSpire=styleSpire,styleCourant=sensCourant}
\newpsstyle{grille}{subgriddiv=0,gridcolor=blue!50,griddots=10}
\newpsstyle{cadre}{linecolor=yellow!50}
\begin{pspicture*}[showgrid](-7,-6)(7,6)
\psframe*[linecolor={[HTML]{996666}}](-7,7)(7,8)
\psmagneticfield[linecolor={[HTML]{660066}}]
\end{pspicture*}
\end{LTXexample}



\clearpage
\section{3D views}
3D views are possible with the macros

\begin{BDef}
\Lcs{psmagneticfield}\OptArgs\coord1\coord2\\
\Lcs{psmagneticfieldThreeD}\OptArgs\coord1\coord2
\end{BDef}

in which options are settings \Lcs{psmagneticfield} and \verb+(x1,y1)(x2,y2)+
coordinates of bottom left corner and upper right framework
is encapsulated as the field map for \Lcs{psframe}. We can use the option
\Lkeyword{viewpoint} of \LPack{pst-3d} package to change the view.
  The options framework are by default, the following:
\begin{verbatim}
\newpsstyle{grille}{subgriddiv=0,gridcolor=lightgray,griddots=10}
\newpsstyle{cadre}{linecolor=green!20}
\end{verbatim}

   So it is that they must change if we want change, as in
Example below.
\begin{LTXexample}[pos=t]
\psset{unit=0.7cm}
\newpsstyle{grille}{subgriddiv=0,gridcolor=blue!50,griddots=10}
\newpsstyle{cadre}{linecolor=yellow!50}
\begin{pspicture}(-7,-6)(7,6)
\psmagneticfieldThreeD[N=8,R=2,L=8,pointsB=1200,linecolor=blue,pointsS=2000](-7,-8)(7,8)
\end{pspicture}
\end{LTXexample}

\begin{LTXexample}[pos=t]
\psset{unit=0.7cm}
\begin{pspicture}(-7,-6)(7,6)
\psmagneticfieldThreeD[N=2,R=2,L=2,linecolor=blue](-7,-8)(7,8)
\ThreeDput{\rput(0,-7){\textbf{Bobines de HELMHOLTZ}}}
\end{pspicture}
\end{LTXexample}

\begin{LTXexample}[pos=t]
\psset{unit=0.75cm,AntiHelmholtz,
  R=2,pointsB=500,pointsS=2000,PasB=0.02,PasS=0.00275,nS=10,
  nL=2,drawSelf,styleSpire=styleSpire,styleCourant=sensCourant}
\newpsstyle{grille}{subgriddiv=0,gridcolor=blue!50,griddots=10}
\newpsstyle{cadre}{linecolor=yellow!50}
\begin{pspicture}(-7,-6)(7,6)
\psmagneticfieldThreeD[linecolor={[HTML]{660066}}](-7,-6)(7,6)
\end{pspicture}
\end{LTXexample}




\clearpage
\section{List of all optional arguments for \texttt{pst-magneticfield}}

\xkvview{family=pst-magneticfield,columns={key,type,default}}

\nocite{*}
\bgroup
\raggedright
\bibliographystyle{plain}
\bibliography{\jobname}
\egroup


\printindex




\end{document}