Completed and further simplified version of the question:
We have a cubic open room of volume $V,$ open in the sense that there's both a source and a sink of gas connected to the room.
There's a constant influx (amount of substance per unit area per unit time) $I_f$ of a gas $x$ (source), similarly a constant outflux $O_f$ of $x$. So in short, the room is being both filled by the gas $x$, and from the other end a certain amount (not necessarily matching the amount that had entered) manages to leave the room.
Last detail, the room is initially uniformly filled with a fluid $y$ with concentration (amount of substance per unit volume) $\rho_0.$ The source and the sink are impermeable to $y$. If this last detail proves to over-complicate things too much, we can set $\rho_0=0$ and assume the room to be initially empty (i.e. vacuum).
Initial conditions: $\rho_x (t=0)=0$ and $\rho_y (t=0) = \rho_0 \neq 0.$ (As mentioned before, for added simplicity one can assume $\rho_0 =0$ at first). Simple case: in-out flows are constant with $I_f \ge O_f$. Difficult case: the in-out flows are proportional to current average density of x in the room, i.e. $I_f\propto A_i \langle \rho_x(t) \rangle$ and $O_f \propto A_o \langle \rho_x(t)\rangle$. If I understand correctly for the latter case the boundary conditions become time dependent as well? Would the problem still be tractable?
My question:
Ultimately, I am trying to figure out how I can compute the concentration profile of the gas $x$ in the room as a function of time, given our initial conditions. More precisely, I gather we have to set things off using the diffusion equation $\frac{\partial \rho_x (\mathbf{r},t)}{\partial t}=D\nabla^2 \rho_x (\mathbf{r},t).$ But how do account for the source+sink on the lhs? (do they also perturb the boundary conditions)
I understand it may be more practical to consider first the steady state scenario, namely, the concentration profile $\rho_x$ is no longer time dependent. Would it be possible to calculate this limiting concentration profile? At least for the simple case?
In reality my question is really at a conceptual and methodological level, since I'm not sure where to start from in order to model the concentration.
I understand this may be just basic fluid dynamics at work, but I would really appreciate some hints or learning from similar solved examples.
Please let me know if the question as it stands is too vague (e.g. if it is important that the gas is compressible or not.)