4
$\begingroup$

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.)

$\endgroup$
7
  • $\begingroup$ Thanks for pinging me. Please clarify "concentration" and "completely empty room". Is the room initially filled with gas X (not "empty"), and are you now bleeding gas Y into the room? That seems to be your intent. In that case the question is whether diffusion is rapid compared to convection - there will be two limiting cases. Can you clarify your question? $\endgroup$
    – Floris
    Commented Oct 31, 2016 at 21:27
  • $\begingroup$ @Floris sure. By concentration I meant amount of substance per unit volume ($kg/m^3$ or $mol/m^3$), the substance being that of gas x injected into the room. For simplicity I m only considering the case where the room is initially empty, that is, there's no other gas involved. Please let me know if there are any other points to be clarified. $\endgroup$
    – user929304
    Commented Oct 31, 2016 at 22:50
  • $\begingroup$ If there is no other gas, is the room vacuum? If so, then diffusion will be "almost instantaneous" - given by the desire of the injected gas to fill the void. Then the problem becomes trivial - but that doesn't seem to be what you are asking about. $\endgroup$
    – Floris
    Commented Oct 31, 2016 at 22:57
  • $\begingroup$ @Floris You re right. Let us assume a uniform initial density $\rho_0$ of another gas y (definitely other than x), with $\rho_0 \neq 0$. I admit this problem was initially given to me with the room being filled with a fluid (unknown, e.g. water) into which a gas is injected from a source and the sink is only permeable to the gas. But to wrap my mind around the problem i figured a first simpler step would be to assume the room s empty. Do you reckon the original problem is tractable? $\endgroup$
    – user929304
    Commented Oct 31, 2016 at 23:35
  • 1
    $\begingroup$ @Floris thanks again for the points you brought up. Please see the edited question description. $\endgroup$
    – user929304
    Commented Nov 1, 2016 at 15:24

3 Answers 3

1
$\begingroup$

From your question it seems to me that flow of gas in the canal and through the holes is being created by some external agency like a pump. If this is the case, mass flow in the room, from canal to holes, does not require any concentration gradient to exist in the room. Flow is driven by a pressure gradient. Therefore knowledge of flow rates alone is insufficient to tell you anything about the concentration profile (or even if it exists at all; the best you can do is calculate average concentration of gas in the room using control-volume type analysis, as shown by @NoEigenvalue). If at all a concentration gradient is present, then it means that thermodynamic conditions are not uniform in the room. If pressure in the room may be assumed constant, then variation in concentration/density requires that temperature be non-uniform in the room. So you need to analyse energy equation too, but things will most likely become messy.

$\endgroup$
1
$\begingroup$

A simple flow model would go like this:

The volume contains $x$ kg of gas, so the density $\rho$ is $x/V$ with units $\mathrm{kg/m^3}$. Now we ask of the rate of change of $x$, the amount of kg inside the box, per time. We write this as

$$\frac{dx}{dt} =\text{stuff coming in}-\text{stuff going out} ,$$

where the units on the right should be $\mathrm{kg/s}$.

When there is an influx then a certain amount "$I_f$" of kg per second enter the box. We can express this as

$$\text{stuff coming in}=I_f\cdot~\mathrm{\frac{kg}{s}}= \rho_i ~\mathrm{\frac{kg}{m^3}}\cdot Q_i~\mathrm{\frac{m^3}{s}}, $$

where $\rho_i$ is the density of the incoming gas and $Q_i$ is the volumetric flow rate of the incoming gas. The units are $\mathrm{kg/s}$, just as we want.

Similarly the amount of stuff going out is the density of gas inside the box times the volumetric flow rate $Q_o$ out of the box:

$$\text{stuff going out}= O_f\cdot~\mathrm{\frac{kg}{s}}=\rho ~\mathrm{\frac{kg}{m^3}}\cdot Q_o ~\mathrm{\frac{m^3}{s}}. $$

