[cig-commits] [commit] master: write a section in the manual for the composition reaction cookbook (1560b76)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri May 16 18:31:01 PDT 2014


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/fec9fff95d1f00eabc29ab290d8294518b63b49a...7b658caa05d489ae3f8d61b8049b015e7be94f77

>---------------------------------------------------------------

commit 1560b76913d4a2888c5105ca2448123b2e2ae450
Author: Juliane Dannberg <dannberg at gfz-potsdam.de>
Date:   Fri May 16 22:49:19 2014 +0200

    write a section in the manual for the composition reaction cookbook


>---------------------------------------------------------------

1560b76913d4a2888c5105ca2448123b2e2ae450
 cookbooks/composition-reaction.prm               |   6 +--
 doc/manual/cookbooks/composition-reaction/0.png  | Bin 2858 -> 1893 bytes
 doc/manual/cookbooks/composition-reaction/12.png | Bin 88453 -> 76562 bytes
 doc/manual/cookbooks/composition-reaction/2.png  | Bin 50603 -> 41622 bytes
 doc/manual/cookbooks/composition-reaction/20.png | Bin 83814 -> 71281 bytes
 doc/manual/cookbooks/composition-reaction/4.png  | Bin 61002 -> 50452 bytes
 doc/manual/cookbooks/composition-reaction/8.png  | Bin 78085 -> 66259 bytes
 doc/manual/manual.tex                            |  62 +++++++++++++++++++++++
 8 files changed, 63 insertions(+), 5 deletions(-)

diff --git a/cookbooks/composition-reaction.prm b/cookbooks/composition-reaction.prm
index af8d92a..6d5aabe 100644
--- a/cookbooks/composition-reaction.prm
+++ b/cookbooks/composition-reaction.prm
@@ -53,10 +53,6 @@ subsection Boundary temperature model
   end
 end
 
-subsection Boundary composition model
-  set Model name = box
-end
-
 
 # The velocity along the top boundary models a spreading
 # center that is moving left and right:
@@ -125,7 +121,7 @@ subsection Postprocess
 
   subsection Visualization
     set Time between graphical output = 0.1
-    set List of output variables = density, viscosity
+    set List of output variables = density
   end
 end
 
diff --git a/doc/manual/cookbooks/composition-reaction/0.png b/doc/manual/cookbooks/composition-reaction/0.png
index e55b01d..fdb8304 100644
Binary files a/doc/manual/cookbooks/composition-reaction/0.png and b/doc/manual/cookbooks/composition-reaction/0.png differ
diff --git a/doc/manual/cookbooks/composition-reaction/12.png b/doc/manual/cookbooks/composition-reaction/12.png
index 9780c95..fad516c 100644
Binary files a/doc/manual/cookbooks/composition-reaction/12.png and b/doc/manual/cookbooks/composition-reaction/12.png differ
diff --git a/doc/manual/cookbooks/composition-reaction/2.png b/doc/manual/cookbooks/composition-reaction/2.png
index 0b7df78..da95955 100644
Binary files a/doc/manual/cookbooks/composition-reaction/2.png and b/doc/manual/cookbooks/composition-reaction/2.png differ
diff --git a/doc/manual/cookbooks/composition-reaction/20.png b/doc/manual/cookbooks/composition-reaction/20.png
index c429652..1e0eac4 100644
Binary files a/doc/manual/cookbooks/composition-reaction/20.png and b/doc/manual/cookbooks/composition-reaction/20.png differ
diff --git a/doc/manual/cookbooks/composition-reaction/4.png b/doc/manual/cookbooks/composition-reaction/4.png
index aef2790..643a7db 100644
Binary files a/doc/manual/cookbooks/composition-reaction/4.png and b/doc/manual/cookbooks/composition-reaction/4.png differ
diff --git a/doc/manual/cookbooks/composition-reaction/8.png b/doc/manual/cookbooks/composition-reaction/8.png
index 8c74d3a..d715f13 100644
Binary files a/doc/manual/cookbooks/composition-reaction/8.png and b/doc/manual/cookbooks/composition-reaction/8.png differ
diff --git a/doc/manual/manual.tex b/doc/manual/manual.tex
index 9a9cc20..e63bfb1 100644
--- a/doc/manual/manual.tex
+++ b/doc/manual/manual.tex
@@ -4195,6 +4195,68 @@ than in the rest of the domain, an effect that from a physical perspective
 clearly makes no sense at all.
 
 
