Skip to content

Releases: ovitrac/SFPPy

πŸš€ SFPPy - Python Framework for Food Contact Compliance & Risk Assessment 🍏⏩🍎

07 Mar 17:41
Compare
Choose a tag to compare

SFPPy v1.3 Releases 🍏⏩🍎


SFPPy is a Python-based framework for π“Œ‰β—―π“‡‹ Compliance Testing of Food Contact Materials and πŸŽ’βŒ¬β™»οΈ Recycled Plastic Safety Assessment, supporting regulations from:

  • πŸ‡ΊπŸ‡Έ US FDA regulations
  • πŸ‡ͺπŸ‡Ί European Union (EFSA, EU 10/2011, etc.)
  • πŸ‡¨πŸ‡³ Chinese GB standards
  • 🌍 Other international guidelines

πŸ“Œ SFPPy brings well-established chemical migration models to pure Python, offering object-oriented and scalable capabilities. A large collection of scenarios πŸ—ƒ is included in the SFPPy package.

πŸš€ No Python Knowledge? No Problem! πŸ§‘β€πŸ”¬πŸ‘©β€πŸ”¬ SFPPy is designed for scientists, engineers, and food packaging experts who may not have programming experience. You don’t need to know Python to simulate mass transfer or analyze resultsβ€”just follow πŸ”Ή simple commands and πŸ”Ή pre-built functions to handle complex calculations internally.


πŸ“¦ Download & Installation

SFPPy is available in two versions πŸ—œοΈ:

The light version does not include the private installation of Toxtree. The class patankar.loadpubchem.migrantToxtree, which is used for advanced risk assessment, relies on Toxtree. However, without it, the class patankar.loadpubchem.migrant remains fully operational and is sufficient for routine simulations.
If needed, Toxtree can be installed manually in patankar/private/toxtree/ as described in patankar/private/toxtree/README.md.

  • Full version (78 MB, includes Toxtree) - compatible with πŸͺŸ Windows, 🐧 Linux, 🍎 macOS:
    πŸ“₯ Download SFPPy

  • Light version (15 MB, includes full documentation) - compatible with πŸͺŸ Windows, 🐧 Linux, 🍎 macOS:
    πŸ“₯ Download SFPPymin

❗*Toxtree requires a Java runtime environment (JRE) if Java β˜• is not already installed on your system.*


πŸ“‚ Example Files

SFPPy comes with four example scripts to help you get started:

Example file (located in the root folder 🏠) Description (see πŸ” Wiki Pages)
example1.py Monolayer materials
example2.py Recycled bottles with functional barriers
example3.py Chained simulations with variations
example4.py Fitting experimental curves to extract diffusion and partition coefficients

✨ All scripts in the root folder 🏠 can be executed directly without modifying the Python path.
If you need to run them from another location, use the provided CLI:

sfppy example1.py  # Replace example1.py with your script

πŸ› οΈ Running SFPPy from Anywhere 🌐

To test the releases effortlessly, follow this quick setup:

# Navigate to the extracted SFPPy folder
cd /path/to/SFPPy  # 🏠 This is where the files were unzipped

# Install SFPPy in editable mode (dependencies included)
pip install -e .

# Run example1 from anywhere
sfppy example1.py  # Replace example1.py with your script

For detailed installation instructions, refer to the installation guide πŸ§‘β€πŸ”§.


πŸš€ Quick Start & Exploration

πŸ“š Read the Online Documentation:

⚑ Build complex migration scenarios 🎚 efficiently with minimal Python code:

πŸ” Click to expand example
from patankar.layer import gPET, PP
from patankar.food import ambient, hotfilled, realfood, fat, liquid, stacked

# πŸ—οΈ Define a multilayer material (ABA: PET-PP-PET)
A = gPET(l=(20, "um"), migrant='bisphenol A', C0=0)
B = PP(l=(500, "um"), migrant='bisphenol A', C0=200)  
ABA = A + B + A  # The leftmost layer is in contact with food

# 🍽️ Define contact & storage conditions
class contact1(stacked, ambient): name = "1: Setoff"; contacttime = (4, "months")
class contact2(hotfilled, realfood, liquid, fat): name = "2: Hot Filling"
class contact3(ambient, realfood, liquid, fat): name = "3: Storage"; contacttime = (6, "months")

# πŸ”„ Simulate a multi-step migration process
medium1, medium2, medium3 = contact1(), contact2(), contact3()
medium1 >> ABA >> medium1 >> medium2 >> medium3  # Automatic chaining

# πŸ“Š Merge & visualize migration kinetics
sol123 = medium1.lastsimulation + medium2.lastsimulation + medium3.lastsimulation
sol123.plotCF()

