-
-
August 17, 2023 at 2:00 pmMohammad AsifSubscriber
Hi,
I am modeling the adsorption of CO2 in a mixture (air+CO2) by using a porous zone (see attached figure). I have written a UDF for the rate of adsorption dq/dt= k(q^* - q)) using four UDS and then applied them to the porous zone only. Used DEFINE_ADJUST to adjust these four UDS and in the end added the mass source term in the porous zone. See the figure attached. My source term is DEFINE_SOURCE(m_src,c,t,ds,eqn)Â
{
  real mass_source;
  mass_source = -C_UDSI(c,t,3);
  ds[eqn]=0.0;
  return mass_source;}
The UDF is compiled without any problem. The problem I am facing is that my CO2 breakthrough at the outlet is very quick and not exactly matches the literature. I don't know what I am doing wrong. If any expert can suggest anything or throw some light on whether I am doing it right or not, that will be really helpful.
-
August 17, 2023 at 5:17 pmRobForum Moderator
As I don't know what you're solving it's hard to say. How does the mass balance look?Â
-
August 17, 2023 at 8:35 pmMohammad AsifSubscriber
Â
I am solving the adsorption of CO2 taking place in an adsorption bed which is assumed as porous, as shown in the attached picture in my original post. For better understanding, I am sharing my UDF here. The mass balance is looking fine. One more problem is that my program is taking too much time, even though the mesh size is not that big, porosity is 0.4 but I am using default values of Viscous resistance and Inertial resistance. I am adding the adsorption rate of CO2 as a mass source term in the porous region.
I am using linear driving force adsorption model-> dq/dt= k(q^* – q), q^* is calculated by Langmuir isotherm and then adding (1-porosity)*rho*dq/dt as a mass source in porous zone.
ÂÂ
Â
-
August 18, 2023 at 8:56 amRobForum Moderator
I'm still not sure what the problem is. Air & CO2 enter the zone, some CO2 is removed via the source term and air & some CO2 leaves through the outlet. Mass is conserved so the model is working, or rather seems to be doing what you set it up to do.Â
-
August 18, 2023 at 10:15 amMohammad AsifSubscriber
Yes, Air and CO2 enter the zone and CO2 is adsorbed (you can say added to the porous zone and removed from the bulk phase) using a source term. It seems to be giving better results now but my program is running for the last two days, I am having a good workstation, mesh size is also 10000 cells, but it seems the process is taking too much time.Â
-
August 18, 2023 at 11:56 amRobForum Moderator
Is the model transient or steady?Â
-
August 18, 2023 at 11:57 amMohammad AsifSubscriber
The model is transient.
-
August 18, 2023 at 1:35 pmRobForum Moderator
OK. Because you need to resolve the flow time scale (speed relative to cell size) but also run long enough to reach whatever state you want you can have some very long duration simulations. Eg you need to resolve at 0.001s but simulate for 5 hours: you need around 18Million timesteps each requiring 10-15 iterations.Â
-
August 18, 2023 at 6:28 pmMohammad AsifSubscriber
Exactly, my simulation ran for 48 hours to reach the state I need at the outlet of my domain.
-
August 21, 2023 at 9:21 amRobForum ModeratorAssuming it must be run transient, then your best option is to check cpu load (10k cells may not see much benefit from parallel) to ensure it's being used efficiently. For transient simulations we expect the solution to take many hours or a few days at best: hence why we prefer steady state runs.ÂÂ
-
August 21, 2023 at 11:30 amMohammad AsifSubscriber
I am interested in knowing the flow time in which CO2 will reach the exit of the domain. That's why I am running it in transient mode.
-
August 21, 2023 at 12:49 pmRobForum Moderator
Then you'll need to wait for the run to complete.Â
-
August 21, 2023 at 12:53 pmMohammad AsifSubscriber
Ok, thanks.
-
September 2, 2023 at 5:55 pmJamesSubscriber
Hello mate,
Do you mind sharing the code?
-
-
- The topic ‘Adsorption using ANSYS Fluent, species transport’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Script error Code: 800a000d
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
-
1301
-
591
-
544
-
524
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.