SOCR ≫ | TCIU Website ≫ | TCIU GitHub ≫ |
The previous animation can be generated via Mathematica. Note that, once we have established the PBC conditions, the initial condition cannot be arbitrarily prescribed. PBC have to be
Linear combinations of trigonometric sine function, and
The frequency terms for time and space should be an integer multiple of 2Pi/(Length of interval). In this case it is \(\pi\).
Here is the Mathematica code to model this solution (users may need to add a specific local export directory at the end).
eqn = Derivative[2, 0][u][x, t] == D[D[u[x, t], t], t];
(*The coefficient in Cosine must be a multiple of Pi*)
init1 = u[x, 0] == Cos[Pi*x];
init2 =
\!\(\*SuperscriptBox[\(u\),
TagBox[
RowBox[{"(",
RowBox[{"0", ",", "1"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, 0] == -Pi*Sin[Pi*x];
(*Two initial conditions, Two boundary conditions*)
bon1 = u[-1, t] == u[1, t];
bon2 = (D[u[x, t], x] /. x -> -1) == (D[u[x, t], x] /. x -> 1);
usol = NDSolveValue[{eqn, init1, init2, bon1, bon2},
u, {x, -1, 1}, {t, 0, 5}];
fr = Table[
Plot[usol[x, t], {x, -1, 1}, PlotLegends -> Automatic,
PlotLabel -> (HoldForm["Time:"]) == t], {t, 0, 5, 0.2}];
Export["(*)", fr,
"DisplayDurations" -> 0.3, "AnimationReptitions" -> 20,
ImageSize -> 800];
Several alternative example to tease out the dynamics assuming same periodic boundary condition
\[u(x,0)=Cos(\pi x), u_x(x,0)=-4\pi Sin(\pi x)\]
\[u(x,0)=Cos(\pi x) + Sin(3 \pi x), u_x(x,0)=-\pi Sin(\pi x) + 2\pi Cos(3 \pi x)\]
\[u(x,0)=Cos(\pi x) + Sin(3 \pi x)+Cos(5\pi x), u_x(x,0)=-\pi Sin(\pi x) + 2\pi Cos(3 \pi x)+Sin(5\pi x)\]
Next, we formalize a problem for the ultrahyperbolic equation with 2 time dimensions and 2 spatial dimensions, with periodic boundary conditions constrained on 2D spatial and 2D time dimensions.
\[ \Delta_x u = \Delta_t u, \text{ where } x\in[-\frac{1}{2},\frac{1}{2}]\times[-\frac{1}{2},\frac{1}{2}]\subset\mathbb{R}^2, t\in [0,5]\times[0,5]\subset\mathbb{R}^2\] \[u(-\frac{1}{2},x_2,t_1,t_2)=u(\frac{1}{2},x_2,t_1,t_2),u_{x_1}(-\frac{1}{2},x_2,t_1,t_2)=u_{x_1}(\frac{1}{2},x_2,t_1,t_2)\] \[u(x_1,-\frac{1}{2},t_1,t_2)=u(x_1,\frac{1}{2},t_1,t_2),u_{x_2}(x_1,-\frac{1}{2},t_1,t_2)=u_{x_2}(x_1,\frac{1}{2},t_1,t_2)\] \[u(x_1,x_2,0,t_2)=u(x_1,x_2,5,t_2),u_{t_1}(x_1,x_2,0,t_2)=u_{t_1}(x_1,x_2,5,t_2)\] \[u(x_1,x_2,t_1,0)=u(x_1,x_2,t_1,5),u_{t_2}(x_1,x_2,t_1,0)=u_{t_2}(x_1,x_2,t_1,5)\] In polar kime coordinates, we have a slightly different formulation \[\Delta_x u = \frac{\partial^2}{\partial r^2} u+\frac{1}{r}\frac{\partial}{\partial r}u+\frac{1}{r^2}\frac{\partial^2}{\partial \phi^2}u,\text{ where } (r,\phi)\in [0,5]\times[-\pi,\pi]\]
Instead of directly solving the polar kime problem, we transform the solution using Cartesian to polar coordinate transformations:
\[u(x,t)=e^{2\pi i(x_1\xi_1+x_2\xi_2+x_3\xi_3+\eta_1 rcos\phi+ \eta_2 rsin\phi) }, \xi_1,\xi_2,\xi_3,\eta_1,\eta_2\in \mathbb{Z} \]
\[[-1,1]\times[-1,1]\times[-5,5]\times[-5,5] \overset{\small{determines}}{\Longrightarrow} [-1,1]\times[-1,1]\times[0,5]\times(-\pi,\pi)\]
However, the boundary condition is not necessarily determined by the boundary conditions in polar coordinates, but rather by the boundary conditions on the hypercube that “circumscribes” such circle.
Strictly speaking, for the interval
\[[-1,1]^{ds} \quad and \quad [-1,1]^{dt}\]
the solution should be
\[u(x,t)=e^{\pi i(x_1\xi_1+x_2\xi_2+x_3\xi_3+\eta_1 rcos\phi+ \eta_2 rsin\phi) }, \xi_1,\xi_2,\xi_3,\eta_1,\eta_2\in \mathbb{Z} \]
In the following animation we scale the solution by a factor of 2. That is,
\[u(x,t)=e^{2\pi i(x_1\xi_1+x_2\xi_2+x_3\xi_3+\eta_1 rcos\phi+ \eta_2 rsin\phi) }, \xi_1,\xi_2,\xi_3,\eta_1,\eta_2\in \mathbb{Z} \]
will still solve the periodic boundary condition on the [-1,1] hypercube.
Let’s visualize the solution in terms of the kime phase coordinates. The setup is
\[\xi=(\xi_1,\xi_2,\xi_3)=(-3,2,0), \eta=(\eta_1,\eta_2)=(-2,3), (x_1,x_2,t,\phi):[-1,1]\times[-1,1]\times[0,5]\times(-\pi,\pi)\]
Note: The rendering of this animation takes about 8-12 hours to run.
eta = {-2, 3};
chsi = {-3, 2};
mp[\[Theta]_, x_, y_, t_] =
Exp[2*Pi*I*t*
Inner[Times, eta, {Cos[\[Theta]], Sin[\[Theta]]}, Plus]]*
Exp[2*Pi*I*Inner[Times, chsi, {x, y}, Plus]];
fr = Table[
Show[ContourPlot3D[
Re[mp[\[Theta], x, y, 1]], {x, -1, 1}, {y, -1,
1}, {\[Theta], -\[Pi], \[Pi]},
RegionFunction ->
Function[{x, y, \[Theta]}, x^2 + y^2 <= 1],
Contours -> {-0.5, 0, 0.5},
ContourStyle -> Opacity[0.1]],
SliceContourPlot3D[Re[mp[\[Theta], x, y, 1]],
x == -1, {x, -1, 1}, {y, -1,
1}, {\[Theta], -\[Pi], \[Pi]}],
SliceContourPlot3D[Re[mp[\[Theta], x, y, 1]],
y == 1, {x, -1, 1}, {y, -1,
1}, {\[Theta], -\[Pi], \[Pi]}]], {t, 0, 5, 0.5}];
Export["C:\\(*Put your directory here*).gif", fr,
"DisplayDurations" -> 0.3, "AnimationRepetitions" -> 10,
ImageSize -> 800];
In this section, we examine the dynamics of the wave equation solution with respect to each of the two kime dimensions in Cartesian coordinates, where k1 and k2 range from (0,5).
In this example, we slice the 3D domain using three planes: 1) the xy-plane (the intrinsic spatial dimension), (2) the yz-plane (the dynamics corresponding to spatial dimension y and varying k2), and (3) the xz plane(the dynamics corresponding to spatial dimension x and varying k2). The time dimension k1 and k2, correspond to t and s. The k1 dimension is intrinsic in the time dimension that we perceive, and can be demonstrated by the successive pictures generated in Mathematica. The setup is
\[\xi = (\xi_1,\xi_2,\xi_3)=(-3,2,0),\eta=(\eta_1,\eta_2)=(-2,3)\]
eta = {-2, 3};
chsi = {-3, 2};
u[s_, x_, y_, t_] =
Exp[2*Pi*I*Inner[Times, eta, {t, s}, Plus]]*
Exp[2*Pi*I*Inner[Times, chsi, {x, y}, Plus]];
fr1 = Table[
SliceContourPlot3D[Re[u[s, x, y, t]],
"CenterPlanes", {x, -1, 1}, {y, -1, 1}, {s, 0, 5},
PlotLegends -> Automatic], {t, 0, 5, 0.1}];
Export["C:\\(*Put your directory here*).gif", fr1,
"DisplayDurations" -> 0.3, "AnimationRepetitions" -> 10,
ImageSize -> 800];
The step size here is important. For example, if we choose the step size to be 1 or 0.5, we would get a static animation result.
In this section, we use the magnitude of the polar coordinate as time and let phase ranges from(-π,π).
In this example, we follow the three cutting planes showcased in the previous section and demonstrate the wave equation solution in polar coordinates. The setup in this section will be
\[\xi = (\xi_1,\xi_2,\xi_3)=(-3,2,0),\eta=(\eta_1,\eta_2)=(-2,3)\]
eta = {-2, 3};
chsi = {-3, 2};
mp[\[Theta]_, x_, y_, t_] =
Exp[2*Pi*I*Inner[Times, eta, {t*Cos[\[Theta]], t*Sin[\[Theta]]}, Plus]]*
Exp[2*Pi*I*Inner[Times, chsi, {x, y}, Plus]];
fr2 = Table[
SliceContourPlot3D[Re[mp[\[Theta], x, y, t]],
"CenterPlanes", {x, -1, 1}, {y, -1, 1}, {\[Theta], -\[Pi], \[Pi]},
PlotLegends -> Automatic], {t, 0, 5, 0.1}];
Export["C:\\(*Put your directory here*).gif", fr2,
"DisplayDurations" -> 0.3, "AnimationRepetitions" -> 10,
ImageSize -> 800];
Note that the spatial dynamics in the xy-plane is similar to the Cartesian coordinates example. To demonstrate the different phase dynamics (we only show 3 stacked plane along the x axis, as s and y are symmetric).
In this example, we expand the previous example to examine different spatial distributions corresponding to different phases. The output example has 9 different planar projections at different positions in the field of view.
fr2b3 = Table[Table[
SliceContourPlot3D[Re[mp[\[Theta], x, y, t]],
{x==l/\[Pi],y==l/\[Pi],\[Theta]==l}, {x, -1, 1}, {y, -1, 1}, {\[Theta], -\[Pi], \[Pi]},
PlotLegends -> Automatic, PlotLabel -> (HoldForm["Phase"]==l) (HoldForm["Time"]==t)],
{l,-\[Pi],\[Pi],\[Pi]/4}], {t, 0, 5, 0.1}];
Export["C:\\(*Put your directory here*).gif", fr2b3,
"DisplayDurations" -> 0.3, "AnimationRepetitions" -> 10,
ImageSize -> 800];
In this section, we use the magnitude of the polar coordinate as time and let phase ranges from(-π,π).
This animation shows the wave equation solutions along spherical isosurfaces. The animation consists of 50 radial slices on the spatial coordinates, from r=0 to r=5 with 0.1 increment.
Animate[Graphics[Circle[{0,0},a],Frame -> True, PlotRange -> {{-1,1},{-1,1}}],{a,0,5,0.1},AnimationRunning -> True];
The phase is then embedded into the polar coordinates formed by time magnitude and phase to form a spherical coordinate system. All animation iterations consist of 5 isosurfaces of the u(x,t) potential function (0,1,-1,√2/2,-√2/2). The segment z<0 and xy<0 is cut out to peek inside these nested isosurfaces. Also note that there is a discontinuity in the visualization as the potential function solution is not properly defined for x=y. The set-up is similar as in the previous section.
friso = Table[
Show[SphericalPlot3D[{ff[\[Theta], \[Phi], r]}, {\[Theta], 0,
Pi}, {\[Phi], 0, 2 Pi},
Exclusions -> {\[Theta] == Pi/4},
PlotRange -> {{-\[Pi], \[Pi]}, {-\[Pi], \[Pi]}, {-2, 2}},
Mesh -> None,
RegionFunction ->
Function[{x, y, z, \[Theta], \[Phi], r}, (y > 0 || x*y > 0) ||
z > 0], PlotStyle -> Directive[Opacity[0.5], Green]],
SphericalPlot3D[{ff1[\[Theta], \[Phi], r]}, {\[Theta], 0,
Pi}, {\[Phi], 0, 2*Pi},
Exclusions -> {\[Theta] == Pi/4},
PlotRange -> {{-\[Pi], \[Pi]}, {-\[Pi], \[Pi]}, {-2, 2}},
Mesh -> None,
RegionFunction ->
Function[{x, y, z, \[Theta], \[Phi], r}, (y > 0 || x*y > 0) ||
z > 0], PlotStyle -> Directive[Opacity[0.5], Red]],
SphericalPlot3D[{ff2[\[Theta], \[Phi], r]}, {\[Theta], 0,
Pi}, {\[Phi], 0, 2*Pi},
Exclusions -> {\[Theta] == Pi/4},
PlotRange -> {{-\[Pi], \[Pi]}, {-\[Pi], \[Pi]}, {-2, 2}},
Mesh -> None,
RegionFunction ->
Function[{x, y, z, \[Theta], \[Phi], r}, (y > 0 || x*y > 0) ||
z > 0], PlotStyle -> Directive[Opacity[1], Purple]],
SphericalPlot3D[{ff3[\[Theta], \[Phi], r]}, {\[Theta], 0,
Pi}, {\[Phi], 0, 2*Pi},
Exclusions -> {\[Theta] == Pi/4},
PlotRange -> {{-\[Pi], \[Pi]}, {-\[Pi], \[Pi]}, {-2, 2}},
Mesh -> None,
RegionFunction ->
Function[{x, y, z, \[Theta], \[Phi], r}, (y > 0 || x*y > 0) ||
z > 0], PlotStyle -> Directive[ Opacity[0.3], Blue]],
SphericalPlot3D[{ff4[\[Theta], \[Phi], r]}, {\[Theta], 0,
Pi}, {\[Phi], 0, 2*Pi},
Exclusions -> {\[Theta] == Pi/4},
PlotRange -> {{-\[Pi], \[Pi]}, {-\[Pi], \[Pi]}, {-2, 2}},
Mesh -> None,
RegionFunction ->
Function[{x, y, z, \[Theta], \[Phi], r}, (y > 0 || x*y > 0) ||
z > 0], PlotStyle ->
Directive[Opacity[0.5], Yellow]]], {r, 0, 5, 0.1}];
Export["C:\\(*Put your directory here*).gif", friso,
"DisplayDurations" -> 0.3, "AnimationRepetitions" -> 20,
ImageSize -> 800];
Spatial Visualization at certain kime coordinates
In this example, we present a dynamic slider that allows interactive manipulation along the spatial dimension at different kime coordinates (k1,k2).
Caution: Manual manipulation of the controls in the dynamic Mathematica app below will require some time for the Wolfram cloud server to respond….These calculations may take up to one minute to complete. Please be patient.
(*Be sure to run the setup in the front*)
eta = {-2, 3};
chsi = {-3, 2};
u[s_, x_, y_, t_] =
Exp[2*Pi*I*Inner[Times, eta, {t, s}, Plus]]*
Exp[2*Pi*I*Inner[Times, chsi, {x, y}, Plus]];
Manipulate[
Column[{Graphics[{PointSize -> Large, Point[{t, s}]},
Frame -> True, PlotRange -> {{0, 5}, {0, 5}}],
ContourPlot[Re@u[s, x, y, t], {x, -1, 1}, {y, -1, 1},
Mesh -> 50]}], {t, 0, 5}, {s, 0, 5}]
Kime phases and magnitude on spatial coordinates
In this example, we present an alternative interface that allows manipulation of the different distribution on the spatial dimension at different kime coordinates (r,θ)
eta = {-2, 3};
chsi = {-3, 2};
int[\[Theta]_, x_, y_, t_] =
Exp[2*Pi*I*
Inner[Times, eta, {t*Cos[\[Theta]], t*Sin[\[Theta]]}, Plus]]*
Exp[2*Pi*I*Inner[Times, chsi, {x, y}, Plus]];
Manipulate[
Column[{Graphics[{PointSize -> Large, Point[{x, y}]},
Frame -> True, PlotRange -> {{-1, 1}, {-1, 1}}],
ContourPlot[
Re@int[\[Theta], x, y, t], {\[Theta], -\[Pi], \[Pi]}, {t, 0, 5},
Mesh -> 50]}], {x, -1, 1}, {y, -1, 1}]
To introduce event “orderness” in kime coordinates, we demonstrate the dynamics of the wave equation by traversing along a closed curve in kime. The following example demonstrates the kime dependent dynamics. The problem is formulated through an observer that traverses the wave equation solution along a closed ellipsoidal path in the kime plane. The ellipsoid is defined with a = 5, b = 3 where we use a slightly different set up. \[\xi=(\xi_1,\xi_2,\xi_3)=(-2,1,0), \eta=(\eta_1,\eta_2)=(-1,2), \frac{x^2}{a^2}+\frac{y^2}{b^2}=1\]
(*PLotting a ellipsoid*)
a = 5; b = 3;
eta = {-1, 2};
chsi = {-2, 1};
mp[\[Theta]_, x_, y_, t_] =
Exp[2*Pi*I*Inner[Times, eta, {t*Cos[\[Theta]], t*Sin[\[Theta]]}, Plus]]*
Exp[2*Pi*I*Inner[Times, chsi, {x, y}, Plus]];
frsim1 = Table[{Show[
Plot[y /. Solve[(x/a)^2 + (y/b)^2 == 1], {x, -a, a},
AspectRatio -> Automatic, Axes -> False],
Graphics[{PointSize[Large], Blue,
Point[{Sqrt[
a^2*b^2/(b^2 Cos[\[Theta]]^2 + a^2 Sin[\[Theta]]^2)]*
Cos[\[Theta]],
Sqrt[a^2*b^2/(b^2 Cos[\[Theta]]^2 + a^2 Sin[\[Theta]]^2)]*
Sin[\[Theta]]}]}],
Epilog -> {Text[
StringForm["A = (``,``)",
N[Sqrt[a^2*b^2/(b^2 Cos[\[Theta]]^2 + a^2 Sin[\[Theta]]^2)]*
Cos[\[Theta]]],
N[Sqrt[a^2*b^2/(b^2 Cos[\[Theta]]^2 + a^2 Sin[\[Theta]]^2)]*
Sin[\[Theta]]]], Scaled[{.7, .7}]]}, Axis -> False],
Plot3D[Re[
mp[\[Theta], x, y,
Sqrt[a^2*
b^2/(b^2 Cos[\[Theta]]^2 + a^2 Sin[\[Theta]]^2)]]], {x, -1,
1}, {y, -1, 1}]}, {\[Theta], 0, 2 \[Pi], \[Pi]/50}];
Export["C:\\(*Put your directory here*).gif", frsim1,
"DisplayDurations" -> 0.3, "AnimationRepetitions" -> 20,
ImageSize -> 800];
In the next example, we depict a numerical solution to an initial and boundary condition problem for the ultrahyperbolic equation (2 temporal dimensions and 2 spatial dimensions). The initial conditions are: \[ u(x,y,z,0)=10e^{-5x^2-10y^2}, u_t(x,y,z,0)=0 \]
And all the Boundary value are specified using Dirichlet boundary conditions
eqn = Derivative[0, 0, 2, 0][u][x, y, z, t] +
Derivative[0, 2, 0, 0][u][x, y, z, t] -
Derivative[2, 0, 0, 0][u][x, y, z, t] == D[D[u[x, y, z, t], t], t];
(*Two initial conditions on the variable t*)
inti1 = u[x, y, z, 0] == 10*Exp[-5*x^2 - 10*y^2];
init2 =
\!\(\*SuperscriptBox[\(u\),
TagBox[
RowBox[{"(",
RowBox[{"0", ",", "0", ",", "0", ",", "1"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, y, z, 0] == 0;
(*12 boundary conditions \[Equal] 3 dimensions(x,y,z) * 2 boundary \
conditions(x\[Equal]a,x\[Equal]b) * 2(first and second order)*)
bon1 = DirichletCondition[u[x, y, z, t] == 0, x == -1];
bon2 = DirichletCondition[u[x, y, z, t] == 0, x == 1];
bon3 = DirichletCondition[u[x, y, z, t] == 0, y == -1];
bon4 = DirichletCondition[u[x, y, z, t] == 0, y == 1];
bon5 = DirichletCondition[u[x, y, z, t] == 0, z == 0];
bon6 = DirichletCondition[u[x, y, z, t] == 0, z == 5];
bon7 = DirichletCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\) == 0,
x == -1];
bon8 = DirichletCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\) == 0,
x == 1];
bon9 = DirichletCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\) == 0,
y == -1];
bon10 = DirichletCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\) == 0,
y == 1];
bon11 = DirichletCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\) == 0,
z == 0];
bon12 = DirichletCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\) == 0,
z == 5];
usol = NDSolveValue[{eqn, inti1, init2, bon1, bon2, bon3, bon4, bon5,
bon6, bon7, bon8, bon9, bon10, bon11, bon12},
u, {x, -1, 1}, {y, -1, 1}, {z, 0, 5}, {t, 0, 5}];
stabledt = {0, 0.0001, 0.001, 0.01, 0.1, 0.12, 0.13, 0.14, 0.141,
0.142, 0.143, 0.144, 0.145, 0.146, 0.147, 0.148, 0.149, 0.15,
0.151, 0.152, 0.153, 0.154, 0.155, 0.156, 0.157, 0.158, 0.159,
0.16};
linearedt = {0.162, 0.163, 0.164, 0.165, 0.166, 0.167, 0.168, 0.169,
0.17, 0.171, 0.172, 0.173, 0.174, 0.175, 0.176, 0.177, 0.178,
0.179, 0.18, 0.181};
exponentialedt = {0.19, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 4, 5};
t11 = Table[
DensityPlot3D[usol[x, y, z, t], {x, -1, 1}, {y, -1, 1}, {z, 0, 5},
PlotLegends -> Automatic,
PlotLabel ->
Row[{Style["Stable Region", Bold, Blue], " Time: ", t,
" s"}]], {t, stabledt}];
t12 = Table[
DensityPlot3D[usol[x, y, z, t], {x, -1, 1}, {y, -1, 1}, {z, 0, 5},
PlotLegends -> Automatic,
PlotLabel ->
Row[{Style["Center Dissipates", Bold, Red], " Time: ", t,
" s"}]], {t, linearedt}];
t13 = Table[
DensityPlot3D[usol[x, y, z, t], {x, -1, 1}, {y, -1, 1}, {z, 0, 5},
PlotLegends -> Automatic,
PlotLabel ->
Row[{Style["Exponential Explode", Bold, Black], " Time: ", t,
" s"}]], {t, exponentialedt}];
Export["C:\\(*.gif directory here*)",
Join[t11, t12, t13], "DisplayDurations" -> 0.6,
"AnimationReptitions" -> 20, ImageSize -> 800];
Using the same initial condition: \[ u(x,y,z,0)=10e^{-5x^2-10y^2}, u_t(x,y,z,0)=0 \] And imposing the periodic boundary conditions instead
eqn = Derivative[0, 0, 2, 0][u][x, y, z, t] +
Derivative[0, 2, 0, 0][u][x, y, z, t] -
Derivative[2, 0, 0, 0][u][x, y, z, t] == D[D[u[x, y, z, t], t], t];
(*Two initial conditions on the variable t*)
inti1 = u[x, y, z, 0] == 10*Exp[-5*x^2 - 10*y^2];
init2 =
\!\(\*SuperscriptBox[\(u\),
TagBox[
RowBox[{"(",
RowBox[{"0", ",", "0", ",", "0", ",", "1"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, y, z, 0] == 0;
(*12 boundary conditions \[Equal] 3 dimensions(x,y,z) * 2 boundary \
conditions(x\[Equal]a,x\[Equal]b) * 2(first and second order)*)
bon1 = PeriodicBoundaryCondition[u[x, y, z, t], x == -1,
TranslationTransform[{2, 0, 0}]];
bon2 = PeriodicBoundaryCondition[u[x, y, z, t], y == -1,
TranslationTransform[{0, 2, 0}]];
bon3 = PeriodicBoundaryCondition[u[x, y, z, t], z == 0,
TranslationTransform[{0, 0, 5}]];
bon4 = PeriodicBoundaryCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\), x == -1,
TranslationTransform[{2, 0, 0}]];
bon5 = PeriodicBoundaryCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\), y == -1,
TranslationTransform[{0, 2, 0}]];
bon6 = PeriodicBoundaryCondition[\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(u[x, y, z, t]\)\), z == 0,
TranslationTransform[{0, 0, 5}]];
usol = NDSolveValue[{eqn, inti1, init2, bon1, bon2, bon3, bon4, bon5,
bon6}, u, {x, -1, 1}, {y, -1, 1}, {z, 0, 5}, {t, 0, 5}];
Another rendering of the solution: