There is no answer to this. When you are taught to use dimensional analysis at school the teacher invariably selects an easy example (it's almost always the pendulum) to keep things simple. In the real world there is no guarantee that you have a dimensionless constant.

It's actually quite rare to use dimensional analysis to derive equations in the real world. The sorts of simple systems that are amenable to dimensional analysis are usually already well known. However it's very, very useful to use dimensional analysis to check that an equation you derive is dimensionally consistent.

For example suppose you're working through a differential equation for some quantity, and after covering many sheets of paper with scribbles you end up with a final equation. It's very easy to make a minor mistake along the way, so the first thing you check is that your final equation is dimensionally consistent, i.e. the dimensions of the left and right sides are the same. If they aren't that means you've made a mistake somewhere. I routinely do this in my answers to questions on this site!

The answers are no and no. Being dimensionless or having the same dimension is a necessary condition for quantities to be "compatible", it is not a sufficient one. What one is trying to avoid is called category error. There is analogous situation in computer programming: one wishes to avoid putting values of some data type into places reserved for a different data type. But while having the same dimension is certainly required for values to belong to the same "data type", there is no reason why they can not be demarcated by many other categories in addition to that.

Newton meter is a unit of both torque and energy, and joules per kelvin of both entropy and heat capacity, but adding them is typically problematic. The same goes for adding proverbial apples and oranges measured in "dimensionless units" of counting numbers. Actually, the last example shows that the demarcation of categories depends on a context, if one only cares about apples and oranges as objects it might be ok to add them. Dimension is so prominent in physics because it is rarely meaningful to mix quantities of different dimensions, and there is a nice calculus (dimensional analysis) for keeping track of it. But it also makes sense to introduce additional categories to demarcate values of quantities like torque and energy, even if there may not be as nice a calculus for them.

As your own examples show it also makes sense to treat radians differently depending on context: take their category ("dimension") viz. steradians or counting numbers into account when deciding about addition, but disregard it when it comes to substitution into transcendental functions. Hertz is typically used to measure wave frequency, but because cycles and radians are officially dimensionless it shares dimension with the unit of angular velocity, radian per second, radians also make the only difference between amperes for electric current and ampere-turns for magnetomotive force. Similarly, dimensionless steradians are the only difference between lumen and candela, while luminous intensity and flux are often distinguished. So in those contexts it might also make sense to treat radians and steradians as "dimensional".

In fact, radians and steradians were in a class of their own as "supplementary units" of SI until 1995. That year the International Bureau on Weights and Measures (BIPM) decided that "*ambiguous status of the supplementary units compromises the internal coherence of the SI*", and reclassified them as "*dimensionless derived units, the names and symbols of which may, but need not, be used in expressions for other SI derived units, as is convenient*", thus eliminating the class of supplementary units. The desire to maintain a general rule that arguments of transcendental functions must be dimensionless might have played a role, but this shows that dimensional status is to a degree decided by convention rather than by fact. In the same vein, ampere was introduced as a new base unit into MKS system only in 1901, and incorporated into SI even later. As the name suggests, MKS originally made do with just meters, kilograms, and seconds as base units, this required fractional powers of meters and kilograms in the derived units of electric current however.

As @dmckee pointed out energy and torque can be distinguished as scalars and pseudo-scalars, meaning that under the orientation reversing transformations like reflections, the former keep their value while the latter switch sign. This brings up another categorization of quantities that plays a big role in physics, by transformation rules under coordinate changes. Among vectors there are "true" vectors (like velocity), covectors (like momentum), and pseudo-vectors (like angular momentum), in fact all tensor quantities are categorized by representations of orthogonal (in relativity Lorentz) group. This also comes with a nice calculus describing how tensor types combine under various operations (dot product, tensor product, wedge product, contractions, etc.). One reason for rewriting Maxwell's electrodynamics in terms of differential forms is to keep track of them. This becomes important when say the background metric is not Euclidean, because the identification of vectors and covectors depends on it. Different tensor types tend to have different dimensions anyway, but there are exceptions and the categorizations are clearly independent.

But even tensor type may not be enough. Before Joule's measurements of the mechanical equivalent of heat in 1840s the quantity of heat (measured in calories) and mechanical energy (measured in derived units) had two different dimensions. But even today one may wish to keep them in separate categories when studying a system where mechanical and thermal energy are approximately separately conserved, the same applies to Einstein's mass energy. This means that categorical boundaries are not set in stone, they may be erected or taken down both for practical expediency or due to a physical discovery.

Many historical peculiarities in the choice and development of units and unit systems are described in Klein's book The Science of Measurement.

## Best Answer

The problem seems to contain three dimension parameters, $D$, $k$ and $L$. The first thing would be to determine what the typical scale parameters are. You need a length scale $x_0$ and a time scale $t_0$. The options for the length scale are $x_0=L$, $x_0=D/k/L$ or $x_0=\sqrt{D/k}$ and those for the time scale are $t_0=1/k$, $t_0=L^2/D$ or $t_0=L/\sqrt{kD}$. To determine which one to choose, one needs to think a little about the physics.

Next, one convert the function (concentration) into a function of dimensionless variable $$ c(x,t) \to c_0(u,v) = c_0\left(\frac{x}{x_0},\frac{t}{t_0}\right) . $$ Then we plug this back into the equation. The result is $$ \frac{1}{t_0} \partial_v c_0(u,v) = \frac{D}{x_0^2}\partial_u^2 c_0(u,v) - kc_0(u,v) . $$ Based on this result, it seems that the appropriate choice for the scale parameters would be $x_0=\sqrt{D/k}$ and $t_0=1/k$, because then the dimensionless of the equation becomes completely independent of any parameters: $$ \partial_v c_0(u,v) = \partial_u^2 c_0(u,v) - c_0(u,v) . $$