Solution of PDE with directional derivative There is a partial differential equation containing directional derivative in the left-hand side:
$$ 
\vec{s} \cdot \nabla f = a f + b \\
$$
where $f, a, b$ are functions of $(x,y,z)$, and $\vec{s}$ is a unit direction vector. How to solve this type of equation? Standard reference books did not really help me, actually I stuck with method of characteristics, but I'm not sure if it is appropriate here.
 A: When I wrote up this answer, I neglected to notice that the OP specified $(x, y, z)$ coordinates, presumably in $\Bbb R^3$, so I spoke as if things take place in $\Bbb R^n$; but I think things are pretty much OK, nevertheless.
Basically, the method of characteristics, at least as I understand it, should be fine here; the characteristics are precisely the integral curves of the vector field $\vec s$, so the equation
$\vec s \cdot \nabla f = af + b, \tag{1}$
tells us that, along each trajectory of the ordinary differential equation
$\dot {\vec x}(t) = \vec s(x(t)), \tag{2}$
we must have 
$\frac{df}{dt} = af(t) + b. \tag{3}$
A solution to (3) is easily had; writing
$u(t) = af(t) + b, \tag{4}$
we see that
$\frac{du}{dt} = a\frac{df}{dt} = a(af + b) = au, \tag{5}$
a solution of which is readily seen to be
$u(t) = u(t_0)e^{a(t - t_0)}.  \tag{6}$
which may be re-written in terms of $f(t)$:
$f(t) = \frac{1}{a}((af(t_0) + b)e^{a(t - t_0)} - b). \tag{7}$
(7) gives the solution along each integral curve of $\vec s$; to complete the picture, we need to realize that $f(t_0)$ must be a function specified on some surface $S$ to which $\vec s$ is in general transverse, i.e. not tangent.  If we think of $S$ as a space of parameters for $f(t_0)$, it becomes $f(p, t_0)$ where $p \in S$; then
(7) becomes
$f(p, t) = \frac{1}{a}((af(p, t_0) + b)e^{a(t - t_0)} - b). \tag{8}$
What we are really doing here is specifying $f(p, t)$ in a local "coordinate system"
determined by $S$ and the parameter $t$ along the integral curves of $\vec s$, taking $t = t_0$ on $S$.  Sufficiently near a point $p_0 \in S$, points in the ambient space can be represented as $(p, t)$.  Of course, this "coordinate system" may be difficult to express in term of standard coordinates in, say, $\Bbb R^n$, assuming that is the ambient manifold.  But such is the price of the method of characteristics.
A more rigorous view of the $(p, t)$ representation might require using hypersurface coordinates on $S$ and expressing $p$ in terms of them, but a thorough discussion along those lines would take much longer than I have at present.
EDIT:  $a$, $b$ time-dependent in (1) and (3):  as pointed out by our OP ziliboba in this comment, $a$ and $b$ may depend on the parameter $t$ which is the independent variable in the differential equation (2) which defines the integral curves of $\vec s$.  I had, when the above was written, assumed that $a$ and $b$ are constant which leads to the particularly simple form of the solution (7), (8).  In the event that
$a$ and/or $b$ depend on $t$, as they generally will (the case $a$, $b$ constant being the exception rather than the rule), the solution of (1), (3) may be written in terms of integrals of the coefficients $a$, $b$, though they may be difficult to evaluate in terms of elementary functions as is the case when $a$, $b$ are constant.  For
$\frac{df(p, t)}{dt} = a(p, t)f(p, t) + b(p, t), \tag{9}$
the general solution is
$f(p, t) = exp(\int_{t_0}^t a(p, s) ds) (f(p, t_0) + \int_{t_0}^t exp(-\int_{t_0}^s a(p, r) dr)b(p, s) ds), \tag{10}$
where in (9), (10) we have written $a(p, t)$, $b(p, t)$, $f(p, t)$ in order to stress
that these functions of $t$ also depend on the point $p$ at which the corresponding integral curve of $\vec s$ crosses the initial surface $S$; $t = t_0$ at such points,
and this defines the initial value $f(p, t_0)$ occurring in (10).  Formula (10) as a solution to equation (9) is of course well-known from the classical literature on ordinary differential equations, and occurs in many standard texts on the subject. It is not difficult to derive (10) from (9), but repeating the requisite sequence of steps here would only and undue length to this already long-enough post.  The derivation may in fact be found in my answer to this question; see especially the
material in the vicinity of equations (5)-(13) of that posting.
In closing I would like to stress that the real difficulty in using the method of characteristics to solve (1) will often lie in finding the integral curves of $\vec s$ from (2) which give rise to the $(p, t)$ coordinates in which the solution is written.  In general this will be a nonlinear problem and finding the curves $x(p, t)$ will be quite a challenge; but if we have solved that problem, the solution to (9) is, as we have seen here, straightforward.  
END of EDIT:  $a$, $b$ time-dependent in (1) and (3):
Hope this helps!  Cheers,
and as always,
Fiat Lux!!!
