1 /* Copyright (C) 2003 Valerij Pipin <pip@iszf.irk.ru>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be
9 * useful, but WITHOUT ANY WARRANTY; without even the implied
10 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
13 * Examine magnetic field lines embedded in moving plasma
17 if get('itensor,'version)=false then load(itensor);
18 ("Examine magnetic field lines embedded in moving plasma")$
19 ("introduce the 2-form describing the magnetic field")$
20 decsym(B,2,0,[anti(all)],[]);
21 ("Due to infinite conductivity the electric field is expressed as")$
22 E1:ishow(B([i1,i2])|v)$
23 ("But we can also express it through the vector potential")$
24 E2:ishow(expand(2*extdiff(A([i1]),i2)|v))$
25 ("and put this result in the following equation:")$
26 EQ1:ishow(dt*B([i1,i2])=extdiff(E2,i1))$
27 ("Now compute the Lie-derivative of B")$
28 EQ2:ishow('liediff(v,B([i2,i1]))=liediff(v,extdiff(A([i1]),i2)))$
29 ("and sum up the LHS and RHS")$
30 ishow(lhs(EQ1)+lhs(EQ2)=rename(expand(rhs(EQ1)+rhs(EQ2))))$
32 /* End of demo -- comment line needed by MAXIMA to resume demo menu */