What calculation to use to work out parts per 100 at a particular speed. At work we have product mixing into a tank.
I need to write (and understand) a program that will mix these products to the correct ratio in the tank.
For example; it may be a simple at 98.6% product A and 1.4% product B.
Product A flows into the tank at 2000L/h while product B only flows at 0-50L/h.
How do I calculate the speed in which B should flow?
I would like to understand the calculation as there could be different ratios including more products.
EDIT*
After reading Hennings answer and believing it to be correct (and it way we'll still be) I may need some clarification.
Although it makes sense, what confuses me is that it may not take the full hour for product A to reach its set point, it may only take 10 or 15 minutes. Maybe it could even take 1.5hrs.
Does the same logic apply or does it then need to be multiplied/divided by time to yield the correct answer.?
EDIT*
Before wasting time reading further do know this:
Although flow may not stay the same, I will not be using a set amount in my equation, it will take the REAL value and calculate as it goes. In other words it would have no fixed numbers, it would look like this:
B_flow = (A_flow/A_level) * B_level
Ok more info:
So this is the process as I know it.
Product A is the main ingredient, it will always have a bulk percentage of 90+%. This will flow at a variable rate, somewhere around the mark of 2000L/h.
Product B - F are smaller products that will flow at a rate of 0-50L/h - this is the variable that I need calculated.
There is many possible end-products that may be produced, but here is a very basic example:
Product A flows in at 2000L/h filling 98% of the tank over the course of 15 minutes (this is also an unknown variable, depending on flow rate and the overall wanted percentage of the product).
I need to calculate what rate any other product would need to flow at in order to have its respective amount in the tank at the end of the same time bracket (ie. 15 minutes).
So if I wanted 98% product A and 2% product B. How would B's flow rate be calculated?
Please let me know if there is more information required.
 A: In one hour, $98.6$ liters of A flow into the tank $\frac{2000}{98.6}$ times. This is the same number of times $1.4$ liters of B should flow in. So the desired flow rate of B is
$$ \frac{2000}{98.6}\cdot 1.4 = 28.4 $$
liters per hour.
(This assumes the desired percentages are volume ratios, of course. If they are mass ratios, and A and B have different densities, you need more data).
A: I am assuming that the products are fluids and that they are getting into the tank through tubes.
We define flux of a material is the amount of material getting into the tank per unit time. If $\rho$ is the density of the material, and $v(r)$ is its speed through the pipe, then the flux is
\begin{equation}
\phi = \int_0^R \rho v(r) 2\pi r dr
\end{equation}
If you now have two materials and their flux in the tank should be such that $\phi_1 = \alpha \phi_2$ then,
\begin{equation}
\int_0^{R_1} \rho_1 v_1(r) 2\pi r dr = \alpha\int_0^{R_2} \rho_2 v_2(r) 2\pi r dr 
\end{equation}
Since $\alpha$ is fixed, by your requirements, $\rho_1$ and $\rho_2$ are material parameters, you can change either $R_1$, $R_2$ or $v_1$, $v_2$ or both to match the two sides of the equation. For a tube of circular cross section, we can assume $v$ to be of the form,
\begin{equation}
v(r) = \frac{G}{4\mu}(R^2 - r^2),
\end{equation}
where $G$ is the pressure gradient driving the flow and $\mu$ is the dynamic viscosity of the material.
