MOOSE - Multiscale Object Oriented Simulation Environment
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DifShell Class Reference

#include <DifShell.h>

+ Inheritance diagram for DifShell:
+ Collaboration diagram for DifShell:

Public Member Functions

void calculateVolumeArea (const Eref &e)
 
 DifShell ()
 Faraday's constant (Coulomb / Mole) More...
 
void vBuffer (const Eref &e, double kf, double kb, double bFree, double bBound)
 
void vEqTauPump (const Eref &e, double kP)
 
void vFInflux (const Eref &e, double I, double fraction)
 
void vFluxFromIn (const Eref &e, double innerC, double innerThickness)
 
void vFluxFromOut (const Eref &e, double outerC, double outerThickness)
 
void vFOutflux (const Eref &e, double I, double fraction)
 
double vGetC (const Eref &e) const
 
double vGetCeq (const Eref &e) const
 
double vGetD (const Eref &e) const
 
double vGetDiameter (const Eref &e) const
 
double vGetInnerArea (const Eref &e) const
 
double vGetLeak (const Eref &e) const
 
double vGetLength (const Eref &e) const
 
double vGetOuterArea (const Eref &e) const
 
unsigned int vGetShapeMode (const Eref &e) const
 
double vGetThickness (const Eref &e) const
 
double vGetValence (const Eref &e) const
 
double vGetVolume (const Eref &e) const
 
void vHillPump (const Eref &e, double vMax, double Kd, unsigned int hill)
 
void vInflux (const Eref &e, double I)
 
void vMMPump (const Eref &e, double vMax, double Kd)
 
void vOutflux (const Eref &e, double I)
 
void vProcess (const Eref &e, ProcPtr p)
 
void vReinit (const Eref &e, ProcPtr p)
 
void vSetC (const Eref &e, double C)
 C is a read-only field. More...
 
void vSetCeq (const Eref &e, double Ceq)
 
void vSetD (const Eref &e, double D)
 
void vSetDiameter (const Eref &e, double diameter)
 
void vSetInnerArea (const Eref &e, double innerArea)
 
void vSetLeak (const Eref &e, double leak)
 
void vSetLength (const Eref &e, double length)
 
void vSetOuterArea (const Eref &e, double outerArea)
 
void vSetShapeMode (const Eref &e, unsigned int shapeMode)
 
void vSetThickness (const Eref &e, double thickness)
 
void vSetValence (const Eref &e, double valence)
 
void vSetVolume (const Eref &e, double volume)
 
void vStoreInflux (const Eref &e, double flux)
 
void vStoreOutflux (const Eref &e, double flux)
 
void vTauPump (const Eref &e, double kP, double Ceq)
 
- Public Member Functions inherited from DifShellBase
void buffer (const Eref &e, double kf, double kb, double bFree, double bBound)
 
 DifShellBase ()
 
void eqTauPump (const Eref &e, double kP)
 
void fInflux (const Eref &e, double I, double fraction)
 
void fluxFromIn (const Eref &e, double innerC, double innerThickness)
 
void fluxFromOut (const Eref &e, double outerC, double outerThickness)
 
void fOutflux (const Eref &e, double I, double fraction)
 
double getC (const Eref &e) const
 
double getCeq (const Eref &e) const
 
double getD (const Eref &e) const
 
double getDiameter (const Eref &e) const
 
double getInnerArea (const Eref &e) const
 
double getLeak (const Eref &e) const
 
double getLength (const Eref &e) const
 
double getOuterArea (const Eref &e) const
 
unsigned int getShapeMode (const Eref &e) const
 
double getThickness (const Eref &e) const
 
double getValence (const Eref &e) const
 
double getVolume (const Eref &e) const
 
void hillPump (const Eref &e, double vMax, double Kd, unsigned int hill)
 
void influx (const Eref &e, double I)
 
void mmPump (const Eref &e, double vMax, double Kd)
 
void outflux (const Eref &e, double I)
 
void process (const Eref &e, ProcPtr p)
 
void reinit (const Eref &e, ProcPtr p)
 
void setC (const Eref &e, double C)
 
void setCeq (const Eref &e, double Ceq)
 
void setD (const Eref &e, double D)
 
