aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorallen <allen@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-08-19 16:44:20 +0000
committerallen <allen@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-08-19 16:44:20 +0000
commit9e6ac478ca1e3e1fa92ff0f8a7ec46d58acb76e9 (patch)
treea54cab22e42b886a1bc33dc568bee8f667c83c98 /doc
parente92a0672def1e6f26a3b40f5b341c83f5a962d6a (diff)
Adding docs for Robin boundary condition
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@151 6a38eb6e-646e-4a02-a296-d141613ad6c4
Diffstat (limited to 'doc')
-rw-r--r--doc/documentation.tex94
1 files changed, 93 insertions, 1 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 057211f..5128ecd 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -62,7 +62,8 @@ The boundary conditions available are
\item Scalar
\item Flat
\item Copy (static)
-\item Radiation
+\item Radiation
+\item Robin
\end{itemize}
\vskip .5cm
@@ -505,6 +506,97 @@ boundary to apply the boundary condition.
\end{Lentry}
+\subsection{Robin Boundary Condition}
+
+This boundary condition has not yet been implemented in
+individual coordinate directions.
+The Robin boundary condition is:
+\begin{equation}
+f(r) = f_0 + \frac{k}{r^n}
+\end{equation}
+with $k$ a constant, $n$ the decay rate and $f_0$ the value at infinity. This implies:
+\begin{equation}
+\frac{\partial f}{\partial r} = - n \frac{k}{r^{n+1}}
+\end{equation}
+or
+\begin{equation}
+\frac{\partial f}{\partial r} = - n \frac{(f-f_0)}{r}
+\end{equation}
+Considering now a given cartesian direction $x$ we get:
+\begin{equation}
+\frac{\partial f}{\partial x} =
+\frac{\partial f}{\partial r}
+\frac{\partial r}{\partial x} = \frac{x}{r}\frac{\partial f}{\partial r}
+\end{equation}
+which implies
+\begin{equation}
+\frac{\partial f}{\partial x} = - n (f-f_0)\frac{x}{r^2}
+\end{equation}
+The equations are then finite differenced around the grid point $i+1/2$:
+\begin{equation}
+f_{i+1} - f_i = - n \Delta x \left( \frac{1}{2}(f_{i+1}+f_i) - f_0\right) \frac{x_{i+1/2}}{r^2_{i+1/2}}
+\end{equation}
+or
+\begin{equation}
+f_{i+1}-f_i = -n \Delta x ( (f_{i+1}+f_i)-2 f_0)\frac{x_{i+1}+x_i}{(r_{i+1}+r_i)^2}
+\end{equation}
+And this is then solved either for $f_i$ or $f_{i+1}$ depending on which side are
+we looking at.
+
+
+\subsubsection*{Calling from C:}
+
+{\bf All Coordinate Directions:}
+\begin{verbatim}
+int ierr = BndRobinVN(cGH *cctkGH, int *stencil_size,
+ CCTK_REAL finf, int npow, char *variable_name)
+int ierr = BndScalarGN(cGH *cctkGH, int *stencil_size,
+ CCTK_REAL finf, int npow, char *group_name)
+int ierr = BndScalarVI(cGH *cctkGH, int *stencil_size,
+ CCTK_REAL finf, int npow, int group_index)
+int ierr = BndScalarGI(cGH *cctkGH, int *stencil_size,
+ CCTK_REAL finf, int npow, int variable_index)
+\end{verbatim}
+
+
+\subsubsection*{Calling from Fortran:}
+{\bf All Coordinate Directions:}
+\begin{verbatim}
+call BndRobinVN(ierr, cctkGH, stencil_size, finf, npow, variable_name)
+call BndRobinGN(ierr, cctkGH, stencil_size, finf, npow, group_name)
+call BndRobinVI(ierr, cctkGH, stencil_size, finf, npow, variable_index)
+call BndRobinGI(ierr, cctkGH, stencil_size, finf, npow, group_index)
+\end{verbatim}
+where
+{\tt
+\begin{tabbing}
+character*(*) \= variable\_name\=\kill
+integer \> ierr \\
+CCTK\_POINTER \> cctkGH\\
+integer \> stencil\_size(dim)\\
+CCTK\_REAL \> finf \\
+integer \> npow \\
+character*(*) \> variable\_name\\
+character*(*) \> group\_name\\
+integer \> variable\_index\\
+integer \> group\_index\\
+\end{tabbing}
+}
+
+\subsubsection*{Arguments}
+\begin{Lentry}
+\item[{\tt ierr}] Return value, negative value indicates the
+boundary condition was not successfully applied
+\item[{\tt cctkGH}] Grid hierarchy pointer
+\item[{\tt finf}] Scalar value at infinity
+\item[{\tt npow}] Decay rate ($n$ in discussion above)
+\item[{\tt stencil\_size}] Array with dimension of the grid function, containing the stencil width to apply the boundary at
+\item[{\tt variable\_name}] Name of the variable
+\item[{\tt group\_name}] Name of the group
+\item[{\tt variable\_index}] Variable index
+\item[{\tt group\_index}] Group index
+\end{Lentry}
+
% Automatically created from the ccl files by using gmake thorndoc
\include{interface}