How to integrate variable in a transient simulation?
I am quite new to CFX (using WB 13) but am working on a problem describing adsorption of CO2 on a porous structure. The domain(s) consist of a rectangular channel (10 x 10 cm x 50cm)through which flows air with cir. 400ppm CO2 at velocities of about 0.1m/s. Placed in the channel are plates of porous material about 1 cm thick and 10 cm wide with a variable length which adsorb CO2. The plates also have a given maximum CO2 loading (ie. the maximum amount of CO2 which can be adsorbed onto the material). The rate of adsorption is defined by something like:
eq. 1 - Rate_new = Constant*(maximum_loading - instantaneous_loading_new)
With maximum_loading being a function of local CO2 partial pressure, Temperature, and a number of constant empirical factors.
I would like to simulate the transient adsorption of CO2 on the plate to determine the 'best' geometry of the adsorption material for a given air flow speed and plate size. By 'best' I mean, which configuration will capture the most CO2 in the shortest amount of time. This simulation needs to be transient also because the local CO2 partial pressure will change along the length of the channel as the gas is locally absorbed. At first the very front edge of the plate will see 400ppm and the back will see 0 ppm (because it has all been removed from the air flow). After a while the front region will 'fill up' and stop absorbing which increases the local CO2 partial pressure at the back which then changes its uptake rate.
I have implemented two domains: 1) the channel, 2) the plates (as a porous media with a given permeability). In the plate domain I have implemented a sub-domain with a source term defining the rate of CO2 adsorption of eq.1 The source term is defined by expressions as in the tutorial dealing with mixing of an acid + water. In both domains flows a variable composition mixture of CO2 Ideal Gas and Air Ideal Gas.
I have come across the following problem however. In order to determine the instantaneous_loading in eq. 1, I need to numerically integrate the instantaneous loading in time in a way such as:
eq. 2. instantaneous_loading_new = instantaneous_loading_old + Rate_old*time_step
Where new and old refer to the current and previous time steps of the transient simulation respectively.
This is what I don't know how to do. How can I access 'old' data in CFX to use for the determination of 'new' data.
If someone has a CEL file or an example simulation or knows of a reference simulation in these forums I would be very grateful for this info.
Thanks and regards.
Accessing old values in CEL is not supported. But there is an unsupported way to do it, search the forum and hopefully you can find it.
To be fair, I don't actually need to access the old data. It's just a way for me to understand what needs to happen. Were I writing my own code I would use the formulation of eq. 2. to 'accumulate' a variable.
I'm surprised that CFX does not support this type of variable accumulation/integration given that every solid-gas reaction rate is determined by a conversion extent which needs to be integrated.
Can you suggest search terms...I don't really know what it is called that which I'm looking for.
Accessing old values, accumulating over time, time integral - all the same thing and you cannot do it as a supported feature in CFX. This question has been asked many times and all I can recommend is you put in a feature request to ANSYS for it to be included.
You can do it as an unsupported feature. Define an additional variable (say "OldVel") and edit the CCL for the additional variable to include the hidden CCL:
That's it. The trick with the dummy run to initialization the Additional Variables to 0 seem to have worked well. Thanks for the link to the thread.
Seems like a pretty standard procedure which should be better documented despite being unsupported.
Anyway, thanks for your help.
|All times are GMT -4. The time now is 16:10.|