CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Boundary conditions for a solute-impermeable membrane (aggregation of a scalar)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2022, 16:57
Question Boundary conditions for a solute-impermeable membrane (aggregation of a scalar)
  #1
New Member
 
Anonymous
Join Date: Oct 2022
Posts: 4
Rep Power: 4
NotANumber is on a distinguished road
Hello,


I am new to OpenFOAM and I'm struggling to get a simulation to work. I want to model the aggregation of solute at a solute-impermeable membrane in a through flow. I have a known concentration at one side of the channel (maintained, say, by a very large tank containing a known concentration of solute). At the other end of the domain, I have a semi-permeable membrane; I expect solute aggregation in this region as a result of advection, provided advection is fast relative to diffusion.



I have a known velocity profile from a previous simulation and I am using scalarTransportFoam. I currently—as a first pass, just to test the solver—use a fixedValue boundary condition at the inlet and zeroGradient at the outlet. I don't see any development in the concentration profile. This seems like a reasonable result, as the initial condition (uniform solute concentration equal to the concentration at the inlet) is consistent with my boundary conditions and all spatial derivatives are zero (so there can be no change in concentration, according to the governing equation).


Is there a different way I should model the boundary conditions for this problem? Essentially, I want to ensure the solute entering the channel is conserved, such that any solute that enters the channel remains there (I am considering only early times, so I do not expect issues with saturation or steep changes in concentration at the inlet). I am new to OpenFOAM, and to computational fluid dynamics more generally, so I am not familiar with all of the available options. I feel like I probably need to use a source at the inlet to specify some rate at which solute enters the channel (the product of density and the inlet velocity), but I do not know how to get that to work with the boundary conditions OpenFOAM provides, and the documentation for scalarTransportFoam says it only applies to "[equations] without source terms."


Thanks in advance for any help or pointers on this!
Attached Images
File Type: png solute_transport.png (50.6 KB, 13 views)
NotANumber is offline   Reply With Quote

Old   November 9, 2022, 12:47
Default
  #2
New Member
 
Anonymous
Join Date: Oct 2022
Posts: 4
Rep Power: 4
NotANumber is on a distinguished road
I think I have figured out how to implement this.


The boundary condition I was looking for was, of course, no-flux, which would be equivalent to the zero-gradient condition in the absence of a normal velocity on the boundary. That is, where the normal velocity \mathbf{u} \cdot \hat{\mathbf{n}} = 0, the flux \mathbf{J} = - \mathcal{D} \nabla c + c \mathbf{u} simplifies to -\mathcal{D} \frac{\partial c}{\partial x} = 0 on the boundary (where \hat{\mathbf{n}} is in the x-direction). With the membrane, however, the normal velocity is no longer zero, so this simplification is not possible. Instead, I have -\mathcal{D} \frac{\partial c}{\partial x} + cu = 0, where u = \mathbf{u} \cdot \hat{\mathbf{n}} \neq 0. I have to calculate the gradient \frac{\partial c}{\partial x} = \frac{cu}{\mathcal{D}} at the boundary. I do so with a gradientExpression in groovyBC.
NotANumber is offline   Reply With Quote

Reply

Tags
boundary conditions, scalartransportfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 19:02
Problem with SIMPLEC-like finite volume channel flow boundary conditions ghobold Main CFD Forum 3 June 15, 2015 12:14
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 18:30
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00


All times are GMT -4. The time now is 10:54.