void setDiameter (const Eref &e, double diameter)
 
void setInnerArea (const Eref &e, double innerArea)
 
void setLeak (const Eref &e, double leak)
 
void setLength (const Eref &e, double length)
 
void setOuterArea (const Eref &e, double outerArea)
 
void setShapeMode (const Eref &e, unsigned int shapeMode)
 
void setThickness (const Eref &e, double thickness)
 
void setValence (const Eref &e, double valence)
 
void setVolume (const Eref &e, double volume)
 
void storeInflux (const Eref &e, double flux)
 
void storeOutflux (const Eref &e, double flux)
 
void tauPump (const Eref &e, double kP, double Ceq)
 

Static Public Member Functions

static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from DifShellBase
static SrcFinfo1< double > * concentrationOut ()
 
static const CinfoinitCinfo ()
 
static SrcFinfo2< double,
double > * 
innerDifSourceOut ()
 
static SrcFinfo2< double,
double > * 
outerDifSourceOut ()
 

Private Member Functions

double integrate (double state, double dt, double A, double B)
 

Private Attributes

double C_
 
double Ceq_
 
double Cmultiplier_
 
double D_
 
double dCbyDt_
 
double diameter_
 
double innerArea_
 
double leak_
 
double length_
 
double outerArea_
 
double prevC_
 
unsigned int shapeMode_
 
double thickness_
 
double valence_
 
double volume_
 

Static Private Attributes

static const double EPSILON = 1.0e-10
 
static const double F = 96485.3415
 Faraday's constant (Coulomb / Mole) More...
 

Detailed Description

Definition at line 14 of file DifShell.h.

Constructor & Destructor Documentation

DifShell::DifShell ( )

Faraday's constant (Coulomb / Mole)

Definition at line 56 of file DifShell.cpp.

56  :
57  dCbyDt_( 0.0 ),
58  Cmultiplier_(0.0),
59  C_( 0.0 ),
60  Ceq_( 0.0 ),
61  prevC_(0.0),
62  D_( 0.0 ),
63  valence_( 0.0 ),
64  leak_( 0.0 ),
65  shapeMode_(0),
66  length_(0),
67  diameter_(0),
68  thickness_(0),
69  volume_(0),
70  outerArea_(0),
71  innerArea_(0)
72 { ; }
double leak_
Definition: DifShell.h:93
double valence_
Definition: DifShell.h:92
double dCbyDt_
Definition: DifShell.h:86
double innerArea_
Definition: DifShell.h:100
double outerArea_
Definition: DifShell.h:99
double Ceq_
Definition: DifShell.h:89
double thickness_
Definition: DifShell.h:97
double prevC_
Definition: DifShell.h:90
double C_
Definition: DifShell.h:88
double Cmultiplier_
Definition: DifShell.h:87
double D_
Definition: DifShell.h:91
double volume_
Definition: DifShell.h:98
double length_
Definition: DifShell.h:95
double diameter_
Definition: DifShell.h:96
unsigned int shapeMode_
Definition: DifShell.h:94

Member Function Documentation

void DifShell::calculateVolumeArea ( const Eref e)

Definition at line 285 of file DifShell.cpp.

References diameter_, innerArea_, length_, M_PI, outerArea_, shapeMode_, thickness_, and volume_.

Referenced by vReinit(), vSetDiameter(), vSetLength(), vSetShapeMode(), and vSetThickness().

