18. Let $x, y \in \mathbf{R}^{+}$, and $x+y=k$, find the range of $k$ values such that the inequality $\left(x+\frac{1}{x}\right)\left(y+\frac{1}{y}\right) \geqslant$ $\left(\frac{k}{2}+\frac{2}{k}\right)^{2}$ always holds.
18. When $x=y$, the original inequality holds, at this time $k$ can be any positive number.

When $x \neq y$, without loss of generality, assume $x>y$, let $m=\frac{k}{2}, x=m+t, y=m-t,(0<t<m)$, then the original inequality becomes
$$
\left(m+t+\frac{1}{m+t}\right)\left(m-t+\frac{1}{m-t}\right) \geqslant\left(m+\frac{1}{m}\right)^{2},
$$

Simplifying and rearranging, we get $t^{2} \geqslant \frac{m^{4}-4 m^{2}-1}{m^{2}}$.
Clearly, for (1) to hold for all cases, it is necessary and sufficient that $m^{4}-4 m^{2}-1 \leqslant 0$, i.e., $m^{2} \leqslant 2+\sqrt{5}$,
which means $0<m \leqslant \sqrt{2+\sqrt{5}}$, thus $0<k \leqslant 2 \sqrt{2+\sqrt{5}}$.