OGSTools 0.x Release Notes#

Breaking changes#

API breaking changes#

Deprecations#

Removed Modules#

Examples#

Changes (non API-breaking)#

Bugfixes#

  • the python files next to the python script (<python_script>) are now saved with it, so a Python BC script run by Model.run() can import them.

  • plot.contourf failed to plot a variable on celldata with a mask, but is now able to.

  • Material.get_property warns only once that it is deprecated (!510).

  • Model.save writes only the meshes that the model uses. Before, it linked the whole folder of the meshes, also with unrelated files (!518).

  • Result.save with overwrite=True replaces an existing link instead of raising FileExistsError (!518).

  • ogsmonitor logs LogFileHandler messages through the ogstools.logparser logger instead of printing them (!510).

  • Masking a variable no longer writes NaN into the mesh data.

  • Eigenvalues and eigenvectors of masked tensors are NaN instead of raising an error or giving wrong values.

  • fixed ot.mesh.read for a symbolic link to a file without extension; the reader is now chosen by the extension of the link name (!520).

  • the logparser reads the end messages of current OGS versions: OGS completed on, Simulation aborted on … Received signal, and OGS terminated on … One of the tests failed. Simulation failed gives a SimulationExecutionTimeFailed record, and the live monitor reports it as terminated with error. SimulationAbort records now carry mpi_process (!520).

  • MeshSeries.probe_values with a list of data names works with pyvista 0.49 (!521).

  • Variable.transform works with pint 0.26 for units with an offset, such as °C**2 of a temperature variance (!521).

  • Vector plots with vtk 9.7 draw no arrow outside the mesh (!521).

  • MeshSeries reads XDMF files that meshio wrote. Their xi:include elements use an xpointer() XPath, which raised a ReadError (!457).

  • MeshSeries reads a PVD or XDMF file through a symlink, as StorageBase.link creates it. It looked for the data files next to the symlink instead of next to its target (!457).

  • XDMF point data keeps its integer type instead of being cast to float (!457).

  • MeshSeries.save("x.pvd") of a series read from XDMF writes one VTU file per time step, and a dry run returns the files the save writes (!457).

  • MeshSeries.save("x.pvd", deep=False) raises a ValueError for a series that was changed after reading or not read from PVD. It wrote a PVD file that referenced VTU files that do not exist (!457).

  • With StorageBase.Backup, overwriting a .pvd or .xdmf file backs up its VTU or HDF5 files too, not only the PVD or XDMF file (!457).

  • model.save will now recognize, if the domain mesh needs ID mapping and passes the include_domain flag to Meshes.identify_subdomain (!531).

  • If the domain mesh already contains an ID mapping prior to Meshes.identify_subdomain, it will be also included for recomputation automatically (otherwise a modified domain mesh might include a faulty mapping and wouldn’t get updated before) (!531)

Features#

  • logparser.end_state reads from an OGS log how the run ended: EndState.COMPLETED, FAILED (in the time loop), ERROR, ABORTED (by a signal) or NO_END (!520).

  • variable aggregations over a meshseries can now be plotted directly e.g.: fig = ot.plot.contourf(meshseries, ot.variables.temperature.max)

  • output names of variables aggregations have changed:

    • temperature_{max|min|mean|median} -> {max|min|mean|median}_temperature

    • temperature_std -> temperature_standard_deviation

    • temperature_var -> temperature_variance

  • variables now have methods for derivatives (gradient, divergence, vorticity, qcriterion) which can be computed or plotted on the fly.

  • meshseries now has a setitem method to set either data (ms["new_data"] = ...) or a mesh (ms[-1] = ... -> overwrites the last timestep)

  • MeshSeries.probe_values now accepts integer ids in addition to coordinates and probes these very fast for Meshseries read from xdmf-files

  • MeshSeries.extract and MeshSeries.transform now can now detach the originally read file to ensure consistency.

  • added Variable.convert_stress(to=..., biot=..., bishop=..., pressure=...) to give a modified Variable, which converts between total and effective stress before evaluation of any other stored functions. Biot’s and Bishop’s coefficient can each be a constant or the name of a data field (cell data, e.g. from a material property, is interpolated to the points).

  • variables.dilatancy_critescu and variables.dilatancy_alkan now assume effective stress and no longer read “pressure”, so they behave the same as variables.dilatancy_critescu_eff and variables.dilatancy_alkan_eff as calculating from effective stress is the default for all OGS process (aside from TRM). For total stress input use e.g. <variable>.convert_stress(to="effective", ...).

  • added variables.fluid_pressure_criterion_clay (== variables.fluid_pressure_criterion) and variables.fluid_pressure_criterion_salt

  • The integrity criteria are masked by the field variables.INTEGRITY_MASK (“host_rock”) instead of “displacement_active”.

  • ogs6py

    • added Project.convert_to_staggered (ogstools.ogs6py.staggered), which converts a monolithic HT, HYDRO_MECHANICS, RICHARDS_MECHANICS, THERMO_HYDRO_MECHANICS or THERMO_MECHANICS project to the staggered scheme: one time loop process per process variable, with the monolithic convergence criterion split by components and own copies of the nonlinear and linear solvers. (!514)

  • MeshSeries.save("x.xdmf") writes the series as XDMF, with all time steps in one HDF5 file x.h5. Read it back with MeshSeries("x.xdmf"). With deep=False, a series read from XDMF gets only an XDMF file that references its HDF5 data. A .pvd target, no target and save(id=...) still write PVD and VTU files. Data that is not a number, such as text, raises a ValueError; save it as .pvd. Any other suffix raises a RuntimeError before anything is written (!457).

Infrastructure#

  • pytest-mpl moved from the dependencies to the test extra, so installing ogstools no longer installs pytest.

  • gmsh is limited to <5. gmsh 5 writes MSH 4.2 by default, and meshio 5.3.5 cannot read it (!520).

Documentation#

New Examples#

  • Evaluation of mechanical integrity criteria

Updated Examples#

  • “Stress analysis” no longer has section for integrity criteria as they now have their own example.

  • “Variable presets and data transformation” now explains a bit better how derived Variables work

Tests#

Imports#

Maintainer TODOs#

next sub release#

next main release#

  • MeshSeries.save with a suffix other than .pvd or .xdmf: raise a ValueError instead of a RuntimeError (!457).