polykin.transport.diffusion¤
uptake_sphere ¤
uptake_sphere(t: float, a: float, D: float) -> float
Fractional mass uptake for transient diffusion in a sphere.
For a sphere of radius \(a\), where the concentration is initially \(C_0\) everywhere, and the surface concentration is maintained at \(C_s\), the fractional mass uptake is:
where \(t\) is the time, and \(D\) is the diffusion coefficient.
References
- J. Crank, "The mathematics of diffusion", Oxford University Press, 1975, p. 91.
PARAMETER | DESCRIPTION |
---|---|
t
|
Time (s).
TYPE:
|
a
|
Radius of sphere (m).
TYPE:
|
D
|
Diffusion coefficient (m²/s).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Fractional mass uptake. |
See also
profile_sphere
: related method to determine the concentration profile.
Examples:
Determine the fractional mass uptake after 100 seconds for a polymer sphere with a radius of 0.2 mm and a diffusion coefficient of 1e-10 m²/s.
>>> from polykin.transport.diffusion import uptake_sphere
>>> uptake_sphere(t=1e2, a=0.2e-3, D=1e-10)
0.9484368978658284
Source code in src/polykin/transport/diffusion.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
|