How amirhossein-naeejnezhad/refrigeration-cycle-model works
This repository models an R32 vapor-compression refrigeration cycle for data-center cooling. The principal workflow starts with a condenser-water inlet-temperature sweep, designs fixed heat-exchanger conductances, iteratively solves each operating point, reconstructs thermodynamic states and performance, then presents plots and exports tabular results. The map-based compressor model and CoolProp cycle reconstruction form the core physics; LMTD matching couples that physics to the air- and water-side heat exchangers. Source excerpts show the main control flow and core calculations; unsampled notebook behavior is not inferred.
Main entry points: main.py Study runner · thermodynamics.py Cycle reconstruction · utils.py Numeric helpers · heat_exchanger.py HX design
Components 14
Model setup
- Model parameters
src/config.py - Numeric helpers
src/utils.py
Cycle physics
- HX design
src/heat_exchanger.py - LMTD matching
src/heat_exchanger.py - Cycle reconstruction
src/thermodynamics.py - Compressor map
src/compressor.py
Operating study
- Study runner
src/main.py - Operating solver
src/solver.py
Analysis and results
- Tables and CSV
src/main.py - Performance plots
src/plots_others.py - Pressure-ratio study
src/plots_others.py - Cycle diagrams
src/plots_ph_ts.py
Other components
- Engineer
- CoolProp
Connections 18
- Engineer → Study runner: runs
- Study runner → Model parameters: reads settings
src/main.py - Study runner → HX design: designs conductance
src/main.py - HX design → Cycle reconstruction: evaluates nominal cycle
src/heat_exchanger.py - Study runner → Operating solver: solves sweep
src/main.py - Operating solver → Cycle reconstruction: evaluates cycle
src/solver.py - Operating solver → LMTD matching: updates temperatures
src/solver.py - Cycle reconstruction → Compressor map: evaluates map
src/thermodynamics.py - Cycle reconstruction → CoolProp: queries properties
src/thermodynamics.py - Study runner → Numeric helpers: converts units
src/main.py - HX design → Numeric helpers: calculates LMTD
src/heat_exchanger.py - LMTD matching → Numeric helpers: calculates LMTD
src/heat_exchanger.py - Study runner → Tables and CSV: builds and exports
src/main.py - Study runner → Performance plots: plots results
src/main.py - Study runner → Cycle diagrams: plots states
src/main.py - Study runner → Pressure-ratio study: runs extrapolation
src/main.py - Performance plots → Numeric helpers: uses plot helper
src/plots_others.py - Cycle diagrams → CoolProp: queries properties
src/plots_ph_ts.py