Commit 4aee1e47 authored by Santiago Ospina De Los Ríos's avatar Santiago Ospina De Los Ríos

Merge branch 'run-dorie-create-immediately' into 'master'

Update default simulation config files

See merge request !183
parents 00e61325 2e353b5c
......@@ -62,6 +62,7 @@
* Deploy online documentation for each branch to private server !163
* Use YAML (instead of muPhi `.bcdat`) files for specifying BCs !121
* Unit and system tests report code coverage separately !172
* Improve docs on config file parameters and make default ones executable !183
### Fixed
* Allow meta-ini files for unit tests !101
......
......@@ -7,8 +7,8 @@ configure_file(${CMAKE_CURRENT_BINARY_DIR}/tutorial-1.ini
COPYONLY)
# Copy files needed for the test to run
configure_file(${CMAKE_BINARY_DIR}/doc/default_files/infiltration.yml
infiltration.yml
configure_file(${CMAKE_BINARY_DIR}/doc/default_files/richards_bc.yml
richards_bc.yml
COPYONLY)
configure_file(${CMAKE_BINARY_DIR}/doc/default_files/richards_param.yml
richards_param.yml
......
......@@ -27,8 +27,8 @@ quantity = matricHead
equation = -h
[richards.boundary]
file = infiltration.yml
file = richards_bc.yml
[richards.output]
fileName = infiltr_homogeneous_sand_2D
outputPath = ./
\ No newline at end of file
outputPath = ./
......@@ -121,7 +121,7 @@ Boundary Condition
The :doc:`boundary conditions file </manual/bcfile>` has to be specified by the
keyword ``richards.boundary.file`` in the configuration file. For now, we will
use the infiltration file, ``infiltration.yml``, provided by the command
use the boundary condition file ``richards_bc.yml`` provided by the command
``dorie create``. By default, this file sets a constant infiltration of
:math:`j_w = -5.55\cdot 10^{-6}\,\text{ms}^{-1}` at the top, a constant matric
head of :math:`h_m = 0\,\text{m}` at the bottom, and a no-flux condition on the
......@@ -164,7 +164,7 @@ configuration file. A typical DORiE simulation has the following output:
[18:27:32.768 I] Creating output directory: ./
[18:27:32.768 I] Creating a rectangular grid in 2D
[18:27:32.776 I] [RIC] Loading parameter data file: richards_param.yml
[18:27:32.779 I] [RIC] Reading boundary condition data file: infiltration.yml
[18:27:32.779 I] [RIC] Reading boundary condition data file: richards_bc.yml
[18:27:32.784 I] [RIC] Setup complete
[18:27:33.296 I] [RIC] Time Step 0: 0.00e+00 + 1.00e+01 -> 1.00e+01
[18:27:33.581 I] [RIC] Time Step 1: 1.00e+01 + 1.50e+01 -> 2.50e+01
......@@ -194,6 +194,6 @@ shown below.
============= ======================================================================
Configuration :download:`config.ini <config.ini>`
Boundary :download:`infiltration.yml </default_files/infiltration.yml>`
Boundary :download:`richards_bc.yml </default_files/richards_bc.yml>`
Parameters :download:`richards_param.yml </default_files/richards_param.yml>`
============= ======================================================================
......@@ -57,8 +57,8 @@ current folder. Explore them!
============= ======================================================================
Configuration :download:`config.ini </default_files/config.ini>`
Boundary :download:`infiltration.yml <../default_files/infiltration.yml>`,
:download:`solute.yml </default_files/solute.yml>`
Boundary :download:`richards_bc.yml </default_files/richards_bc.yml>`,
:download:`transport_bc.yml </default_files/transport_bc.yml>`
Parameters :download:`richards_param.yml </default_files/richards_param.yml>`,
:download:`transport_param.yml </default_files/transport_param.yml>`
============= ======================================================================
......@@ -117,8 +117,8 @@ function(create_default_config INPUT OUTPUT SOURCE_DIR CSS)
endfunction()
# copy BC & parameter files
file(COPY infiltration.yml
solute.yml
file(COPY richards_bc.yml
transport_bc.yml
richards_param.yml
transport_param.yml
DESTINATION .)
......
......@@ -26,6 +26,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</definition>
<suggestion> richards </suggestion>
<values> richards, richards+transport </values>
<comment> Options: richards, richards+transport </comment>
<versionadded version="unreleased"> </versionadded>
</parameter>
</category>
......@@ -38,7 +39,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
the corresponding grid is to be given. </definition>
<suggestion> rectangular </suggestion>
<values> rectangular, gmsh </values>
<comment> Choose grid type: rectangular, gmsh </comment>
<comment> Options: rectangular, gmsh </comment>
</parameter>
<parameter name="dimensions">
......@@ -168,7 +169,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</definition>
<values> none, waterFlux </values>
<suggestion> none </suggestion>
<comment> none, waterFlux </comment>
<comment> Options: none, waterFlux </comment>
<versionadded version="unreleased"> Replaces ``useAdaptivity``.
</versionadded>
</parameter>
......@@ -191,27 +192,28 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</parameter>
<parameter name="markingStrategy">
<definition> Marking strategy used in order to find the grid cells that should
be refined / coarsened.
<definition> Marking strategy used in order to find the grid cells that
should be refined / coarsened.
**elementFraction**: Of the N elements in the sorted list of local errors, the first
&alpha;N elements are refined while the last &beta;N elements are being coarsened.
* **elementFraction**: Of the N elements in the sorted list of local
errors, the first &alpha;N elements are refined while the last
&beta;N elements are being coarsened.
**errorFraction**: Refine (coarse) as many elements as necessary, such that the
total relative contribution of all refined (coarsened) cells to the
global error is &alpha; (&beta;), starting with the most (least) contributing
element. The total number of affected entities can vary greatly
between different iterations, and (with &alpha; = &beta;) much more elements
are coarsened than refined.
* **errorFraction**: Refine (coarse) as many elements as necessary,
such that the total relative contribution of all refined (coarsened)
cells to the global error is &alpha; (&beta;), starting with the most
(least) contributing element. The total number of affected entities
can vary greatly between different iterations, and (with &alpha; =
&beta;) much more elements are coarsened than refined.
**threshold**: All elements with a local error &eta; &gt; &alpha; are being refined once.
Coarsening occurs for all elements that carry an error smaller
than &beta;.
* **threshold**: All elements with a local error &eta; &gt; &alpha; are
being refined once. Coarsening occurs for all elements that carry an
error smaller than &beta;.
</definition>
<values> elementFraction, errorFraction, threshold </values>
<suggestion> elementFraction </suggestion>
<comment> elementFraction, errorFraction, threshold </comment>
<comment> Options: elementFraction, errorFraction, threshold </comment>
<versionchanged version="unreleased"> Option ``targetTolerance`` removed.
</versionchanged>
</parameter>
......@@ -242,6 +244,8 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<definition> Logging level of the core functions. </definition>
<suggestion> info </suggestion>
<values> trace, debug, info, warning, error, critical </values>
<comment> Options: trace, debug, info, warning, error, critical
</comment>
</parameter>
<versionadded version="unreleased"> </versionadded>
</category>
......
......@@ -40,7 +40,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</definition>
<values> none, binary, exponential </values>
<suggestion> binary </suggestion>
<comment> none, binary, exponential </comment>
<comment> Options: none, binary, exponential </comment>
<versionadded version="unreleased"> </versionadded>
</parameter>
......@@ -122,7 +122,8 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
random field. </definition>
<values> exponential, gaussian, spherical, whiteNoise </values>
<suggestion> gaussian </suggestion>
<comment> exponential, gaussian, spherical, whiteNoise </comment>
<comment> Options: exponential, gaussian, spherical, whiteNoise
</comment>
<versionchanged version="unreleased"> Renamed from
``generator.fft.covariance``. </versionchanged>
</parameter>
......
......@@ -26,13 +26,14 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<parameter name="outputPath">
<definition> Path to the directory where most of the outputs are stored.
DORiE will attempt to create it if it does not exist. </definition>
<suggestion> ./ </suggestion>
<suggestion> output_richards </suggestion>
<values> path </values>
</parameter>
<parameter name="fileName">
<definition> Base file name for VTK output. </definition>
<values> string </values>
<suggestion> output_richards </suggestion>
</parameter>
<parameter name="vertexData">
......@@ -46,9 +47,12 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</parameter>
<parameter name="policy">
<definition> Policy to write the data. </definition>
<definition> Policy when to write the data. ``none`` disables output
for this model.
</definition>
<suggestion> endOfRichardsStep </suggestion>
<values> endOfRichardsStep, none </values>
<comment> Options: endOfRichardsStep, none </comment>
<versionadded version="unreleased"> </versionadded>
</parameter>
......@@ -77,9 +81,9 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<category name="boundary">
<parameter name="file">
<definition> Path to the YAML boundary condition data file.
<suggestion> infiltration.yml </suggestion>
</definition>
<values> path </values>
<suggestion> richards_bc.yml </suggestion>
<versionchanged version="unreleased"> Expects a YAML file now.
</versionchanged>
</parameter>
......@@ -88,11 +92,13 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<category name="initial">
<parameter name="type">
<definition> The data type representing the initial condition. Either an
HDF datafile (``data``), or analytic equations (``analytic``).
HDF datafile (``data``), analytic equations (``analytic``), or a
solution of the stationary flow problem (``stationary``).
</definition>
<values> data, analytic </values>
<values> data, analytic, stationary </values>
<suggestion> analytic </suggestion>
<comment> Choose initial condition type: data, analytic </comment>
<comment> Options: data, analytic, stationary
</comment>
<versionadded version="unreleased"> </versionadded>
</parameter>
......@@ -236,7 +242,8 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</definition>
<values> none, semiUpwind, fullUpwind </values>
<suggestion> none </suggestion>
<comment> Choose upwinding type: 'none', 'semiUpwind', 'fullUpwind'
<comment> Options (recommended for):
none (DG), semiUpwind (DG), fullUpwind (FV)
</comment>
<versionchanged version="unreleased"> Renamed from
``dg.experimental.upwinding``. </versionchanged>
......@@ -254,6 +261,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
* **IIP:** Incomplete Interior Penalty: no symmetry term
</definition>
<values> SIPG, NIPG, OBB, IIP </values>
<comment> Options: SIPG, NIPG, OBB, IIP </comment>
<suggestion> SIPG </suggestion>
<versionchanged version="unreleased"> Renamed from
``dg.experimental.method``. </versionchanged>
......@@ -299,6 +307,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</definition>
<suggestion> none </suggestion>
<values> none, warn, error </values>
<comment> Options: none, warn, error </comment>
<versionadded version="unreleased"> </versionadded>
</parameter>
......
......@@ -25,13 +25,14 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<parameter name="outputPath">
<definition> Path to the directory where most of the outputs are stored.
DORiE will attempt to create it if it does not exist. </definition>
<suggestion> ./ </suggestion>
<suggestion> output_transport </suggestion>
<values> path </values>
</parameter>
<parameter name="fileName">
<definition> Base file name for VTK output. </definition>
<values> string </values>
<suggestion> output_transport </suggestion>
</parameter>
<parameter name="vertexData">
......@@ -46,9 +47,12 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</parameter>
<parameter name="policy">
<definition> Policy to write the data. </definition>
<definition> Policy when to write the data. ``none`` disables output
for this model.
</definition>
<suggestion> endOfRichardsStep </suggestion>
<values> endOfTransportStep, endOfRichardsStep, none </values>
<comment> Options: endOfTransportStep, endOfRichardsStep, none </comment>
</parameter>
<parameter name="writeDispersionTensor">
......@@ -86,9 +90,9 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<category name="boundary">
<parameter name="file">
<definition> Path to the YAML boundary condition data file.
<suggestion> solute.yml </suggestion>
</definition>
<values> path </values>
<suggestion> transport_bc.yml </suggestion>
</parameter>
</category>
......@@ -105,6 +109,8 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<parameter name="quantity">
<definition> The physical quantity represented by the initial condition
data.
* ``soluteConcentration``: Solute concentration in the water phase.
</definition>
<values> soluteConcentration </values>
<suggestion> soluteConcentration </suggestion>
......@@ -203,6 +209,8 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
``explicit_euler`` is a explicit method.
</definition>
<values> explicit_euler, implicit_euler, alex2 </values>
<comment> Options: explicit_euler, implicit_euler, alex2 (implicit)
</comment>
<suggestion> alex2 </suggestion>
</parameter>
......@@ -249,6 +257,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
* **IIP:** Incomplete Interior Penalty: no symmetry term
</definition>
<values> SIPG, NIPG, OBB, IIP </values>
<comment> Options: SIPG, NIPG, OBB, IIP </comment>
<suggestion> SIPG </suggestion>
</parameter>
......@@ -284,6 +293,7 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
quality of the flux reconstruction.
</definition>
<suggestion> none </suggestion>
<comment> Options: none, warn, error </comment>
<values> none, warn, error </values>
</parameter>
......@@ -302,10 +312,10 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<definition> Check for negative solute concentrations in the computed
solution.
* ``pass``: Passes silently when negative values are encountered.
* ``pass``: Pass silently when negative values are encountered.
* ``warn``: Issues a warning when finding negative values, but
continues the computation.
* ``warn``: Issue a warning when finding negative values, but
continue the computation.
* ``retry``: Discard the computed solution, and repeat it with a
reduced time step size according to the ``transport.time`` settings.
......@@ -313,7 +323,6 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
<suggestion> retry </suggestion>
<values> pass, warn, retry </values>
<comment> Choose handling: pass, warn, retry </comment>
<versionadded version="unreleased"> </versionadded>
</parameter>
<parameter name="negativeTol">
......@@ -323,7 +332,6 @@ A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
</definition>
<values> float &gt; 0 </values>
<suggestion> 1E-6 </suggestion>
<versionadded version="unreleased"> </versionadded>
</parameter>
</category>
......
......@@ -27,8 +27,8 @@ Templates for the required files can conveniently be generated with the
| :ref:`Parameterization Data File | :file:`.yml` | Specifies the soil and solute | :download:`richards_param.yml </default_files/richards_param.yml>`, |
| <man-parameter_file>` | | parameterization type(s) and parameters. | :download:`transport_param.yml </default_files/transport_param.yml>` |
+----------------------------------------+----------------+------------------------------------------+----------------------------------------------------------------------+
| :doc:`Boundary Condition Data File | :file:`.yml` | Specifies the boundary segmentation and | :download:`infiltration.yml </default_files/infiltration.yml>`, |
| </manual/bcfile>` | | the boundary conditions. | :download:`solute.yml </default_files/solute.yml>` |
| :doc:`Boundary Condition Data File | :file:`.yml` | Specifies the boundary segmentation and | :download:`richards_bc.yml </default_files/richards_bc.yml>`, |
| </manual/bcfile>` | | the boundary conditions. | :download:`transport_bc.yml </default_files/transport_bc.yml>` |
+----------------------------------------+----------------+------------------------------------------+----------------------------------------------------------------------+
| :ref:`GMSH Mesh File | :file:`.gmsh` | Mesh with possibly complicated geometry | --- |
| <man-grid_gmsh>` (optional) | | to build an unstructured grid from. | |
......
......@@ -207,14 +207,14 @@ are impermeable. The ``horizontal_projection`` parameter ensures that the given
value is the rainfall per unit area in case the surface is tilted or
irregularly shaped.
.. literalinclude:: ../default_files/infiltration.yml
.. literalinclude:: ../default_files/richards_bc.yml
:language: yaml
The default boundary condition file for the Transport model yields a constant
concentration of solute at the upper boundary, similar to a homogeneous tracer
in the fluid. All other boundaries employ outflow conditions.
.. literalinclude:: ../default_files/solute.yml
.. literalinclude:: ../default_files/transport_bc.yml
:language: yaml
.. _YAML: https://gettaurus.org/docs/YAMLTutorial/
......@@ -78,8 +78,8 @@ def run(args):
def create(args):
for f in ("config.ini",
"parfield.ini",
"infiltration.yml",
"solute.yml",
"richards_bc.yml",
"transport_bc.yml",
"richards_param.yml",
"transport_param.yml"):
newfile = os.path.join(os.getcwd(),f)
......
......@@ -30,7 +30,8 @@ def write(parameters,out,*args,**kwargs):
with open(out,"w") as f:
f.write("# Parameter file created by the DORiE parameter scraper\n")
f.write("# {0:%Y-%m-%d, %H:%M}\n\n".format(datetime.datetime.today()))
f.write("# Make sure to at least define all parameters marked with 'UNDEFINED'\n\n")
f.write("# Consult the \"Configuration File Guide\" in the User Manual"
"\n# for more information on the settings in this file\n\n")
for category in parameters:
f.write("\n[{0}]\n".format(category))
for p in parameters[category]:
......@@ -42,4 +43,4 @@ def write(parameters,out,*args,**kwargs):
if p.suggestion:
f.write("{0} = {1}\n".format(p.key,p.suggestion))
else:
f.write("{0} = UNDEFINED\n".format(p.key))
f.write("{0} = NONE\n".format(p.key))
......@@ -44,15 +44,17 @@ add_custom_target(test_run_parallel
add_dependencies(test_run_parallel prepare_testing)
# dorie exec tests
dorie_add_metaini_test(TARGET dorie_test METAINI create.mini.in)
dorie_add_metaini_test(TARGET dorie_test METAINI pfg.mini.in)
dorie_add_metaini_test(TARGET dorie_test METAINI run.mini.in)
set_tests_properties(dorie_test_exec_create PROPERTIES FIXTURES_SETUP dorie_create)
set_tests_properties(dorie_test_exec_run PROPERTIES FIXTURES_REQUIRED dorie_create)
dorie_add_metaini_test(TARGET dorie_test METAINI plot.mini.in)
set_tests_properties(dorie_test_exec_run PROPERTIES FIXTURES_SETUP dorie_plot)
set_tests_properties(dorie_test_exec_plot PROPERTIES FIXTURES_REQUIRED dorie_plot)
dorie_add_metaini_test(TARGET dorie_test METAINI create.mini.in)
add_custom_target(test_dorie_exec
COMMAND ctest --output-on-failure --tests-regex ^.+_exec.+$
)
......
......@@ -7,5 +7,5 @@ _evaluation = compare
__refpath = ${CMAKE_BINARY_DIR}/doc/default_files
[_compare]
created_files = richards_param.yml infiltration.yml transport_param.yml solute.yml config.ini parfield.ini
reference_files = {__refpath}/richards_param.yml {__refpath}/infiltration.yml {__refpath}/transport_param.yml {__refpath}/solute.yml {__refpath}/config.ini {__refpath}/parfield.ini
created_files = richards_param.yml richards_bc.yml transport_param.yml transport_bc.yml config.ini parfield.ini
reference_files = {__refpath}/richards_param.yml {__refpath}/richards_bc.yml {__refpath}/transport_param.yml {__refpath}/transport_bc.yml {__refpath}/config.ini {__refpath}/parfield.ini
__name = exec_plot
_test_command = plot
_test_target = run.pvd
_test_target = output_richards.pvd
......@@ -2,25 +2,10 @@ include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
__name = exec_run
_test_command = run
_asset_path = "${CMAKE_CURRENT_LIST_DIR}"
grid.dimensions = 2
grid.initialLevel = 0
grid.gridType = rectangular
grid.cells = 20 20
grid.extensions = 1 1
[richards]
output.fileName = run | unique name
output.outputPath = run | unique name
boundary.file = "{_asset_path}/bcs/infiltration.yml"
parameters.file = "{_asset_path}/param/richards_param.yml"
time.end = 1E4
time.maxTimestep = 1E4
time.startTimestep = 5E2
numerics.FEorder = 2
time.end = 1E2
time.maxTimestep = 1E2
time.startTimestep = 1E2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment