Commit fe7d83b
committed
refactor: pure dataclass Fluid architecture with two-level caching
Architecture refactoring:
- Replace ThermoSystem (JVM reference) with pure dataclass Fluid + FluidProperties
- FluidStream is now a pure dataclass without JVM reference
- Introduce FluidService with dependency injection for flash operations
- Rename StreamMixer to SimplifiedStreamMixer
- Extract remove_liquid to separate method
Performance improvements:
- Add two-level caching: reference fluid cache and flash operation cache
- Add CacheService for centralized cache management
Bug fixes:
- Fix circular import issue in thermo.py
- Fix cache stats printout for pytest
Tests and documentation:
- Add cache behavior tests for fluid service
- Update snapshots for precision changes
- Add reference state warning to flash_ph docstrings
- Clarify standard density and cache key structure
Chore:
- Include anonymous volume in docker services to avoid venv issues1 parent 0571c97 commit fe7d83b
74 files changed
Lines changed: 7522 additions & 7022 deletions
File tree
- src
- ecalc_neqsim_wrapper
- libecalc
- domain
- infrastructure/energy_components/legacy_consumer/system
- process
- compressor/core
- sampled
- train
- simplified_train
- utils
- entities/process_units
- compressor
- liquid_remover
- mixer
- pressure_modifier
- rate_modifier
- simplified_stream_mixer
- splitter
- temperature_setter
- value_objects/fluid_stream
- infrastructure/neqsim_fluid_provider
- presentation/yaml/mappers
- charts
- tests
- ecalc_cli/snapshots/test_app
- test_json_advanced_model
- test_new_ltp_export_properly
- test_new_stp_export_properly
- test_valid
- ecalc_neqsim_wrapper
- integration_tests
- unit_tests
- libecalc
- core
- consumers/system
- models/compressor_modelling
- sampled
- domain/process
- compressor
- entities/process_units
- fluid_stream
- integration/snapshots/test_all_energy_usage_models/test_all_results
- output/flow_diagram/snapshots/test_ecalc_model_mapper/test_all_energy_usage_models
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 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 | + | |
0 commit comments