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.2-2-cp314-cp314-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.14Windows x86-64

kratoshdf5application-10.4.2-2-cp314-cp314-manylinux_2_34_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.13Windows x86-64

kratoshdf5application-10.4.2-2-cp313-cp313-manylinux_2_34_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.12Windows x86-64

kratoshdf5application-10.4.2-2-cp312-cp312-manylinux_2_34_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.11Windows x86-64

kratoshdf5application-10.4.2-2-cp311-cp311-manylinux_2_34_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.10Windows x86-64

kratoshdf5application-10.4.2-2-cp310-cp310-manylinux_2_34_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.9Windows x86-64

kratoshdf5application-10.4.2-2-cp39-cp39-manylinux_2_34_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.8Windows x86-64

kratoshdf5application-10.4.2-2-cp38-cp38-manylinux_2_34_x86_64.whl (25.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

File details

Details for the file kratoshdf5application-10.4.2-2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ac6f553809b63c93cad609a305f3e61778d2193649b8bda26b57eedde4278845
MD5 c5ca525d0f4ac7ffb3fb9d26b6af2c29
BLAKE2b-256 6abfada996ef2b70cf52849166988998fd2536afc61f769773b1be677d786dcd

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 33aed21cc754d0dcc001fab1a2604ba1dddb631e6e95dfc4e244a1419880aa4e
MD5 4ffe02ef08dbfce02ca277bea3ffbfa3
BLAKE2b-256 3377c779f91ddb586acb41500daef16d6f614e98b5fe0a6d97ac1a3e06a6d7b2

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d2f57a347c0eee8a9d442c060326c9b99e70f9a7c15094b65c7e9fece95871fd
MD5 e8fd9beb8873165e426970e2fefd0605
BLAKE2b-256 fc9039ba12b8d77725f404b167853bc82bc91fec0ab8ed78e618f7b1aecebfbb

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3e249415cce569f78ab236ea8aa1a1451470542238f12bbb74b97c27ad4d71d6
MD5 f3de500b7231a539149a0329e319e0ee
BLAKE2b-256 d7ddff0ac6ac4659aa01c67ef047dbc4293f33a76b07d79dfffb7dd906168942

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 31fe662478ed09e27ed4b641dff00d2285403614dad0f10738c289e4596716bc
MD5 8a0ae4ff100a07c7878b7a8f45165eed
BLAKE2b-256 a2dadff79dad24a8810204fba2ef4f6db84a658f4cae618dcb352dcb50d17355

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 abb51c6f67ab1b4afeaf3a17740e483776feb019c0f11a8c25e51157c1414a50
MD5 418a79ca09738ff5d42b244c54a6b60b
BLAKE2b-256 3307cd5a00bcc76bb9341d932fa203885d2f3d6202985552feaa4332ef0c1446

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e9321e60de80764c4e6418fcb5f4763c0f1396ae506daeb88a628011bf7de211
MD5 c120334d93c692babca75a7ef16e4833
BLAKE2b-256 d49c86ddc3234fb59bb8a663f0c187f53e832d901d7aeddfcf2a705f57595347

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 25d7112b084542725a2d56d1032148c8f4522dad345a6258719cc7721e2a4999
MD5 9aa873bd68a3b4579951a8018caabf7f
BLAKE2b-256 f9e4f037ec76bca866eabf9cbac375d26dd0e2c7af5fdc4fc2e933567ce2bd24

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 79af2e98124b145d0510b321275b891bcdf46703222c1d32b22f8634957ed51a
MD5 4ed3afefd467ac4e554c15564e67527c
BLAKE2b-256 daf894084b70bb70521fe91caa1aa40dc34efcc3725bc46ffea50383e99bc6da

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 047399687be8aab1fae0375dc6086eb4ca289916dd6ea76c195a488ccf928487
MD5 7edf78a6daa4f42b8bf74a7d518a5b48
BLAKE2b-256 f1830cd4d9428e77612fb8b42aad176185691eb635d4e335bffda27fa0c2ce58

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5173c240fd33c483b707beb3c7be6333662fa6828983482fe99d2ce19235bc25
MD5 ed627354cbc5ad110cc38551b0c500d8
BLAKE2b-256 14e37833b4fcea2f9a81bc679db9c49edd800895c392c534d299ab0736851f3b

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0de467517b4b51b99ed81539396aaa652d84106a77d9f0763c5457d4bc769cdb
MD5 fd1b4740627196d0387b8ecaa42995de
BLAKE2b-256 ae24e9961cbf42bb17d9388ccd2aae554e8deecef3ed3519b6d276de0f6a7419

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a583c333cddeebf02afe16467f2404aeea9b54849308fef6d6b239b3096881d2
MD5 b9a8244cef7283dd215236e55bfa5d74
BLAKE2b-256 081cdf83e690b3ddcc5caeb1f90d9f737a16294ca551537ac5517c8932e80d9d

See more details on using hashes here.

File details

Details for the file kratoshdf5application-10.4.2-2-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kratoshdf5application-10.4.2-2-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 316c588bcb9c6bb0d7ac7dc4aea7fd9cebd358673e25e3024e9f9aa4d8fcd87e
MD5 127d7cc3489162fe54c59338ba3e4f57
BLAKE2b-256 c65499d96e979aae00f41acbe65907053ad46af3726c91d01c62f0650ead4562

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