286 {
287 double rOut = diameter_/2.;
288 
289  double rIn = rOut - thickness_;
290 
291  if (rIn <0)
292  rIn = 0.;
293 
294  switch ( shapeMode_ )
295  {
296  /*
297  * Onion Shell
298  */
299  case 0:
300  if ( length_ == 0.0 ) { // Spherical shell
301  volume_ = 4./3.* M_PI * ( rOut * rOut * rOut - rIn * rIn * rIn );
302  outerArea_ = 4*M_PI * rOut * rOut;
303  innerArea_ = 4*M_PI * rIn * rIn;
304  } else { // Cylindrical shell
305  volume_ = ( M_PI * length_ ) * ( rOut * rOut - rIn * rIn );
306  outerArea_ = 2*M_PI * rOut * length_;
307  innerArea_ = 2*M_PI * rIn * length_;
308  }
309 
310  break;
311 
312  /*
313  * Cylindrical Slice
314  */
315  case 1:
316  volume_ = M_PI * diameter_ * diameter_ * thickness_ / 4.0;
317  outerArea_ = M_PI * diameter_ * diameter_ / 4.0;
319  break;
320 
321  /*
322  * User defined
323  */
324  case 3:
325  // Nothing to be done here. Volume and inner-, outer areas specified by
326  // user.
327  break;
328 
329  default:
330  assert( 0 );
331  }
332 }
double innerArea_
Definition: DifShell.h:100
#define M_PI
Definition: numutil.h:34
double outerArea_
Definition: DifShell.h:99
double thickness_
Definition: DifShell.h:97
double volume_
Definition: DifShell.h:98
double length_
Definition: DifShell.h:95
double diameter_
Definition: DifShell.h:96
unsigned int shapeMode_
Definition: DifShell.h:94

+ Here is the caller graph for this function:

const Cinfo * DifShell::initCinfo ( )
static

Definition at line 19 of file DifShell.cpp.

References difShellCinfo, and DifShellBase::initCinfo().

20 {
21 
22 
23  static string doc[] =
24  {
25  "Name", "DifShell",
26  "Author", "Niraj Dudani. Ported to async13 by Subhasis Ray. Rewritten by Asia Jedrzejewska-Szmek",
27  "Description", "DifShell object: Models diffusion of an ion (typically calcium) within an "
28  "electric compartment. A DifShell is an iso-concentration region with respect to "
29  "the ion. Adjoining DifShells exchange flux of this ion, and also keep track of "
30  "changes in concentration due to pumping, buffering and channel currents, by "
31  "talking to the appropriate objects.",
32  };
33  static Dinfo< DifShell > dinfo;
34  static Cinfo difShellCinfo(
35  "DifShell",
37  0,
38  0,
39  &dinfo,
40  doc,
41  sizeof( doc ) / sizeof( string ));
42 
43  return &difShellCinfo;
44 }
static const Cinfo * initCinfo()
Definition: Dinfo.h:60
static const Cinfo * difShellCinfo
Definition: DifShell.cpp:47
Definition: Cinfo.h:18

+ Here is the call graph for this function:

double DifShell::integrate ( double  state,
double  dt,
double  A,
double  B 
)
private

Definition at line 275 of file DifShell.cpp.

References EPSILON.

Referenced by vProcess().

276 {
277  if ( B > EPSILON ) {
278  double x = exp( -B * dt );
279  return state * x + ( A / B ) * ( 1 - x );
280  }
281 
282  return state + A * dt ;
283 }
static const double EPSILON
Definition: DifShell.h:102

+ Here is the caller graph for this function:

void DifShell::vBuffer ( const Eref e,
double  kf,
double  kb,
double  bFree,
double  bBound 
)
virtual

Implements DifShellBase.

Definition at line 376 of file DifShell.cpp.

References Cmultiplier_, and dCbyDt_.

381 {
382  dCbyDt_ += kb * bBound;
383  Cmultiplier_ += kf * bFree;
384 }
double dCbyDt_
Definition: DifShell.h:86
double Cmultiplier_
Definition: DifShell.h:87
void DifShell::vEqTauPump ( const Eref e,
double  kP 
)
virtual

Same as tauPump, except that we use the v value of Ceq.

Implements DifShellBase.

Definition at line 459 of file DifShell.cpp.

References Ceq_, Cmultiplier_, and dCbyDt_.

460 {
461  dCbyDt_ += kP*Ceq_;
462  Cmultiplier_ -= kP;
463 }
double dCbyDt_
Definition: DifShell.h:86
double Ceq_
Definition: DifShell.h:89
double Cmultiplier_
Definition: DifShell.h:87
void DifShell::vFInflux ( const Eref e,
double  I,
double  fraction 
)
virtual

Implements DifShellBase.

Definition at line 429 of file DifShell.cpp.

References dCbyDt_, F, valence_, and volume_.

