Consider this hypothetical equipment.
A pipe made of semi-permeable membrane (permeable only to the solute) has a streamline flow of pure water going from A to B ($P_A>P_B$). Midway, another static compartment with a high concentration of the solute (which is maintained at a constant level $C$ by replenishment) is brought in contact such that exchange is possible across the two compartments. Disregarding the effect of gravity, how would you model the solute flow in the pipe? Assume that the solutes are consumed at B.
It seems intuitive that the solute will flow in the direction of B due to the bulk flow of the liquid, as you would expect from the common experience. But when I tried to characterize it thermodynamically, using the chemical potential, I could not come up with the proper terms. The concentration gradient would favor diffusion equally towards A and B, representing a gain in entropy. But what other thermodynamic gains will preferentially push the solutes in the direction of B, if any? Is a steady state possible, and if it is, what factors will determine the concentration at A?
I couldn't factor in the effect of pressure. Although the pressure gradient makes intuitive sense for the flow of liquid (Bernoulli equation and potential energy), how does it explain it's effect on the solute? Would a solute flow, without concomitant solvent-flow allowed, from a compartment with water at a higher pressure, to a one with lower pressure, although the initial concentration in both the compartments was same?
Having taken the topic after a long gap, I apologize if I seem to have totally muddled up the fundamentals. Although the precise mathematical equations aren't required, it might help understand the stuff going on here. Let me know if it isn't suited to Physics SE.