πŸ“Œ SFPPy is fully configured, so no deep Python knowledge is required! πŸŽ‰


πŸ’‘ Why Use SFPPy?

  • βœ… Regulation-Ready: Compliance testing βš–οΈ for FDA, EFSA, and GB standards
  • βœ… Fast & Scalable: Optimized finite-volume solver πŸ”’ for 1D mass transfer modeling
  • βœ… Modular & Object-Oriented πŸ“¦: Easily define multilayer materials & food contact conditions
  • βœ… PubChem βš› & ToxTree ☣️ Integration: Fetch molecular properties directly from PubChem & ToxTree
  • βœ… Automatic Chaining ⏩: Effortlessly simulate multi-step processes
  • βœ… Export Results πŸ“€: to EXCELπŸ“Š, CSVπŸ“Š, PandasπŸ“Š, MatlabⓂ️, 𝐑…

πŸš€ Try SFPPy now and streamline your food safety assessments!


πŸ”— Additional Resources

πŸ“– Publication:
AIChE Journal - SFPPy Migration Modeling

πŸ“Œ GitHub Pages:
https://ovitrac.github.io/SFPPy/


🍏⏩🍎 SFPPy for Food Contact Compliance and Risk Assessment
*Contact* Olivier Vitrac *for questions |* Website *|* Documentation

πŸš€ SFPPy - Python Framework for Food Contact Compliance & Risk Assessment 🍏⏩🍎

27 Feb 15:42
Compare
Choose a tag to compare

SFPPy v1.22 🍏⏩🍎

SFPPy is a Python-based framework for compliance testing of food contact materials and recycled plastic safety assessment, supporting regulations from:

  • πŸ‡ΊπŸ‡Έ US FDA regulations
  • πŸ‡ͺπŸ‡Ί European Union (EFSA, EU 10/2011, etc.)
  • πŸ‡¨πŸ‡³ Chinese GB standards
  • 🌍 Other international guidelines

SFPPy brings well-established chemical migration models to pure Python, offering object-oriented and scalable capabilities.
πŸ” Read the detailed internal documentation here.


πŸ“¦ Download & Installation

  • Full version (< 10 MB with documentation) - for Windows, Linux, macOS:
    πŸ“₯ Download SFPPy v1.22

πŸ“‚ Example Files

Included in the root folder:

  • example1.py
  • example2.py
  • example3.py

πŸš€ Quick Start & Exploration

πŸ“š Read the Online Documentation:

⚑ Create complex migration scenarios with concise, efficient Python code:

πŸ” Click to expand example
from patankar.layer import gPET, PP
from patankar.food import ambient, hotfilled, realfood, fat, liquid, stacked
from patankar.loadpubchem import migrant

# πŸ”¬ Look up substances on PubChem
m = migrant("limonene")

# πŸ—οΈ Create a multilayer material (ABA: PET-PP-PET)
A = gPET(l=(20, "um"), migrant=m, C0=0)
B = PP(l=(500, "um"), migrant=m, C0=200)  
ABA = A + B + A  # The leftmost layer is in contact with food

# 🍽️ Define contact & storage conditions
class contact1(stacked, ambient): name = "1: Setoff"; contacttime = (4, "months")
class contact2(hotfilled, realfood, liquid, fat): name = "2: Hot Filling"
class contact3(ambient, realfood, liquid, fat): name = "3: Storage"; contacttime = (6, "months")

# πŸ”„ Simulate a multiple-step migration process
medium1, medium2, medium3 = contact1(), contact2(), contact3()
medium1 >> ABA >> medium1 >> medium2 >> medium3  # Automatic chaining

# πŸ“Š Merge & visualize migration kinetics
sol123 = medium1.lastsimulation + medium2.lastsimulation + medium3.lastsimulation
sol123.plotCF()

πŸ’‘ Why Use SFPPy?

βœ… Regulation-Ready: Supports compliance testing for FDA, EFSA, and GB standards
βœ… Fast & Scalable: Optimized finite-volume solver for 1D mass transfer modeling
βœ… Modular & Object-Oriented: Easily define multilayer materials & food contact conditions
βœ… PubChem Integration: Fetch molecular properties directly from PubChem
βœ… Automatic Chaining: Simulate multi-step processes effortlessly

πŸš€ Try SFPPy now and streamline your food safety assessments!


πŸ”— Additional Resources

πŸ“– Publication:
AIChE Journal - SFPPy Migration Modeling

πŸ“Œ GitHub Pages:
https://ovitrac.github.io/SFPPy/