430 {
431  dCbyDt_ += fraction * I / ( F * valence_ * volume_ );
432 }
double valence_
Definition: DifShell.h:92
double dCbyDt_
Definition: DifShell.h:86
static const double F
Faraday's constant (Coulomb / Mole)
Definition: DifShell.h:104
double volume_
Definition: DifShell.h:98
void DifShell::vFluxFromIn ( const Eref e,
double  innerC,
double  innerThickness 
)
virtual

Implements DifShellBase.

Definition at line 400 of file DifShell.cpp.

References Cmultiplier_, D_, dCbyDt_, innerArea_, thickness_, and volume_.

401 {
402  //influx from inner shell
403  //double dx = ( innerThickness + thickness_ ) / 2.0;
404  double diff = 2.* D_/volume_ * innerArea_ / (innerThickness + thickness_);
405 
406  dCbyDt_ += diff * innerC ;
407  Cmultiplier_ += diff ;
408 }
double dCbyDt_
Definition: DifShell.h:86
double innerArea_
Definition: DifShell.h:100
double thickness_
Definition: DifShell.h:97
double Cmultiplier_
Definition: DifShell.h:87
double D_
Definition: DifShell.h:91
double volume_
Definition: DifShell.h:98
void DifShell::vFluxFromOut ( const Eref e,
double  outerC,
double  outerThickness 
)
virtual

We could pre-compute ( D / Volume ), but let us leave the optimizations for the solver.

Implements DifShellBase.

Definition at line 386 of file DifShell.cpp.

References Cmultiplier_, D_, dCbyDt_, outerArea_, thickness_, and volume_.

387 {
388  double diff =2.* D_ /volume_ * outerArea_ / (outerThickness + thickness_) ;
389  //influx from outer shell
395  dCbyDt_ += diff * outerC;
396  Cmultiplier_ += diff ;
397 
398 }
double dCbyDt_
Definition: DifShell.h:86
double outerArea_
Definition: DifShell.h:99
double thickness_
Definition: DifShell.h:97
double Cmultiplier_
Definition: DifShell.h:87
double D_
Definition: DifShell.h:91
double volume_
Definition: DifShell.h:98
void DifShell::vFOutflux ( const Eref e,
double  I,
double  fraction 
)
virtual

Implements DifShellBase.

Definition at line 434 of file DifShell.cpp.

References dCbyDt_, F, valence_, and volume_.

435 {
436  dCbyDt_ -= fraction * I / ( F * valence_ * volume_ );
437 }
double valence_
Definition: DifShell.h:92
double dCbyDt_
Definition: DifShell.h:86
static const double F
Faraday's constant (Coulomb / Mole)
Definition: DifShell.h:104
double volume_
Definition: DifShell.h:98
double DifShell::vGetC ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 90 of file DifShell.cpp.

References C_.

91 {
92  return C_;
93 }
double C_
Definition: DifShell.h:88
double DifShell::vGetCeq ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 107 of file DifShell.cpp.

References Ceq_.

108 {
109  return Ceq_;
110 }
double Ceq_
Definition: DifShell.h:89
double DifShell::vGetD ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 122 of file DifShell.cpp.

References D_.

123 {
124  return D_;
125 }
double D_
Definition: DifShell.h:91
double DifShell::vGetDiameter ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 195 of file DifShell.cpp.

References diameter_.

196 {
197  return diameter_;
198 }
double diameter_
Definition: DifShell.h:96
double DifShell::vGetInnerArea ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 265 of file DifShell.cpp.

References innerArea_.

266 {
267  return innerArea_;
268 }
double innerArea_
Definition: DifShell.h:100
double DifShell::vGetLeak ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 147 of file DifShell.cpp.

References leak_.

148 {
149  return leak_;
150 }
double leak_
Definition: DifShell.h:93
double DifShell::vGetLength ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 179 of file DifShell.cpp.

References length_.

180 {
181  return length_;
182 }
double length_
Definition: DifShell.h:95
double DifShell::vGetOuterArea ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 247 of file DifShell.cpp.

References outerArea_.

248 {
249  return outerArea_;
250 }
double outerArea_
Definition: DifShell.h:99
unsigned int DifShell::vGetShapeMode ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 163 of file DifShell.cpp.

References shapeMode_.

164 {
165  return shapeMode_;
166 }
unsigned int shapeMode_
Definition: DifShell.h:94
double DifShell::vGetThickness ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 211 of file DifShell.cpp.

