Plot contact forms from TE_11 and TM_11 fields. We only plot the +-fields as the --fields are contact forms if and only if the +-fields are contact forms. See notebook: contactFromTETM.nb

(* before evaluating the below commands, run notebook contactFromTETM.nb 
Note also that we assume that t=0.
*)
ComplexExpand[Re[BelTE[x,y,z,m,n,+1]/.{ϵ->1, μ-> 1, a-> 1, b-> 1, β-> 1, ω-> 1,m->1,n->1,t->0}]]
ComplexExpand[Re[BelTM[x,y,z,m,n,+1]/.{ϵ->1, μ-> 1, a-> 1, b-> 1, β-> 1, ω-> 1,m->1,n->1,t-> 0}]]

TEplus[x_,y_,z_]:={((Cos[π y] Cos[z] Sin[π x])/(4 π (Sqrt[1+2 (π^2)])))+((Cos[π x] Sin[π y] Sin[z])/(4 π)),((Cos[π x] Cos[z] Sin[π y])/(4 π (Sqrt[1+2 (π^2)])))-((Cos[π y] Sin[π x] Sin[z])/(4 π)),-((Cos[π x] Cos[π y] Sin[z])/(2 (Sqrt[1+2 (π^2)])))}

TMplus[x_,y_,z_]:={((Cos[π y] Cos[z] Sin[π x])/(4 π (Sqrt[1+2 (π^2)])))+((π Cos[π y] Cos[z] Sin[π x])/(2 (Sqrt[1+2 (π^2)])))-((Cos[π x] Sin[π y] Sin[z])/(4 π)),-((Cos[π x] Cos[z] Sin[π y])/(4 π (Sqrt[1+2 (π^2)])))-((π Cos[π x] Cos[z] Sin[π y])/(2 (Sqrt[1+2 (π^2)])))-((Cos[π y] Sin[π x] Sin[z])/(4 π)),(1/2) Cos[z] Sin[π x] Sin[π y]}

(* Load planefield plotter. If this generates fatal error messages, quit kernel,   rerun definitions of TEplus and TMplus and rerun the below commands.
 *)
SetDirectory["~/writing/WIP/contact/plots/"];
<<CSPlotter.m

xmin=0; xmax=1; dx=(xmax-xmin)/14;
ymin=0; ymax=1; dy=(ymax-ymin)/14;
scale=dy;

plotTE[z_,lbl_]:=Module[{t},
t=Table[contactelement[{x,y,0},TEplus[x,y,z],scale],{x,xmin,xmax,dx},{y,ymin,ymax,dy}];
Show[t,Boxed->False, PlotLabel->Style[lbl<>"\n",Italic,13]]
(* Labeled[t,Style[lbl,Italic,17]]*)
]
plotTM[z_,lbl_]:=Module[{t},
t=Table[contactelement[{x,y,0},TMplus[x,y,z],scale],{x,xmin,xmax,dx},{y,ymin,ymax,dy}];
Show[t,Boxed->False,PlotLabel->Style[lbl<>"\n",Italic,13]]
(*Labeled[t,Text[Style[lbl,Italic,17]]]*)
]

e0=plotTE[Pi 0/4, "(a)"];
e1=plotTE[ Pi 1/4, "(b)"];
e2=plotTE[ Pi 2/4, "(c)"];
e3=plotTE[ Pi 3/4, "(d)"];
TEarr=GraphicsArray[{{e0,e1},{e2,e3}}]

Export["~/writing/WIP/contact/TE11plus.pdf", TEarr]

TEplus[1/2,1/2,z]

TM

e0=plotTM[Pi 0/4, "(a)"];
e1=plotTM[ Pi 1/4, "(b)"];
e2=plotTM[ Pi 2/4, "(c)"];
e3=plotTM[ Pi 3/4, "(d)"];
TMarr=GraphicsArray[{
{e0,e1},
{e2,e3}
(*{e4,e5}*)}
]

Export["~/writing/WIP/contact/TM11plus.pdf", TMarr]

(* There does not seem to be a way to place labels under a 3D graphics object. Therefore I manually moved the labels to under the objects using Photoshop. *)

Periodicity:

TEplus[x,y,z]+TEplus[x,y,z+Pi]
TMplus[x,y,z]+TMplus[x,y,z+Pi]

Type of failure: check that the contact condition always fails due to the fact the the field vanishes. This follows since both fields are Beltrami fields.

TEplus[1/2,1/2,z]
{TEplus[0,0,z],TEplus[0,1,z],TEplus[1,0,z],TEplus[1,1,z]}

TMplus[1/2,1/2,z]
{TEplus[0,0,z],TEplus[0,1,z],TEplus[1,0,z],TEplus[1,1,z]}