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 byModel.run()can import them.plot.contourffailed to plot a variable on celldata with a mask, but is now able to.Material.get_propertywarns only once that it is deprecated (!510).Model.savewrites only the meshes that the model uses. Before, it linked the whole folder of the meshes, also with unrelated files (!518).Result.savewithoverwrite=Truereplaces an existing link instead of raisingFileExistsError(!518).ogsmonitorlogsLogFileHandlermessages through theogstools.logparserlogger 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.readfor 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, andOGS terminated on … One of the tests failed.Simulation failedgives aSimulationExecutionTimeFailedrecord, and the live monitor reports it as terminated with error.SimulationAbortrecords now carrympi_process(!520).MeshSeries.probe_valueswith a list of data names works with pyvista 0.49 (!521).Variable.transformworks with pint 0.26 for units with an offset, such as°C**2of a temperature variance (!521).Vector plots with vtk 9.7 draw no arrow outside the mesh (!521).
MeshSeriesreads XDMF files that meshio wrote. Theirxi:includeelements use anxpointer()XPath, which raised aReadError(!457).MeshSeriesreads a PVD or XDMF file through a symlink, asStorageBase.linkcreates 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 aValueErrorfor 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.pvdor.xdmffile backs up its VTU or HDF5 files too, not only the PVD or XDMF file (!457).model.savewill now recognize, if the domain mesh needs ID mapping and passes theinclude_domainflag toMeshes.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_statereads from an OGS log how the run ended:EndState.COMPLETED,FAILED(in the time loop),ERROR,ABORTED(by a signal) orNO_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_valuesnow accepts integer ids in addition to coordinates and probes these very fast for Meshseries read from xdmf-filesMeshSeries.extractandMeshSeries.transformnow 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_critescuandvariables.dilatancy_alkannow assume effective stress and no longer read “pressure”, so they behave the same asvariables.dilatancy_critescu_effandvariables.dilatancy_alkan_effas 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) andvariables.fluid_pressure_criterion_saltThe 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 filex.h5. Read it back withMeshSeries("x.xdmf"). Withdeep=False, a series read from XDMF gets only an XDMF file that references its HDF5 data. A.pvdtarget, no target andsave(id=...)still write PVD and VTU files. Data that is not a number, such as text, raises aValueError; save it as.pvd. Any other suffix raises aRuntimeErrorbefore anything is written (!457).
Infrastructure#
pytest-mplmoved from the dependencies to thetestextra, so installing ogstools no longer installs pytest.gmshis limited to<5. gmsh 5 writes MSH 4.2 by default, andmeshio5.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.savewith a suffix other than.pvdor.xdmf: raise aValueErrorinstead of aRuntimeError(!457).