References thickness_.

212 {
213  return thickness_;
214 }
double thickness_
Definition: DifShell.h:97
double DifShell::vGetValence ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 137 of file DifShell.cpp.

References valence_.

138 {
139  return valence_;
140 }
double valence_
Definition: DifShell.h:92
double DifShell::vGetVolume ( const Eref e) const
virtual

Implements DifShellBase.

Definition at line 229 of file DifShell.cpp.

References volume_.

230 {
231  return volume_;
232 }
double volume_
Definition: DifShell.h:98
void DifShell::vHillPump ( const Eref e,
double  vMax,
double  Kd,
unsigned int  hill 
)
virtual

Implements DifShellBase.

Definition at line 471 of file DifShell.cpp.

References C_, dCbyDt_, and volume_.

472 {
473  //This needs fixing
474  double ch;
475  switch( hill )
476  {
477  case 0:
478  ch = 1.0;
479  break;
480  case 1:
481  ch = C_;
482  break;
483  case 2:
484  ch = C_ * C_;
485  break;
486  case 3:
487  ch = C_ * C_ * C_;
488  break;
489  case 4:
490  ch = C_ * C_;
491  ch = ch * ch;
492  break;
493  default:
494  ch = pow( C_, static_cast< double >( hill ) );
495  };
496 
497  dCbyDt_ += -( vMax / volume_ ) * ( ch / ( ch + Kd ) );
498 }
double dCbyDt_
Definition: DifShell.h:86
double C_
Definition: DifShell.h:88
double volume_
Definition: DifShell.h:98
void DifShell::vInflux ( const Eref e,
double  I 
)
virtual

I: Amperes F_: Faraday's constant: Coulomb / mole valence_: charge on ion: dimensionless

Implements DifShellBase.

Definition at line 410 of file DifShell.cpp.

References dCbyDt_, F, valence_, and volume_.

411 {
417  dCbyDt_ += I / ( F * valence_ * volume_ );
418 
419 }
double valence_
Definition: DifShell.h:92
double dCbyDt_
Definition: DifShell.h:86
static const double F
Faraday's constant (Coulomb / Mole)
Definition: DifShell.h:104
double volume_
Definition: DifShell.h:98
void DifShell::vMMPump ( const Eref e,
double  vMax,
double  Kd 
)
virtual

Implements DifShellBase.

Definition at line 465 of file DifShell.cpp.

References C_, Cmultiplier_, and volume_.

466 {
467  Cmultiplier_ += ( vMax / volume_ ) / ( C_ + Kd ) ;
468 
469 }
double C_
Definition: DifShell.h:88
double Cmultiplier_
Definition: DifShell.h:87
double volume_
Definition: DifShell.h:98
void DifShell::vOutflux ( const Eref e,
double  I 
)
virtual

Same as influx, except subtracting.

Implements DifShellBase.

Definition at line 424 of file DifShell.cpp.

References dCbyDt_, F, valence_, and volume_.

425 {
426  dCbyDt_ -= I / ( F * valence_ * volume_ );
427 }
double valence_
Definition: DifShell.h:92
double dCbyDt_
Definition: DifShell.h:86
static const double F
Faraday's constant (Coulomb / Mole)
Definition: DifShell.h:104
double volume_
Definition: DifShell.h:98
void DifShell::vProcess ( const Eref e,
ProcPtr  p 
)
virtual

Send ion concentration and thickness to adjacent DifShells. They will then compute their incoming fluxes.

Send ion concentration to ion buffers. They will send back information on the reaction (forward / backward rates ; free / bound buffer concentration) immediately, which this DifShell will use to find amount of ion captured or released in the current time-step.

Implements DifShellBase.

Definition at line 348 of file DifShell.cpp.

References C_, Cmultiplier_, DifShellBase::concentrationOut(), dCbyDt_, ProcInfo::dt, DifShellBase::innerDifSourceOut(), integrate(), leak_, DifShellBase::outerDifSourceOut(), prevC_, and thickness_.

