Arfken's formulas Field Tensor Transformation

Examples

Needs["TensorCalculus3`Tensorial`"]

Clear[EF, B, F, tvalues, tf, gmat, 
      fmat]

oldindices = BaseIndices;
oldflavors = IndexFlavors;
ClearIndexFlavor /@ oldflavors;
DeclareBaseIndices[{0, 1, 2, 3}]
DeclareIndexFlavor /@ {{red, Red}, {rocket, 
            SuperStar}};

This defines all the shortcuts for a coordinate object,  the metric tensor and a second order tensor R.

DefineTensorShortcuts[{{x, A, B, EF}, 
        1}, {{F, T, BF, g, tf, gmat, fmat}, 2}]
labs = {x, δ, g, Γ};

We can now use the shortcuts instead of the longer form.

{Fuu[α, β], Ad[β],  xu[α], 
        gdd[α, β]}  // ToFlavor[red]

gmat=(({{1, 0, 0, 0}, {0, -1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, -1}}));
fmat=(({{0, -E1, -E2, -E3}, {E1, 0, -B3, B2}, {E2, B3, 0, -B1}, {E3, -B2, B1, 0}}));
SetTensorValueRules[
            gdd[red@α, β], gmat]
SetTensorValueRules[
            Fuu[α, red@β], fmat]

gdd[i, j]

% // EinsteinArray[]

% /. TensorValueRules[g]

gsol = Flatten[%]

Fuu[α, β] // 
      EinsteinArray[]

    fsol = % /. TensorValueRules[F] // ToArrayValues // 
        Flatten

gsol
fsol

Fdd[α, β] == (gdd[α, γ] Fuu[γ, δ] gdd[δ, β])//ToFlavor[
        red]

(gdd[α, γ] Fuu[γ, δ] gdd[δ, β])//ToFlavor[red]

% /. TensorValueRules[g] /. 
      TensorValueRules[F]

TensorValueRules[
      F]

% // MatrixForm

{{(Subscript[F, 00]^(00))->0,(Subscript[F, 01]^(01))->-E1,(Subscript[F, 02]^(02))->-E2,(Subscript[F, 03]^(03))->-E3},{(Subscript[F, 00]^(00))->0,(Subscript[F, 01]^(01))->-E1,(Subscript[F, 02]^(02))->-E2,(Subscript[F, 03]^(03))->-E3},{(Subscript[F, 10]^(10))->E1,(Subscript[F, 11]^(11))->0,(Subscript[F, 12]^(12))->-B3,(Subscript[F, 13]^(13))->B2},{(Subscript[F, 10]^(10))->E1,(Subscript[F, 11]^(11))->0,(Subscript[F, 12]^(12))->-B3,(Subscript[F, 13]^(13))->B2},{(Subscript[F, 20]^(20))->E2,(Subscript[F, 21]^(21))->B3,(Subscript[F, 22]^(22))->0,(Subscript[F, 23]^(23))->-B1},{(Subscript[F, 20]^(20))->E2,(Subscript[F, 21]^(21))->B3,(Subscript[F, 22]^(22))->0,(Subscript[F, 23]^(23))->-B1},
{(Subscript[F, 30]^(30))->E3,(Subscript[F, 31]^(31))->-B2,(Subscript[F, 32]^(32))->B1,(Subscript[F, 33]^(33))->0},{(Subscript[F, 30]^(30))->E3,(Subscript[F, 31]^(31))->-B2,(Subscript[F, 32]^(32))->B1,(Subscript[F, 33]^(33))->0}}//MatrixForm

Fdd[α, β] == (gdd[α, γ] Fuu[γ, δ] gdd[δ, β]) // 
      ToFlavor[red] 

    ft = gdd[α, γ] Fuu[γ, δ] gdd[δ, β]  // ToFlavor[red]  // MetricSimplify[g]  

    %//ToArrayValues

Tensor Applications to physics class in E&M field tensor generations with Mathematica  September 1, 2006

