|
Layers
Diffusion in heterogeneous environments
|
Function for solving the forward problem with the 3-layer model. More...
#include "header.h"
Go to the source code of this file.
Functions | |
| void | calc_diffusion_curve_layer (int nt, int nz, int nr, int iprobe, int jprobe, int iz1, int iz2, int nolayer, double dt, double dr, double sdelay, double sduration, double alpha_so, double theta_so, double kappa_so, double alpha_sp, double theta_sp, double kappa_sp, double alpha_sr, double theta_sr, double kappa_sr, double dfree, double *t, double *s, double *invr, char *imagebasename, double image_spacing, double *p) |
| Calculates the concentration as a function of space and time and returns the probe concentration as a function of time; also outputs the concentration as images if that option was chosen. More... | |
Function for solving the forward problem with the 3-layer model.
This file is similar to model.c for fit-layer except that it can output the concentration as images. The concentration is calculated on an nz*(nr+1) grid for is for z: 0 -> zmax and r: 0 -> rmax. If this concentration grid were output as an image it would be rectangular of aspect ratio about 1:2, with the maximum intensity at the left side of the image (source at r=0). Instead the output images are nearly square with the source (r=0) in the middle column of the images. The left side of the images are a mirror of the right side. I.e. the output images have dimensions of nz*(2*nr-1) and are for z: 0 -> zmax and r: -rmax -> rmax.
Definition in file model.c.
| void calc_diffusion_curve_layer | ( | int | nt, |
| int | nz, | ||
| int | nr, | ||
| int | iprobe, | ||
| int | jprobe, | ||
| int | iz1, | ||
| int | iz2, | ||
| int | nolayer, | ||
| double | dt, | ||
| double | dr, | ||
| double | sdelay, | ||
| double | sduration, | ||
| double | alpha_so, | ||
| double | theta_so, | ||
| double | kappa_so, | ||
| double | alpha_sp, | ||
| double | theta_sp, | ||
| double | kappa_sp, | ||
| double | alpha_sr, | ||
| double | theta_sr, | ||
| double | kappa_sr, | ||
| double | dfree, | ||
| double * | t, | ||
| double * | s, | ||
| double * | invr, | ||
| char * | imagebasename, | ||
| double | image_spacing, | ||
| double * | p | ||
| ) |
Calculates the concentration as a function of space and time and returns the probe concentration as a function of time; also outputs the concentration as images if that option was chosen.
This function solves the diffusion equation in each layer
,
subject to the continuity conditions at the interfaces between layers
and the boundary condition
(total absorption) at the top, the bottom, and the side of the cylinder, where
= concentration in layer 
= free diffusion coefficient
= permeability in layer 
= source in layer 
= extracellular volume fraction in layer 
= nonspecific clearance factor in layer 
This function calls convolve3() to compute the Laplacian in cylindrical coordinates.
| [in] | nt | Number of support points in time |
| [in] | nz | Number of rows of concentration matrix |
| [in] | nr | Number of columns of concentration matrix |
| [in] | iprobe | z-index of probe location |
| [in] | jprobe | r-index of probe location |
| [in] | iz1 | z-index of SR-SP boundary |
| [in] | iz2 | z-index of SP-SO boundary |
| [in] | nolayer | Flag for whether to model a single homogeneous environment (true) or to model a 3-layer environment |
| [in] | dt | Spacing in time ( ) |
| [in] | dr | Spacing in r (in this program, ) |
| [in] | sdelay | Source delay (time before source starts) |
| [in] | sduration | Duration of source |
| [in] | alpha_so | Extracellular volume fraction in SO layer |
| [in] | theta_so | Permeability in SO layer |
| [in] | kappa_so | Nonspecific clearance factor in SO layer |
| [in] | alpha_sp | Extracellular volume fraction in SP layer |
| [in] | theta_sp | Permeability in SP layer |
| [in] | kappa_sp | Nonspecific clearance factor in SP layer |
| [in] | alpha_sr | Extracellular volume fraction in SR layer |
| [in] | theta_sr | Permeability in SR layer |
| [in] | kappa_sr | Nonspecific clearance factor in SR layer |
| [in] | dfree | Free diffusion coefficient |
| [in] | t | Time array |
| [in] | s | Source array |
| [in] | invr | Array for values |
| [out] | p | Probe array (concentration as a function of time) |
Definition at line 101 of file model.c.


1.8.11