Iota User Manual
  • Introduction
  • Installing Iota
  • Registering Iota license
  • Getting started
  • Simulation Data Interfaces
    • Support ANSYS Fluent simulations
    • Support EDEM simulations
    • Support LIGGGHTS simulations
      • LIGGGHTS-DUMP
      • LIGGGHTS-VTK
  • Iota Python Reference Library
    • iota.dataset
    • iota.graph
    • iota.render
    • iota.media
    • iota.coarsegraining
    • iota.mesh
  • Licensing
    • Iota-Suite End User Agreement
    • Third Party Licenses
      • Assimp License (BSD)
      • Boost Software License v1.0
      • Boost Software License v1.0
      • Eigen License (MPL2)
      • HDF5 License
      • Netgen License (GNU LGPL 2.0)
      • PSF License for Python3.5
      • Zlib License
      • Plotly License (MIT)
      • Peewee License (MIT)
      • Hug License (MIT)
      • Anaconda License (BSD)
      • FFmpeg License (GNU LGPL 2.1)
      • STB License (MIT)
      • FreeType2 License
      • Libpng License
      • GLFW License (ZLIB)
      • GLEW License
      • NumPy License
      • Pythreejs License
      • Jupyter License
Powered by GitBook
On this page
  • class CoarseGraining
  • Attributes
  • Methods

Was this helpful?

  1. Iota Python Reference Library

iota.coarsegraining

Previousiota.mediaNextiota.mesh

Last updated 5 years ago

Was this helpful?

Description

This module provides functionalities to transform the discrete data from particle based simulations (e.g DPM, DEM) into continuum data.

CoarseGraining class object. This object contains the settings, the output and the run methods for a coarse-graining analysis.

Parameters

  • file: (str) path and name to a coarse-graining settings file (Default: None)

  • settings: (dict) coarse-graining settings given as a dictionary (Default: None)

  • dataset : () a dataset object to be used as input dataset for the coarse-graining analysis. If provided, it overwrites the input dataset of the coarse-graining settings (Default: None)

Examples

Creating a CoarseGraining object with default settings

my_cg = iota.coarse_graining.CoarseGraining()

Creating a CoarseGraining object based on the settings in an existing coarse-graining settings file

my_cg = iota.coarse_graining.CoarseGraining(file='C:/Users/Stephe/CGSettings/my_cg_settings.json')

Creating a CoarseGraining object given on an existing settings dictionary

my_new_cg = iota.coarse_graining.CoarseGraining(settings=my_cg.settings)

Creating a CoarseGraining object with default settings and an existing dataset object as the input dataset

my_cg = iota.coarse_graining.CoarseGraining(dataset=my_dataset)

Creating a CoarseGraining object based on the settings in an existing coarse-graining settings file and using an existing dataset object as the input dataset

my_cg = iota.coarse_graining.CoarseGraining(file='C:/Users/Stephe/CGSettings/my_cg_settings.json', dataset=my_dataset)

Creating a CoarseGraining object given on an existing settings dictionary and using an existing dataset object as the input dataset

my_new_cg = iota.coarse_graining.CoarseGraining(settings=my_cg.settings, dataset=my_dataset)

Attributes

Get the coarse-graining settings that the user explicitly has set

Returns

  • A dictionary with the settings explicitly set by the user

Example

Getting the settings of a coarse-graining object

my_cg_settings = my_cg.settings
print(my_cg_settings)

Methods

Get the default coarse-graining settings

Returns

  • A dictionary with the default coarse-graining settings

Example

Getting the default settings of a coarse-graining object

default_cg_settings = my_cg.settings_default()
print(default_cg_settings)

Get the complete coarse-graining settings that result from merging the settings explicitly set by the user and the default settings

Returns

  • A dictionary with the complete coarse-graining settings of the CoarseGraining object

Example

Getting the complete settings of a CoarseGraining object

cg_settings = my_cg.settings_merged()
print(cg_settings)

Run coarse-graining transformation based on the settings of the CoarseGraining object

Example

Running the coarse-graining transformation for the CoarseGraining object

cg_settings.run()

Get the dataset object that corresponds to the coarse-graining dataset generated after running the coarse-graining transformation

Return

Example

Getting the coarse-graining dataset generated after running coarse-graining transformation

my_cg.run()
my_cg_dataset = my_cg.output_dataset()

Get a list that contains the graphs object that may have been generated as result of the coarse-graining transformation

Return

Example

Getting the list of graph objects generated after running coarse-graining transformation

my_cg.run()
my_cg_graphs = my_cg.output_graphs()
my_cg_graphs[0].display()

Get the dataset object that corresponds to the padem dataset that may have been generated after running the coarse-graining transformation. The padem dataset would contain the raw data of the particle based simulation in Particle Analytics format

Return

Example

Getting the padem dataset generated after running coarse-graining transformation

my_cg.run()
my_padem_dataset = my_cg.output_padem()

Parameters

  • file: (str) path and name for the file where the settings will be exported to.

  • merged: (bool) if True, the complete coarse-graining settings are exported, i.e., the settings resulting of merging the user settings and the default ones. If False, only the user settings are exported (Default: False)

Example

Exporting the coarse-graining settings set by the user to a file

my_cg.export(file='C:/Users/Stephen/CGsettings/my_cg_settings.json')

Exporting the complete coarse-graining settings to a file

my_cg.export(file='C:/Users/Stephen/CGsettings/my_cg_settings.json', merged=True)

A object that corresponds to the coarse-graining dataset

A list of objects that correspond to the graphs generated by the coarse-graining transformation

A object that corresponds to the padem dataset

Export the settings of a given CoarseGraining object to file in format

json
CoarseGraining.settings
CoarseGraining.settings_default()
CoarseGraining.settings_merged()
CoarseGraining.run()
CoarseGraining.output_dataset()
CoarseGraining.output_graphs()
CoarseGraining.output_padem()
CoarseGraining.export_settings(file, merged)
CoarseGraining
settings
settings_default
settings_merged
run
output_dataset
output_graphs
output_padem
export_settings
class CoarseGraining
iota.coarse_graining.CoarseGraining(file, settings, dataset)
iota.dataset.Dataset
iota.dataset.Dataset
iota.dataset.Dataset
iota.graph.Graph