You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in two dimensions using the finite volume method, with support also provided for steady-state problems and for systems of PDEs of the above form. In addition to this generic form above, we also provide support for specific problems that can be solved in a more efficient manner, namely:
If this package doesn't suit what you need, you may like to review some of the other PDE packages shown [here](https://github.com/JuliaPDE/SurveyofPDEPackages).
25
25
26
-
As a very quick demonstration, here is how we could solve a diffusion equation with Dirichlet boundary conditions on a square domain using the standard `FVMProblem` formulation; please see the docs for more information.
26
+
As a very quick demonstration, here is how we could solve a diffusion equation with Dirichlet boundary conditions on a square domain using the standard `FVMProblem` formulation; please see the docs for more information.
27
27
28
28
```julia
29
29
using FiniteVolumeMethod, DelaunayTriangulation, CairoMakie, OrdinaryDiffEq
30
30
a, b, c, d =0.0, 2.0, 0.0, 2.0
31
31
nx, ny =50, 50
32
-
tri =triangulate_rectangle(a, b, c, d, nx, ny, single_boundary=true)
32
+
tri =triangulate_rectangle(a, b, c, d, nx, ny, single_boundary=true)
33
33
mesh =FVMGeometry(tri)
34
34
bc = (x, y, t, u, p) ->zero(u)
35
35
BCs =BoundaryConditions(mesh, bc, Dirichlet)
36
36
f = (x, y) -> y ≤1.0?50.0:0.0
37
37
initial_condition = [f(x, y) for (x, y) in DelaunayTriangulation.each_point(tri)]
Copy file name to clipboardExpand all lines: docs/src/index.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
CurrentModule = FiniteVolumeMethod
3
3
```
4
4
5
-
# Introduction
5
+
# Introduction
6
6
7
7
This is the documentation for FiniteVolumeMethod.jl. [Click here to go back to the GitHub repository](https://github.com/SciML/FiniteVolumeMethod.jl).
8
8
@@ -20,10 +20,10 @@ using the finite volume method, with additional support for steady-state problem
20
20
21
21
The [tutorials](tutorials/overview.md) in the sidebar demonstrate the many possibilities of this package. In addition to these two generic forms, we also provide support for specific problems that can be solved in a more efficient manner, namely:
Copy file name to clipboardExpand all lines: docs/src/interface.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,34 +2,34 @@
2
2
CurrentModule = FiniteVolumeMethod
3
3
```
4
4
5
-
# Interface
5
+
# Interface
6
6
7
-
```@contents
7
+
```@contents
8
8
Pages = ["interface.md"]
9
9
```
10
10
11
11
In this section, we describe the basic interface for defining and solving PDEs using this package. This interface will also be made clearer in the tutorials. The basic summary of the discussion below is as follows:
12
12
13
-
1. Use `FVMGeometry` to define the problem's mesh.
14
-
2. Provide boundary conditions using `BoundaryConditions`.
15
-
3. (Optional) Provide internal conditions using `InternalConditions`.
16
-
4. Convert the problem into an `FVMProblem`.
17
-
5. If you want to make the problem steady, use `SteadyFVMProblem` on the `FVMProblem`.
18
-
6. If you want a system of equations, construct an `FVMSystem` from multiple `FVMProblem`s; if you want this problem to be steady, skip step 5 and only now apply `SteadyFVMProblem`.
19
-
7. Solve the problem using `solve`.
20
-
8. For a discussion of custom constraints, see the tutorials.
21
-
9. For interpolation, we provide `pl_interpolate` (but you might prefer [NaturalNeighbours.jl](https://github.com/DanielVandH/NaturalNeighbours.jl) - see [this tutorial for an example](tutorials/piecewise_linear_and_natural_neighbour_interpolation_for_an_advection_diffusion_equation.md)).
13
+
1. Use `FVMGeometry` to define the problem's mesh.
14
+
2. Provide boundary conditions using `BoundaryConditions`.
15
+
3. (Optional) Provide internal conditions using `InternalConditions`.
16
+
4. Convert the problem into an `FVMProblem`.
17
+
5. If you want to make the problem steady, use `SteadyFVMProblem` on the `FVMProblem`.
18
+
6. If you want a system of equations, construct an `FVMSystem` from multiple `FVMProblem`s; if you want this problem to be steady, skip step 5 and only now apply `SteadyFVMProblem`.
19
+
7. Solve the problem using `solve`.
20
+
8. For a discussion of custom constraints, see the tutorials.
21
+
9. For interpolation, we provide `pl_interpolate` (but you might prefer [NaturalNeighbours.jl](https://github.com/DanielVandH/NaturalNeighbours.jl) - see [this tutorial for an example](tutorials/piecewise_linear_and_natural_neighbour_interpolation_for_an_advection_diffusion_equation.md)).
22
22
23
-
# `FVMGeometry`: Defining the mesh
23
+
# `FVMGeometry`: Defining the mesh
24
24
25
-
The finite volume method (FVM) requires an underlying triangular mesh, as outlined in the [mathematical details section](math.md). This triangular mesh is to be defined from [DelaunayTriangulation.jl](https://github.com/JuliaGeometry/DelaunayTriangulation.jl). The `FVMGeometry` type wraps the resulting `Triangulation` and computes information about the geometry required for solving the PDEs. The docstring for `FVMGeometry` is below; the fields of `FVMGeometry` are public API.
25
+
The finite volume method (FVM) requires an underlying triangular mesh, as outlined in the [mathematical details section](math.md). This triangular mesh is to be defined from [DelaunayTriangulation.jl](https://github.com/JuliaGeometry/DelaunayTriangulation.jl). The `FVMGeometry` type wraps the resulting `Triangulation` and computes information about the geometry required for solving the PDEs. The docstring for `FVMGeometry` is below; the fields of `FVMGeometry` are public API.
26
26
27
27
```@docs
28
28
FVMGeometry
29
29
```
30
30
31
-
The `FVMGeometry` struct uses `TriangleProperties` for storing properties of a control volume that intersects a given triangle, defined below. This struct is
32
-
public API, although it is unlikely you would ever need it.
31
+
The `FVMGeometry` struct uses `TriangleProperties` for storing properties of a control volume that intersects a given triangle, defined below. This struct is
32
+
public API, although it is unlikely you would ever need it.
33
33
34
34
```@docs
35
35
TriangleProperties
@@ -152,15 +152,14 @@ These `solve` functions rely on `fvm_eqs!` for evaluating the equations. You sho
152
152
fvm_eqs!
153
153
```
154
154
155
-
# Custom constraints
155
+
# Custom constraints
156
156
157
157
You can also provide custom constraints. Rather than outlining this precisely here, it is best explained in the tutorials, namely [this tutorial](tutorials/solving_mazes_with_laplaces_equation.md). We note that one useful function for this is `compute_flux`, which allows you to compute the flux across a given edge. The docstring for `compute_flux` is below, and this function is public API.
158
158
159
159
```@docs
160
160
compute_flux
161
161
```
162
162
163
-
164
163
# Piecewise linear interpolation
165
164
166
165
You can evaluate the piecewise linear interpolation corresponding to a solution using `pl_interpolate`, defined below; this function is public API.
@@ -169,4 +168,4 @@ You can evaluate the piecewise linear interpolation corresponding to a solution
169
168
pl_interpolate
170
169
```
171
170
172
-
Better interpolants are available from [NaturalNeighbours.jl](https://github.com/DanielVandH/NaturalNeighbours.jl) - see the [this tutorial](tutorials/piecewise_linear_and_natural_neighbour_interpolation_for_an_advection_diffusion_equation.md) for some examples.
171
+
Better interpolants are available from [NaturalNeighbours.jl](https://github.com/DanielVandH/NaturalNeighbours.jl) - see the [this tutorial](tutorials/piecewise_linear_and_natural_neighbour_interpolation_for_an_advection_diffusion_equation.md) for some examples.
0 commit comments