Mechanische Komponenten API¶
pyadm1.components.mechanical.pump.Pump
¶
Bases: Component
Pump component for material handling in biogas plants.
Models different pump types for substrate feeding, recirculation, and digestate transfer. Calculates power consumption based on flow rate, pressure head, and pump efficiency.
Attributes:
| Name | Type | Description |
|---|---|---|
pump_type |
Type of pump (centrifugal, progressive_cavity, piston) |
|
Q_nom |
Nominal flow rate [m³/h] |
|
pressure_head |
Pressure head [m] or [bar] |
|
efficiency |
Pump efficiency at nominal point (0-1) |
|
motor_efficiency |
Motor efficiency (0-1) |
|
fluid_density |
Fluid density [kg/m³] |
|
speed_control |
Enable variable speed drive (VSD) |
|
current_flow |
Current flow rate [m³/h] |
|
is_running |
Pump operating state |
Example
pump = Pump( ... "feed_pump", ... pump_type="progressive_cavity", ... Q_nom=10.0, ... pressure_head=50.0 ... ) pump.initialize() result = pump.step(0, 1/24, {'Q_setpoint': 8.0})
Source code in pyadm1/components/mechanical/pump.py
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 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 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 | |
Functions¶
__init__(component_id, pump_type='progressive_cavity', Q_nom=10.0, pressure_head=50.0, efficiency=None, motor_efficiency=0.9, fluid_density=1020.0, speed_control=True, name=None)
¶
Initialize pump component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
str
|
Unique identifier |
required |
pump_type
|
str
|
Type of pump ("centrifugal", "progressive_cavity", "piston") |
'progressive_cavity'
|
Q_nom
|
float
|
Nominal flow rate [m³/h] |
10.0
|
pressure_head
|
float
|
Design pressure head [m] |
50.0
|
efficiency
|
Optional[float]
|
Pump efficiency (0-1), calculated if None |
None
|
motor_efficiency
|
float
|
Motor efficiency (0-1) |
0.9
|
fluid_density
|
float
|
Fluid density [kg/m³] |
1020.0
|
speed_control
|
bool
|
Enable variable speed drive |
True
|
name
|
Optional[str]
|
Human-readable name |
None
|
Source code in pyadm1/components/mechanical/pump.py
from_dict(config)
classmethod
¶
Create pump from dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Dict[str, Any]
|
Configuration dictionary |
required |
Returns:
| Type | Description |
|---|---|
Pump
|
Pump instance |
Source code in pyadm1/components/mechanical/pump.py
initialize(initial_state=None)
¶
Initialize pump state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_state
|
Optional[Dict[str, Any]]
|
Optional initial state dictionary with keys: - 'is_running': Initial pump state - 'current_flow': Initial flow rate [m³/h] - 'operating_hours': Cumulative operating hours - 'energy_consumed': Cumulative energy [kWh] - 'total_volume_pumped': Cumulative volume [m³] |
None
|
Source code in pyadm1/components/mechanical/pump.py
step(t, dt, inputs)
¶
Perform one simulation time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
float
|
Current time [days] |
required |
dt
|
float
|
Time step [days] |
required |
inputs
|
Dict[str, Any]
|
Input data with optional keys: - 'Q_setpoint': Desired flow rate [m³/h] - 'enable_pump': Enable/disable pump - 'fluid_density': Fluid density [kg/m³] - 'fluid_viscosity': Fluid viscosity [Pa·s] - 'pressure_head': Required pressure head [m] |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with keys: - 'P_consumed': Power consumption [kW] - 'Q_actual': Actual flow rate [m³/h] - 'is_running': Current running state - 'efficiency': Current operating efficiency - 'pressure_actual': Actual pressure head [m] - 'speed_fraction': Speed as fraction of nominal |
Source code in pyadm1/components/mechanical/pump.py
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 | |
to_dict()
¶
Serialize pump to dictionary.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary representation |
Source code in pyadm1/components/mechanical/pump.py
pyadm1.components.mechanical.mixer.Mixer
¶
Bases: Component
Mixer/agitator component for biogas digesters. Models mechanical or hydraulic mixing systems that maintain homogeneity in anaerobic digesters. Calculates power consumption based on mixer type, operating conditions, and fluid properties.
Attributes:
| Name | Type | Description |
|---|---|---|
mixer_type |
Type of mixer (propeller, paddle, jet) |
|
tank_volume |
Tank volume [m³] |
|
tank_diameter |
Tank diameter [m] |
|
tank_height |
Tank height [m] |
|
mixing_intensity |
Mixing intensity level |
|
power_installed |
Installed mixer power [kW] |
|
impeller_diameter |
Impeller diameter [m] |
|
operating_speed |
Mixer rotational speed [rpm] |
|
intermittent |
Intermittent operation mode |
|
on_time_fraction |
Fraction of time mixer is on (0-1) |
Example
mixer = Mixer( ... "mix1", ... mixer_type="propeller", ... tank_volume=2000, ... mixing_intensity="medium" ... ) mixer.initialize() result = mixer.step(0, 1/24, {})
Source code in pyadm1/components/mechanical/mixer.py
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 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 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 652 653 654 655 656 657 | |
Functions¶
__init__(component_id, mixer_type='propeller', tank_volume=2000.0, tank_diameter=None, tank_height=None, mixing_intensity='medium', power_installed=None, impeller_diameter=None, operating_speed=None, intermittent=True, on_time_fraction=0.25, name=None)
¶
Initialize mixer component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component_id
|
str
|
Unique identifier |
required |
mixer_type
|
str
|
Type of mixer ("propeller", "paddle", "jet") |
'propeller'
|
tank_volume
|
float
|
Tank liquid volume [m³] |
2000.0
|
tank_diameter
|
Optional[float]
|
Tank diameter [m] (calculated if None) |
None
|
tank_height
|
Optional[float]
|
Tank height [m] (calculated if None) |
None
|
mixing_intensity
|
str
|
Intensity level ("low", "medium", "high") |
'medium'
|
power_installed
|
Optional[float]
|
Installed power [kW] (calculated if None) |
None
|
impeller_diameter
|
Optional[float]
|
Impeller diameter [m] (calculated if None) |
None
|
operating_speed
|
Optional[float]
|
Rotational speed [rpm] (calculated if None) |
None
|
intermittent
|
bool
|
Enable intermittent operation |
True
|
on_time_fraction
|
float
|
Fraction of time mixer is on (0-1) |
0.25
|
name
|
Optional[str]
|
Human-readable name |
None
|
Source code in pyadm1/components/mechanical/mixer.py
from_dict(config)
classmethod
¶
Create mixer from dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Dict[str, Any]
|
Configuration dictionary |
required |
Returns:
| Type | Description |
|---|---|
Mixer
|
Mixer instance |
Source code in pyadm1/components/mechanical/mixer.py
initialize(initial_state=None)
¶
Initialize mixer state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_state
|
Optional[Dict[str, Any]]
|
Optional initial state dictionary with keys: - 'is_running': Mixer running state - 'current_speed_fraction': Speed fraction (0-1) - 'operating_hours': Cumulative operating hours - 'energy_consumed': Cumulative energy [kWh] |
None
|
Source code in pyadm1/components/mechanical/mixer.py
step(t, dt, inputs)
¶
Perform one simulation time step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
float
|
Current time [days] |
required |
dt
|
float
|
Time step [days] |
required |
inputs
|
Dict[str, Any]
|
Input data with optional keys: - 'speed_setpoint': Desired speed fraction (0-1) - 'enable_mixing': Enable/disable mixer - 'fluid_viscosity': Fluid viscosity [Pa·s] - 'temperature': Fluid temperature [K] |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with keys: - 'P_consumed': Power consumption [kW] - 'P_average': Time-averaged power [kW] - 'is_running': Current running state - 'mixing_quality': Mixing quality index (0-1) - 'reynolds_number': Reynolds number - 'power_number': Power number - 'mixing_time': Mixing time [min] - 'shear_rate': Average shear rate [1/s] |
Source code in pyadm1/components/mechanical/mixer.py
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 296 297 298 299 300 301 | |
to_dict()
¶
Serialize mixer to dictionary.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary representation |