Skip to content

Commit

Permalink
Touch up wording
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeR227 committed Dec 17, 2024
1 parent 6aa851d commit a3a1fae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/src/brussel/brussel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Brusselator

This Brusselator example is adapted from [MethodOfLines.jl](https://docs.sciml.ai/MethodOfLines/stable/tutorials/brusselator/#brusselator). The [Brusselator](https://en.wikipedia.org/wiki/Brusselator) is a autocatalytic chemical reaction that takes place between two reactants `U` and `V`.
This Brusselator example is adapted from [MethodOfLines.jl](https://docs.sciml.ai/MethodOfLines/stable/tutorials/brusselator/#brusselator)'s page on the same topic. The [Brusselator](https://en.wikipedia.org/wiki/Brusselator) is a autocatalytic chemical reaction that takes place between two reactants `U` and `V`.

```@setup INFO
include(joinpath(Base.@__DIR__, ".." , "..", "docinfo.jl"))
Expand Down Expand Up @@ -28,7 +28,7 @@ nothing # hide

## The Model

We establish the model for the Brusselator, with the two reactants `U` and `V`, modelled as residing on the vertices of the mesh. The equations encode a reaction that occurs independently at each point coupled with a diffusion term as well as a source term `F` in the case of `U`. Here `α` denotes the rate of diffusion for both reactants.
We establish the model for the Brusselator, with the two reactants `U` and `V`, modeled as residing on the vertices of the mesh. The equations encode a reaction that occurs independently at each point coupled with a diffusion term as well as a source term `F` in the case of `U`. Here `α` denotes the rate of diffusion for both reactants.
```@example DEC
BrusselatorDynamics = @decapode begin
(U, V)::Form0
Expand All @@ -50,7 +50,7 @@ nothing # hide

## Boundary Conditions

We now establish the Dirichlet boundary conditions for our model. Here we intend to set some portion of the `U` variable to be a fixed value on some portion of the mesh. At this point, the conditions are only set symbolically and their actual implementation can change. Note that these values are set at the beginning of execution, as shown by the computation graph.
We now establish the Dirichlet boundary conditions for our model. Here we intend to set some portion of the `U` variable to be a fixed value on some portion of the mesh. At this point the boundary conditions are only set symbolically and their actual implementation can change. Note that these values are set at the beginning of execution, as shown by the computation graph.
```@example DEC
BrusselatorBoundaries = @decapode begin
B::Constant
Expand Down
8 changes: 5 additions & 3 deletions docs/src/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

## 1. How do I incorporate scalar or vector field input data where you have a function of the embedded coordinates?

We can take a look at the [Brusselator page](../brussel/brussel.md#initial-data) which sets the values of each point on its mesh to a value as determined by some function. This can be done in a similar manner in 1D and 2D.
We can take a look at the [Brusselator page](../brussel/brussel.md#initial-data) which sets the values of each point on its mesh to a value as determined by some function. This can be done in a similar manner in both 1D and 2D.

The Brusselator also demonstrates, with the variable `F`, how one can go about changing the function by which these values are set over time.

## 2. How do I incorporate input data from a file with linear interpolation?

The Grigoriev Ice Cap model has a section where after the initial data is loaded from a TIF, the data is interpolated so that it may fit over a discrete mesh of our choosing. The link for that is [here](../grigoriev/grigoriev.md#loading-a-scientific-dataset).
The Grigoriev Ice Cap model has a section where after the initial data is loaded from a TIF and the data is interpolated so that it may fit over a discrete mesh of our choosing. You may view that [here](../grigoriev/grigoriev.md#loading-a-scientific-dataset).

## 3. How do I set boundary conditions like fixed value, no-flux, and no-slip?

Boundary conditions can be set by using "collages", which can take two variables among two different Decapodes and apply a function on the first. A general workflow would be to have the first Decapode encode the physics and have the second one encode values for boundary conditions. They can be related by a function that will mask the first variable and replace the desired values with second. An example of applying fixed boundary conditions would be in the [Brusselator page](../brussel/brussel.md#boundary-conditions).
Boundary conditions can be set by using "collages", which can take two variables among two different Decapodes and apply a function on the first.

A general workflow would be to have the first Decapode encode the physics and have a second Decapode encode values for the boundary conditions. They can be related by a function that will mask the first variable and replace the desired values with those of the second's. An example of applying fixed boundary conditions would be in the [Brusselator page](../brussel/brussel.md#boundary-conditions).

A similar workflow can be used for "no-flux" and "no-slip" conditions by fixing the value of the appropriate variable to be 0.

Expand Down

0 comments on commit a3a1fae

Please sign in to comment.