diff --git a/benchmarks/benchmark1.ipynb b/benchmarks/benchmark1.ipynb index 7d944d656..084e6a103 100644 --- a/benchmarks/benchmark1.ipynb +++ b/benchmarks/benchmark1.ipynb @@ -1001,13 +1001,57 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Results" + "## Submission Guidelines\n", + "\n", + "Please follow these [upload instructions](https://github.com/usnistgov/pfhub/blob/master/upload.md).\n", + "\n", + "In addition to that specified, further data to upload can include a Youtube video, images of the nuclei at different times, or the entire phase field variable at different times. This data can be uploaded directly to the website or stored at a secondary location and only the link to the data provided. This data is not required, but will help others view your work.\n", + "\n", + "### Part (a)\n", + "\n", + "Part (a) requires running the simulation to equilibrium, and the following data should be collected.\n", + "\n", + "- The free energy integrated over the whole domain, $\\mathcal{F}$, at each timestep. \n", + "\n", + " One PFHub upload is required for all the simulations. The free energy data should be recorded in a file named needs to be `free_energy_1a.csv`. This CSV file (comma-separated value) must have the following format: note the column headings and lack of spaces.\n", + "\n", + " ```\n", + " time,free_energy\n", + " 0.00000000,319.0337102\n", + " 5.00000000,318.8273928\n", + " ...\n", + " 10000.0000,40.81065093\n", + " ...\n", + " ```\n", + " \n", + "- The phase field, $c$, at each grid point in the domain at the following times (aspirational):\n", + " - 1,000\n", + " - 10,000\n", + " - 100,000\n", + " - 1,000,000\n", + "\n", + " You may provide this data in whatever format you consider \"most useful,\" and we shall endeavour to deal with that, e.g. a checkpoint file in the format native to your phase-field simulation framework.\n", + " Optionally, please consider also uploading a VTK ImageData file. If your mesh is unstructured or irregular, this will require appropriate interpolation prior to export. This can be accomplished in ParaView using the PointVolumeInterpolator filter.\n", + "\n", + " The names of these data files should encode the time and problem, e.g.,\n", + " `raw_data_1a.0001000.vti`,\n", + " `raw_data_1a.0010000.vti`,\n", + " `raw_data_1a.0100000.vti`, and\n", + " `raw_data_1a.1000000.vti`.\n", + "\n", + "### Parts (b) through (d)\n", + "\n", + "The same data as in Part (a) are required; please follow the same instructions, modifying \"1a\" with the appropriate letter (\"1b\", \"1c\", etc.).\n", + "\n", + ": Any mention of commercial products within NIST web pages is for information only; it does not imply recommendation or endorsement by NIST." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ + "## Results\n", + "\n", "Results from this benchmark problem are displayed on the [simulation result page]({{ site.baseurl }}/simulations) for different codes." ] }, @@ -1019,21 +1063,12 @@ "\n", "Feedback on this benchmark problem is appreciated. If you have questions, comments, or seek clarification, please contact the [CHiMaD phase field community]({{ site.baseurl }}/community/) through the [Gitter chat channel]({{ site.links.chat }}) or by [email]({{ site.baseurl }}/mailing_list/). If you found an error, please file an [issue on GitHub]({{ site.links.github }}/issues/new)." ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1047,7 +1082,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.4" + "version": "3.9.16" } }, "nbformat": 4, diff --git a/benchmarks/benchmark1.ipynb.raw.html b/benchmarks/benchmark1.ipynb.raw.html index bb873a595..920f04d77 100644 --- a/benchmarks/benchmark1.ipynb.raw.html +++ b/benchmarks/benchmark1.ipynb.raw.html @@ -1,10 +1,9 @@ -
In [5]:
-
from IPython.display import HTML
+
from IPython.display import HTML
 
 HTML('''<script>
 code_show=true; 
@@ -23,7 +22,7 @@
 <form action="javascript:code_toggle()"><input type="submit" value="Code Toggle"></form>''')
 
