mibitrans.transport API reference
model_parent
Results
Object that holds model results and input parameters for individual runs.
Source code in mibitrans/transport/model_parent.py
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 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | |
attenuation_parameters
property
Attenuation parameters of the model used for the results.
biodegradation_capacity
property
Biodegradation capacity of the model used for the results. Only for instant reaction models.
c_source
property
Nett source zone concentration used in the model.
cxyt
property
Modelled concentration for all x, y and t, using the input parameters present in this object.
cxyt_noBC
property
Concentration in domain without subtracting biodegradation capacity, in the instant reaction model.
electron_acceptors
property
Electron acceptor/byproduct concentrations of the model used for the results.
hydrological_parameters
property
Hydrological parameters of the model used for the results.
input_parameters
property
Return the input arguments for the model in the form of a dictionary, based on current values.
k_source
property
Source depletion rate used in the model.
mode
property
Model mode used for running the model.
model_parameters
property
Space-time discretization parameters of the model used for the results.
model_type
property
Class object of the model that generated the results.
relative_cxyt
property
Modelled concentration for all x, y and t, divided by the maximum source zone concentration.
rv
property
Retarded flow velocity used in the model.
short_description
property
Short description of the model that generated the results.
source_parameters
property
Source parameters of the model used for the results.
t
property
Model t discretization array.
utilization_factor
property
Utilization factor of the model used for the results.
x
property
Model x discretization array.
y
property
Model y discretization array.
__init__(model)
Records input parameters and resulting output based given model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Transport3D
|
Model object from which to initialize results. Should be child class of Transport3D. |
required |
Properties
model_type (Transport3D) : Class instance of model used to generate results. short_description (str) : Short description of model. x (np.ndarray) : Numpy array with model x (longitudinal direction) discretization, corresponding to model_parameters, with distance in [m]. y (np.ndarray) : Numpy array with model y (transverse horizontal direction) discretization, corresponding to model_parameters, with distance in [m]. t (np.ndarray) : Numpy array with model t (time) discretization, corresponding to model_parameters, with time in [days]. hydrological_parameters (HydrologicalParameters) : Dataclass holding the hydrological parameters used to run the model. attenuation_parameters (AttenuationParameters) : Dataclass holding the attenuation parameters used to run the model. source_parameters (SourceParameters) : Dataclass holding the source parameters used to run the model. model_parameters (ModelParameters): Dataclass holding the model parameters used to run the model. electron_acceptors (ElectronAcceptors): Dataclass holding the electron acceptor concentrations used to run the model. Only for instant reaction, None for other models. utilization_factor (UtilizationFactor): Dataclass holding the electron acceptor utilization factors used to run the model. Only for instant reaction, None for other models. mode (str) : Model mode of the used model. Either ‘linear’ or ‘instant_reaction’ rv (float) : Retarded flow velocity, as v / R [m/day]. k_source (float) : Source depletion rate [1/days]. For infinite source mass, k_source = 0, and therefore, no source depletion takes place. c_source (np.ndarray) : Initial nett source zone concentrations. For multiple source zones, nett concentration in nth source zone is original concentration minus concentration in source zone n - 1. For instant reaction model, the biodegradation capacity is added to the outermost source zone. biodegradation_capacity (float) : Maximum capacity of biodegradation taking place, based on electron acceptor concentrations and utilization factor. cxyt (np.ndarray) : Three-dimensional numpy array with concentrations for all x, y and t positions. Indexed as cxyt[t,y,x]. In [g/m3]. relative_cxyt (np.ndarray) : Three-dimensional numpy array with relative concentrations for all x, y and t positions. Compared to maximum source zone concentrations. cxyt_noBC (np.ndarray) : Three-dimensional numpy array with concentrations for all x, y and t of instant reaction models, without subtracting the biodegradation capacity, in [g/m3]. input_parameters (dict) : Dictionary of input parameter dataclasses for the model. Does not include instant reaction parameters.
Functions:
| Name | Description |
|---|---|
centerline |
Plot center of contaminant plume, at a specified time and y position. |
transverse |
Plot concentration distribution as a line horizontal transverse to the plume extent. |
breakthrough |
Plot contaminant breakthrough curve at given x and y position in model domain. |
plume_2d |
Plot contaminant plume as a 2D colormesh, at a specified time. |
plume_3d |
Plot contaminant plume as a 3D surface, at a specified time. |
mass_balance |
Return a mass balance object with source and plume characteristics at given time(s). |
Source code in mibitrans/transport/model_parent.py
breakthrough(x_position, y_position=0, relative_concentration=False, animate=False, **kwargs)
Plot contaminant breakthrough curve at given x and y position in model domain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_position
|
x-position along the plume (longitudinal direction). |
required | |
y_position
|
y-position across the plume (transverse horizontal direction). By default, at the center of the plume (at y=0). |
required | |
relative_concentration (bool, optional)
|
If set to True, will plot concentrations relative to maximum source zone concentrations at t=0. By default, absolute concentrations are shown. |
required | |
animate
|
bool
|
If True, animation of contaminant plume until given time is shown. Default is False. |
False
|
**kwargs
|
Arguments to be passed to plt.plot(). |
required |
Source code in mibitrans/transport/model_parent.py
centerline(y_position=0, time=None, relative_concentration=False, animate=False, **kwargs)
Plot center of contaminant plume of this model, at a specified time and y position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_position
|
float
|
y-position across the plume (transverse horizontal direction) for the plot. By default, the center of the plume at y=0 is plotted. |
0
|
time
|
float
|
Point of time for the plot. Will show the closest time step to given value. By default, last point in time is plotted. |
None
|
relative_concentration (bool, optional)
|
If set to True, will plot concentrations relative to maximum source zone concentrations at t=0. By default, absolute concentrations are shown. |
required | |
animate
|
bool
|
If True, animation of contaminant plume until given time is shown. Default is False. |
False
|
**kwargs
|
Arguments to be passed to plt.plot(). |
required |
Source code in mibitrans/transport/model_parent.py
mass_balance(time='all', verbose=False)
Return a mass balance object with source and plume characteristics at given time(s).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time
|
float | str
|
Time at which to initially calculate the mass balance. Either as a value between 0 and model end time. Or as ‘all’, which will calculate mass balance attributes for each time step as arrays. |
'all'
|
verbose
|
bool
|
Verbose mode. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
mass_balance_object |
Object of the MassBalance class. Output is accessed through object properties. Can be called to change the time of the mass balance. |
The mass balance object has the following properties
plume_mass: Mass of the contaminant plume inside the model extent, at the given time(s), in [g]. source_mass: Mass of the contaminant source at the given time(s), in [g]. No values are given for models with infinite source mass. delta_source: Difference in mass between contaminant source at given time and source at t = 0, in [g]. degraded_mass: Mass of plume contaminant degradation at the given time(s), compared to a model without degradation, in [g]. Has no value if model does not consider degradation. model_without_degradation: Object of model without degradation. Has no value if model does not consider degradation. instant_reaction_degraded_mass(self): Difference in plume mass instant reaction with and without biodegradation capacity subtracted, in [g]. electron_acceptor_change(self): Change in electron acceptor/byproduct masses at the given time(s), in [g]. Only for instant reaction.
Source code in mibitrans/transport/model_parent.py
plume_2d(time=None, relative_concentration=False, animate=False, **kwargs)
Plot contaminant plume as a 2D colormesh, at a specified time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time
|
float
|
Point of time for the plot. Will show the closest time step to given value. By default, last point in time is plotted. |
None
|
relative_concentration (bool, optional)
|
If set to True, will plot concentrations relative to maximum source zone concentrations at t=0. By default, absolute concentrations are shown. |
required | |
animate
|
bool
|
If True, animation of contaminant plume until given time is shown. Default is False. |
False
|
**kwargs
|
Arguments to be passed to plt.pcolormesh(). |
required |
Returns a matrix plot of the input plume as object.
Source code in mibitrans/transport/model_parent.py
plume_3d(time=None, relative_concentration=False, animate=False, **kwargs)
Plot contaminant plume as a 3D surface, at a specified time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time
|
float
|
Point of time for the plot. Will show the closest time step to given value. By default, last point in time is plotted. |
None
|
relative_concentration (bool, optional)
|
If set to True, will plot concentrations relative to maximum source zone concentrations at t=0. By default, absolute concentrations are shown. |
required | |
animate
|
bool
|
If True, animation of contaminant plume until given time is shown. Default is False. |
False
|
**kwargs
|
Arguments to be passed to plt.plot_surface(). |
required |
Returns:
| Type | Description |
|---|---|
|
ax (matplotlib.axes._axes.Axes) : Matplotlib Axes object of plume plot. or if animate == True |
|
|
anim (matplotib.animation.FuncAnimation) : Matplotlib FuncAnimation object of plume plot. |
Source code in mibitrans/transport/model_parent.py
transverse(x_position, time=None, relative_concentration=False, animate=False, **kwargs)
Plot concentration distribution as a line horizontal transverse to the plume extent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_position
|
x-position along the plume (longitudinal direction) for the plot. |
required | |
time
|
float
|
Point of time for the plot. Will show the closest time step to given value. By default, last point in time is plotted. |
None
|
relative_concentration (bool, optional)
|
If set to True, will plot concentrations relative to maximum source zone concentrations at t=0. By default, absolute concentrations are shown. |
required | |
animate
|
bool
|
If True, animation of contaminant plume until given time is shown. Default is False. |
False
|
**kwargs
|
Arguments to be passed to plt.plot(). |
required |
Source code in mibitrans/transport/model_parent.py
Transport3D
Bases: ABC
Parent class for all 3-dimensional analytical solutions.
Source code in mibitrans/transport/model_parent.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
attenuation_parameters
property
writable
Rename to shorthand form of attenuation_parameters inside class for ease of use.
electron_acceptors
property
Return dictionary of electron acceptor parameters.
hydrological_parameters
property
writable
Rename to shorthand form of hydrological_parameters inside class for ease of use.
input_parameters
property
Return the input arguments for the model in the form of a dictionary, based on current values.
mode
property
writable
Model mode property. Either ‘linear’ or ‘instant_reaction’.
model_parameters
property
writable
Rename to shorthand form of model_parameters inside class for ease of use.
relative_cxyt
property
Compute relative concentration c(x,y,t)/c0, where c0 is the maximum source zone concentration at t=0.
short_description
abstractmethod
property
Short string describing model type.
source_parameters
property
writable
Rename to shorthand form of source_parameters inside class for ease of use.
utilization_factor
property
Return dictionary of utilization factor property.
__init__(hydrological_parameters, attenuation_parameters, source_parameters, model_parameters, verbose=False)
Initialize parent class object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hydrological_parameters (mibitrans.data.parameters.HydrologicalParameters)
|
Dataclass object containing hydrological parameters from HydrologicalParameters. |
required | |
attenuation_parameters (mibitrans.data.read.AttenuationParameters)
|
Dataclass object containing adsorption, degradation and diffusion parameters from AttenuationParameters. |
required | |
source_parameters (mibitrans.data.read.SourceParameters)
|
Dataclass object containing source parameters from SourceParameters. |
required | |
model_parameters (mibitrans.data.read.ModelParameters)
|
Dataclass object containing model parameters from ModelParameters. |
required | |
verbose
|
bool
|
Verbose mode. Defaults to False. |
False
|
Source code in mibitrans/transport/model_parent.py
instant_reaction(electron_acceptors, utilization_factor=UtilizationFactor(util_oxygen=3.14, util_nitrate=4.9, util_ferrous_iron=21.8, util_sulfate=4.7, util_methane=0.78))
Enable and set up parameters for instant reaction model.
Instant reaction model assumes that biodegradation is an instantaneous process compared to the groundwater flow velocity. The biodegradation is assumed to be governed by the availability of electron acceptors, and quantified using stoichiometric relations from the degradation reactions. Considered are concentrations of acceptors Oxygen, Nitrate and Sulfate, and reduced species Ferrous Iron and Methane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
electron_acceptors
|
ElectronAcceptors
|
ElectronAcceptor dataclass containing electron acceptor concentrations. Alternatively provided as list, numpy array or dictionary corresponding with delta_oxygen, delta_nitrate, ferrous_iron, delta_sulfate and methane. For more information, see documentation for ElectronAcceptors. |
required |
utilization_factor
|
UtilizationFactor
|
UtilizationFactor dataclass containing electron acceptor utilization factors. Alternatively provided as list, numpy array or dictionary corresponding with information, see documentation of UtilizationFactor. By default, electron acceptor utilization factors for a BTEX mixture are used, based on values by Wiedemeier et al. (1995). |
UtilizationFactor(util_oxygen=3.14, util_nitrate=4.9, util_ferrous_iron=21.8, util_sulfate=4.7, util_methane=0.78)
|
Source code in mibitrans/transport/model_parent.py
run()
abstractmethod
sample(x_position, y_position, t_position)
abstractmethod
Method that calculates concentration at single, specified location in model domain.
models
Anatrans
Bases: Transport3D
Model class using an analytical solution based on Bear (1979), Domenico (1987) & Newell et al. (1997).
Under the assumption that C(x,y,z,t) = C(x,t) * C(y,t) * C(z,t), the 3D ADE can be broken up in three separate differential equations which can be solved individually. For C(x,t) the solution is given in Bear (1979), C(y,t) and C(z,t) can be derived from Crank (1975). The equation used for Anatrans is the combination of these solutions, with addition of source depletion, source superposition and instant reaction model, described in Newell et al. (1997) and implemented in the BIOSCREEN screening model. The solution of Newell et al. (1997) is based of the Domenico (1987) solution, a truncated version of the equation described above, which introduces an error with a size dependent on the ratio of flow velocity and longitudinal dispersivity. Anatrans instead uses the fully untruncated version.
Bear, J. 1979. Hydraulics of Ground Water. New York: McGraw-Hill.
Crank, J. 1975. The mathematics of Diffusion. New York: Oxford University Press.
Domenico, P. A. (1987). An analytical model for multidimensional transport of a decaying contaminant species. Journal of Hydrology, 91(1-2), 49-58.
Newell, C. J., McLeod, R. K., & Gonzales, J. R. (1997). BIOSCREEN natural attenuation decision support system version 1.4 revisions, Tech. rep., U.S. EPA.
Source code in mibitrans/transport/models.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 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 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
short_description
property
Short description of model type.
__init__(hydrological_parameters, attenuation_parameters, source_parameters, model_parameters, verbose=False)
Initialize model object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hydrological_parameters (mibitrans.data.parameters.HydrologicalParameters)
|
Dataclass object containing hydrological parameters from HydrologicalParameters. |
required | |
attenuation_parameters (mibitrans.data.read.AttenuationParameters)
|
Dataclass object containing adsorption, degradation and diffusion parameters from AttenuationParameters. |
required | |
source_parameters (mibitrans.data.read.SourceParameters)
|
Dataclass object containing source parameters from SourceParameters. |
required | |
model_parameters (mibitrans.data.read.ModelParameters)
|
Dataclass object containing model parameters from ModelParameters. |
required | |
verbose
|
bool
|
Verbose mode. Defaults to False. |
False
|
Attributes:
| Name | Type | Description |
|---|---|---|
mode |
str)
|
Current model mode. Is ‘linear’ by default. Once instant reaction parameters are provided. Use this attribute to switch between ‘linear’ and ‘instant_reaction’ models. |
cxyt |
np.ndarray)
|
Output array containing concentrations in model domain, in [g/m^3]. Indexed as [t,y,x] |
relative_cxyt |
np.ndarray)
|
Output array with concentrations in model domain, divided by the maximum source zone concentration at t=0. Indexed as [t,y,x]. |
x |
np.ndarray)
|
Discretized model x-dimension, in [m]. |
y |
np.ndarray)
|
Discretized model y-dimension, in [y]. |
t |
np.ndarray)
|
Discretized model t-dimension, in [days]. |
c_source |
np.ndarray)
|
Nett source zone concentrations, accounting for source superposition, in [g/m^3]. |
vr |
float)
|
Retarded groundwater flow velocity, in [m/d]. |
k_source |
float)
|
Source zone decay rate, in [1/days]. |
biodegradation_capacity |
float)
|
Maximum capacity of biodegradation given provided electron acceptor |
Functions:
| Name | Description |
|---|---|
run |
Run model with current parameters, returns Results object. |
sample |
Calculate concentration at any given position and point in time. |
instant_reaction |
Activate the instant reaction model by providing electron acceptor concentrations. And optionally electron acceptor utilization factors. Switch between model modes by using the mode attribute. |
centerline |
Plot center of contaminant plume of this model, at a specified time and y position. |
transverse |
Plot concentration distribution as a line horizontal transverse to the plume extent. |
breakthrough |
Plot contaminant breakthrough curve at given x and y position in model domain. |
plume_2d |
Plot contaminant plume as a 2D colormesh, at a specified time. |
plume_3d |
Plot contaminant plume as a 3D surface, at a specified time. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If input is not of the correct Dataclass. |
Source code in mibitrans/transport/models.py
run()
Calculate the concentration for all discretized x, y and t using the analytical transport model.
Source code in mibitrans/transport/models.py
sample(x_position, y_position, time)
Give concentration at any given position and point in time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_position
|
float
|
x position in domain extent [m]. |
required |
y_position
|
float
|
y position in domain extent [m]. |
required |
time
|
float
|
time for which concentration is sampled [days]. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
concentration |
float
|
concentration at given position and point in time [g/m^3]. |
Source code in mibitrans/transport/models.py
Bioscreen
Bases: Anatrans
Model class using the analytical solution implemented in the BIOSCREEN screening model, Newell et al. (1997).
This model is an exact implementation of the transport equations implemented in the BIOSCREEN screening model of Newell et al. (1997), which is based on the Domenico (1987) analytical model. Using a truncated version of the equation used in the Anatrans model. This model is implemented as a method of comparison with the original BIOSCREEN software. And is included for legacy reasons, since it is the first model implemented in the mibitrans package, serving as a basis for the other models. However, caution should be taken when using this model, since a varying error is introduced by using the truncated analytical solution. The error is most prominent for shorter times and distances from the source, and depends on the ratio of flow velocity and longitudinal dispersivity. For modelling, the Anatrans (untruncated approximate solution) and Mibitrans (exact analytical solution) models are recommended instead.
Domenico, P. A. (1987). An analytical model for multidimensional transport of a decaying contaminant species. Journal of Hydrology, 91(1-2), 49-58.
Newell, C. J., McLeod, R. K., & Gonzales, J. R. (1997). BIOSCREEN natural attenuation decision support system version 1.4 revisions, Tech. rep., U.S. EPA.
Source code in mibitrans/transport/models.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |
short_description
property
Short description of model type.
__init__(hydrological_parameters, attenuation_parameters, source_parameters, model_parameters, verbose=False)
Initialize model object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hydrological_parameters (mibitrans.data.parameters.HydrologicalParameters)
|
Dataclass object containing hydrological parameters from HydrologicalParameters. |
required | |
attenuation_parameters (mibitrans.data.read.AttenuationParameters)
|
Dataclass object containing adsorption, degradation and diffusion parameters from AttenuationParameters. |
required | |
source_parameters (mibitrans.data.read.SourceParameters)
|
Dataclass object containing source parameters from SourceParameters. |
required | |
model_parameters (mibitrans.data.read.ModelParameters)
|
Dataclass object containing model parameters from ModelParameters. |
required | |
verbose
|
bool
|
Verbose mode. Defaults to False. |
False
|
Attributes:
| Name | Type | Description |
|---|---|---|
mode |
str)
|
Current model mode. Is ‘linear’ by default. Once instant reaction parameters are provided. Use this attribute to switch between ‘linear’ and ‘instant_reaction’ models. |
cxyt |
np.ndarray)
|
Output array containing concentrations in model domain, in [g/m^3]. Indexed as [t,y,x] |
relative_cxyt |
np.ndarray)
|
Output array with concentrations in model domain, divided by the maximum source zone concentration at t=0. Indexed as [t,y,x]. |
x |
np.ndarray)
|
Discretized model x-dimension, in [m]. |
y |
np.ndarray)
|
Discretized model y-dimension, in [y]. |
t |
np.ndarray)
|
Discretized model t-dimension, in [days]. |
c_source |
np.ndarray)
|
Nett source zone concentrations, accounting for source superposition, in [g/m^3]. |
vr |
float)
|
Retarded groundwater flow velocity, in [m/d]. |
k_source |
float)
|
Source zone decay rate, in [1/days]. |
biodegradation_capacity |
float)
|
Maximum capacity of biodegradation given provided electron acceptor |
Functions:
| Name | Description |
|---|---|
run |
Run model with current parameters, returns Results object. |
sample |
Calculate concentration at any given position and point in time. |
instant_reaction |
Activate the instant reaction model by providing electron acceptor concentrations. And optionally electron acceptor utilization factors. Switch between model modes by using the mode attribute. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If input is not of the correct Dataclass. |
Source code in mibitrans/transport/models.py
Mibitrans
Bases: Transport3D
Model class using an exact analytical solution as described in Karanovic (2007), based on Wexler (1992).
Karanovic (2007) implemented the Wexler (1992) exact analytical solution in the Excel based BIOSCREEN-AT, and added source depletion, akin to that implemented in its predecessor BIOSCREEN by Newell et al. (1997). The Mibitrans model allows for the same method as used in BIOSCREEN-AT, but expands it by allowing multiple source zones (by means of superposition) and including the instant reaction model. These were present in the original BIOSCREEN, but not reimplemented in BIOSCREEN-AT. Using a single source zone in this model, and not using the instant reaction option will make the Mibitrans solution resolve to the equation described in Karanovic (2007). Which in turn resolves to the Wexler (1992) solution if source depletion is disabled.
Karanovic, M., Neville, C. J., & Andrews, C. B. (2007). BIOSCREEN‐AT: BIOSCREEN with an exact analytical solution. Groundwater, 45(2), 242-245.
Newell, C. J., McLeod, R. K., & Gonzales, J. R. (1997). BIOSCREEN natural attenuation decision support system version 1.4 revisions, Tech. rep., U.S. EPA.
Wexler, E. J. (1992). Analytical solutions for one-, two-, and three-dimensional solute transport in ground-water systems with uniform flow. US Government Printing Office.
Source code in mibitrans/transport/models.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
short_description
property
Return short description of model type.
__init__(hydrological_parameters, attenuation_parameters, source_parameters, model_parameters, verbose=False)
Initialize model object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hydrological_parameters (mibitrans.data.parameters.HydrologicalParameters)
|
Dataclass object containing hydrological parameters from HydrologicalParameters. |
required | |
attenuation_parameters (mibitrans.data.read.AttenuationParameters)
|
Dataclass object containing adsorption, degradation and diffusion parameters from AttenuationParameters. |
required | |
source_parameters (mibitrans.data.read.SourceParameters)
|
Dataclass object containing source parameters from SourceParameters. |
required | |
model_parameters (mibitrans.data.read.ModelParameters)
|
Dataclass object containing model parameters from ModelParameters. |
required | |
verbose
|
bool
|
Verbose mode. Defaults to False. |
False
|
Attributes:
| Name | Type | Description |
|---|---|---|
mode |
str)
|
Current model mode. Is ‘linear’ by default. Once instant reaction parameters are provided. Use this attribute to switch between ‘linear’ and ‘instant_reaction’ models. |
cxyt |
np.ndarray)
|
Output array containing concentrations in model domain, in [g/m^3]. Indexed as [t,y,x] |
relative_cxyt |
np.ndarray)
|
Output array with concentrations in model domain, divided by the maximum source zone concentration at t=0. Indexed as [t,y,x]. |
x |
np.ndarray)
|
Discretized model x-dimension, in [m]. |
y |
np.ndarray)
|
Discretized model y-dimension, in [y]. |
t |
np.ndarray)
|
Discretized model t-dimension, in [days]. |
c_source |
np.ndarray)
|
Nett source zone concentrations, accounting for source superposition, in [g/m^3]. |
vr |
float)
|
Retarded groundwater flow velocity, in [m/d]. |
k_source |
float)
|
Source zone decay rate, in [1/days]. |
biodegradation_capacity |
float)
|
Maximum capacity of biodegradation given provided electron acceptor |
Functions:
| Name | Description |
|---|---|
run |
Run model with current parameters, returns Results object. |
sample |
Calculate concentration at any given position and point in time. |
instant_reaction |
Activate the instant reaction model by providing electron acceptor concentrations. And optionally electron acceptor utilization factors. Switch between model modes by using the mode attribute. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If input is not of the correct Dataclass. |
Source code in mibitrans/transport/models.py
run()
Calculate the concentration for all discretized x, y and t using the analytical transport model.
Source code in mibitrans/transport/models.py
sample(x_position, y_position, time)
Give concentration at any given position and point in time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_position
|
float
|
x position in domain extent [m]. |
required |
y_position
|
float
|
y position in domain extent [m]. |
required |
time
|
float
|
time for which concentration is sampled [days]. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
concentration |
float
|
concentration at given position and point in time [g/m^3]. |