-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create theory section and update tutorials #233
Open
dccowan
wants to merge
38
commits into
main
Choose a base branch
from
update_theory
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 31 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
ae501a8
Update basic inner products theory
dccowan 794db2b
Final draft of basic inner products theory
dccowan d13ed21
preliminary add of isotropic and anisotropic inner products. Fix some…
dccowan 39a8b1c
Update tutorials and theory to have consistent vector notation
dccowan 9bde7c8
Merge branch 'master' into update_theory
dccowan 05ba1f6
Add link to theory and update tutorials for latest difinition of orig…
dccowan 306bef5
Clean up some typos and improvements to formulations
dccowan ddaec41
Draft of differential operators
dccowan 7a58a64
Final draft of discrete operators
dccowan 826232a
Improve finite volume theory title page
dccowan 2fac6e8
small edit
dccowan 29ce0c7
Create mesh theory section
dccowan 009eb50
Organization, links and structure of theory section
dccowan 0e891b2
Adding interpolation matrix theory
dccowan be8fc0f
Draft for averaging matrices
dccowan 8c4e7ab
Finish averaging operators section small edits to notation
dccowan 7db23bd
Preliminary draft of inner products with differential operators
dccowan b561555
Edits to inner products with differential operators
dccowan a0b2b40
Add captions, links and labels
dccowan d762067
Finalize Poisson with zero neumann condition example and theory
dccowan b178367
Update finalized theory and tutorial for poisson and advection-diffusion
dccowan d0c95f5
Add reciprocal properties theory
dccowan 117ff04
Add boundary conditions for divergence. Edits to gradient
dccowan dc3b5e6
Boundary conditions on the curl
dccowan 2564c84
Add interpolation matrix tutorial
dccowan 34dcc66
Update interpolation tutorial to match variable definition in theory
dccowan b2e7d55
Merge branch 'master' into update_theory
dccowan ad3d5c5
small edits
dccowan 0f1a966
Add a few hyperlinks
dccowan 4873308
Add references
dccowan 105f36c
update suggestions to interpolation tutorial
dccowan 3b7f1de
Fix typos and test new organization of theory and tutorials.
dccowan df7007b
Update meshes and operators tutorials (amalgamation)
dccowan 02efc33
Restructure inner products tutorials section
dccowan 0c6b980
Update tutorials
dccowan 0985a8f
Small edits
dccowan 49b8657
configure bibtex
dccowan f1fe3ba
Merge branch 'master' into update_theory
dccowan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
.. _finite_volume_index: | ||
|
||
Intoduction to Finite Volume | ||
**************************** | ||
|
||
What is Finite Volume? | ||
---------------------- | ||
|
||
The finite volume method is a method for numerically approximating the solution to partial differential equations. | ||
Implementation of the finite volume method requires the discretization of continuous functions and variables. | ||
Discrete representations of functions and variables are organized on a numerical grid (or mesh). | ||
The final product of the approach is a linear system of equations :math:`\boldsymbol{A \phi=q}` | ||
that can be solved to compute the discrete approximation of a desired quantity. | ||
|
||
.. figure:: ../images/finitevolumeschematic.png | ||
:width: 700 | ||
:align: center | ||
|
||
Conceptual illustrating for solving PDEs with the finite volume method. | ||
|
||
In *discretize*, we use a staggered mimetic finite volume approach (:cite:`haber2014,HymanShashkov1999`). | ||
This approach requires the definitions of variables at either cell-centers, nodes, faces, or edges. | ||
This method is different from finite difference methods, | ||
as the final linear system is constructed by approximating the inner products between | ||
test functions and partial differential equations. | ||
|
||
**Contents:** | ||
|
||
- :ref:`Meshes <meshes_index>` | ||
- :ref:`Interpolation, Averaging and Differential Operators <operators_index>` | ||
- :ref:`Inner Products <inner_products_index>` | ||
- :ref:`Discretizing PDEs Derivation Examples <derivation_examples_index>` | ||
|
||
**Tutorials and Examples Gallery:** | ||
|
||
- :ref:`Mesh Generation <sphx_glr_tutorials_mesh_generation>` | ||
- :ref:`Interpolation, Averaging and Differential Operators <sphx_glr_tutorials_operators>` | ||
- :ref:`Inner Products <sphx_glr_tutorials_inner_products>` | ||
- :ref:`Discretizing PDEs Derivation Examples <sphx_glr_tutorials_pde>` | ||
- :ref:`Examples Gallery <sphx_glr_examples>` | ||
|
||
|
||
Examples | ||
-------- | ||
|
||
Below are several examples of the final linear system obtained using the finite volume approach. | ||
A comprehensive derivation of the final result is not provided here. The full derivations are | ||
provide in the :ref:`discretizing PDEs derivation examples <derivation_examples_index>` theory section. | ||
|
||
Direct Current Resistivity | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The governing equation for the direct current resistivity problem is given by: | ||
|
||
.. math:: | ||
\nabla \cdot \sigma \nabla \phi = -q_s | ||
|
||
where | ||
|
||
- :math:`\phi` is the electric potential | ||
- :math:`\sigma` is the electrical conductivity within the domain | ||
- :math:`q_s` is a general representation of the source term | ||
- :math:`\nabla` is the gradient operator | ||
- :math:`\nabla \cdot` is the divergence operator | ||
|
||
If we choose to define the discrete representation of the electric potential on the nodes, | ||
the solution for the electric potentials after applying the finite volume approach is given by: | ||
|
||
.. math:: | ||
\boldsymbol{[G^T \! M_{\sigma e} G ]} \boldsymbol{\phi} = \mathbf{q_s} | ||
|
||
where :math:`\boldsymbol{G^T \! M_{\sigma e} G }` is a sparse matrix and | ||
|
||
- :math:`\boldsymbol{\phi}` is the discrete approximation to the electric potentials on the nodes | ||
- :math:`\boldsymbol{G}` is the :ref:`discrete gradient operator <operators_differential_gradient>` | ||
- :math:`\boldsymbol{M_{\sigma e}}` is the :ref:`mass matrix for electrical conductivity <inner_products_isotropic_edges>` | ||
- :math:`\boldsymbol{q_s}` is the discrete representation of the source term on the nodes | ||
|
||
|
||
Frequency Domain Electromagnetics | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The governing equations for the frequency domain electromagnetic problems, | ||
for a source current, can be expressed using Maxwell's equations: | ||
|
||
.. math:: | ||
\begin{align} | ||
&\nabla \times \mu^{-1} \vec{B} - \sigma \vec{E} = \vec{J}_s \\ | ||
&\nabla \times \vec{E} = - i\omega \vec{B} | ||
\end{align} | ||
|
||
where | ||
|
||
- :math:`\vec{E}` is the electric field | ||
- :math:`\vec{B}` is the magnetic flux density | ||
- :math:`\vec{J}_s` is a general representation of the source term | ||
- :math:`\sigma` is the electrical conductivity within the domain | ||
- :math:`\mu` is the magnetic permeability within the domain | ||
- :math:`\omega` is the angular frequency | ||
- :math:`\nabla \times` is the curl operator | ||
|
||
Here we choose to define the discrete representation of the electric field on edges | ||
and the discrete representation of the magnetic flux density on faces. | ||
The solution for the electric potentials after applying the finite volume approach is given by: | ||
|
||
.. math:: | ||
\begin{align} | ||
\boldsymbol{C^T \! M_{\mu f} \, b } - \boldsymbol{M_{\sigma e} \, e} = \mathbf{j_s} \\ | ||
\mathbf{C \, e} = -i \omega \mathbf{b} | ||
\end{align} | ||
|
||
which can be combined to form a single linear system: | ||
|
||
.. math:: | ||
\boldsymbol{[C^T \! M_{\mu f} C } + i\omega \boldsymbol{M_{\sigma e}]} \mathbf{e} = -i \omega \mathbf{j_s} | ||
|
||
where :math:`\boldsymbol{C^T \! M_{\mu f} C } + i\omega \boldsymbol{M_{\sigma e}}` is a sparse matrix and | ||
|
||
- :math:`\boldsymbol{e}` is the discrete approximation to the electric field on edges | ||
- :math:`\boldsymbol{b}` is the discrete approximation to the magnetic flux density on faces | ||
- :math:`\boldsymbol{C}` is the :ref:`discrete curl operator <operators_differential_curl>` | ||
- :math:`\boldsymbol{M_{\sigma e}}` is the :ref:`mass matrix for electrical conductivity <inner_products_isotropic_edges>` | ||
- :math:`\boldsymbol{M_{\mu f}}` is the :ref:`mass matrix for the inverse of the magnetic permeability <inner_products_isotropic_reciprocal>` | ||
- :math:`\boldsymbol{j_s}` is the discrete representation of the source current density on the edges | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be made one level lower? E.g. a subheading of the page, which is "Finite Volume", and then DC resistivity and FDEM under that. This way, there is only one top-level heading on the page