Difference between this model and prior model:
Diffusion increased by factor of 10.
Flow added.
Initial Condition Set to zero. C(x,0)=0 0<=x<=0.1.
Input Concentration: A pulse starting at t=0 and stopping at t=2.
// MODEL NUMBER: 0169
// MODEL NAME: Diffusion1DpdeAdvection
// SHORT DESCRIPTION: Diffusion in a single region with advection
//
import nsrunit;
unit conversion on;
math Diffusion1DpdeAdvection { // Diffusion in one region plus flow
realDomain t sec; t.min=0; t.max=10.0; t.delta=0.01; //Time domain
real L = 0.1 cm; //Space domain
real Ngrid=31;
realDomain x cm; x.min=0.0; x.max=L; x.ct=Ngrid;
real C(x,t) mM; // Concentration variable
extern real Cin(t) mM; // Inflowing Concentration from Function Generator
real Cout(t) mM; // Outflowing Concentration
extern real C0(x) mM; // Initial distribution of Material
real D= 0.00001 cm^2/sec; // Diffusion coefficient
real F=1 ml/(g*min); // Flow (milliliters/(gram of tissue)/minute)
real V=0.05 ml/g; // Volume (milliters/(gram of tissue))
/*
NOTE: When Flow is included, Volume must also be included.
*/
when(t=t.min) {C= if(x=x.min) Cin else C0;} // Initial distribution assigned to Concentration
// variable
when(x=x.min) {(-F*L/V)*(C-Cin)+D*C:x = 0;} // Inflow boundary condition
when(x=x.max) {C:x=0; Cout=C;}
C:t=-F*L/V*C:x + D*C:x:x ; // Partial differential equation describing system
}
/*
DETAILED DESCRIPTION:
This is the 1-D avection-diffusion problem. Note that
the left inflow boundary condition is a Robin (row-ban')
condition.
SHORTCOMINGS/GENERAL COMMENTS:
- Specific inadequacies or next level steps
KEY WORDS: diffusion, Tutorial, flow, boundary conditions, PDE
REFERENCES:
None.
REVISION HISTORY:
Original Author : GaryR Date: 06/12/08
Revised by: BEJ Date:18jan13 : Update boundary Conditions
COPYRIGHT AND REQUEST FOR ACKNOWLEDGMENT OF USE:
Copyright (C) 1999-2013 University of Washington. From the National Simulation Resource,
Director J. B. Bassingthwaighte, Department of Bioengineering, University of Washington, Seattle WA 98195-5061.
Academic use is unrestricted. Software may be copied so long as this copyright notice is included.
This software was developed with support from NIH grant HL073598.
Please cite this grant in any publication for which this software is used and send an email
with the citation and, if possible, a PDF file of the paper to: staff@physiome.org.
*/