CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Adsorption Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2016, 16:38
Default Adsorption Boundary Condition
  #1
New Member
 
Join Date: Jun 2016
Posts: 2
Rep Power: 0
Bine is on a distinguished road
Dear CFD Online community,

I'm new in this forum and have not been working very long with OpenFOAM, so I hope you can help me.

I'm trying to simulate the adsorption process with a source term for the adsorption of a component at a wall in a very simple way, because I don't have much experience in programming solvers.
I use the Langmuir kinetic, so the source term is the following equation and depends on the free concentration and the surface concentration of the adsorbed species:

dC/dt = -kA*C*(Csmax-Cs)+kD*Cs

Analogue the source term of the adsorbed component can be written as:

dCs/dt = kA*C*(Csmax-Cs)-kD*Cs

C is the free concentration in the fluid, Cs the surface concentration of the adsorbed species, Csmax the maximum surface concentration. kA and kD are the adsorption and desorption coefficients.

My first try o realize the simulation of this process was to use the scalarTransportFoam-solver (solver for diffusion and convection of one component) and groovyBC. For writing the surface concentration, I added Cs as a second component to the scalarTransportFoam-solver.

More detailed:
I described the boundary condition for adsorption of C on one wall like this:

boundaryField
{
upperWall
{
type groovyBC;
refValue uniform 1;
refGradient uniform 0;
valueFraction uniform 1;
value uniform 1;
valueExpression "C-(((ka*(Csmax-Cs)*C)-(kd*Cs))*deltaT())";
gradientExpression "0";
fractionExpression "1";
evaluateDuringConstruction 0;
variables
3
(
"ka=0.02;"
"kd=0.1;"
"Csmax=1;"
);
}

And I used the analogue formulation for the Cs component.

Because the boundary condition depends on on C and Cs, I just added the following lines in the solver to write and save the field for Cs (copied from the other component).

solve
(
fvm::ddt(Cs)
+ fvm::div(phi, Cs)
- fvm::laplacian(DCs, Cs)
==
fvOptions(Cs)
);

I set the diffusion coefficient of Cs zero, because this component occurs only on the surface and not in the fluid.

My problem is, that actually it is not necessary to calculate Cs in the whole field. Is it possible to write only a surface field for Cs on the wall in the solver? If yes, could you tell me how? I didn't find something similar in the tutorial cases.

Or maybe somebody has a totally different idea how to realize this type of process.

Thank you for your help!
Bine
Bine is offline   Reply With Quote

Old   June 21, 2016, 03:17
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Does it make sense to separate C and Cs in your context? Cs is just the patch value of C at the free surface.

valueExpression "C.internalField()-(((ka*(Csmax-C)*C.internalField())-(kd*C))*deltaT())";
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   June 21, 2016, 04:07
Default
  #3
New Member
 
Join Date: Jun 2016
Posts: 2
Rep Power: 0
Bine is on a distinguished road
Thank you for the quick answer!

Unfortunately I have to separate C and Cs.
Maybe I didn't explain it clear enough in my first thread, but C and Cs don't have the same value. C is the free concentration of a component, also at the surface, but not adsorbed, Cs is the already adsorbed concentration.
You can imagine it as a surface reaction C --> Cs.
Thats why I have to write the Cs field in every timestep somehow.
Bine is offline   Reply With Quote

Reply

Tags
adsorption, groovybc, scalartransportfoam, surface reaction


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
Accessing multiple boundary patches from a custom boundary condition file ripudaman OpenFOAM Programming & Development 0 October 22, 2014 19:34
Radiation interface hinca CFX 15 January 26, 2014 18:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44


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