API Reference¶
This page contains the complete API reference for all public modules, classes, and functions in rheojax.
API Modules
- Core Module (rheojax.core)
- Models API
- Classical Models
- Multi-Mode Models
- Fractional Models
- Non-Newtonian Flow Models
- Soft Glassy Rheology (SGR) Models
- STZ Models
- Elasto-Plastic Models (EPM)
- SPP LAOS Models
- Fluidity Models
- Fluidity-Saramito EVP Models
- DMT Thixotropic Models
- IKH Models (Isotropic-Kinematic Hardening)
- FIKH Models (Fractional IKH)
- Hébraud-Lequeux Model
- Giesekus Models
- ITT-MCT Models (Integration Through Transients MCT)
- TNT Models (Transient Network Theory)
- VLB Models (Vernerey-Long-Brighenti)
- HVM Model (Hybrid Vitrimer)
- HVNM Model (Hybrid Vitrimer Nanocomposite)
- SPP Analysis API
- Transforms API
- Pipeline API
- I/O Module (rheojax.io)
- Utilities (rheojax.utils)
- Logging (rheojax.logging)
- Visualization (rheojax.visualization)
Quick Links¶
Phase 1 (Core Infrastructure):
Core Module (rheojax.core) - Base classes, data structures, parameters, Bayesian inference, JAX configuration
I/O Module (rheojax.io) - File readers and writers (TRIOS, CSV, Excel, HDF5)
Utilities (rheojax.utils) - Utilities (optimization, Mittag-Leffler functions, compatibility checking)
Logging (rheojax.logging) - Comprehensive logging system with JAX-safe utilities
Visualization (rheojax.visualization) - Plotting functions and templates
Phase 2 (Models and Transforms):
Models API - All 53 rheological models (classical, fractional, flow, multi-mode, SGR, STZ, EPM, fluidity, Saramito, DMT, IKH, FIKH, HL, Giesekus, ITT-MCT, TNT, VLB, HVM, HVNM, SPP)
Transforms API - All 7 data transforms (FFT, mastercurve, mutation, OWChirp, smoothing, SRFS, SPP)
Pipeline API - Pipeline API for high-level workflows
Phase 4 (Complete): Performance & Correctness [done - v0.3.0-v0.4.0]
Models API - Generalized Maxwell Model (GMM), Fractional Models
Utilities (rheojax.utils) - Element minimization, warm-start optimization
Phase 5 (Complete): Soft Glassy Rheology & SPP [done - v0.5.0]
Models API - SGR Conventional, SGR Generic, SPP Yield Stress
Transforms API - SRFS (Strain-Rate Frequency Superposition), SPP Decomposer
Phase 6 (Complete): Shear Transformation Zone (STZ) [done - v0.6.0]
Models API - STZ Conventional (Langer 2008)
Phase 7 (Complete): Elasto-Plastic Models (EPM) [done - v0.6.0]
Models API - Lattice EPM (Mesoscopic, FFT-based)
Utilities (rheojax.utils) - EPM Kernels (Propagator, Plasticity)
Visualization (rheojax.visualization) - Lattice field plotting
Overview by Category¶
Core Components¶
Base Classes:
rheojax.core.base.BaseModel- Base class for all modelsrheojax.core.base.BaseTransform- Base class for all transforms
Data Structures:
rheojax.core.data.RheoData- Primary data containerrheojax.core.parameters.Parameter- Single parameterrheojax.core.parameters.ParameterSet- Parameter collectionrheojax.core.parameters.SharedParameterSet- Multi-technique shared parameters
Registries:
rheojax.core.registry.ModelRegistry- Model discovery and instantiationrheojax.core.registry.TransformRegistry- Transform discovery and instantiation
Test Modes & Deformation:
rheojax.core.test_modes.TestMode- Test mode enumeration (OSCILLATION, RELAXATION, CREEP, …)rheojax.core.test_modes.DeformationMode- Deformation geometry (SHEAR, TENSION, BENDING, COMPRESSION)rheojax.core.test_modes.detect_test_mode()- Automatic test mode detection
Models (53 total)¶
Classical Models (3):
rheojax.models.Maxwell- Spring and dashpot in seriesrheojax.models.Zener- Standard Linear Solid (SLS)rheojax.models.SpringPot- Fractional power-law element
Multi-Mode Models (1):
rheojax.models.GeneralizedMaxwell- Generalized Maxwell Model (Prony series)
Fractional Maxwell Family (4):
rheojax.models.FractionalMaxwellGel- Spring + SpringPotrheojax.models.FractionalMaxwellLiquid- SpringPot + dashpotrheojax.models.FractionalMaxwellModel- Two SpringPotsrheojax.models.FractionalKelvinVoigt- Parallel spring + SpringPot
Fractional Zener Family (4):
rheojax.models.FractionalZenerSolidLiquid(FZSL) - Solid + fractional liquidrheojax.models.FractionalZenerSolidSolid(FZSS) - Two solids + fractionalrheojax.models.FractionalZenerLiquidLiquid(FZLL) - Most generalrheojax.models.FractionalKelvinVoigtZener(FKVZ) - FKV + series spring
Advanced Fractional Models (3):
rheojax.models.FractionalBurgersModel(FBM) - Maxwell + FKV in seriesrheojax.models.FractionalPoyntingThomson(FPT) - FKV + spring in seriesrheojax.models.FractionalJeffreysModel(FJM) - Two dashpots + SpringPot
Non-Newtonian Flow Models (6):
rheojax.models.PowerLaw- tau = \(K \, \dot{\gamma}^n\)rheojax.models.Carreau- Smooth Newtonian -> power-lawrheojax.models.CarreauYasuda- Extended Carreaurheojax.models.Cross- Alternative to Carreaurheojax.models.HerschelBulkley- Yield stress + power-lawrheojax.models.Bingham- Yield stress + Newtonian
Soft Glassy Rheology Models (2):
rheojax.models.SGRConventional- Soft Glassy Rheology (Sollich 1998)rheojax.models.SGRGeneric- Thermodynamic SGR (GENERIC)
STZ Models (1):
rheojax.models.STZConventional- Shear Transformation Zone (Langer 2008)
SPP LAOS Models (1):
rheojax.models.SPPYieldStress- Yield stress for SPP analysis
Elasto-Plastic Models (2):
rheojax.models.LatticeEPM- Mesoscopic lattice model (FFT-based)rheojax.models.TensorialEPM- Tensorial scaffolding
Fluidity Models (2):
rheojax.models.FluidityLocal- Local fluidity with aging/rejuvenationrheojax.models.FluidityNonlocal- Nonlocal fluidity with cooperativity length
Fluidity-Saramito EVP Models (2):
rheojax.models.FluiditySaramitoLocal- Tensorial EVP with fluidity couplingrheojax.models.FluiditySaramitoNonlocal- Nonlocal Saramito EVP
DMT Thixotropic Models (2):
rheojax.models.DMTLocal- de Souza Mendes-Thompson (0D)rheojax.models.DMTNonlocal- DMT with structure diffusion (1D)
IKH Models (2):
rheojax.models.MIKH- Single-mode isotropic-kinematic hardeningrheojax.models.MLIKH- Multi-layer IKH
FIKH Models (2):
rheojax.models.FIKH- Fractional IKH (Caputo structure kinetics)rheojax.models.FMLIKH- Fractional multi-layer IKH
Hébraud-Lequeux Model (1):
rheojax.models.HebraudLequeux- Mean-field soft glass model
Giesekus Models (2):
rheojax.models.GiesekusSingleMode- Nonlinear differential constitutiverheojax.models.GiesekusMultiMode- Multi-mode Giesekus
ITT-MCT Models (2):
rheojax.models.ITTMCTSchematic- F12 schematic MCTrheojax.models.ITTMCTIsotropic- Isotropic MCT with S(k) input
TNT Models (5):
rheojax.models.TNTSingleMode- Single-mode transient networkrheojax.models.TNTLoopBridge- Loop-bridge conversion kineticsrheojax.models.TNTStickyRouse- Sticky Rouse chain dynamicsrheojax.models.TNTCates- Living polymer (worm-like micelles)rheojax.models.TNTMultiSpecies- Multi-species bond network
VLB Models (4):
rheojax.models.VLBLocal- Vernerey-Long-Brighenti (local)rheojax.models.VLBMultiNetwork- Multi-network VLBrheojax.models.VLBVariant- VLB with modified kineticsrheojax.models.VLBNonlocal- Nonlocal VLB (1D PDE)
HVM Model (1):
rheojax.models.HVMLocal- Hybrid vitrimer (3 sub-networks)
HVNM Model (1):
rheojax.models.HVNMLocal- Hybrid vitrimer nanocomposite (4 sub-networks)
Transforms (7 total)¶
rheojax.transforms.FFTAnalysis- Time -> frequency domain (FFT)rheojax.transforms.Mastercurve- Time-temperature superposition (WLF/Arrhenius)rheojax.transforms.MutationNumber- Viscoelastic character quantificationrheojax.transforms.OWChirp- Optimal waveform analysis for LAOSrheojax.transforms.SmoothDerivative- Noise-robust differentiationrheojax.transforms.SRFS- Strain-rate frequency superpositionrheojax.transforms.SPPDecomposer- Sequence of Physical Processes decomposition
Pipeline API¶
Core Pipeline:
rheojax.pipeline.Pipeline- Base fluent API with method chaining
Specialized Workflows:
rheojax.pipeline.MastercurvePipeline- Time-temperature superpositionrheojax.pipeline.ModelComparisonPipeline- Multi-model comparisonrheojax.pipeline.CreepToRelaxationPipeline- Creep -> relaxation conversionrheojax.pipeline.FrequencyToTimePipeline- Frequency -> time conversion
Batch Processing:
rheojax.pipeline.PipelineBuilder- Programmatic pipeline constructionrheojax.pipeline.BatchPipeline- Multi-file parallel processing
I/O (Input/Output)¶
Readers:
rheojax.io.auto_load()- Auto-detect format and loadrheojax.io.load_trios()- TA TRIOS text filesrheojax.io.load_csv()- CSV filesrheojax.io.load_excel()- Excel files (.xlsx, .xls)rheojax.io.load_anton_paar()- Anton Paar files
Writers:
rheojax.io.save_hdf5()- HDF5 format (full fidelity)rheojax.io.save_excel()- Excel reports (multi-sheet)
Utilities¶
Optimization:
rheojax.utils.optimization.nlsq_optimize()- Nonlinear least squares with JAXrheojax.utils.optimization.calculate_confidence_intervals()- Parameter uncertainty
Mittag-Leffler Functions:
rheojax.utils.mittag_leffler.mittag_leffler_e()- One-parameter: E_alpha(z)rheojax.utils.mittag_leffler.mittag_leffler_e2()- Two-parameter: E_alpha,beta(z)
Test Modes:
rheojax.core.test_modes.detect_test_mode()- Auto-detect test moderheojax.core.test_modes.get_compatible_test_modes()- Get compatible modes for modelrheojax.core.test_modes.suggest_models_for_test_mode()- Suggest models for test mode
Visualization¶
Plotting Functions:
rheojax.visualization.plot_rheo_data()- Plot RheoData objectsrheojax.visualization.plot_model_fit()- Plot data with model fitrheojax.visualization.plot_residuals()- Plot fit residualsrheojax.visualization.plot_mastercurve()- Plot mastercurve with shift factors
Styles:
‘default’: Standard matplotlib style
‘publication’: High-quality for publications
‘presentation’: Large fonts and markers for presentations
API Design Principles¶
Consistency¶
All rheojax classes follow consistent patterns:
Models:
model = ModelClass() # Instantiate
model.fit(X, y) # Fit to data
predictions = model.predict(X) # Make predictions
score = model.score(X, y) # Calculate R^2
Transforms:
transform = TransformClass() # Instantiate
result = transform.transform(data) # Apply transform
result = transform.fit_transform(data) # Fit and transform
original = transform.inverse_transform(result) # Inverse (if available)
Pipelines:
pipeline = (Pipeline()
.load(source)
.transform(name, **params)
.fit(model, **kwargs)
.plot(**options)
.save(filepath))
scikit-learn Compatibility¶
rheojax models are compatible with scikit-learn:
fit(X, y),predict(X),score(X, y)methodsget_params(),set_params(**params)for hyperparameter accessCan be used in scikit-learn pipelines and GridSearchCV
JAX Integration¶
All numerical operations use JAX:
Automatic differentiation for optimization
JIT compilation for performance
GPU/CPU automatic dispatch
Compatible with JAX transformations (vmap, pmap, etc.)
Type Hints¶
All public APIs include type hints:
def fit(self, X: ArrayLike, y: ArrayLike, **kwargs) -> Self:
"""Fit model to data."""
...
Documentation Standards¶
All classes and functions include:
Docstrings with description
Parameters with types and descriptions
Returns with type and description
Examples showing typical usage
Cross-references to related functions
Getting Started¶
For new users, we recommend:
Read the User Guide: user_guide/getting_started
Try the Pipeline API: Pipeline API for high-level workflows
Explore Models: Models API to understand available models
Learn Transforms: Transforms API for data preprocessing
For advanced users:
Master the Modular API: user_guide/modular_api
Understand Core Classes: Core Module (rheojax.core)
Implement Custom Workflows: user_guide/multi_technique_fitting
Version Information¶
This documentation covers rheojax version 0.6.0.
Phase 1 (v0.1.0): Core infrastructure, test mode detection, I/O, visualization
Phase 2 (v0.1.5): 20 models, 5 transforms, Pipeline API, multi-technique fitting
Phase 3 (v0.2.0): Bayesian inference with NumPyro NUTS, ArviZ diagnostics, BayesianPipeline, all 20 models support Bayesian inference
Phase 4 (v0.3.0): Generalized Maxwell Model (GMM) with PyVisco integration, auto shift factors for mastercurves
Phase 5 (v0.3.1): JAX-native foundation with 30-45% performance improvements
Phase 6 (v0.3.2): Vectorization and memory optimizations (50-75% cumulative improvement)
Phase 7 (v0.4.0): Mode-aware Bayesian inference (critical correctness fix), GMM element search optimization (2-5x speedup), TRIOS auto-chunking (50-70% memory reduction)
Phase 8 (v0.5.0): SGR models (Soft Glassy Rheology), SRFS transform, shear banding detection, SPP LAOS analysis
Phase 9 (v0.6.0): GUI improvements (Diagnostics, Export pages), comprehensive logging system, piblin-jax removal
Support¶
Documentation: https://rheojax.readthedocs.io
GitHub Issues: https://github.com/imewei/rheojax/issues
Email: wchen@anl.gov