More Modes of the Equilateral Triangle Cavity

The second mode

freqs[[2]]
wavelengths[[2]]

Check that the set of {l,m} pairs is closed under the symmetry operations

set=pm[groups[[2,2]]]
lm[pm[groups[[2,2]]]]
%==%%

Generate a set of coeffiecients by starting with only one pair, then apply the symmetry operations repeatedly, generating a subgroup of the {l,m} pairs required to build a solution. In this case all pairs are needed.

start=set[[1]]

terms=generator[start]

Once you've identified the required terms, build the solution (In this case the imaginary part vanishes).

g[x_,y_]=ComplexExpand[Plus@@Map[f[#][x,y]&,terms]]

The real part generates a mode that is even about the altitude of the triangle (the y-axis)

ContourPlot[Re[g[x,y]],{x,-1/2,1/2},{y,0,-(Sqrt[3])/2},Contours->11,RegionFunction->Function[{x,y},y≤0&&y≤-(Sqrt[3])Abs[x]&&y≥ -(Sqrt[3])/2],AspectRatio->Automatic,Frame->False]

Here's the extension into the plane showing the symmetry. The wavelength is the same as the height of the triangular cavity.

Show[ContourPlot[Re[g[x,y]],{x,-1.5,1.5},{y,-2 (Sqrt[3])/2, (Sqrt[3])/2},Contours->11,AspectRatio->Automatic,Frame->False],Graphics[{Red,Thick,Line[{{0,0},{1/2,-(Sqrt[3])/2},{-1/2,-(Sqrt[3])/2},{0,0}}]}]]

The third mode

n=3;

freqs[[n]]
wavelengths[[n]]

set=pm[groups[[n,2]]]
lm[pm[groups[[n,2]]]]
%==%%

start=set[[1]]

terms=generator[start]

g[x_,y_]=ComplexExpand[Plus@@Map[f[#][x,y]&,terms]]

The real part generates a mode that is even about the altitude of the triangle (the y-axis)

ContourPlot[Re[g[x,y]],{x,-1/2,1/2},{y,0,-(Sqrt[3])/2},Contours->11,RegionFunction->Function[{x,y},y≤0&&y≤-(Sqrt[3])Abs[x]&&y≥ -(Sqrt[3])/2],AspectRatio->Automatic,Frame->False]

The imaginary part generates a mode that is odd about the altitude of the triangle (the y-axis)

ContourPlot[Im[g[x,y]],{x,-1/2,1/2},{y,0,-(Sqrt[3])/2},Contours->11,RegionFunction->Function[{x,y},y≤0&&y≤-(Sqrt[3])Abs[x]&&y≥ -(Sqrt[3])/2],AspectRatio->Automatic,Frame->False]

Here's the extension into the plane showing the symmetry. These modes look like the lowest-frequency modes, only the wavelength is 1/2 of the lowest mode.

Show[ContourPlot[Re[g[x,y]],{x,-1.5,1.5},{y,-2 (Sqrt[3])/2, (Sqrt[3])/2},Contours->11,AspectRatio->Automatic,Frame->False],Graphics[{Red,Thick,Line[{{0,0},{1/2,-(Sqrt[3])/2},{-1/2,-(Sqrt[3])/2},{0,0}}]}]]

Show[ContourPlot[Im[g[x,y]],{x,-1.5,1.5},{y,-2 (Sqrt[3])/2, (Sqrt[3])/2},Contours->11,AspectRatio->Automatic,Frame->False],Graphics[{Red,Thick,Line[{{0,0},{1/2,-(Sqrt[3])/2},{-1/2,-(Sqrt[3])/2},{0,0}}]}]]

The 4th mode

n=4;

freqs[[n]]
wavelengths[[n]]

set=pm[groups[[n,2]]]
lm[pm[groups[[n,2]]]]
%==%%

start=set[[1]]

terms=generator[start]

g[x_,y_]=ComplexExpand[Plus@@Map[f[#][x,y]&,terms]]

ContourPlot[Re[g[x,y]],{x,-1/2,1/2},{y,0,-(Sqrt[3])/2},Contours->11,RegionFunction->Function[{x,y},y≤0&&y≤-(Sqrt[3])Abs[x]&&y≥ -(Sqrt[3])/2],AspectRatio->Automatic,Frame->False]

ContourPlot[Im[g[x,y]],{x,-1/2,1/2},{y,0,-(Sqrt[3])/2},Contours->11,RegionFunction->Function[{x,y},y≤0&&y≤-(Sqrt[3])Abs[x]&&y≥ -(Sqrt[3])/2],AspectRatio->Automatic,Frame->False]

Show[ContourPlot[Re[g[x,y]],{x,-1.5,1.5},{y,-2 (Sqrt[3])/2, (Sqrt[3])/2},Contours->11,AspectRatio->Automatic,Frame->False],Graphics[{Red,Thick,Line[{{0,0},{1/2,-(Sqrt[3])/2},{-1/2,-(Sqrt[3])/2},{0,0}}]}]]

Show[ContourPlot[Im[g[x,y]],{x,-1.5,1.5},{y,-2 (Sqrt[3])/2, (Sqrt[3])/2},Contours->11,AspectRatio->Automatic,Frame->False],Graphics[{Red,Thick,Line[{{0,0},{1/2,-(Sqrt[3])/2},{-1/2,-(Sqrt[3])/2},{0,0}}]}]]