|
[Sponsors] |
June 20, 2016, 16:38 |
Adsorption Boundary Condition
|
#1 |
New Member
Join Date: Jun 2016
Posts: 2
Rep Power: 0 |
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 |
|
June 21, 2016, 03:17 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
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. |
|
June 21, 2016, 04:07 |
|
#3 |
New Member
Join Date: Jun 2016
Posts: 2
Rep Power: 0 |
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. |
|
Tags |
adsorption, groovybc, scalartransportfoam, surface reaction |
|
|
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 |