Thursday, June 20, 2013

Drug Delivery Modeling (Two Compartment Model/Conventional chemotherapy)

Have you ever wondered how long a drug injected via bolus stays in your system? If you want to know, than one possibility is to use computational models to find out. For drugs that move from the blood into other tissues a two compartment model is usually needed to characterize the drug distribution in the body. The schematic sketch of a two compartment model can look like:



 In the following example I use Python to solve the Ordinary Differential Equations (ODE) to calculate the concentrations of doxorubicin (chemotherapeutic agent) in the body plasma and body tissue compartment.











additional infos simulation model:
http://www.musc.edu/ablation/pubs/Gasselhuber,%20PLos%20One%202012.pdf

 

Automatic greenhouse control system (Code Files)

A few people asked me if they can have the source code files to following project:

http://scientificcomputingco.blogspot.com/2013/02/automatic-greenhouse-control-system.html

The code files can be found here:
https://www.dropbox.com/sh/ip306uavm7jpekg/xQuoUjSmEJ/Green%20house%20control

Unfortunately there comes little to no documentation with the file, thus one have to dig through the source code files to understand the program.

You can contact me for further questions.

Thursday, April 25, 2013

Spatial Element Offset Normal To Surface

Finite element model of a mouse (2D elements). Left: Original mesh; Middle: Offset mesh; Right: Original and offset mesh (via overlay)


Let's assume you wan to work with a whole body Finite Element (FE) model of an animal, e.g. with a mouse model. Quite often the origin of your model is a triangulated surface generated from imaging data. In some cases, what you want to do is to offset your triangulated surface in the direction normal to the surface. E.g. to create a skin layer. So how can you do that? Well it is actually quite simple. What you need are following steps:

1) Equivalence your surface mesh (remove duplicated nodes).
2) Calculate the smooth node normals:
  --Calculate the element (face) normals.
  --Add the element normal to every node that is shared by the element.
3) Normalize the normals at the nodes (unit vectors, pointing away from the surface).
4) Multiply the normal vectors with the desired offset.

The results of this procedure can be seen in the image above.

If anybody is interested in the code (written Pyton) I can send it via email.