Skip to main content

Python generic module to visualize simulation geometries and results.

Project description

Scivianna: SCIentific VIsualizer for simulAtioN aNAlysis

Scivianna is an open-source Python simulation geometry and result visualizer based on Holoviz Panel. It provides a powerful and flexible environment for visualizing 1D plots and 2D geometries simultaneously, with support for real-time simulation result visualization through code coupling.

Quick Start

Basic Usage

from scivianna.layout.gridstack import GridStackLayout
from scivianna.panel.visualisation_panel import VisualizationPanel
from scivianna.slave import ComputeSlave

# Create a slave with your data interface
slave = ComputeSlave(YourInterface)

# Create a visualization panel
panel = VisualizationPanel(slave, name="My Panel")

# Create a layout and add the panel
layout = GridStackLayout({"panel1": panel})

# Display
layout.show()

Key Features

1. Simultaneous 1D and 2D Visualization

Visualize line plots and 2D geometries together in an integrated dashboard.

2. Real-Time Code Coupling

Connect to simulations in real-time using the C3PO coupling platform and ICOCO interface. The visualizer can receive field updates during simulation execution.

3. Generic Data Interfaces

Scivianna provides flexible interfaces to read various data formats:

  • MED (Salome MED file format)
  • VTK (Visualization Toolkit files)
  • CSV (Structured time-series data)
  • Custom interfaces via GenericInterface base class

4. Remote Server Access

Access the visualizer from a distant computer using Panel's server/client architecture. Perfect for running simulations on HPC clusters while visualizing locally.

5. Extensible Architecture

Extensions can be added to panels for additional functionality:

  • Field selectors
  • Line selection tools
  • File loaders
  • Layout management
  • AI assistant integration

Code Coupling with C3PO

Scivianna integrates with the C3PO coupling tool through the ICOCO interface:

from scivianna.coupling.icoco import LayoutProblem
from scivianna.layout.gridstack import GridStackLayout

# Create your layout
layout = GridStackLayout(panels)

# Create the coupling problem
problem = LayoutProblem(layout, title="Coupled Simulation")

# Use with C3PO
# problem.initialize()
# problem.setInputMEDDoubleField("panel_name@field_name", field_data)

Requirements

  • Python >= 3.8, < 4
  • panel
  • holoviews
  • bokeh / jupyter_bokeh
  • matplotlib
  • numpy / pandas
  • shapely / geopandas
  • rasterio
  • icoco (for coupling features)
  • panel_material_ui

Repository Organization

scivianna/
├── src/
│   └── scivianna/              # Main package source code
│       ├── agent/              # LLM/Agent integration tools
│       ├── component/          # UI components (GridStack, Overlay, SplitJS, R3F)
│       ├── coupling/           # C3PO/ICOCO coupling interface
│       ├── data/               # Data containers and workers
│       ├── extension/          # Panel extensions (axes, layout, file loader, etc.)
│       ├── icon/               # UI icons
│       ├── input_file/         # Sample input files
│       ├── interface/          # Data interfaces (MED, VTK, CSV, generic)
│       ├── layout/             # Layout managers (GridStack, Split)
│       ├── panel/              # Visualization panels and GUI
│       ├── plotter_1d/         # 1D plotting backends
│       ├── plotter_2d/         # 2D plotting backends (grid, polygon)
│       └── utils/              # Utilities (mesh tools, serialization, etc.)
│
├── tests/                      # Test suite
├── utils/                      # Development utilities
└── results/                    # Example outputs

Core Modules

Module Purpose
panel/ Visualization panels with GUI controls, extensions, and overlay components
layout/ Layout managers for arranging multiple panels (GridStack, Split)
interface/ Data interfaces for reading various file formats (MED, VTK, CSV)
coupling/ ICOCO-compatible interface for code coupling with C3PO
data/ Data containers and workers for handling simulation data
extension/ Extendable components for axes, field selection, file loading, etc.
plotter_1d/ & plotter_2d/ Plotting backends using Bokeh and Matplotlib
component/ Custom Panel components including React Three Fiber integration

Project details


Download files

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

Source Distribution

scivianna-0.5.5.tar.gz (788.8 kB view details)

Uploaded Source

Built Distribution

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

scivianna-0.5.5-py3-none-any.whl (836.1 kB view details)

Uploaded Python 3

File details

Details for the file scivianna-0.5.5.tar.gz.

File metadata

  • Download URL: scivianna-0.5.5.tar.gz
  • Upload date:
  • Size: 788.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for scivianna-0.5.5.tar.gz
Algorithm Hash digest
SHA256 5a23e3dacf202c703e87e439d4a5259caaa328342e5269a5e586d389292f795a
MD5 1c6b661d88353208c15c0bdd7050a4d2
BLAKE2b-256 c5b9c80437350e2e3c5161726f28d98978adef0a059cfb3747046a15a89caa6b

See more details on using hashes here.

File details

Details for the file scivianna-0.5.5-py3-none-any.whl.

File metadata

  • Download URL: scivianna-0.5.5-py3-none-any.whl
  • Upload date:
  • Size: 836.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for scivianna-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b21c734488d5b640a9bbc5ee07c1d7d78e5e2b87a98db4a967b5428cbf1bc80d
MD5 65b51b27eb4b70bd70e2e8a2a668e178
BLAKE2b-256 a3797b332bca6318413bf54eb18fe2c0cf1f831161d77dd30d7d358026254b02

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