The density $\rho$ of the gas inside the box is, as said above, $x/V$, so we can finally write (omitting the units):

$$\frac{dx}{dt}= \rho_i \cdot Q_i -\frac{x}{V} \cdot Q_o .$$

The solution of this is

$$x(t)=\frac{ Q_i }{Q_0}~\rho_i V+c_1e^{-\frac{Q_0}{V} \cdot t}, $$

where the constant $c_1$ has to determined from the condition that the box contains $x_0$ kg of gas at $t=0$. When the room is empty at the beginning then

$$x(t)=\frac{ Q_i }{Q_0}~\rho_i V~\left(1-e^{-\frac{Q_0}{V} \cdot t}\right), $$

which makes sense: if the flow rates for "going out" and "coming in" are equal then after long enough time the amount of gas in the box will just be the density of the incoming gas times the volume.

$\endgroup$
5
  • $\begingroup$ Thanks a lot, very interesting approach. To make sure that I understand correctly, you are assuming that the density in the room is always uniform hence the use of x/V right? What if we didnt want to make such assumption? Would we then resort to using the diffusion equation? $\endgroup$
    – user929304
    Commented Oct 30, 2016 at 22:22
  • $\begingroup$ Yes - I made the "instant mixing" assumption. To be honest I restricted myself to this model since I don't know enough about the use of the diffusion equation in such situations to say something meaningful. ^^ But I guess you would need to include the incoming gas as a source term of the equation and the outgoing gas as a boundary condition imposed on the solution. $\endgroup$
    – user42076
    Commented Oct 31, 2016 at 9:32
  • $\begingroup$ Indeed. By the way I ve slightly edited the questions after some sensible comments. $\endgroup$
    – user929304
    Commented Nov 1, 2016 at 15:25
  • $\begingroup$ This solution is incompatible w one of the assumptions, i.e. "constant outfow $O_f$". While here $O_f$ is made dependent on $\rho_x=x/V$, and since $x$ varies in time the outflow rate will vary in time too. This is why the solution is exponential, which is inconsistent with constant sources/sinks scenario. $\endgroup$
    – rmhleo
    Commented Nov 7, 2016 at 16:06
  • $\begingroup$ @rmhleo A late response to your remark... You are of course right, I interpreted the question wrongly. But the question remains if it is at all sensible to consider a constant outflow in the $kg/s$-sense. ("amount of substance per unit area per unit time", with fixed area of in/outflow) My argument is that even if you solve the diffusion equation inside the volume the equations I used are still valid when you measure "at the pipes" leading to and from the room. Constant flows would then mean $\dot x = I_f - O_f=\pm~const$, so that $x$ would then increase "forever" or go to zero. $\endgroup$
    – user42076
    Commented Nov 12, 2016 at 18:21
1
$\begingroup$

You do not need the diffusion equation since you are interested only on time variation regardless of spatial distribution. Especially because you are fixing inflow and outflow irrespective of surface area, which probably means these areas are equal and then only the time rates matter. Since those time rates are constant, the is not clear if you are interested in the volumetric profile, in which case the solution is a linear or flat profile with time.

If you do want spatially resolved density, then you need to provide the areas of inflow and outflow because they matter. Also the speed of inflow/outflow will change the type of diffusion, which can range from molecular diffusion, if they are very small, to chaotic turbulence if they are really fast.


Addition after comments below…


To solve the problem, it needs to be specified further. For the equation proposed to be applicable

$$\frac{\partial \rho_x(r, t)}{\partial t} = D \nabla^2 \rho_x(r,t)$$

we need thermodynamical equilibrium. This means that the gas y has to be present and it's temperature and pressure must match those of the incoming/outgoing gas in the fronteers.

If this does not hold, the duffusion will also be driven by temperature/pressure gradients. Such effects would be expressed by dependences of the diffusion coefficient $D$ on spatial coordinates, and we would need to use the more general expression