349 {
357 
366  dCbyDt_ = leak_;
367  Cmultiplier_ = 0;
368  prevC_ = C_;
369 
370  innerDifSourceOut()->send( e, prevC_, thickness_ );
371  outerDifSourceOut()->send( e, prevC_, thickness_ );
372 
373  concentrationOut()->send( e, C_ );
374 
375 }
double leak_
Definition: DifShell.h:93
double dCbyDt_
Definition: DifShell.h:86
static SrcFinfo1< double > * concentrationOut()
double integrate(double state, double dt, double A, double B)
Definition: DifShell.cpp:275
double thickness_
Definition: DifShell.h:97
static SrcFinfo2< double, double > * innerDifSourceOut()
double dt
Definition: ProcInfo.h:18
double prevC_
Definition: DifShell.h:90
double C_
Definition: DifShell.h:88
double Cmultiplier_
Definition: DifShell.h:87
static SrcFinfo2< double, double > * outerDifSourceOut()

+ Here is the call graph for this function:

void DifShell::vReinit ( const Eref e,
ProcPtr  p 
)
virtual

Implements DifShellBase.

Definition at line 334 of file DifShell.cpp.

References C_, calculateVolumeArea(), Ceq_, Cmultiplier_, DifShellBase::concentrationOut(), dCbyDt_, DifShellBase::innerDifSourceOut(), leak_, DifShellBase::outerDifSourceOut(), prevC_, and thickness_.

335 {
336  dCbyDt_ = leak_;
337  Cmultiplier_ = 0;
339 
340  C_= Ceq_;
341  prevC_ = Ceq_;
342  concentrationOut()->send( e, C_ );
343  innerDifSourceOut()->send( e, prevC_, thickness_ );
344  outerDifSourceOut()->send( e, prevC_, thickness_ );
345 
346 }
double leak_
Definition: DifShell.h:93
double dCbyDt_
Definition: DifShell.h:86
static SrcFinfo1< double > * concentrationOut()
double Ceq_
Definition: DifShell.h:89
double thickness_
Definition: DifShell.h:97
static SrcFinfo2< double, double > * innerDifSourceOut()
double prevC_
Definition: DifShell.h:90
double C_
Definition: DifShell.h:88
double Cmultiplier_
Definition: DifShell.h:87
void calculateVolumeArea(const Eref &e)
Definition: DifShell.cpp:285
static SrcFinfo2< double, double > * outerDifSourceOut()

+ Here is the call graph for this function:

void DifShell::vSetC ( const Eref e,
double  C 
)
virtual

C is a read-only field.

Implements DifShellBase.

Definition at line 80 of file DifShell.cpp.

References C_, and prevC_.

81 {
82  if ( C < 0.0 ) {
83  cerr << "Error: DifShell: C cannot be negative!\n";
84  return;
85  }
86 
87  C_ = C;
88  prevC_ = C_;
89 }
double prevC_
Definition: DifShell.h:90
double C_
Definition: DifShell.h:88
void DifShell::vSetCeq ( const Eref e,
double  Ceq 
)
virtual

Implements DifShellBase.

Definition at line 95 of file DifShell.cpp.

References C_, Ceq_, and prevC_.

96 {
97  if ( Ceq < 0.0 ) {
98  cerr << "Error: DifShell: Ceq cannot be negative!\n";
99  return;
100  }
101 
102  Ceq_ = Ceq;
103  prevC_ = Ceq;
104  C_ = Ceq;
105 }
double Ceq_
Definition: DifShell.h:89
double prevC_
Definition: DifShell.h:90
double C_
Definition: DifShell.h:88
void DifShell::vSetD ( const Eref e,
double  D 
)
virtual

Implements DifShellBase.

Definition at line 112 of file DifShell.cpp.

References D_.

113 {
114  if ( D < 0.0 ) {
115  cerr << "Error: DifShell: D cannot be negative!\n";
116  return;
117  }
118 
119  D_ = D;
120 }
double D_
Definition: DifShell.h:91
void DifShell::vSetDiameter ( const Eref e,
double  diameter 
)
virtual

Implements DifShellBase.

Definition at line 184 of file DifShell.cpp.

References calculateVolumeArea(), and diameter_.

