Skip to main content

Monomer infiltration saturation time surrogate model

The code trains/uses a multilayer perceptron to infer a mapping between the physical parameters of the delignified transparent wood composites and their monomer infiltration saturation time. Full saturation of the porous wood is necessary for obtaining both the optical transparency and mechanical integrity of the final material.

Input and output

The input of the model consists of six parameters characterizing the transparent wood sample:

  • Sample length [m] - L
  • Fluid dynamic viscosity [Pa $\cdot$ s] - $\mu$
  • Longitudinal permeability [ $m^2$ ] - $k_{long}$
  • Mean pore radius [m] - $r_{\mu}$
  • Surface tension [N/m] - $\gamma$
  • Porosity - $\phi$

The output is the saturation time measured in seconds.

Dataset

The dataset for training the surrogate model is provided in the file surrogate_data.csv. Each row corresponds to one simulation carried out using a Darcy-flow-based infiltration model implemented in FEniCSx 0.9. The columns correspond to the physical parameters in the same order as described above followed by the saturation time.

Surrogate model

The surrogate model is a multilayer perceptron implemented in PyTorch. It consists of 3 hidden layers, each with 50 neurons. ReLU is used as the activation function for every layer, and sigmoid is used in the output.

Before training both the input and output values are transformed using the logarithm function and scaled to the range (0,1).

Model weights

The package also includes a set of model weights trained on the provided dataset. The weights are stored in the file weights.pt and have been trained with the same defaults as the CLI command aitw-infiltration-surrogate train:

  • Number of epochs: 10000
  • Patience: 500
  • train_ratio: 0.8
  • validation_ratio: 0.5

Installation

cd <PATH to folder with pyproject.toml>
pip install .

Usage

CLI

The installation will make available a aitw-infiltration-surrogate command line interface.

  • Run aitw-infiltration-surrogate --help to see the available commands.
  • Run aitw-infiltration-surrogate train --help to see all available options for training the surrogate model.
  • Run aitw-infiltration-surrogate inference --help to see all available options for running inference with the surrogate model.

Example for training the surrogate model with the provided dataset:

aitw-infiltration-surrogate train --data_file surrogate_data.csv --output_dir model_output

Example for running inference with the surrogate model using the provided weights:

aitw-infiltration-surrogate inference --input_file input.csv

Tab autocompletion

Enabling tab autocompletion https://click.palletsprojects.com/en/stable/shell-completion/

E.G for bash run the command

eval "$(_AITW_INFILTRATION_SURROGATE_COMPLETE=bash_source aitw-infiltration-surrogate)"

You can also add it to either ~/.bashrc or, if you are using a virtual environment, to bin/activate of the virtual environment to avoid running the command for every new shell.

Metadata

Release files for AITW_infiltration_surrogate 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AITW_infiltration_surrogate 1.0.0
File Size Uploaded Provenance Actions
aitw_infiltration_surrogate-1.0.0.tar.gz 34.8 kB Without provenance Details for aitw_infiltration_surrogate-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for AITW_infiltration_surrogate 1.0.0
File Interpreter ABI Platform Actions
aitw_infiltration_surrogate-1.0.0-py3-none-any.whl Python 3 none any Details for aitw_infiltration_surrogate-1.0.0-py3-none-any.whl

Total release size: 70.0 kB

Release files / aitw_infiltration_surrogate-1.0.0.tar.gz

Download URL aitw_infiltration_surrogate-1.0.0.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f881be8914c07ebdde48a31e3079aab1f3c76fd99c07541002fdce85e493a3f9
BLAKE2b-256 checksum
How to use checksums
221fc07526a8797cc90b93171593c5f828b6ecdf7b2a6f6acbe247564c2c21a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release files / aitw_infiltration_surrogate-1.0.0-py3-none-any.whl

Download URL aitw_infiltration_surrogate-1.0.0-py3-none-any.whl
Size 35.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3923766fd338fa9ed8a504a4a50ac6718e80e4de43f6aae913601255bd70f78f
BLAKE2b-256 checksum
How to use checksums
2666e3facd6dde4f47adda74c5b27abf6807e34b37b272a10275171d90cd67de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Security for AITW_infiltration_surrogate 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page