For this project, your team (of fd2d_heat_steady.py to produce an easy-to-use program
for modeling 2-d heat conduction. Because the numerical methods needed
are completely implemented in the given code, the challenges for your team
are (1) to understand how the existing code works and (2) to craft a new
interface that takes a given "input" and provides a desired "output." You
are free to change code in fd2d_heat_steady.py, or you may import only
those pieces you want or need. You should avoid simply copying code from
fd2d_heat_steady.py into new functions that do basically the same thing.
This project repository contains several files that define your path forward:
-
heat2d/fd2d_heat_steady.pyis the same file we saw earlier in class (unmodified from its original source as of 10/05/2022. -
heat2d/__init__.pyis used to perform imports and other operations needed to set up the module. In particular, this imports thesolvefunction defined in driver. -
heat2d/driver.pydefines thesolvefunction and theplotfunction. -
examples/simple_box.pydefines a very simple, 2-d heat conduction problem without any heat sources. This is equivalent to the example given infd2d_heat_steady.py. However, note that the inputs tosolvediffer from thefd2d_heat_steadyfunction defined infd2d_heat_steady.py. -
examples/simple_box_ref.pngis identical to the image that should be produced byheat2d.plot. -
examples/simple_box_ref.outis identical to the text-based output that should be saved to file. Hint:np.savetxtis your friend. -
examples/refrigerator.pydefines a more realistic application.
Although refrigeration units rely on convection for removing heat, we can approximate the heat exchanger with a fixed, negative heat source.
-
Fully implement the
solveandplotfunctions. You may add additional functions to thedriver.pymodule as needed. All development should be clearly shown ingitlogs. Development should include multiple pull-request and review cycles. -
Run the code to produce
simple_box.pngandsimple_box.out. -
Implement the
qandkfunctions needed for the refrigerator "default" example. Run and save yourpngandoutfiles.
Note the temperatures within the refrigerator region. -
Create a Jupyter notebook that demonstrates your tool by "optimizing" the refrigerator materials or heat sink to ensure the maximum temperature inside the refrigerator is equal to or below 4
$^{\circle}$ C. Show the results first for the "default" configuration. Then describe your optimization process and the final "design." Compare your results to real fridges; are they even remotely comparable?Warnings:
- The "default" fridge geometry has 1 cm-thick walls. Hence, please
don't divide the 50 cm of space into 11 or 21 or whatever cells.
Make sure you use a grid that can actually capture the geometry! - You may wish to test how sensitive things like "minimum temperature" are to the "delta" used to discretize the domain.
- As "delta" gets small, the matrix gets big.
- The "default" fridge geometry has 1 cm-thick walls. Hence, please
don't divide the 50 cm of space into 11 or 21 or whatever cells.
- Your group repository must contain all of the files and output noted above. Your Jupyter notebook should be committed in an "executed" state, i.e., all your results should be visible from GitHub.
- What happens if
kdepends on the temperature?