Skip to content

Commit 667a11b

Browse files
GodotMisogiGodotMisogi
authored andcommitted
Updated coefficient for more interesting result
1 parent 0ffc04d commit 667a11b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmarks/SimpleHandwrittenPDE/ks_spectral_wpd.jmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Kuramoto-Sivashinsky partial differential equation is solved on the domain $
1313
u(t,-L) & = u(t,L) = 1.
1414
\end{align}
1515
```
16-
The spatial derivative operators are represented via Fourier pseudospectral approximations. Here, the domain is discretized by projecting on an equispaced grid of points $x_s \in [-L, L]$; the solution is approximated on this grid via linear combinations of sinusoidal functions in space. The coefficients $\kappa = 1, \beta = 1/2,~\gamma = 1/8$ are chosen to produce `interesting' behavior as seen in the reference solution below.
16+
The spatial derivative operators are represented via Fourier pseudospectral approximations. Here, the domain is discretized by projecting on an equispaced grid of points $x_s \in [-L, L]$; the solution is approximated on this grid via linear combinations of sinusoidal functions in space. The coefficients $\kappa = 1, \beta = 1/2,~\gamma = 1/16$ are chosen to produce `interesting' behavior as seen in the reference solution below.
1717
```math
1818
\begin{align}
1919
\frac{du}{dt} & = -\kappa u D_x u - \beta D_x^2 u - \gamma D_x^4 u \\
@@ -50,7 +50,7 @@ function kuramoto_sivashinsky(N, L, alpha)
5050
p = (; D1, alpha)
5151

5252
tspan = (0.0, 1.0)
53-
prob = SplitODEProblem(MatrixOperator(-p.alpha / 2 * (Matrix(D2) + 1/4 * Matrix(D4))),
53+
prob = SplitODEProblem(MatrixOperator(-p.alpha / 2 * (Matrix(D2) + 1/8 * Matrix(D4))),
5454
nonlinear_convection!,
5555
u0, tspan, p);
5656

@@ -86,6 +86,7 @@ heatmap(xs, tslices, ys', xlabel = "x", ylabel = "t")
8686
```julia
8787
abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much
8888
reltols = 0.1 .^ (1:4)
89+
multipliers = 0.5 .^ (0:3)
8990
setups = [
9091
Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers),
9192
Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers),

0 commit comments

Comments
 (0)