-
+
@@ -33,12 +32,11 @@
-
Out[5]:
+
Out[5]:
-
- -
-
+
@@ -66,7 +63,7 @@
In [6]:
-
from IPython.display import HTML
+
from IPython.display import HTML
 
 HTML('''
 <a href="{{ site.links.github }}/raw/nist-pages/benchmarks/benchmark1.ipynb"
@@ -76,7 +73,7 @@
 ''')
 
-
+
@@ -86,17 +83,15 @@
-
Out[6]:
+
Out[6]:
- -
@@ -106,8 +101,7 @@
-
-
+

Benchmark Problem 1: Spinodal Decomposition

@@ -118,12 +112,12 @@

Benchmark Problem 1: Spin
In [20]:
-
from IPython.display import HTML
+
from IPython.display import HTML
 
 HTML('''{% include jupyter_benchmark_table.html num="[1]" revision=1 %}''')
 
-
+

@@ -133,13 +127,11 @@

Benchmark Problem 1: Spin
-
Out[20]:
+
Out[20]:
-
-{% include jupyter_benchmark_table.html num="[1]" revision=1 %} -
+
{% include jupyter_benchmark_table.html num="[1]" revision=1 %}
@@ -148,8 +140,7 @@

Benchmark Problem 1: Spin

-
-
+
  • Overview
  • @@ -183,42 +174,37 @@

    Benchmark Problem 1: Spin

-
-
+
-

See the journal publication entitled "Benchmark problems for numerical implementations of phase field models" for more details about the benchmark problems. Furthermore, read the extended essay for a discussion about the need for benchmark problems.

+

See the journal publication entitled "Benchmark problems for numerical implementations of phase field models" for more details about the benchmark problems. Furthermore, read the extended essay for a discussion about the need for benchmark problems.

-
-
+

Overview

-
-
+
-

Spinodal decomposition is one of the oldest problems in the phase field canon, and its formulation in terms of continuum fields goes back to the seminal works by Cahn and Hilliard [1]. The Cahn-Hilliard equation thus predates the name "phase field" in this context, but the term has subsequently been adopted by the community. While spinodal decomposition may be one of the simplest problems to model, it is highly relevant, as a large number of phase field models include the diffusion of a solute within a matrix. Furthermore, precipitation and growth may also be modeled with the same formulation if the appropriate initial conditions are chosen. For the benchmark problem, we select a simple formulation that is numerically tractable so that results may be obtained quickly and interpreted easily, testing the essential physics while minimizing model complexity and the chance to introduce coding errors.

+

Spinodal decomposition is one of the oldest problems in the phase field canon, and its formulation in terms of continuum fields goes back to the seminal works by Cahn and Hilliard [1]. The Cahn-Hilliard equation thus predates the name "phase field" in this context, but the term has subsequently been adopted by the community. While spinodal decomposition may be one of the simplest problems to model, it is highly relevant, as a large number of phase field models include the diffusion of a solute within a matrix. Furthermore, precipitation and growth may also be modeled with the same formulation if the appropriate initial conditions are chosen. For the benchmark problem, we select a simple formulation that is numerically tractable so that results may be obtained quickly and interpreted easily, testing the essential physics while minimizing model complexity and the chance to introduce coding errors.

-
-
+

Free energy and dynamics

-
-
+

The spinodal decomposition benchmark problem has a single order parameter, $c$, which describes the atomic fraction of solute. The free energy of the system, $F$, is expressed as $$ @@ -234,8 +220,7 @@

Free energy and dynamics

-
-
+
@@ -264,7 +249,7 @@

Figure 1: free energy densityplt.show()

-
+
@@ -274,7 +259,7 @@

Figure 1: free energy density -
+
@@ -679,10 +664,9 @@

Figure 1: free energy density
-
-
+
-

