pde2path demos
Clicking on the demo name changes to that directory; clicking the m file(s) opens them in the editor,
where they should be run cell-by-cell. For this to work, either run
setpde2path, or set
p2phome by hand, for instance by calling
p2phome=pwd in the
pde2path root
directory.
Contents
Scalar problems
- acsuite: a collection of demos for the Allen-Cahn equation in 1D, 2D, and 3D, using the OOPDE setting, mostly described here.
-
ac1D_simple,
cmds.m : Allen-Cahn eq. on 1D interval with homogeneous Neumann BC: a starting point for beginners.
-
ac1D,
cmds1.m :
1D Allen-Cahn eq. with Dirichlet BC, including mesh-adaption, fold continuation, imperfect bifurcation, and
deflation.
-
6 further demo-directories, including x-dependent terms,
quasilinear problems, global coupling, and nonlinear BC, in 1D, 2D and 3D.
See the tutorial.
- ac2Dwspot,
cmds1.m :
2D Allen-Cahn eq. with a parameter dependent spot BCs, a basic demo for trullekrul mesh--adaptation.
- ac3Dwspot,
cmds1.m : 3D variant of ac2Dwspot.
- acpbc: a variant
of acsuite with periodic BC, described in "Periodic boundary conditions in pde2path".
-
ac1Dpbc,
cmds.m :
1D Allen-Cahn eq. with periodic BC, including mesh-adaption and fold continuation.
-
3 further demo-directories, including x-dependent terms,
quasilinear problems, in 2D and 3D.
See the tutorial.
- Some 'old' AC demos are here:
- acfront,
acfront_cmds.m :
Traveling wave continuation for Allen-Cahn eq.,
quasi 1D with NBC
- achex,
ac6cmds.m :
Allen-Cahn eq. on hexagon with space dependent
BC (example for gnbcs.m)
- bratu,
bratu_cmds.m :
Bratu's problem on a rectangle
- nlbc,
nlbccmds.m :
Laplace(u)=0 on disk, with nonlinear BC.
- hexex,
cmds.m :
A simple scalar problem on a hexagon, example for higher order degenerate
bifurcations.
- sh:
The (quadratic-cubic) Swift-Hohenberg (SH) equation in 1D cmds1d.m,
2D cmds2dhex.m,
and 3D cmds3dcube.m, including multiple bifurcation points and snaking of localized patterns.
We rewrite the SH equation as a second order system with a singular mass matrix.
- shgc: SH with an
additional global coupling, in 1D, cmds1d.m , and 2D
cmds2dhexfro.m
- fCH:
a "functionalized" Cahn Hilliard, showing interesting pearling and meandering instabilities
of 'channels'. Again rewritten as a 2nd order system with singular mass matrix. Needs mass
and phase constraints.
cmds1.m pearling and meandering of a "straight" channel
cmds2.m for pearling from a curved
channel, and some time integration.
Systems
- schnakpat,
cmds1d.m : A somewhat comprehensive treatment of the Schnakenberg RD system in 1D and 2D. Including (in 2D, e.g., cmds2da.m ) multiple bifurcation points,
and the numerical computation of dispersion relations.
- schnakfold,
schnakcmds1.m : Fold continuation in the Schnakenberg problem; example for fuha.spjac in system. Examples of time integration in
schnakcmds2.m .
- schnaktravel,
schnak_cmds.m :
Traveling waves in the Schnakenberg problem;
example for cylinder geometry and fuha.qf and fuha.qjac in a 2-component system.
- gpsol,
gpcmds.m : Time harmonic (vector) Gross-Pitaeevsky in a rotating
frame; scalar, i.e., 2-component real system, and vector
(2 complex components) versions.
An example for space-dependent convection terms.
- chemtax,
cmds2D.m :
A quasilinear chemotaxis RD system.
- animalchem,
animalcmds.m : chemtax on a fun domain.
- rbconv,
rbconv_cmds.m :
A classical Rayleigh-Benard convection problem
- nlb,
nlbcmds.m :
Nonlinear Bloch waves. An example for periodic
BC and customization of bifdetc and swibra due to multiplicity of eigenvalues.
- twofluid,
tf_cmds.m :
2D traveling waves in a cylinder, with mixed boundary conditions and
advection.
- vkplate,
vkcmds.m :
the Von Karman equations for the buckling of elastic plates, here written
as a (regularized) 6-component system.
- The following four demos are described in "Symmetries and freezing in pde2path", available
here.
- cGL,
cmds1.m :
a complex Ginzburg-Landau equation with various symmetries (translational and rotational). Basic example how to set up phase conditions.
- fhnfreeze,
cmds1.m : explains phase conditions and 'freezing' to obtain and continue
fronts in a Fitzhugh--Nagumo system.
- modfro,
cmds1.m : Modulated fronts, i.e., Hopf-bifurcation from traveling waves, in model for autocatalysis, a 2 component reaction-diffusion system.
- breathe,
cmds1.m : Standing pulses in another Fitzhugh--Nagumo type system.
Hopf
These demos are explained in the "Hopf - tutorial", available
here
- cgl:
a complex Ginzburg-Landau equation on boxes with BCs that
yield simple Hopf bifurcation points (HBPs) as a simple example with
Hopf bifurcations. 1D cmds1d.m,
2D cmds2d.m,
and 3D cmds3d.m;
- cglpbc: The cGL
equation on 1D and 2D boxes with periodic BC. The resulting O(2) symmetry
yields that most HBPs have multiplicity at least two, leading to the bifurcation of standing waves (SWs) and traveling waves (TWs). Using suitable
phase--conditions, the TWs can
be continued as relative equilibria, and secondary bifurcation then yield modulated TWs, or relative periodic orbits.
1D cmds1d.m,
2D cmds2d.m
- cgldisk: The cGL
equation on a disk. Again O(2) invariant, where we now obtain standing waves
and rotating waves (RWs), which take the form of rigigdly rotating spirals,
and can be continued as realtive equilibria.
Secondary bifurcations yield meandering spirals.
cmds2d.m
- cglext: The cGL
equation, 1D with NBCs, and with periodic BCs. Illustrates continuation
of periodic orbits (POs) with fixed period T,
of POs for nonautonomous
problems , and of generation of POs via poiniguess, independent of HBPs.
NBCs cmds1.m,
pBCs cmds2.m
- gksspirals,
a RD system on the unit disk, similar to the cGL equation, but with
somewhat nonstandard BC. O(2) symmetry again yields SWs and RWs.
cmds1.m
is the starting point.
- brussel:
Interaction of Turing and Hopf mode in a Brusselator model, in 1D
bru1dcmds.m,
and 2D bru2dcmds.m.
- pollution,
pollcmds.m:
Hopf bifurcation in a canonical system for optimal pollution control.
(An OC problem, but canonical paths are not yet computed).
- mass-cons,
cmds1d.m:
Hopf bifurcation in a two component reaction diffusion toy model with
cross diffusion and mass conservation.
- kspbc,
cmds1.m:
Hopf bifurcation of standing (and traveling, cmds2.m) waves in the Kuramoto-Sivashinsky
(KS) equation with periodic BC. We thus have two symmetries, i.e., translational and boost invariance. Also an example how to set up 4th
order equations in pde2path.
Optimal Control (OC)
Explained in "Infinite time horizon spatially distributed
optimal control problems with pde2path, a user guide",
available
here.
- sloc,
a "Shallow Lake" optimal control problem; scalar PDE, 2-component
canonical system;
bdcmd1Ds.m,
cpdemo1D.m.
- vegoc:
An optimal harvesting problem, 2-component PDE, 4-component
canonical system;
bdcmds.m,
cpcmds.m
- lvoc:
A boundary control problem, 2-component PDE of Lottka-Volterra type;
Fishing on shore leads to a 4-component canonical system with
nonlinear BC.
bdcmds.m,
cpcmds.m
- pollution:
The 'pollution' demo from Hopf--demos, now extended by computation of
canonical paths to canonical periodic states.
bdcmds.m,
cpcmds.m
pde2path without FEM
Explained in "pde2path without FEM", available
here.
- acG, the Allen--Cahn
equation on graphs; based on the matlab graph class, little extra coding
needed, see
cmds1.m for Watts-Strogatz graphs and
cmds2.m for Barabasi-Albert graphs.
- schnakG, the
Schnakenberg problem
equation on graphs; like for acG, see
cmds1.m for Watts-Strogatz graphs and
cmds2.m for Barabasi-Albert graphs.
- ac1Dcheb, the Allen--Cahn equation discretized via Chebychev FDs. See
cmds1, and
ac2DDBC
and ac2NDBC
for 2D cases with Dirichlet BCs and Neumann BCs, respectively.
- schnak2D, the
Schnakenberg problem via Chebychev FDs. See
cmds1.
- sh1Dfou,
the Swift-Hohenberg equation via dct,
cmds1.
See sh2Dfou
and cmds1.
for the 2D case.
- sh1Dmfree,
and cmds1 for a matrix-free implementations (no explicit Jacobians) of
sh1Dfou, and similarly sh2Dmfree,
and cmds1 for the 2D case.
Higher order FEM
Explained in "pde2path with higher order FEM", available
here.
- AC1D, 1D Allen--Cahn;
based on FSElib, prepare by running
sethofem.m , then see
cmds.m .
- AC variants AC1Dq
(with advection), and AC2D
(2D)
-
Swift-Hohenberg,
2D,
cmds.m ;
3D,
cmds.m
-
Schnakenberg on
torus,
cmds.m , and on
cone,
cmds1.m
Geometric PDEs
Explained in "Differential geometric bifurcation problems in pde2path",
here.
- spcap1,
continuation of spherical caps, based on surface FEM.
See
cmds1.m .
- enneper,
Bifurcation from the Enneper minimal surface
cmds1.m ,
and experiments with mean curvature flow
cmds2.m .
- nodDBC,
Nodoids with Dirichlet BCs (starting with liquid bridges), short
cmds1.m
and long
cmds1.m .
- nodpBC,
Nodoids with periodic BCs, short
cmds1.m
and long
cmds1.m .
- TPS,
Triply periodic surfaces, namely the minimal Schwarz P
cmds1
and it's non-zero-H companions
cmds2.m .