-
-
August 17, 2023 at 2:00 pm
Mohammad Asif
SubscriberHi,
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 pm
Rob
Ansys EmployeeAs 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 pm
Mohammad Asif
SubscriberI 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 am
Rob
Ansys EmployeeI'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 am
Mohammad Asif
SubscriberYes, 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 am
Rob
Ansys EmployeeIs the model transient or steady?
-
August 18, 2023 at 11:57 am
Mohammad Asif
SubscriberThe model is transient.
-
August 18, 2023 at 1:35 pm
Rob
Ansys EmployeeOK. 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 pm
Mohammad Asif
SubscriberExactly, my simulation ran for 48 hours to reach the state I need at the outlet of my domain.
-
August 21, 2023 at 9:21 am
Rob
Ansys EmployeeAssuming 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 am
Mohammad Asif
SubscriberI 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 pm
Rob
Ansys EmployeeThen you'll need to wait for the run to complete.
-
August 21, 2023 at 12:53 pm
Mohammad Asif
SubscriberOk, thanks.
-
September 2, 2023 at 5:55 pm
James
SubscriberHello mate,
Do you mind sharing the code?
-
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
-
7742
-
4502
-
2963
-
1449
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.