185 {
186  if ( diameter < 0.0 ) {
187  cerr << "Error: DifShell: diameter cannot be negative!\n";
188  return;
189  }
190 
191  diameter_ = diameter;
193 }
void calculateVolumeArea(const Eref &e)
Definition: DifShell.cpp:285
double diameter_
Definition: DifShell.h:96

+ Here is the call graph for this function:

void DifShell::vSetInnerArea ( const Eref e,
double  innerArea 
)
virtual

Implements DifShellBase.

Definition at line 252 of file DifShell.cpp.

References innerArea_, and shapeMode_.

253 {
254  if ( shapeMode_ != 3 )
255  cerr << "Warning: DifShell: Trying to set innerArea, when shapeMode is not USER-DEFINED\n";
256 
257  if ( innerArea < 0.0 ) {
258  cerr << "Error: DifShell: innerArea cannot be negative!\n";
259  return;
260  }
261 
262  innerArea_ = innerArea;
263 }
double innerArea_
Definition: DifShell.h:100
unsigned int shapeMode_
Definition: DifShell.h:94
void DifShell::vSetLeak ( const Eref e,
double  leak 
)
virtual

Implements DifShellBase.

Definition at line 142 of file DifShell.cpp.

References leak_.

143 {
144  leak_ = leak;
145 }
double leak_
Definition: DifShell.h:93
void DifShell::vSetLength ( const Eref e,
double  length 
)
virtual

Implements DifShellBase.

Definition at line 168 of file DifShell.cpp.

References calculateVolumeArea(), and length_.

169 {
170  if ( length < 0.0 ) {
171  cerr << "Error: DifShell: length cannot be negative!\n";
172  return;
173  }
174 
175  length_ = length;
177 }
void calculateVolumeArea(const Eref &e)
Definition: DifShell.cpp:285
double length_
Definition: DifShell.h:95

+ Here is the call graph for this function:

void DifShell::vSetOuterArea ( const Eref e,
double  outerArea 
)
virtual

Implements DifShellBase.

Definition at line 234 of file DifShell.cpp.

References outerArea_, and shapeMode_.

235 {
236  if (shapeMode_ != 3 )
237  cerr << "Warning: DifShell: Trying to set outerArea, when shapeMode is not USER-DEFINED\n";
238 
239  if ( outerArea < 0.0 ) {
240  cerr << "Error: DifShell: outerArea cannot be negative!\n";
241  return;
242  }
243 
244  outerArea_ = outerArea;
245 }
double outerArea_
Definition: DifShell.h:99
unsigned int shapeMode_
Definition: DifShell.h:94
void DifShell::vSetShapeMode ( const Eref e,
unsigned int  shapeMode 
)
virtual

Implements DifShellBase.

Definition at line 153 of file DifShell.cpp.

References calculateVolumeArea(), and shapeMode_.

154 {
155  if ( shapeMode != 0 && shapeMode != 1 && shapeMode != 3 ) {
156  cerr << "Error: DifShell: I only understand shapeModes 0, 1 and 3.\n";
157  return;
158  }
159  shapeMode_ = shapeMode;
161 }
void calculateVolumeArea(const Eref &e)
Definition: DifShell.cpp:285
unsigned int shapeMode_
Definition: DifShell.h:94

+ Here is the call graph for this function:

void DifShell::vSetThickness ( const Eref e,
double  thickness 
)
virtual

Implements DifShellBase.

Definition at line 200 of file DifShell.cpp.

References calculateVolumeArea(), and thickness_.

201 {
202  if ( thickness < 0.0 ) {
203  cerr << "Error: DifShell: thickness cannot be negative!\n";
204  return;
205  }
206 
207  thickness_ = thickness;
209 }
double thickness_
Definition: DifShell.h:97
void calculateVolumeArea(const Eref &e)
Definition: DifShell.cpp:285

+ Here is the call graph for this function:

void DifShell::vSetValence ( const Eref e,
double  valence 
)
virtual

Implements DifShellBase.

Definition at line 127 of file DifShell.cpp.

References valence_.

128 {
129  if ( valence < 0.0 ) {
130  cerr << "Error: DifShell: valence cannot be negative!\n";
131  return;
132  }
133 
134  valence_ = valence;
135 }
double valence_
Definition: DifShell.h:92
void DifShell::vSetVolume ( const Eref e,
double  volume 
)
virtual