$$\frac{\partial \rho_x(r, t)}{\partial t} = \nabla ( D(\rho,t) \nabla \rho_x(r,t) )$$

Now, under the mentioned assumptions, you can have the following cases:

  • Equal sized entry and exit boundaries...

Then the problem is basically unidimensional since the transversal profile has no differences and the equation looks like:

$$\frac{\partial \rho_x(z, t)}{\partial t} = D \frac{\partial^2 \rho_x(z,t)}{\partial z^2}$$

  • Unequal sized entry and exit boundaries...

Then the problem can be 2D in space, if cyllindrical coordinates can be used because the system is rotationally symmetric where you can use

$$\frac{\partial \rho_x(z, t)}{\partial t} = D (\frac{1}{r}\frac{\partial}{\partial r}(r\frac{\partial \rho}{\partial r} ) + \frac{1}{r^2}\frac{\partial^2 \rho}{\partial \phi ^2} + \frac{\partial^2 \rho_x(z,t)}{\partial z^2})$$

or if not, like in your case where V is a box, then a the coordinate system needs to be chosen according to the problem.

Al of these equations can be solved defining correctly the boundary conditions. For the first case they are simply $O_f$ and $I_f$, while for the second, it needs to account for the entry and exit boundaries shape.

$\endgroup$
9
  • $\begingroup$ Thanks for your comments. Indeed the spatially resolved density as a function of time is what I m interested in (also the extreme case being the steady state). As i mentioned to Floris in the comments, the outflow is assumed constant here for simplicity, whereas i was originally intereated in the case $O_f$ is proportional to the time average density $\propto A \langle \rho_x(t) \rangle$. With the inflow rate being constant. So do you reckon we need to set out some dimensions for the in and out flow in order to make the problem tractable? $\endgroup$
    – user929304
    Commented Nov 7, 2016 at 22:34
  • $\begingroup$ Then it seems the closest to what you want is @NoEigenvalue's answer, but it does not come across from your question. To solve the problem as you want, in spatial dimmensions and time, you need to provide also the sources and sinks as 3D functions, even if they are point sources. This is in general a complicated problem with no analytic solution, and usually needs to be numerically solved. However, the type of diffusion equation (molecular or heat or fluid) will depend on the constraints on the source and sinks, like how fast, and how much volume w.r.t to V. You need to constrain further. $\endgroup$
    – rmhleo
    Commented Nov 7, 2016 at 22:59
  • $\begingroup$ Thanks again. I'm mainly interested in learning how the governing equations can be figured out for the model at hand, irrespective of whether they are analytically solvable or not. Would we be able to make progress for the simplified cases $I_f \ge O_f$ with both being constant in time? $\endgroup$
    – user929304
    Commented Nov 8, 2016 at 13:23
  • $\begingroup$ Well I think the model at hand does not specify things that are relevant. If you are free to make further assumptions (necessary for determining a diffusion equation and arriving to a solution) then I would suggest a fluid with laminar flow. But for this scenario, $I_f =O_f$ yields a constant $\rho_x$ in time and in volume. While $I_f >O_f$ yields an linear rise of pressure during time up to infinity (if $I_f,O_f$ ar constant in time), or if they are pressure/density dependent, then some exponential function. If you fix one of these conditions, a more concrete answer can be elaborated. $\endgroup$
    – rmhleo
    Commented Nov 8, 2016 at 13:52
  • $\begingroup$ Thanks again, I see. I think assuming laminar flow for the gas x in host fluid y would be a reasonable starting point. So imagine that as the rooms fills up with x, at first we have a high concentration near the source, as the gas diffuses, some starts to leave the room from the sink so near the sink the concentration is lowering, I imagine (just my hunch) after sufficiently long time: we reach a stationary state i.e. the concentration profile in the room becomes independent of t as the room (of finite volume) is saturated in x. Is this a sound scenario? $\endgroup$
    – user929304
    Commented Nov 8, 2016 at 15:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.