Because $c$ must obey a continuity equation -- the flux of $c$ is conserved -- the evolution of $c$ is given by the Cahn-Hilliard equation [1], which is derived from an Onsager force-flux relationship [[2][balluffi2005kinetics]]: +

Because $c$ must obey a continuity equation -- the flux of $c$ is conserved -- the evolution of $c$ is given by the Cahn-Hilliard equation [1], which is derived from an Onsager force-flux relationship [2]: $$ \frac{\partial c}{\partial t}=\nabla\cdot\Bigg\{M\nabla\left(\frac{\partial f_{chem}}{\partial c}-\kappa\nabla^{2}c\right)\Bigg\} $$ @@ -692,16 +676,14 @@

Figure 1: free energy density
-
-
+

-
-
+
@@ -737,30 +719,29 @@

Parameter values
-
-
+
-
-
+

Several boundary conditions, initial conditions and computational domain geometries are used to challenge different aspects of the numerical solver implementation. We test four combinations that are increasingly difficult to solve: two with square computational domains, see (a) and (b), with side lengths of 200 units, one with a computational -domain in the shape of a "T," see (c), with a total height of 120 units, a total width of 100 units, +domain in the shape of a "T," see (c), with a total height of 120 units, a total width of 100 units, and horizontal and vertical section widths of 20 units, and one in which the computational domain is the surface of a sphere with a radius of r = 100 units, see (d). While most codes readily handle rectilinear domains, a spherical domain may pose problems, such as having the solution restricted to a two-dimensional curved surface. The coordinate systems and origins are given in Fig. 2. Periodic boundary conditions are applied to one square domain, see (a), while -no-flux boundaries are applied to the other square domain, see (b), and the "T"-shaped domain, see (c). Periodic boundary conditions are commonly used with rectangular or rectangular prism domains +no-flux boundaries are applied to the other square domain, see (b), and the "T"-shaped domain, see (c). Periodic boundary conditions are commonly used with rectangular or rectangular prism domains to simulate an infinite material, while no-flux boundary conditions may be used to simulate an isolated piece of material or a mirror plane. As the computational domain is compact for the spherical surface, no boundary conditions are specified for it. Note that the same @@ -771,16 +752,14 @@

Domain geometries and boundar

-
-
+

(a) Square periodic

@@ -812,12 +791,12 @@

(a) Square periodic -
Out[14]:
+
Out[14]:
-
Ly
Ly
Lx
Lx
+<foreignObject height="12" pointer-events="all" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow:visible;" width="13">
Ly
</foreignObject>Ly<foreignObject height="12" pointer-events="all" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow:visible;" width="13">
Lx
</foreignObject>Lx
@@ -827,16 +806,14 @@

(a) Square periodic
-
-
+
-
-
+
-
-
+

The domain is the surface of a sphere with radius 100.

@@ -917,16 +890,14 @@

(d) Sphere

-
-
+

The initial conditions for the first benchmark problem are chosen such that the average value of $c$ over the computational domain is approximately $0.5$.

@@ -934,18 +905,16 @@

Initial conditions
-
-
+

-
-
+
-

The initial value of $c$ for the square and "T" computational domains is +

The initial value of $c$ for the square and "T" computational domains is specified by $$ c\left(x,y\right) = @@ -958,8 +927,7 @@

Initial conditions for (a), (b)

-
-
+

Figure 2: initial $c$ for (a), (b) and (c)

@@ -973,15 +941,15 @@

