Design project report
Design project report
Purpose
This prompt writes an engineering design report: fix the problem in a table, sweep the design variables, compare 3+ candidates that meet the constraints, pick one. Python computes and plots, LaTeX typesets, and every number in the text comes from the script.
Values the assignment does not give are marked "assumed" and get a sensitivity check. The AI claims no test it did not run and never shows a failing design as passing.
Input
- Required: what to design and the requirements as numbers. If missing, the AI asks one thing only: "Please send the assignment sheet or the requirements as numbers."
- Helpful: rubric, properties with sources, required equations, length. If your school or instructor gave you a template, that template comes first.
- A property without a source gets `[check needed]`. Text marked "keep as is" stays.
Output
1. `design.py`, `report.tex`, `report.pdf`, two figures, `results.tex`.
2. In the chat, 3 to 7 "Please check" lines: final values, margins, sensitivity verdict, assumed values, effects left out (unsafe first).
3. If the AI cannot run code, it gives files and commands, claims no PDF, and marks hand numbers "estimate, not run".
Rules
1. Steps
1) Copy every numbered requirement into Table 1 before any calculation.
2) Write the model as equations; give each assumption a check and a failure condition (Table 2).
3) Set part 1) of `design.py`, run it, check mm↔m and signs.
4) Pick 3+ candidates, each the lightest under one stated rule.
5) Vary the least certain input ±20 %, then fill in `report.tex`, compile twice, read every page.
2. Outline
Summary (3–4 lines) → Problem → Model → Sweep → Candidates → Sensitivity → Final design (≤3 reasons, in criteria order) → Limitations (which measurement would change the decision). Default: A4, 4–8 pages, 11 pt, spacing 1.25, 2–4 figures, 3–4 tables.
3. Design-problem table
- Requirements, variables (range), constraints (pass/fail), criteria (rank passing designs). Each row: value, unit, source (assignment / textbook / assumed).
- "Light" is a criterion in grams, not a constraint.
4. Assumptions
- Each gets a check value, a failure condition, and safe or unsafe.
- 1D fin equation only if Bi = h(t/2)/k ≪ 0.1 (here 9.0×10⁻⁵). Dropped radiation is at most 2.7 % of Q, on the safe side.
- Block failures with constraints: equal h fails in narrow gaps, so s ≥ 2.0 mm.
5. Candidates and "optimal"
- Columns: variables → performance → mass → result. Failing designs stay, marked "fail".
- "Optimal" needs objective (mass), constraints (T_b ≤ 70 °C, s ≥ 2.0 mm, L ≤ 45 mm), range (N 6–24, L 10–45 mm) and fixed values (fin 1.0 mm). Otherwise "lightest" plus the condition. Swept in 1 mm steps, claim nothing finer.
6. Sensitivity
- Start with inputs the assignment does not give; here h. Recompute each candidate at ±20 %, as table columns.
- Verdict in one line: "Within ±20 % of h, B holds." If it flips, say where.
7. Figures and wording
- Sweep plot: constraint boundary thick solid, sensitivity boundary dashed, infeasible hatched. No color needed.
- Numbers only via `results.tex` names (`\massB`); differences from rounded table values.
- Before → after
- "Design B is optimal." → "B is the lightest design that passes even with h 20 % low (132.8 g), fin thickness fixed at 1.0 mm."
- "A typical convection coefficient was used." → "h = 30 W/(m²·K) is assumed; the conclusion holds for ±20 %."
- "A suitable fin height was chosen." → "A to B lowers T_b at h 20 % low from 78.9 °C to 69.8 °C, for 20.0 g more."
8. The two files
Run end to end on a hypothetical case: an aluminum heat sink for a 65 W CPU, all conditions hypothetical. `python design.py`, then `pdflatex report.tex` twice (Overleaf default pdfLaTeX; upload `results.tex` and both figures).
9. Final check
- Every "assumed" row returns in sensitivity or limitations? Pass/fail text matches the table?
- "Optimal" fully qualified; 3+ candidates, failures kept?
- No `Overfull` or `??` in the log? Did the AI say whether it ran the files?
Attachment 1 · design.py (Python)
```python
design.py - heat sink fin design: sweep -> 3 candidates -> sensitivity (h +/-20 %) -> 2 figures -> results.tex
Every number in the report comes from this file. Never type a number into the text by hand.
import math
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
1) Conditions (hypothetical values; replace with the values in your assignment)
Q, T_INF, T_MAX = 65.0, 30.0, 70.0 # heat load (W), air (C), allowed base temperature (C)
H0, DH = 30.0, 0.20 # convection coefficient (W/m^2K, assumed), sensitivity range
W = D = 0.060 # footprint 60 x 60 mm (m)
T_FIN, T_BASE = 0.0010, 0.0040 # fin thickness, base thickness (m): fixed
K, RHO = 200.0, 2700.0 # aluminum conductivity (W/mK), density (kg/m^3)
S_MIN, S_WIDE, L_MAX = 0.0020, 0.0030, 0.045 # minimum gap, gap for candidate C, height limit (m)
EPS = 0.1 # emissivity for the radiation upper bound (assumed)
N_RANGE = np.arange(6, 25) # design variable 1: fin count
L_STEP = 0.001
L_RANGE = np.arange(10, 46) * L_STEP # design variable 2: fin height 10-45 mm, 1 mm machining step
def model(n, L, h):
"""n fins, height L, convection coefficient h -> (base temperature C, fin efficiency, total area m^2)."""
m = math.sqrt(2 * h / (K * T_FIN))
Lc = L + T_FIN / 2 # corrected length: tip area added to the sides
eta_f = math.tanh(m * Lc) / (m * Lc)
A_f = 2 * Lc * D
A_t = n * A_f + (W - n * T_FIN) * D # fins + exposed base between fins
eta_o = 1 - n * A_f / A_t * (1 - eta_f)
R = 1 / (eta_o * h * A_t) + T_BASE / (K * W * D) # fin array + conduction through the base (K/W)
return T_INF + Q * R, eta_f, A_t
def mass(n, L):
return RHO * (W * D * T_BASE + n * T_FIN * L * D) * 1000 # g
def gap(n):
return (W - n * T_FIN) / (n - 1)
def lightest(h, s_min):
"""Lightest (n, L) that meets the constraints (T_b, gap, height)."""
ok = [(mass(n, L), n, L) for n in N_RANGE for L in L_RANGE
if gap(n) >= s_min and L <= L_MAX and model(n, L, h)[0] <= T_MAX]
return min(ok)[1:]
2) Candidates: each is the lightest under a different condition
cands = {"A": lightest(H0, S_MIN), # at nominal h
"B": lightest(H0 * (1 - DH), S_MIN), # even if h is 20 % low
"C": lightest(H0 * (1 - DH), S_WIDE)} # even if h is 20 % low, with a wider gap
3) Sensitivity: hot = h 20 % low (hotter), cool = h 20 % high
tex, rows, tb = {}, "", {}
for k, (n, L) in cands.items():
hot, nom, cool = tb[k] = [model(n, L, H0 * f)[0] for f in (1 - DH, 1, 1 + DH)]
ok = "pass" if hot <= T_MAX else "fail"
rows += f"{k} & {n} & {L*1e3:.0f} & {gap(n)*1e3:.2f} & {nom:.1f} & {hot:.1f} & {cool:.1f} & {mass(n, L):.1f} & {ok} \\\\ "
tex.update({f"n{k}": n, f"len{k}": f"{L*1e3:.0f}", f"gap{k}": f"{gap(n)*1e3:.2f}",
f"mass{k}": f"{mass(n, L):.1f}", f"tbHot{k}": f"{hot:.1f}"})
4) Checks on the assumptions, and the full sweep
nB, LB = cands["B"]
_, etaB, AtB = model(nB, LB, H0)
biot = H0 * (1 + DH) * (T_FIN / 2) / K # Bi at the largest h
q_rad = EPS * 5.67e-8 * AtB * ((tb["B"][1] + 273.15)**4 - (T_INF + 273.15)**4) # upper bound: every surface at T_b
grid = {f: np.array([[model(n, L, H0 * f)[0] for n in N_RANGE] for L in L_RANGE]) for f in (1, 1 - DH)}
wide = np.array([gap(n) >= S_MIN for n in N_RANGE])
feas = {f: int(((grid[f] <= T_MAX) & wide).sum()) for f in grid}
n_cut = N_RANGE[wide].max()
5) Figures
plt.rcParams.update({"font.size": 9, "axes.linewidth": 0.8, "mathtext.fontset": "dejavusans"})
NN, LL = np.meshgrid(N_RANGE, L_RANGE * 1e3)
fig, ax = plt.subplots(figsize=(4.8, 3.5))
ax.clabel(ax.contour(NN, LL, grid[1], levels=[60, 80, 100], colors="k", linewidths=0.6), fmt="%d °C", fontsize=7)
ax.clabel(ax.contour(NN, LL, np.vectorize(mass)(NN, LL / 1e3), levels=[100, 125, 150, 175], colors="0.5",
linewidths=0.7, linestyles=":"), fmt="%d g", fontsize=7)
for f, ls, lab in ((1, "-", "nominal $h$"), (1 - DH, "--", f"$h$ −{DH:.0%}")):
ax.contour(NN, LL, grid[f], levels=[T_MAX], colors="k", linewidths=1.8, linestyles=ls)
ax.plot([], [], "k", lw=1.8, ls=ls, label=f"$T_b$ = {T_MAX:.0f} °C, {lab}")
ax.axvspan(n_cut + 0.5, N_RANGE[-1], fc="none", hatch="///", ec="0.7", lw=0, label=f"gap < {S_MIN*1e3:.1f} mm")
for k, (n, L) in cands.items():
ax.plot(n, L * 1e3, "o", ms=7, mfc="white", mec="k", mew=1.2, zorder=5)
ax.annotate(k, (n, L * 1e3), xytext=(7, -13), textcoords="offset points", fontweight="bold", fontsize=10,
bbox=dict(boxstyle="square,pad=0.1", fc="white", ec="none"), zorder=6)
ax.legend(frameon=False, fontsize=7, loc="lower center", bbox_to_anchor=(0.5, 1.0), ncol=2)
ax.set(xlabel="Fin count $N$", ylabel="Fin height $L$ (mm)")
ax.tick_params(direction="in", top=True, right=True)
fig.savefig("fig_sweep.pdf", bbox_inches="tight")
fig, (a1, a2) = plt.subplots(1, 2, figsize=(5.6, 2.4), gridspec_kw={"width_ratios": [3, 2], "wspace": 0.45})
x = np.arange(len(cands))
hot, nom, cool = np.array(list(tb.values())).T
a1.errorbar(x, nom, yerr=[nom - cool, hot - nom], fmt="o", ms=5, mfc="white", mec="k", ecolor="k", capsize=4)
a1.axhline(T_MAX, ls="--", color="k", lw=0.8)
a1.text(x[-1] + 0.55, T_MAX + 0.4, "limit", ha="right", va="bottom", fontsize=7)
a1.set_ylabel("Base temperature $T_b$ (°C)")
a2.bar(x, [mass(*v) for v in cands.values()], width=0.55, color="0.85", edgecolor="k", lw=0.8)
a2.set_ylabel("Mass (g)")
for s in (a1, a2):
s.set_xticks(x, list(cands))
s.set_xlim(-0.6, x[-1] + 0.6)
s.tick_params(direction="in", top=True, right=True)
fig.savefig("fig_compare.pdf", bbox_inches="tight")
6) Numbers to LaTeX: the text calls them only by name, such as \massB
r1 = lambda v: round(v, 1) # differences use the rounded values printed in the table
mR = {k: r1(mass(*v)) for k, v in cands.items()}
tex.update(Qheat=f"{Q:.0f}", Tinf=f"{T_INF:.0f}", Tmax=f"{T_MAX:.0f}", hNom=f"{H0:.0f}", hLow=f"{H0*(1-DH):.0f}",
hHigh=f"{H0*(1+DH):.0f}", dhPct=f"{DH*100:.0f}", Wbase=f"{W*1e3:.0f}", tFin=f"{T_FIN*1e3:.1f}",
tBase=f"{T_BASE*1e3:.0f}", kAl=f"{K:.0f}", rhoAl=f"{RHO:.0f}", sMin=f"{S_MIN*1e3:.1f}",
sWide=f"{S_WIDE*1e3:.1f}", Lmax=f"{L_MAX*1e3:.0f}", Nlo=N_RANGE[0], Nhi=N_RANGE[-1],
Llo=f"{L_RANGE[0]*1e3:.0f}", Lhi=f"{L_RANGE[-1]*1e3:.0f}", Lstep=f"{L_STEP*1e3:.0f}", nGrid=grid[1].size,
feasNom=feas[1], feasLow=feas[1 - DH], nCut=n_cut, biotNum=f"{biot:.1e}", epsRad=EPS,
radPct=f"{100*q_rad/Q:.1f}", etaB=f"{etaB:.2f}", overA=f"{r1(tb['A'][0]) - T_MAX:.1f}",
marginB=f"{T_MAX - r1(tb['B'][1]):.1f}", dmassAB=f"{mR['B'] - mR['A']:.1f}", dmassBC=f"{mR['C'] - mR['B']:.1f}")
with open("results.tex", "w", encoding="utf-8") as f:
f.writelines(f"\\newcommand{{\\{k}}}{{{v}}}\n" for k, v in tex.items())
f.write(f"\\newcommand{{\\candRows}}{{{rows}}}\n")
for k, (n, L) in cands.items():
print(f"{k}: N={n}, L={L*1e3:.0f} mm, {mR[k]} g, T_b={tb[k][1]:.1f} °C (h-20 %: {tb[k][0]:.1f}, h+20 %: {tb[k][2]:.1f})")
print(f"feasible {feas[1]}/{grid[1].size} (h-20 %: {feas[1 - DH]}), Bi={biot:.1e}, radiation bound {100*q_rad/Q:.1f} % of Q")
```
Attachment 2 · report.tex (LaTeX)
```latex
% report.tex - design project report frame. Build: python design.py, then pdflatex report.tex twice
% (Overleaf default compiler pdfLaTeX works). Every number comes from results.tex, written by design.py.
\documentclass[11pt,a4paper]{article}
\usepackage[margin=25mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern,amsmath,graphicx,booktabs,siunitx,caption,float,array,enumitem}
\setlist{noitemsep}
\sisetup{range-phrase={--},range-units=single}
\captionsetup{font=small,labelfont=bf}
\linespread{1.25}
\input{results.tex}
\title{\vspace{-12mm}\textbf{Rectangular-Fin Heat Sink for a CPU}}
\author{Heat Transfer individual design project \quad Alex Kim\\ \small Nov 6--26, 2026 (3 weeks) \quad Submitted Nov 27, 2026}
\date{}
\begin{document}
\maketitle
\vspace{-8mm}
\begin{abstract}\noindent
An aluminum rectangular-fin heat sink was designed for a CPU that dissipates \SI{\Qheat}{W}. The fin count $N$ and height $L$ were swept
to compute the base temperature $T_b$ and the mass, and three candidates that meet the constraints were compared. The final design B
($N=\nB$, $L=\SI{\lenB}{mm}$, \SI{\massB}{g}) keeps $T_b=\SI{\tbHotB}{\celsius}$, within the \SI{\Tmax}{\celsius} limit, even with a
\SI{\dhPct}{\percent} lower convection coefficient, and it is the lightest such design.
\end{abstract}
\section{Design problem}
Table~\ref{tab:req} splits the assignment into requirements, design variables, constraints and evaluation criteria.
A constraint is either met or not; the criteria rank the designs that meet every constraint.
\begin{table}[H]\centering\small
\caption{Design problem. Values marked `assumed' are not given in the assignment.}\label{tab:req}
\begin{tabular}{@{}llll@{}}\toprule
Type & Item & Value & Source\\\midrule
Requirement & Heat load $Q$ & \SI{\Qheat}{W} & assignment\\
& Air temperature $T_\infty$ & \SI{\Tinf}{\celsius} & assignment\\
& Footprint $W\times D$ & \SI{\Wbase}{mm} $\times$ \SI{\Wbase}{mm} & assignment\\
& Aluminum conductivity $k$ & \SI{\kAl}{W/(m.K)} & textbook~\cite{text}\\
& Aluminum density $\rho$ & \SI{\rhoAl}{kg/m^3} & textbook~\cite{text}\\
& Convection coefficient $h$ & \SI{\hNom}{W/(m^2.K)} & assumed, Sec.~5\\
Variable & Fin count $N$ & \Nlo--\Nhi & \\
& Fin height $L$ & \SIrange{\Llo}{\Lhi}{mm}, \SI{\Lstep}{mm} steps & machining step\\
& Fin thickness $t$ (fixed) & \SI{\tFin}{mm} & assumed\\
& Base thickness $t_b$ (fixed) & \SI{\tBase}{mm} & assumed\\
Constraint & Base temperature & $T_b \le \SI{\Tmax}{\celsius}$ & assignment\\
& Fin gap & $s \ge \SI{\sMin}{mm}$ & assumed (Table~\ref{tab:assume})\\
& Fin height & $L \le \SI{\Lmax}{mm}$ & assignment (case height)\\
Criterion & First & all constraints met at $h-\SI{\dhPct}{\percent}$ & \\
& Second & lower mass is better & \\\bottomrule
\end{tabular}
\end{table}
\section{Model and assumptions}
The fin tip is handled with the corrected length $L_c = L + t/2$~\cite{text}.
\begin{gather}
m=\sqrt{\frac{2h}{kt}},\qquad \eta_f=\frac{\tanh(mL_c)}{mL_c},\qquad A_t = 2NL_cD + (W-Nt)D, \label{eq:fin}\\
\eta_o = 1-\frac{2NL_cD}{A_t}(1-\eta_f),\qquad T_b = T_\infty + Q\left(\frac{1}{\eta_o h A_t}+\frac{t_b}{kWD}\right). \label{eq:tb}
\end{gather}
The mass is $\rho(WDt_b + NtLD)$ and the fin gap is $s=(W-Nt)/(N-1)$. Table~\ref{tab:assume} lists the assumptions and when they fail.
\begin{table}[H]\centering\small
\caption{Assumptions. `If wrong' says whether the computed $T_b$ is then lower than the real one (unsafe) or higher (safe).}\label{tab:assume}
\begin{tabular}{@{}>{\raggedright}p{0.27\linewidth}>{\raggedright}p{0.22\linewidth}>{\raggedright}p{0.31\linewidth}>{\raggedright\arraybackslash}p{0.1\linewidth}@{}}\toprule
Assumption & Check & Fails when & If wrong\\\midrule
Heat in the fin flows only along its height & $Bi = h(t/2)/k = \num{\biotNum}$ & $Bi$ near 0.1 (thick fins, plastic) & unsafe\\
$h$ is the same on every surface & bounded by $s\ge\SI{\sMin}{mm}$ & narrow gaps: boundary layers merge or air bypasses the fins & unsafe\\
Radiation is neglected & at most \SI{\radPct}{\percent} of $Q$ ($\varepsilon=\epsRad$ assumed) & black anodized surface & safe\\
Base temperature is uniform & not computed [check needed] & CPU die much smaller than the base (spreading resistance) & unsafe\\
Heat load is a steady $Q$ & -- & loads above $Q$ for long periods & unsafe\\\bottomrule
\end{tabular}
\end{table}
\section{Design space sweep}
$T_b$ and mass were computed for all \nGrid{} combinations of $N$ = \Nlo--\Nhi{} and $L$ = \SIrange{\Llo}{\Lhi}{mm} (Fig.~\ref{fig:sweep}).
At nominal $h$, \feasNom{} combinations meet every constraint; with $h$ \SI{\dhPct}{\percent} low, \feasLow{} do.
Because $h$ is taken as constant, more fins always help in this model, so the gap constraint ($N\le\nCut$) decides the design.
\begin{figure}[H]\centering
\includegraphics[width=0.62\linewidth]{fig_sweep.pdf}
\caption{Base temperature (solid) and mass (dotted). Thick lines mark $T_b=\SI{\Tmax}{\celsius}$ at nominal $h$ (solid) and
$h$ \SI{\dhPct}{\percent} low (dashed); designs above and right of a line pass. Hatched: $s<\SI{\sMin}{mm}$.}\label{fig:sweep}
\end{figure}
\section{Candidate designs}
Each candidate is the lightest design within the constraints of Table~\ref{tab:req}, under a different condition (Table~\ref{tab:cand}).
\begin{itemize}
\item A: lightest that meets the constraints at nominal $h$.
\item B: lightest that meets the constraints with $h$ \SI{\dhPct}{\percent} low.
\item C: as B, with the fin gap widened to at least \SI{\sWide}{mm}.
\end{itemize}
\begin{table}[H]\centering\small
\caption{Candidates. Pass or fail is judged at $h$ \SI{\dhPct}{\percent} low.}\label{tab:cand}
\begin{tabular}{@{}ccccccccc@{}}\toprule
& & & & \multicolumn{3}{c}{$T_b$ (\si{\celsius})} & & \\\cmidrule(lr){5-7}
& $N$ & $L$ (mm) & $s$ (mm) & nominal $h$ & $h-\SI{\dhPct}{\percent}$ & $h+\SI{\dhPct}{\percent}$ & Mass (g) & Result\\\midrule
\candRows \bottomrule
\end{tabular}
\end{table}
\section{Sensitivity: convection coefficient $\pm$\SI{\dhPct}{\percent}}
$h$ is an assumed value, so it is the least certain input. It was varied over \SIrange{\hLow}{\hHigh}{W/(m^2.K)} (Table~\ref{tab:cand}, Fig.~\ref{fig:compare}).
\begin{itemize}
\item With $h$ \SI{\dhPct}{\percent} low, A reaches $T_b=\SI{\tbHotA}{\celsius}$, \SI{\overA}{\celsius} over the limit.
\item B and C meet the constraints with $h$ \SI{\dhPct}{\percent} low. Mass does not depend on $h$, so B stays lighter than C.
\item Within this range of $h$, the conclusion (B) does not change.
\end{itemize}
\begin{figure}[H]\centering
\includegraphics[width=0.78\linewidth]{fig_compare.pdf}
\caption{Base temperature (left) and mass (right) per candidate. Marker: nominal $h$; bar top: $h$ \SI{\dhPct}{\percent} low;
bar bottom: $h$ \SI{\dhPct}{\percent} high. Dashed line: limit \SI{\Tmax}{\celsius}.}\label{fig:compare}
\end{figure}
\section{Final design and reasons}
The final design is B ($N=\nB$, $L=\SI{\lenB}{mm}$, $s=\SI{\gapB}{mm}$, \SI{\massB}{g}, fin efficiency \etaB).
\begin{enumerate}
\item First criterion: with $h$ \SI{\dhPct}{\percent} low, $T_b=\SI{\tbHotB}{\celsius}$ meets the limit. At nominal $h$ the margin is \SI{\marginB}{\celsius}.
\item Second criterion: it is the lightest design that meets the first, \SI{\dmassBC}{g} lighter than C.
\item It is \SI{\dmassAB}{g} heavier than A. That mass is the price of not knowing $h$.
\end{enumerate}
Within the range of Table~\ref{tab:req} (fin thickness and footprint fixed), B is the lightest design that meets every constraint with $h$ \SI{\dhPct}{\percent} low.
Other fin thicknesses and fin shapes were not studied.
\section{Limitations and next steps}
\begin{itemize}
\item B's gap of \SI{\gapB}{mm} is close to the \SI{\sMin}{mm} minimum. If $h$ measured on a prototype is below \SI{\hLow}{W/(m^2.K)}, switch to C (\SI{\dmassBC}{g} heavier).
\item Spreading resistance was not included. Recompute once the CPU die size is known [check needed].
\end{itemize}
\begin{thebibliography}{9}\small
\bibitem{text} [check needed] Course textbook: fin efficiency equations and aluminum property table (author, title, edition, page).
\end{thebibliography}
\end{document}
```
Connect ChatGPT or Claude and use this prompt now · More prompts