## Fluids

Topics relate to Fluent, CFX, Turbogrid and more

#### Adsorption using ANSYS Fluent, species transport

Subscriber

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.

Thank you

• Rob
Ansys Employee

As I don't know what you're solving it's hard to say.  How does the mass balance look?

Subscriber

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.

• Rob
Ansys Employee

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.

Subscriber

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.

• Rob
Ansys Employee

Is the model transient or steady?

Subscriber

The model is transient.

• Rob
Ansys Employee

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.

Subscriber

Exactly, my simulation ran for 48 hours to reach the state I need at the outlet of my domain.

• Rob
Ansys Employee
Assuming 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.

Subscriber

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.

• Rob
Ansys Employee

Then you'll need to wait for the run to complete.