State variables and partial derivatives in thermodynamics. In order to use partial derivatives, you
- first need the expression of a state variable as a function of other two state variables;
- then evaluate the partial derivatives you like, keeping in mind the constant independent variable.
!!!Working with multi-variable functions, and with change of variables is 90% of algebra and calculus needed to derive foundations of all the classical thermodynamics!!! (this hint will never be BOLD ENOUGH)
As an example, using the first principle of thermodynamics with $U(V,S)$ or $S(V,U)$
$$dU = - P dV + T dS \qquad \text{or} \qquad dS = \frac{1}{T} dU + \frac{P}{T} dV$$
where the following holds,
$$T = \left( \frac{\partial U}{\partial S} \right)_V \qquad , \qquad \frac{1}{T} = \left(\frac{\partial S}{\partial U}\right)_V$$
$$P = -\left( \frac{\partial U}{\partial V} \right)_S \qquad , \qquad \frac{P}{T} = \left(\frac{\partial S}{\partial V}\right)_U$$
being $dU(V,S)$ and $dS(V,U)$ perfect differentials, or differentials of state functions.
Temperature as partial derivative, for a perfect gas. Thus, in your example using perfect gases - independently from the transformation you're performing -, you first need to write internal energy as a function of $T$ and $S$ and then evaluate the partial derivative. Equation of state and internal energy for a perfect gas read,
$$P V = n R T \qquad , \qquad U = C_V T \ ,$$
while it's possible to write change in entropy as
$$\begin{aligned}
S - S_0 & = C_V \ln\left( \frac{T}{T_0} \right) + n R \ln\left( \frac{V}{V_0} \right) = \\
& = C_V \ln\left( \frac{U}{U_0} \right) + n R \ln\left( \frac{V}{V_0} \right) \ .
\end{aligned}$$
Now that you have an expression of the entropy as a function of internal energy and volume, $S(U,V)$, you can perform the partial derivative remembering that $\frac{d}{dx} \ln \left( \frac{x}{x_0} \right) = \frac{1}{x}$, to get
$$\left(\frac{\partial S}{\partial U}\right)_V = \frac{C_V}{U} = \frac{1}{T} \ ,$$
i.e. the desired result. This result is independent from the transformation, as you would expect being "a definition of temperature".
Your example. In an adiabatic expansion, without dissipation, $S$ is constant. In order to describe the state of the system during the thermodynamic transformation, you need the value of another thermodynamic state variable, $X$ (pressure, temperature,... you're free to choose). Anyway you can't expect to get any useful result from differentiation of the function $U(X,S)$, since $V$ is varying (and this contradicts the definition of temperature) and $S$ is constant,
$$T \neq \left( \frac{\partial S}{\partial U} \right)_x = 0 \qquad \text{for every $X$}$$
A working example. In order to use the definition of $T$ having all the required physical quantities and thermodynamic transformation, you need a system that performs a transformation at constant volume: as an example, you can provide heat flux to a gas in a constant volume rigid box.
In this case, $V$ is const, and $dU(\overline{V},S) = T(S) dS$. For constant volume, energy can be written a single variable function of $S$, whose derivative w.r.t. $S$ (at constant $V$) is the temperature.