randall

Simple CellML example demonstrating imports

The aim here iss to be very simple. There are two cellML components that can be imported: Bucket.cellml and massDependentValve.cellml. There are 4 test examples BucketTest1 through to BucketTest4. Each one progressively imports more components, putting simpler pieces together to make some slightly more complex plumbing each time. Note that a component can be reused more than once by a model that imports it. It just imports it more than once. The mathematical model: The bucket is leaky. The fuller it is, the faster it leaks. Bucket's can be connected to one another, e.g. the outflow from one bucket flows into the next. There is also a mass dependent flow controller, imagine this was one of the buckets, resting on one of the hoses connecting other buckets. As the mass on the hose varies, the flow rate through the hose varies. Note that there is no attempt to conserve matter, so one tap that claims to flow at x litres per minute can be fed as inflow into n buckets, and the net flow rate into them would be n times x. A note about how these were created: A trunk snapshot somewhere after PCEnv 0.2, but before PCEnv 0.3 was used to create these CellML files. Since some bugs remained, some editing of the raw XML was done directly in a text editor. At the time of writing this comment, PCEnv 0.3 release is imminent. A snapshot that is close to that release was used to create BucketTest4.cellml, by modifying BucketTest3.cellml, and PCEnv on its own was sufficient to do this, no additional editing was required. Regarding the choice of using a zip file: Currently, work is in progress to allow the CellML repository at cellml.org to support CellML 1.1 when imports are used. In the interim, a zip file is probably the easiest way of packaging interdependent CellML. Have fun, and please contact me if I can help you use CellML more effectively.

Simple CellML example demonstrating imports - Read More…