Figure 2: initial $c$ for (a
#PYTEST_VALIDATE_IGNORE_OUTPUT
 
 import numpy as np
-from bokeh.plotting import figure, show, output_file, output_notebook, gridplot
-from bokeh.models import FixedTicker
+from bokeh.plotting import figure, show, output_file, output_notebook, gridplot
+from bokeh.models import FixedTicker
 output_notebook()
-from bokeh.palettes import brewer, RdBu11, Inferno256
-from bokeh.models.mappers import LinearColorMapper
+from bokeh.palettes import brewer, RdBu11, Inferno256
+from bokeh.models.mappers import LinearColorMapper
 import matplotlib as plt
 import matplotlib.cm as cm
 import numpy as np
-from bokeh.models import HoverTool, BoxSelectTool
+from bokeh.models import HoverTool, BoxSelectTool
 
 def generate_colorbar(mapper, width, height, n_ticks):
     high, low = mapper.high, mapper.low
@@ -1064,7 +1032,7 @@ 

Figure 2: initial $c$ for (a browser=None);

-

+
@@ -1074,32 +1042,29 @@

Figure 2: initial $c$ for (a
-
+
-
Loading BokehJS ... -
-
+

-
+
-
-
+
-
+
@@ -1395,16 +1358,14 @@

Figure 2: initial $c$ for (a

-
-
+

Initial conditions for (d)

-
-
+
@@ -1495,7 +1455,7 @@

Figure 3: initial $c$ for (d) -
+
@@ -3870,30 +3830,59 @@

Figure 3: initial $c$ for (d)
-
-
+
-

Results

+

Submission Guidelines

Please follow these upload instructions.

+

In addition to that specified, further data to upload can include a Youtube video, images of the nuclei at different times, or the entire phase field variable at different times. This data can be uploaded directly to the website or stored at a secondary location and only the link to the data provided. This data is not required, but will help others view your work.

+

Part (a)

Part (a) requires running the simulation to equilibrium, and the following data should be collected.

+
    +
  • The free energy integrated over the whole domain, $\mathcal{F}$, at each timestep.

    +

    One PFHub upload is required for all the simulations. The free energy data should be recorded in a file named needs to be free_energy_1a.csv. This CSV file (comma-separated value) must have the following format: note the column headings and lack of spaces.

    +
    time,free_energy
    +0.00000000,319.0337102
    +5.00000000,318.8273928
    +...
    +10000.0000,40.81065093
    +...
    +
    +
  • +
  • The phase field, $c$, at each grid point in the domain at the following times (aspirational):

    +
      +
    • 1,000
    • +
    • 10,000
    • +
    • 100,000
    • +
    • 1,000,000
    • +
    +

    You may provide this data in whatever format you consider "most useful," and we shall endeavour to deal with that, e.g. a checkpoint file in the format native to your phase-field simulation framework. +Optionally, please consider also uploading a VTK ImageData file. If your mesh is unstructured or irregular, this will require appropriate interpolation prior to export. This can be accomplished in ParaView using the PointVolumeInterpolator filter.

    +

    The names of these data files should encode the time and problem, e.g., +raw_data_1a.0001000.vti, +raw_data_1a.0010000.vti, +raw_data_1a.0100000.vti, and +raw_data_1a.1000000.vti.

    +
  • +
+

Parts (b) through (d)

The same data as in Part (a) are required; please follow the same instructions, modifying "1a" with the appropriate letter ("1b", "1c", etc.).

+

: Any mention of commercial products within NIST web pages is for information only; it does not imply recommendation or endorsement by NIST.

+

-
-
+
-

Results from this benchmark problem are displayed on the simulation result page for different codes.

+

Results

Results from this benchmark problem are displayed on the [simulation result page]({{ site.baseurl }}/simulations) for different codes.

-
-
+
-

Feedback

Feedback on this benchmark problem is appreciated. If you have questions, comments, or seek clarification, please contact the CHiMaD phase field community through the Gitter chat channel or by email. If you found an error, please file an issue on GitHub.

+

Feedback

Feedback on this benchmark problem is appreciated. If you have questions, comments, or seek clarification, please contact the [CHiMaD phase field community]({{ site.baseurl }}/community/) through the [Gitter chat channel]({{ site.links.chat }}) or by [email]({{ site.baseurl }}/mailing_list/). If you found an error, please file an [issue on GitHub]({{ site.links.github }}/issues/new).

- +