+\paragraph{The active case with reactions.}
+
+\textit{This section was contributed by Juliane Dannberg.}
+
+In addition, there are setups where one wants the compositional fields to interact with each other. One example would be material upwelling at a mid-ocean ridge and changing the composition to that of oceanic crust when it reaches a certain depth. In this cookbook, we will describe how this kind of behaviour can be achieved by using the \textttt{composition reaction} function of the material model. 
+
+We will consider the exact same setup as in the previous paragraphs, except for the initial conditions and properties of the two compositional fields. There is one material that initially fills the bottom half of the domain and is less dense than the material above. In addition, there is another material that only gets created when the first material reaches the uppermost 20\% of the domain, and that has a higher density. This should cause the first material to move upwards, get partially converted to the second material, which then sinks down again. This means we want to change the initial conditions for the compositional fields: 
+
+\begin{lstlisting}[frame=single,language=prmfile,escapechar=\%]
+subsection Compositional initial conditions
+  set Model name = function
+
+  subsection Function
+    set Variable names      = x,z
+    set Function expression = if(z<0.5, 1, 0); 0 % \index[prmindex]{Function expression} \index[prmindexfull]{Compositional initial conditions!Function!Function expression} %
+  end
+end
+\end{lstlisting}
+
+Moreover, instead of the \textttt{simple} material model, we will use the \textttt{composition reaction} material model, which basically behaves in the same way, but can handle two active compositional fields and a reaction between those two fields. In the input file, the user defines a depth and above this \textttt{reaction depth} the first compositional fields is converted to the second field. This can be done by changing the following section (the complete input file can be found in \url{cookbooks/composition-reaction.prm}. 
+
+\begin{lstlisting}[frame=single,language=prmfile,escapechar=\%]
+subsection Material model
+  set Model name = composition reaction % \index[prmindex]{Model name} \index[prmindexfull]{Material model!Model name} %
+
+  subsection Composition reaction model
+    set Thermal conductivity                           = 1e-6 % \index[prmindex]{Thermal conductivity} \index[prmindexfull]{Material model!Composition reaction model!Thermal conductivity} %
+    set Thermal expansion coefficient                  = 0.01 % \index[prmindex]{Thermal expansion coefficient} \index[prmindexfull]{Material model!Composition reaction model!Thermal expansion coefficient} %
+    set Viscosity                                      = 1 % \index[prmindex]{Viscosity} \index[prmindexfull]{Material model!Composition reaction model!Viscosity} %
+    set Density differential for compositional field 1 = -5 % \index[prmindex]{Density differential for compositional field 1} \index[prmindexfull]{Material model!Composition reaction model!Density differential for compositional field 1} %
+    set Density differential for compositional field 2 = 5 % \index[prmindex]{Density differential for compositional field 2} \index[prmindexfull]{Material model!Composition reaction model!Density differential for compositional field 2} %
+    set Reaction depth                                 = 0.2 % \index[prmindex]{Reaction depth} \index[prmindexfull]{Material model!Composition reaction model!Reaction depth} %
+  end
+end
+\end{lstlisting}
+
+\begin{figure}
+  \centering
+  \includegraphics[width=0.3\textwidth]{cookbooks/composition-reaction/0.png}
+  \hfill
+  \includegraphics[width=0.3\textwidth]{cookbooks/composition-reaction/2.png}
+  \hfill
+  \includegraphics[width=0.3\textwidth]{cookbooks/composition-reaction/4.png}
+  \\
+  \includegraphics[width=0.3\textwidth]{cookbooks/composition-reaction/8.png}
+  \hfill
+  \includegraphics[width=0.3\textwidth]{cookbooks/composition-reaction/12.png}
+  \hfill
+  \includegraphics[width=0.3\textwidth]{cookbooks/composition-reaction/20.png}
+  \caption{\it Reaction between compositional fields: Temperature fields at $t=0, 2, 4, 8,
+  12, 20$. The black line is the isocontour line $c_1(\mathbf x,t)=0.5$
+    delineating the position of the material starting at the bottom and the white line is the    isocontour line $c_2(\mathbf x,t)=0.5$
+    delineating the position of the material that is created by the reaction.}
+  \label{fig:composition-reaction}
+\end{figure}
+
+Results of this model are visualized in
+Fig~\ref{fig:composition-reaction}. What is visible is
+that over the course of the simulation, the material that starts at the bottom
+of the domain ascends, reaches the reaction depth and gets converted to the second material, which starts to sink down.
+
+
 
 \subsubsection{Using tracer particles}
 



More information about the CIG-COMMITS mailing list