Almost everything in VisualPDE is customisable. Here, we describe the basic functionality of every option that can be found in the menus of VisualPDE.

## Equations

VisualPDE is all about solving equations. In the Equations pane, you can view and define the problem that VisualPDE will solve for you in your browser, complete with initial and boundary conditions. More advanced settings, including variable renaming, can be found under Settings.

### Edit

Customise all the terms in the PDEs that you would like to solve using natural syntax. See our discussion of valid expressions for helpful examples that will guide you in posing your own PDE system. Typing in any of the fields will highlight the corresponding term in the typeset PDE above.

#### Typeset

Have VisualPDE typeset the specified equations, making use of all the defined diffusion coefficients, functions and parameters. Terms will not be substituted in if they are constants that are not 0 or 1. Toggle this off to see the format of the equations that VisualPDE can interpret.

#### $D_u$, $D_v$, $D_w$, …

Set the diffusion coefficients of all the species in the simulation. When Cross diffusion is enabled, you can also set interaction terms, which are written $D_{uv}$ etc. These can be functions of space ($x$, $y$), time ($t$), any of the unknowns ($u$, $v$, $w$, $q$), the size of the domain ($L$, $L_x$, $L_y$), the images ($I_S$, $I_T$) and any quantities defined in Parameters. See our discussion of valid expressions for valid syntax and a list of available in-built functions.

#### $f_u$, $f_v$, $f_w$, …

Define the inhomogeneities in the equations. These can be functions of space ($x$, $y$), time ($t$), any of the unknowns ($u$, $v$, $w$, $q$), the size of the domain ($L$, $L_x$, $L_y$), the images ($I_S$, $I_T$), and any quantities defined in Parameters. See our discussion of valid expressions for valid syntax and a list of available in-built functions.

Advanced users can also make careful use of RAND, a uniformly random value in $[0,1]$, and RANDN, a normally distributed random number with unit variance and zero mean. This converts the equations into stochastic partial differential equations, which should only be solved using the Forward Euler timestepping scheme. Both RAND and RANDN require manually dividing by sqrt(dt) in non-algebraic equations so that the scheme resembles the Euler-Maruyama method. The solution under other timestepping schemes is undefined.

### Parameters

This menu contains a list of all the user-specified values that can be used throughout VisualPDE. New parameters can be defined using the empty input field at the bottom of the list of parameters. Parameters can depend on one another, but their definitions cannot be cyclic.

#### Basics

The basic syntax for defining a parameter is

name = value


which will make the quantity name available to the simulation. You can then freely change value, which will instantly propagate throughout VisualPDE. If you try to use a name that clashes with an internal variable (some of which are only found under the hood of VisualPDE), a warning will appear to inform you of this. Parameters can be removed by deleting the text that defines them. You can even choose a name that includes subscripts, such as k_1u. This will be interpreted as $k_{1u}$ automatically by VisualPDE.

#### Sliders

name = value in [start,step,stop]


creates a slider for your variable, ranging between the start and stop values in increments of step. The step parameter can be omitted and VisualPDE will choose a step automatically. For example,

a = 0.5 in [0,1]


creates a slider that ranges between 0 and 1, with initial value 0.5 and an automatically determined step size. Parameters with sliders cannot be defined in terms of other parameters.

The configuration of a slider (value, start, step, stop) can be updated by modifying the relevant parts of the expression that defines it. Sliders can be removed by deleting in ... from the parameter definition, and will be removed automatically when the associated parameter is removed.

### Boundary conditions

Boundary conditions can be specified for any species in the simulation. The following boundary conditions are available:

• Periodic
• Dirichlet (e.g. $u\onboundary = 0$)
• Neumann (e.g. $\pd{u}{n}\onboundary = 0$)
• Robin (e.g. $(u + \pd{u}{n})\onboundary = 0$)

Boundary conditions that allow you to specify values can be functions of space ($x$, $y$), time ($t$), any of the unknowns ($u$, $v$, $w$, $q$), the size of the domain ($L$, $L_x$, $L_y$), the images ($I_S$, $I_T$) and any quantities defined in Parameters. Robin boundary conditions are the only type supported that allow you to use an unknown in the specification of its own boundary condition. See our discussion of valid expressions for valid syntax and a list of available in-built functions.

An additional option, Combination, is also available, which allows you to specify different types of boundary condition on the Left, Right, Top and Bottom sides of rectangular domains. These conditions are specified as a string, e.g.

Left: Dirichlet = 0; Right: Neumann = 1; Top: Robin = u; Bottom: Dirichlet = sin(x)


for the species $u$ would specify $u = 0$ on the left boundary, $\pd{u}{n} = 1$ on the right boundary, $\pd{u}{n} = u$ on the top boundary and $u = sin(x)$ on the bottom boundary. Sides can be specified in any order and are case sensitive. Omitting any side will default to periodic boundary conditions (beware, this may have unexpected results if the matching side is not also periodic).

An additional type of condition, ‘Ghost’, can also be specified with Combination boundary conditions. This advanced option pushes VisualPDE to its limits, overriding the value of the ghost nodes used in the spatial discretisation of the PDE, and should be used with caution. We make use of this option in our Visual Story on virus transmission to effectively double the size of the computational domain in one direction.

### Initial conditions

Initial conditions can be specified for any species in the simulation. They can be functions of space ($x$, $y$), the size of the domain ($L$, $L_x$, $L_y$), the images ($I_S$, $I_T$), the random quantity RAND, a uniformly random value in $[0,1]$, the random quantity RANDN, a normally-distributed random number with unit variance and zero mean, and any quantities defined in Parameters. See our discussion of valid expressions for valid syntax and a list of available in-built functions.

## Views

There are often multiple ways to visualise a solution to a PDE. In the Views pane, you can select from and customise a range of example-specific display options, or create your own. Everything you customise will be saved in the current View. If you share your simulation via a link, your Views will be sent along too.

### New (+)

Create a new view with a placeholder name from the current view configuration.