TheraPy is a collection of Python scripts developed to model the evolution of chemical and physical inhomogeneities, i.e. microstructure, in drug-polymer composites used as controlled drug release coatings. This includes the development of microstructure during the process of casting drug eluting coatings, as well as the microstructural changes that occur during use or after the coating is immersed in the release medium. Therefore, these scripts provide tools to predict the relationships between materials and process variables, microstructure, and performance. Establishing these relationships can reduce empiricism in materials selection and process design, providing a facile and efficient means to tailor the underlying microstructure and achieve a desired drug release behavior.

The TheraPy scripts were developed in the Division of Chemistry and Materials Science (DCMS) in the Office of Engineering Laboratories (OSEL) at the Food and Drug Administration’s (FDA) Center for Devices and Radiological Health (CDRH). The scripts are designed to work with FiPy, an object oriented, partial differential equation (PDE) solver. As described below, these scripts can be used much in the same way as the examples provided with the FiPy distribution.

Currently, scripts are provided to predict the microstructure development during casting in both 1D and 2D of systems composed of three components: drug, polymer, and solvent, as well as drug release behavior in 2D. In the future, we intend to add scripts that extend the current model to material systems that:

  • are 3D
  • contain arbitrary number of components
  • exhibit crystallization
  • form chemical bonds between constituents
  • contain components that may undergo chemical degradation.


A tarball of the TheraPy scripts and documentation can be downloaded from export:release/therapy0.1.tar.gz. Alternatively, you can checkout the latest version from the repository:

$ svn checkout therapy

To browse the source code on-line, click here.


Online versions of detailed documentation including the underlying theory and specific usage instructions can be found here source:trunk/_build/latex/TheraPy.pdf.

Alternatively, after downloading and unpacking the tarball or in a version obtained directly from the repository, you will have local copies of the documentation. Under the main "therapy" directory, the html version is in "_build/html" and the pdf version can be found in "_build/latex".


The forum for open discussion of all issues related to the TheraPy scripts can be accessed by clicking the "Forums" tab at the top of the page. If you find a bug or have a specific feature request, please enter it using the "New Issue" tab.

Terms of Use

This software and documentation (the "Software") were developed at the Food and Drug Administration (FDA) by employees of the Federal Government in the course of their official duties. Pursuant to Title 17, Section 105 of the United States Code, this work is not subject to copyright protection and is in the public domain. Permission is hereby granted, free of charge, to any person obtaining a copy of the Software, to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software or derivatives, and to permit persons to whom the Software is furnished to do so. FDA assumes no responsibility whatsoever for use by other parties of the Software, its source code, documentation or compiled executables, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. Further, use of this code in no way implies endorsement by the FDA or confers any advantage in regulatory decisions. Although this software can be redistributed and/or modified freely, we ask that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified.

Also available in: HTML TXT