Skip to main content

KRATOS Multiphysics ("Kratos") is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.

Project description

HDF5Application

The HDF5Application enables the serialization of a model part with or without MPI using the HDF5 library. The model part is stored in and HDF5 file, which can be used for:

  • Viewing a model part with HDFVIEW
  • Scientific visualization with tools supporting XDMF. Tools, which are known to work, include ParaView 5.4 and VisIt.
  • Checkpointing (under development).
  • Re-partitioning (not supported yet).

Installing HDF5 (minimum version 1.8)

The HDF5 C libraries are used with the HDF5Application. If Kratos is configured with MPI then the parallel HDF5 library must be installed. Otherwise, the serial HDF5 library is used.

Serial HDF5 Library

Ubuntu

    sudo apt-get install libhdf5-dev

Parallel HDF5 Library

Ubuntu

    sudo apt-get install libhdf5-openmpi-dev

Build Instructions

  1. Install serial or parallel HDF5 library

  2. Configure Kratos to build the HDF5Application (following the standard instructions)

    • For GNU/Linux:
    add_app ${KRATOS_APP_DIR}/HDF5Application
    
    • For Windows:
    CALL :add_app %KRATOS_APP_DIR%\HDF5Application;
    
  3. Build Kratos

Installing h5py

This package is needed to use some of the python-files, e.g. xdmf_utils.py

    sudo apt-get install python-h5py / python3-h5py

Note

The minimum version for the GCC compiler is 4.9. This is because earlier version don't fully support regular expressions.

Kratos processes

There are few available HDF5 processes which can be integrated into work flow via ProjectParameters.json file.

Initialization from hdf5 process

This process can be used to initialize a given model part using existing HDF5 files. Illustrated example reads in VELOCITY and PRESSURE variables from "hdf5_output/example_initialization_file.h5" file to nodal historical data value container, and nodal, elemental and condition non-historical data value containers. This process also can read FLAGS from HDF5 file and populate model part accordingly.