\(\(\(
\)\(Needs["TensorCalculus3`Tensorial`"]

    \(Clear["Global`*"];\)\)\)\)

If we wanted to calculate the determinant of a tensor with the following values...

oldindices = BaseIndices;
oldflavors = IndexFlavors;
ClearIndexFlavor /@ oldflavors;
DeclareBaseIndices[{0, 1, 2, 3}]
DeclareIndexFlavor /@ {{red, Red}, {rocket, 
            SuperStar}};

DefineTensorShortcuts[{{x, A, B, E,  EF, 𝔼, BF, 
          J, u, v}, 
        1}, {{R, S, EB, B, T, F, ℱ, 
          g, Λ, Γ}, 
        2}, {{T, F, ℱ, ε}, 
        4}]
labs = {x, δ, g, Γ};

{Fuu[α, β], Ad[β], Ju[i],  xu[α], 
        gdd[α, β], 𝔼d[i], 
        EBdd[α, β], εuuuu[κ, λ, μ, ν]}  // ToFlavor[red]

gbasis=(({{1, 0, 0, 0}, {0, -1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, -1}}));

trans=(({{γ, -γ β, 0, 0}, {-γ  β, γ, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}));
itrans=(({{γ, γ  β, 0, 0}, {γ  β, γ, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}));
 fzero=(({{0, -E1, -E2, -E3}, {E1, 0, 0, 0}, {E2, 0, 0, 0}, {E3, 0, 0, 0}}));
fbasis=(({{0, -E1, -E2, -E3}, {E1, 0, -B3, B2}, {E2, B3, 0, -B1}, {E3, -B2, B1, 0}}));
finverse=(({{0, E1, E2, E3}, {-E1, 0, -B3, B2}, {-E2, B3, 0, -B1}, {-E3, -B2, B1, 0}}));
fdual=(({{0, -B1, -B2, -B3}, {B1, 0, E3, -E2}, {B2, -E3, 0, E1}, {B3, E2, -E1, 0}}));

Clear[F, g, Λ, primez, Γ, unprimez, 
        rprimez];
gRule = {(γ^2) - (β^2) (γ^2)  ->  
            1,  (β^2) (γ^2)  - (γ^2)   -> - 
              1 };

SetTensorValueRules[gdd[α, β], 
      gbasis]
SetTensorValueRules[Λud[α, β], 
      trans]
SetTensorValueRules[Γud[α, β], 
      itrans]
SetTensorValueRules[Fuu[α, β], 
      fbasis]
SetTensorValueRules[Fdd[α, β], 
      finverse]
SetTensorValueRules[ℱuu[α, β], 
      fdual]
TensorValueRules[g]
TensorValueRules[Λ]
TensorValueRules[F]
TensorValueRules[Γ]

Λud[α, β]

    % // ToArrayValues[]

Γud[α, β]
% // ToArrayValues[]

Tuu[μ, ν] == Λud[μ, α] Λud[ν, β] Fuu[α, β]

    Λud[μ, α] Λud[ν, β] Fuu[α, β]

    % // MetricSimplify[Λ]

    %% // ToArrayValues[]

primez = %;
primez  // Collect[#, E1] &;
% /. gRule // Collect[#, γ] &

primez = %

Jackson 11.148 the same completely!!!

Fuu[α, β]
% // ToArrayValues[]

SetTensorValueRules[Γud[α, β], itrans]

    SetTensorValueRules[Fuu[α, β], fbasis]

    TensorValueRules[Γ]

    TensorValueRules[F]

Ruu[μ, ν] == Γud[μ, α] Γud[ν, β] Fuu[α, β]
Γud[μ, α] Γud[ν, β] Fuu[α, β]
% // MetricSimplify[Γ]
%% // ToArrayValues[]

unprimez = %;
unprimez  // Collect[#, E1] &;
% /. gRule // Collect[#, γ] &

This is ok ok!

DeclareBaseIndices[oldindices]
ClearIndexFlavor /@ IndexFlavors;
DeclareIndexFlavor /@ oldflavors;
Clear[oldindices, oldflavors]