Skip to content

Commit 667b3bf

Browse files
authored
Merge pull request #210 from jotelha/joss-review-issue-186
documentation addressing Joss review issue 186
2 parents ad273e7 + ac07aa9 commit 667b3bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3198
-54112
lines changed

.github/workflows/documentation.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ jobs:
2525
# Upgrade to latest meson and ninja
2626
sudo pip install --upgrade meson ninja
2727
28+
# needs fenics to build fenics integration documentation snippet
29+
- name: install_fenics
30+
run: |
31+
sudo apt-get install -y --no-install-recommends software-properties-common
32+
sudo add-apt-repository -y ppa:fenics-packages/fenics
33+
sudo apt-get update -qy
34+
sudo apt-get install -y fenics python3-dolfin python3-mshr
35+
2836
- name: install_package
2937
run: |
3038
sudo pip install .[docs]

docs/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ help:
4646
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
4747
@echo " linkcheck to check all external links for integrity"
4848
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
49+
@echo " spelling to run spell check on documentation"
4950

5051
clean:
5152
rm -rf $(BUILDDIR)/*
@@ -176,3 +177,9 @@ pseudoxml:
176177
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
177178
@echo
178179
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
180+
181+
spelling:
182+
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
183+
@echo
184+
@echo "Spell check finished. Results are in $(BUILDDIR)/spelling."
185+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Electrochemistry
2+
================
3+
4+
The electrochemistry module provides three components for preparing atomistic
5+
configurations usually encountered in the context of soluted electrolytes.
6+
7+
.. toctree::
8+
9+
electrochemistry_1
10+
electrochemistry_2
11+
electrochemistry_3
12+
13+
Acknowledgements
14+
----------------
15+
16+
We thank Lukas Elflein for supporting the development of
17+
`matscipy.electrochemistry` and the according example notebooks, Christian
18+
Seidl for early experimentation with the module's functionality, Andreas
19+
Greiner for discussions and inspirations on solving transport problems with
20+
controlled-volume and finte-elements methods, as well as Meng Yonggang and
21+
Zhang Jun for posing an interesting tribological problem that sparked the
22+
development of this module initially.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.pdf
2+
*.gz
3+
*.log
4+
*.aux
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Run
2+
3+
pdflatex file.tex
4+
5+
to build pdf and
6+
7+
pdf2svg file.pdf file.svg
8+
9+
to convert to svg, then
10+
11+
inkscape -h 1024 file.svg -o file.png
12+
13+
to convert to png at 1024 px height.

docs/applications/electrochemistry/electrochemicalCellBazant1d.svg

Lines changed: 678 additions & 0 deletions
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
\documentclass[tikz,margin=0mm]{standalone}
2+
3+
\usepackage{amsmath}
4+
5+
\usetikzlibrary{arrows}
6+
\usetikzlibrary{decorations.pathreplacing}
7+
\usetikzlibrary{shadows,fadings}
8+
\usetikzlibrary{shadows.blur}
9+
\usetikzlibrary{fit}
10+
\usetikzlibrary{calc}
11+
12+
\tikzset{geometry/.style=thick}
13+
\tikzset{feederElectrode/.style={fill=black!30!white, draw=black!80!white}}
14+
\tikzset{electrolyte/.style={fill=black!10!white, draw=black!80!white}}
15+
16+
\begin{document}
17+
\begin{tikzpicture}[geometry]
18+
\def \sternLayerWidth{0.8}
19+
\fill[electrolyte,draw=none] (0,0) rectangle +(10,1) node[pos=0.5,anchor=center,align=center]{electrolyte};
20+
\draw[electrolyte] (0,0) -- +(10,0) +(10,1) -- +(0,1);
21+
\filldraw[feederElectrode] (-0.2,0) rectangle +(0.2,1);
22+
\filldraw[feederElectrode] (10,0) rectangle +(0.2,1);
23+
24+
% electrode BC
25+
\draw (0,2) node[node font=\footnotesize,anchor=south,align=center] {
26+
$\phi + \lambda_S \cdot \mathbf{\hat{n}} \cdot \nabla \phi = \phi_0$\\
27+
$-\mathbf{\hat{n}} \cdot ( -D_i \nabla c_i - z_i F u_i c_i \nabla \phi ) = \sum_{j=1}^M \frac{\nu_{ij} i_j}{F n_j}$
28+
};
29+
\draw (0,2) -- +(0,-0.8);
30+
31+
% bulk BC
32+
\draw (10,2) node[node font=\footnotesize,anchor=south,align=center] {
33+
$\phi + \lambda_S \cdot \mathbf{\hat{n}} \cdot \nabla \phi = 0$\\
34+
$-\mathbf{\hat{n}} \cdot ( -D_i \nabla c_i - z_i F u_i c_i \nabla \phi ) = \sum_{j=1}^M \frac{\nu_{ij} i_j}{F n_j}$
35+
};
36+
\draw (10,2) -- +(0,-0.8);
37+
38+
\draw[->] (-1,0.5) -- (-0.5,0.5) node[pos=0,anchor=east,node font=\footnotesize] {$i_\text{cell} = \sum_{j=1}^M i_j$};
39+
\draw[->] (10.5,0.5) -- (11,0.5) node[anchor=west,node font=\footnotesize] {$i_\text{cell} = \sum_{j=1}^M i_j$};
40+
41+
%% governing eq
42+
\draw [decorate,decoration={brace,amplitude=10pt},xshift=0,yshift=0] (10,-0.2) -- +(-10,0) node [node font=\footnotesize,anchor=north,midway,yshift=-10pt,align=center] {$ \nabla \cdot ( -D_i \nabla c_i - z_i F u_i c_i \nabla \phi ) = 0 $ \\
43+
$\nabla \cdot ( - \epsilon_r \epsilon_0 \nabla \phi ) - F \cdot \sum_{i=1}^N z_i c_i = 0$
44+
};
45+
\end{tikzpicture}
46+
\end{document}

docs/applications/electrochemistry/inertElectrode.svg

Lines changed: 451 additions & 0 deletions
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
\documentclass[tikz,margin=0mm]{standalone}
2+
3+
\usepackage{amsmath}
4+
5+
\usetikzlibrary{arrows}
6+
\usetikzlibrary{decorations.pathreplacing}
7+
\usetikzlibrary{shadows,fadings}
8+
\usetikzlibrary{shadows.blur}
9+
\usetikzlibrary{fit}
10+
\usetikzlibrary{calc}
11+
12+
\tikzset{geometry/.style=thick}
13+
\tikzset{feederElectrode/.style={fill=black!30!white, draw=black!80!white}}
14+
\tikzset{electrolyte/.style={fill=black!10!white, draw=black!80!white}}
15+
16+
\begin{document}
17+
\begin{tikzpicture}[geometry]
18+
\fill[electrolyte,draw=none] (0,0) rectangle +(10,1);
19+
\shade[left color=black!10,right color=white,draw=none] (9.5,0) rectangle +(0.5,1);
20+
\draw[electrolyte,fill=none] (0,0) -- +(10,0) +(10,1) -- +(0,1);
21+
\filldraw[feederElectrode] (-0.2,0) rectangle +(0.2,1);
22+
\draw (-0.2,0.5) node[anchor=east] {electrode};
23+
\draw (5,0.5) node[anchor=center] {electrolyte};
24+
\draw (10,0.5) node[anchor=west] {bulk};
25+
%
26+
% electrode BC
27+
\draw (0,2) node[node font=\footnotesize,anchor=south,align=right] {
28+
%$\phi + \lambda_S \cdot \mathbf{\hat{n}} \cdot \nabla \phi = \phi_0$\\
29+
$\phi = \phi_0$\\
30+
$( -D_i \nabla c_i - z_i F u_i c_i \nabla \phi ) = 0$
31+
};
32+
\draw[->] (0,2) -- +(0,-0.8);
33+
34+
% bulk BC
35+
\draw (10,2) node[node font=\footnotesize,anchor=south,align=center] {
36+
$\phi = 0$\\
37+
$c_i = c_i^\infty$
38+
};
39+
\draw[->] (10,2) -- +(0,-0.8);
40+
41+
%% governing eq
42+
\draw [decorate,decoration={brace,amplitude=10pt},xshift=0,yshift=0] (10,-0.2) -- +(-10,0) node [node font=\footnotesize,anchor=north,midway,yshift=-10pt,align=center] {\footnotesize $ \nabla \cdot ( -D_i \nabla c_i - z_i F u_i c_i \nabla \phi ) = 0 $ \\
43+
$\nabla \cdot ( - \epsilon_r \epsilon_0 \nabla \phi ) - F \cdot \sum_{i=1}^N z_i c_i = 0$
44+
};
45+
\end{tikzpicture}
46+
\end{document}

0 commit comments

Comments
 (0)