Implements DifShellBase.

Definition at line 216 of file DifShell.cpp.

References shapeMode_, and volume_.

217 {
218  if ( shapeMode_ != 3 )
219  cerr << "Warning: DifShell: Trying to set volume, when shapeMode is not USER-DEFINED\n";
220 
221  if ( volume < 0.0 ) {
222  cerr << "Error: DifShell: volume cannot be negative!\n";
223  return;
224  }
225 
226  volume_ = volume;
227 }
double volume_
Definition: DifShell.h:98
unsigned int shapeMode_
Definition: DifShell.h:94
void DifShell::vStoreInflux ( const Eref e,
double  flux 
)
virtual

Implements DifShellBase.

Definition at line 439 of file DifShell.cpp.

References dCbyDt_, and volume_.

440 {
441  dCbyDt_ += flux / volume_;
442 }
double dCbyDt_
Definition: DifShell.h:86
double volume_
Definition: DifShell.h:98
void DifShell::vStoreOutflux ( const Eref e,
double  flux 
)
virtual

Implements DifShellBase.

Definition at line 444 of file DifShell.cpp.

References dCbyDt_, and volume_.

445 {
446  dCbyDt_ -= flux / volume_;
447 }
double dCbyDt_
Definition: DifShell.h:86
double volume_
Definition: DifShell.h:98
void DifShell::vTauPump ( const Eref e,
double  kP,
double  Ceq 
)
virtual

Implements DifShellBase.

Definition at line 449 of file DifShell.cpp.

References Cmultiplier_, and dCbyDt_.

450 {
451  //dCbyDt_ += -kP * ( C_ - Ceq );
452  dCbyDt_ += kP*Ceq;
453  Cmultiplier_ -= kP;
454 }
double dCbyDt_
Definition: DifShell.h:86
double Cmultiplier_
Definition: DifShell.h:87

Member Data Documentation

double DifShell::C_
private

Definition at line 88 of file DifShell.h.

Referenced by vGetC(), vHillPump(), vMMPump(), vProcess(), vReinit(), vSetC(), and vSetCeq().

double DifShell::Ceq_
private

Definition at line 89 of file DifShell.h.

Referenced by vEqTauPump(), vGetCeq(), vReinit(), and vSetCeq().

double DifShell::Cmultiplier_
private
double DifShell::D_
private

Definition at line 91 of file DifShell.h.

Referenced by vFluxFromIn(), vFluxFromOut(), vGetD(), and vSetD().

double DifShell::diameter_
private

Definition at line 96 of file DifShell.h.

Referenced by calculateVolumeArea(), vGetDiameter(), and vSetDiameter().

const double DifShell::EPSILON = 1.0e-10
staticprivate

Definition at line 102 of file DifShell.h.

Referenced by integrate().

const double DifShell::F = 96485.3415
staticprivate

Faraday's constant (Coulomb / Mole)

Definition at line 104 of file DifShell.h.

Referenced by vFInflux(), vFOutflux(), vInflux(), and vOutflux().

double DifShell::innerArea_
private

Definition at line 100 of file DifShell.h.

Referenced by calculateVolumeArea(), vFluxFromIn(), vGetInnerArea(), and vSetInnerArea().

double DifShell::leak_
private

Definition at line 93 of file DifShell.h.

Referenced by vGetLeak(), vProcess(), vReinit(), and vSetLeak().

double DifShell::length_
private

Definition at line 95 of file DifShell.h.

Referenced by calculateVolumeArea(), vGetLength(), and vSetLength().

double DifShell::outerArea_
private

Definition at line 99 of file DifShell.h.

Referenced by calculateVolumeArea(), vFluxFromOut(), vGetOuterArea(), and vSetOuterArea().

double DifShell::prevC_
private

Definition at line 90 of file DifShell.h.

Referenced by vProcess(), vReinit(), vSetC(), and vSetCeq().

unsigned int DifShell::shapeMode_
private
double DifShell::thickness_
private
double DifShell::valence_
private

Definition at line 92 of file DifShell.h.

Referenced by vFInflux(), vFOutflux(), vGetValence(), vInflux(), vOutflux(), and vSetValence().


The documentation for this class was generated from the following files: