s243a

Toy Cooling Tower Prompt

Aug 2nd, 2026 (edited)
9,082
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.98 KB | None | 0 0
  1. You are operating SciREPL Pro on Android. Build and test the following demonstration directly in the current notebook.
  2.  
  3. Do not merely explain how to build it. Create the cells, run them, fix any errors, and leave the completed dashboard visible.
  4.  
  5. # Goal
  6.  
  7. Create a fast, visually compelling conceptual study titled:
  8.  
  9. Can a Flooded Mine Make Data Centers More Water-Efficient?
  10.  
  11. The notebook must compare cooling-tower water recovery in hot-dry and hot-humid weather.
  12.  
  13. This is a fictional educational model—not an engineering design, site assessment, financial analysis, or performance claim.
  14.  
  15. # Priorities
  16.  
  17. 1. Reliability during a live phone demo
  18. 2. Execution in under eight seconds after kernels are ready
  19. 3. Clear visual results
  20. 4. Physically defensible first-order assumptions
  21. 5. Short cells and minimal textual output
  22.  
  23. Use no network requests, package installation, external data, Matplotlib, Plotly imports, pandas, or unnecessary dependencies.
  24.  
  25. Use only:
  26.  
  27. - Bundled NumPy
  28. - Python’s standard library
  29. - SciREPL’s built-in `mplot`
  30. - Bundled SWI-Prolog
  31. - SharedVFS paths under `/shared`
  32.  
  33. Do not inspect or modify unrelated notebooks, cells, files, or settings.
  34.  
  35. # Notebook structure
  36.  
  37. Create exactly four cells in this order:
  38.  
  39. 1. Markdown introduction
  40. 2. Python simulation
  41. 3. Prolog classification
  42. 4. Python dashboard
  43.  
  44. ## Cell 1 — Markdown
  45.  
  46. Write no more than 100 words.
  47.  
  48. Explain that the toy system contains:
  49.  
  50. - A 10 MW data center
  51. - An evaporative cooling tower
  52. - A downstream plume-condensing heat exchanger
  53. - A closed secondary cooling loop
  54. - A flooded mine-water thermal reservoir
  55. - Recovered condensate returned as cooling-tower makeup water
  56.  
  57. State clearly that mine water never contacts cooling-tower water or recovered condensate.
  58.  
  59. Mention that the purpose is to explore water-versus-energy trade-offs under different humidity conditions.
  60.  
  61. ## Cell 2 — Python simulation
  62.  
  63. Use NumPy and the standard library with a fixed random seed.
  64.  
  65. Create two independent seven-day hourly scenarios with identical:
  66.  
  67. - IT load
  68. - Dry-bulb temperature
  69. - Cooling-tower design
  70. - Mine-water starting temperature
  71. - Mine-water volume
  72.  
  73. The scenarios must differ only in atmospheric moisture:
  74.  
  75. - `hot_dry`: relative humidity approximately 20–35%
  76. - `hot_humid`: relative humidity approximately 55–75%
  77.  
  78. Use smooth diurnal dry-bulb and IT-load cycles. Do not download weather data.
  79.  
  80. Implement compact functions for:
  81.  
  82. - Saturation vapour pressure
  83. - Humidity ratio
  84. - Dew-point temperature
  85. - Wet-bulb temperature using a documented approximation
  86. - Moist-air enthalpy
  87.  
  88. Model cooling-tower performance using wet-bulb temperature and a calibrated effectiveness:
  89.  
  90. `tower_effectiveness = (hot_water_temp - cold_water_temp) / (hot_water_temp - wet_bulb_temp)`
  91.  
  92. Use a constant design effectiveness and water-to-air flow ratio. Do not attempt CFD.
  93.  
  94. For each hour:
  95.  
  96. 1. Calculate ambient psychrometric conditions.
  97. 2. Calculate cooling-water range and cold-water temperature.
  98. 3. Calculate the nearly saturated cooling-tower exhaust state using a moist-air mass and energy balance.
  99. 4. Calculate evaporation from the increase in humidity ratio.
  100. 5. Calculate drift separately.
  101. 6. Calculate blowdown using five cycles of concentration.
  102. 7. Calculate baseline makeup water.
  103. 8. Pass the warm saturated plume through a downstream condenser cooled by the mine-water loop.
  104. 9. Condense water only when the plume can be cooled below its dew point.
  105. 10. Clamp condensate flow between zero and tower evaporation.
  106. 11. Return recovered condensate as makeup water.
  107. 12. Transfer both sensible and latent condenser heat into the mine-water reservoir.
  108. 13. Update mine-water temperature using a lumped thermal-capacitance model with a small heat-loss term to surrounding rock or groundwater.
  109. 14. Include condenser fan and mine-loop pump power.
  110. 15. Flag hours when the mine water is too warm to produce condensation.
  111.  
  112. Treat this as a closed heat-exchanger loop. Do not mix mine water with condensate.
  113.  
  114. Track for each scenario:
  115.  
  116. - Ambient dry-bulb temperature
  117. - Relative humidity
  118. - Wet-bulb temperature
  119. - Tower cold-water temperature
  120. - Plume dew point
  121. - Mine-water temperature
  122. - Baseline makeup water
  123. - Makeup water after recovery
  124. - Recovered condensate
  125. - Additional electrical power
  126. - Condensation-available flag
  127.  
  128. Calculate summary metrics:
  129.  
  130. - Total baseline makeup water
  131. - Total recovered water
  132. - Percentage reduction in makeup water
  133. - Water Usage Effectiveness in litres per IT-kWh
  134. - Additional energy as a percentage of IT energy
  135. - Maximum mine-water temperature
  136. - Number of hours when condensation was possible
  137.  
  138. Use plausible illustrative constants, declare them together near the top, and avoid false precision.
  139.  
  140. Save hourly results for both scenarios to:
  141.  
  142. `/shared/mine_cooling.csv`
  143.  
  144. Write concise Prolog facts to:
  145.  
  146. `/shared/mine_cooling_status.pl`
  147.  
  148. Use this fact form:
  149.  
  150. `case_result(Case, WaterSavingPercent, ExtraEnergyPercent, MaxMineTempC, CondensationHours).`
  151.  
  152. Print no tables and no more than two short summary lines.
  153.  
  154. ## Cell 3 — Prolog classification
  155.  
  156. Consult:
  157.  
  158. `/shared/mine_cooling_status.pl`
  159.  
  160. Define deterministic rules that classify each scenario as exactly one of:
  161.  
  162. - `no_condensation`
  163. - `thermal_limit`
  164. - `marginal`
  165. - `promising_toy_result`
  166.  
  167. Use transparent toy thresholds:
  168.  
  169. - `no_condensation` if condensation occurred for fewer than 5% of simulated hours
  170. - `thermal_limit` if maximum mine-water temperature reached 28°C
  171. - `marginal` if water savings were below 10% or additional energy exceeded 5%
  172. - `promising_toy_result` otherwise
  173.  
  174. Print exactly one short line per scenario containing:
  175.  
  176. - Scenario name
  177. - Classification
  178. - Water-saving percentage
  179. - Additional-energy percentage
  180.  
  181. Make the classification deterministic and prevent duplicate Prolog solutions.
  182.  
  183. ## Cell 4 — Python dashboard
  184.  
  185. Use the simulation variables already created by Cell 2.
  186.  
  187. Use SciREPL’s built-in `mplot`; do not import plotting packages.
  188.  
  189. Create two phone-readable interactive charts:
  190.  
  191. 1. A grouped comparison for `hot_dry` and `hot_humid` showing:
  192. - Baseline makeup water
  193. - Makeup water after recovery
  194. - Recovered condensate
  195.  
  196. 2. An hourly temperature chart showing:
  197. - Ambient wet-bulb temperature
  198. - Plume dew-point temperature
  199. - Mine-water temperature
  200.  
  201. Use high-contrast colours, concise titles, labelled axes, and legends. Keep the number of traces small enough to read on a phone.
  202.  
  203. Add a final annotation stating:
  204.  
  205. “Toy model: results depend on weather, heat-exchanger design, mine hydraulics and long-term thermal recharge.”
  206.  
  207. # Completion behaviour
  208.  
  209. - Create the four cells directly.
  210. - Run each cell once in order.
  211. - If a cell fails, make the smallest necessary correction and rerun it.
  212. - Do not add diagnostic cells.
  213. - Do not dump generated code or large arrays into outputs.
  214. - Do not provide a long chat explanation.
  215. - Prefer a working simplified model over adding complexity.
  216. - When everything passes, leave the final dashboard cell visible.
Advertisement