For the list_of_variables in either nodal_data_value_settings, element_data_value_settings, condition_data_value_settings one can specify ALL_VARIABLES_FROM_FILE which will read all the variables available in the input hdf5 file and will populate the model part accordingly. This ALL_VARIABLES_FROM_FILE should be used alone (There can be only this entry in the list if it is used).

            {
                "kratos_module": "KratosMultiphysics.HDF5Application",
                "python_module": "initialization_from_hdf5_process",
                "Parameters": {
                    "model_part_name": "MainModelPart",
                    "file_settings": {
                        "file_name": "hdf5_output/example_initialization_file.h5",
                        "echo_level": 1
                    },
                    "nodal_solution_step_data_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_data_value_settings": {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "element_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "condition_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_flag_value_settings": {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "element_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "condition_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    }
                }
            }

Single mesh temporal input process

This process is used to initialize model part variables at each time step from hdf5 files. You can specify the list of hdf5 files to read from by changing the "file_name" with tags <time> as shown in following example. If no <time> tag is present in "file_name", then same file will be read at each time step and the variables specified will be initialized. In this process, mesh is only read from the initial time step file. Results for each container will be read from time series h5 files.

For the list_of_variables in either nodal_data_value_settings, element_data_value_settings, condition_data_value_settings one can specify ALL_VARIABLES_FROM_FILE which will read all the variables available in the input hdf5 file and will populate the model part accordingly. This ALL_VARIABLES_FROM_FILE should be used alone (There can be only this entry in the list if it is used).

            {
                "kratos_module": "KratosMultiphysics.HDF5Application",
                "python_module": "single_mesh_temporal_input_process",
                "Parameters": {
                    "model_part_name": "MainModelPart",
                    "file_settings": {
                        "file_name": "hdf5_output/<model_part_name>-<time>.h5",
                        "time_format": "0.4f",
                        "echo_level": 1
                    },
                    "nodal_solution_step_data_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_data_value_settings": {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "element_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "condition_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_flag_value_settings": {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "element_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "condition_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    }
                }
            }

Single mesh temporal output process

This process can be used to output data from model parts to HDF5. This will write mesh only in the first time step h5 file. Rest of the time series h5 files will contain only results for each nodal/element/condition containers.

For the list_of_variables in nodal_solution_step_data_settings, one can specify ALL_VARIABLES_FROM_VARIABLES_LIST as the only item (Then this list should only have that entry) so it will write all the variables in the corresponding model's solution step variable list.

            {
                "kratos_module": "KratosMultiphysics.HDF5Application",
                "python_module": "single_mesh_temporal_output_process",
                "Parameters": {
                    "model_part_name": "MainModelPart",
                    "file_settings": {
                        "file_name": "hdf5_output/<model_part_name>-<time>.h5",
                        "time_format": "0.4f",
                        "max_files_to_keep": "unlimited",
                        "echo_level": 1
                    },
                    "output_time_settings": {
                        "step_frequency": 1,
                        "time_frequency": 1.0
                    },
                    "nodal_solution_step_data_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_data_value_settings": {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "element_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "element_gauss_point_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "condition_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "condition_gauss_point_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_flag_value_settings": {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "element_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "condition_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    }
                }
            }

Multiple mesh temporal output process

This process is used to output model part variable data to HDF5 with mesh written for each time step. This is useful in the case if required to write down deformed mesh in each time step.

For the list_of_variables in nodal_solution_step_data_settings, one can specify ALL_VARIABLES_FROM_VARIABLES_LIST as the only item (Then this list should only have that entry) so it will write all the variables in the corresponding model's solution step variable list.

            {
                "kratos_module": "KratosMultiphysics.HDF5Application",
                "python_module": "multiple_mesh_temporal_output_process",
                "Parameters": {
                    "model_part_name": "MainModelPart",
                    "file_settings": {
                        "file_name": "hdf5_output/<model_part_name>-<time>.h5",
                        "time_format": "0.4f",
                        "max_files_to_keep": "unlimited",
                        "echo_level": 1
                    },
                    "output_time_settings": {
                        "step_frequency": 1,
                        "time_frequency": 1.0
                    },
                    "model_part_output_settings": {
                        "prefix": "/ModelData"
                    },
                    "nodal_solution_step_data_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_data_value_settings": {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "element_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "element_gauss_point_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "condition_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "condition_gauss_point_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_flag_value_settings": {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "element_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "condition_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    }
                }
            }

Single mesh xdmf output process for Paraview

This process outputs model part variable data for each time step, additionally it writes down the XDMF file after each time step which is required to visualize HDF5 data in paraview. This process requires h5py to be installed in the python version (which is compiled with Kratos Multiphysics)

For the list_of_variables in nodal_solution_step_data_settings, one can specify ALL_VARIABLES_FROM_VARIABLES_LIST as the only item (Then this list should only have that entry) so it will write all the variables in the corresponding model's solution step variable list.

            {
                "kratos_module": "KratosMultiphysics.HDF5Application",
                "python_module": "single_mesh_xdmf_output_process",
                "Parameters": {
                    "model_part_name": "MainModelPart",
                    "file_settings": {
                        "file_name": "hdf5_output/<model_part_name>-<time>.h5",
                        "time_format": "0.4f",
                        "max_files_to_keep": "unlimited",
                        "echo_level": 1
                    },
                    "output_time_settings": {
                        "step_frequency": 1,
                        "time_frequency": 1.0
                    },
                    "model_part_output_settings": {
                        "prefix": "/ModelData"
                    },
                    "nodal_solution_step_data_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_data_value_settings": {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "element_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "condition_data_value_settings" : {
                        "list_of_variables": [
                            "VELOCITY",
                            "PRESSURE"
                        ]
                    },
                    "nodal_flag_value_settings": {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "element_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    },
                    "condition_flag_value_settings" : {
                        "list_of_variables": [
                            "SLIP"
                        ]
                    }
                }
            }

User defined I/O process

Users can build their own I/O processes by using components of HDF5 application. Following is such example. This example writes model part, and DISPLACEMENT values for each time step at finalize_solution_step

            {
                "kratos_module": "KratosMultiphysics.HDF5Application",
                "python_module": "user_defined_io_process",
                "Parameters": {
                    "model_part_name": "MainModelPart",
                    "process_step": "finalize_solution_step",
                    "controller_settings": {
                        "controller_type": "temporal_controller",
                        "time_frequency": 0.5
                    },
                    "io_settings": {
                        "file_name": "results/<model_part_name>-<time>.h5"
                    },
                    "list_of_operations": [
                        {
                            "operation_type": "model_part_output"
                        },
                        {
                            "operation_type": "nodal_solution_step_data_output",
                            "list_of_variables": ["DISPLACEMENT"]
                        }
                    ]
                }
            }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

kratoshdf5application-10.4.3-cp314-cp314-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.14Windows x86-64

kratoshdf5application-10.4.3-cp314-cp314-manylinux_2_28_x86_64.whl (25.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

kratoshdf5application-10.4.3-cp313-cp313-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.13Windows x86-64

kratoshdf5application-10.4.3-cp313-cp313-manylinux_2_28_x86_64.whl (25.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

kratoshdf5application-10.4.3-cp312-cp312-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.12Windows x86-64

kratoshdf5application-10.4.3-cp312-cp312-manylinux_2_28_x86_64.whl (25.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

kratoshdf5application-10.4.3-cp311-cp311-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.11Windows x86-64

kratoshdf5application-10.4.3-cp311-cp311-manylinux_2_28_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

kratoshdf5application-10.4.3-cp310-cp310-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.10Windows x86-64

kratoshdf5application-10.4.3-cp310-cp310-manylinux_2_28_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

kratoshdf5application-10.4.3-cp39-cp39-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.9Windows x86-64

kratoshdf5application-10.4.3-cp39-cp39-manylinux_2_28_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

kratoshdf5application-10.4.3-cp38-cp38-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.8Windows x86-64

kratoshdf5application-10.4.3-cp38-cp38-manylinux_2_28_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

File details

Details for the file kratoshdf5application-10.4.3-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 41b719202d1014c860e99971edece469d0ccc6d996f7610a29e68409b812860a
MD5 d9a7e65aae0ecdf70da5c279804c7ea7
BLAKE2b-256 ca5e539625f81beb5b8417149cdabe59aa59ca8c85abc6d7ce341dbbcdc9ba49

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 84c7ccb0f00f8f62692db85a6e57e69c4c65f1cf9b87e7831b79f830272deb30
MD5 9698727cad75fb51e4f48f03d7234d2f
BLAKE2b-256 15048489aa126f7e072a0d4e1b97bd48d0912cca40bef389ecb7a4c6ee46cb00

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a788b39f4155e2ad85f77b11c6d8f1dbae9a6297d3d0ff1f7a3b410e8d63d1a3
MD5 e0b687c75cda7d43cb461a645ab4e44a
BLAKE2b-256 7c7fa7e0f1511ad5e2b89b08e18808df8c80f182e70f9fd1f41d11cb74ab78fd

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e06b2eb37bb9b33a6b287d1d2141a8b2cc79e6588869d752d1321499b4b1d674
MD5 b4766280965086370d3d34e9edd67b89
BLAKE2b-256 17f185d2c6a6d1ffba23453d585f945fea415d2c37f93bb666087a15838d6248

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 50016c4a595f63a9d8aa645e406d6f1689c3be4409030f1bd4c0ea80944929ef
MD5 10d85576eba7ff974f3960c9ccc6f69d
BLAKE2b-256 41cdcc864fa768ec5fdca3c21fb32a5eca957d8d0436d938ba034e0b56a03c20

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 43c9bb82aa63f6b9b47722fea74f8f5a1cb5ba6d385fc742b80cd38009d026b5
MD5 ddbe03d1d33f5b1867e774b12f4f2f1c
BLAKE2b-256 9b952dc199fc3e621176e475f92bdfe645d69ca553b4c0f1a156703f9faefaf9

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 489035947cc795df9c2e4b5987957c3cf29b1e1a089e15f90f9859c9adbf58c8
MD5 7316da3d96f3daba5fd5d4bda1db17e7
BLAKE2b-256 9e55f7b260ea79ca5d5f7ab9e5906dbf640d0ca06f5f55cdd5f4fa388989fbbf

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9ab694e050cefc79dd1bda9c33d1fbf99293a2e28bcdf3b31ffcb6bde0fe0088
MD5 c96846369e368a4fe441e2b81e61aaa8
BLAKE2b-256 026eae9a16ed44903ca4e3e05e6df13e77d43f5c7e6efb349b9d27a71d074f2a

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 63d4738c6063a34491ccf545697cc1c46e3c4a439f56e25b39b8e3589ec554a5
MD5 37d131b0aa34fdb22fdeea7868ce130e
BLAKE2b-256 607b2eb37bceb7d2eae608d5940eb32bb0e1ae7f1075d78721654e9746c46f1a

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 da6deb99c8862191323e490704e57fc656609bbd803a7d60ec337def85a0e0b7
MD5 ff3b35127e32306122e8f91afaacc10b
BLAKE2b-256 e7f31bfac07dcb52b83917e797a4c1b41b7848a74814db93065197f01c4ee99f

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 03315a25cea1e31dfa32e842e9cd4f04b0282b97a62473bcb6f2c37ed769809b
MD5 87aec3eacb4d35c9eabeaba07cce6234
BLAKE2b-256 40054cecb4cf3cbd3c53cdebf2d49d6300e12d3fc15f1403ca1af0dbea05b6a2

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 838a83ba75e62b2f122aa21f376c8dc8560e002255dd57978fa0c35c4d448935
MD5 d80f4bbccd6dbb3d745445039733d983
BLAKE2b-256 25532151e44638c7d1d308edd7e3d36adac413ddec85bc2660e176daccbeedfe

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 74f22a833d0b2bc21cd68f75110e0bed3f239dd07cc5a8cdd5658096ba940286
MD5 f18062e8bfb3e197a8352f1a554beba9
BLAKE2b-256 1dbbde76b0771da363be359f685c5dea2a38bca9e982106259c1289667134b3f

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.3-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.3-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 252d51e229ba1240d1fc88d8bce121570826a9a046f284aaa16cc269066e760b
MD5 60b755f5dd0f7c85ddc1957ecf3d3d6b
BLAKE2b-256 4e9457d4e7e0bf3f93e62f6e94f56c656a0e2404c8bff528e6a587f8dfeff2fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page