CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Accumulating Dust on a Filter Cartridge (http://www.cfd-online.com/Forums/cfx/68811-accumulating-dust-filter-cartridge.html)

 WalterW October 2, 2009 07:42

Accumulating Dust on a Filter Cartridge

Dear colleagues,

I'm currently trying to set up a transient simulation of an air filter system in CFX 12.0. It consists of the following domains:

- "dirty air side": inlet and duct leading to the filter cartridge
- filter cartridge, which is set up as porous medium
- clean air side" and system outlet

By setting proper pressure drop coefficients in the homogeneous porous domain I managed to reproduce the measured pressure drop of the system and velocity distributions on the filter cartridge inlet.

But now I would like to go further and simulate the behaviour of the system in time. A filter cartridge by and by accumulates dust. Since the velocity distribution on the filter cartridge inlet is not uniform due to upstream geometry, the aggregation of dust in the cartridge is not uniform either, thus changing the air resistance of the filter material locally. This subsequently alters the flow distribution on the cartridge, which influences again the flow distribution, and so on.
Finally, after months or years of use, the overall pressure drop of the filter cartridge reaches a critical maximum and has to be replaced.

I want to predict the final distribution of dust on the filter cartridge.

My first naive idea was a CEL expression that at each iteration, for each of the porous medium's cells, determines the pressure loss coefficients as a function of the local velocity (high velocity = high coefficient) and the timestep (as time passes, more and more dust aggregates in the filter material). However, since here the filter cartridge has no 'memory', the dust distribution is calculated anew for every timestep. This corresponds to dust moving freely around inside the cartridge, and the resulting distribution is, therefore, much smoother than reality.

My next guess was to write a junction box routine which creates a cross-sectional "dust map" (2D-array) of the cartridge. At the end of every timestep, the array elements are increased according to the velocity corresponding to each element. A CEL function would then, for each point of the porous domain, interpolate something like an 'additional loss factor' from the dust map.

Do you think this a suitable approach for my problem, or is there any simpler solution that would do?

And, crucial for this method: Is it possible to access local velocity data from a junction box routine?
I had hoped to use a function that returns interpolated values for any given point (like the PROBE tool in CFD Post), but could not find anything like that in the documentation.

I would very much appreciate your help!
Walter

 ckleanth October 2, 2009 18:35

From the procedure you have described I suppose you have a velocity versus dp data for your filter when its clear and assuming you can write a second order polynomial from that data you get the linear and quadratic resistance coefficients, from that you can also calculate the permeability and loss coefficients.

I believe you also have data for the performance of the the filter while its is blocked with particles over time. why then dont you plot the linear and quadratic resistance coefficients (I personally would use the permeability and loss coefficients) for each of these these quantities and on how they change with time. then you can easily create two more polynomials describing their change with time. this way you create variable resistance coefficients linking your simulation timestep with the accumulation of particles over time.

:)

 WalterW October 3, 2009 06:36

Your assumptions are correct. :)
I have presure drop versus mass flow / velocity data filter cartridges blocked with various amounts of ISO dust. Those cartridges have been obstructed homogeneously.
But in the system whose performance I have to predict the velocity distribution is not uniform, so the filter is obstructed more in certain areas than in others.
Therefore, alas, an overall decrease of the medium's permeability does net reflect reality.

 ckleanth October 5, 2009 09:28

well in that case I cannot see why you cannot use an isotropic porous model using the same approach that I suggested.

you could also add a passive scalar or if gravitational effects are important you could model particle distribution within your flow; perhaps then you can visualize where within the filter the particles accumulate.

 WalterW October 5, 2009 12:17

I already did a simulation very similar to the one you described, my first approach. According to it the distribution of dust on the cartridge uniformizes (well, almost) with time. But that's not physically correct: If you have a spot of high flow velocity on the filter inlet, that area will collect a lot of dust, and there (locally!) the permeability of the filter decreases.
Time, in reality, will never smooth out the spot - but this simulation approach does.

In the approach you suggested the filter's permeability changes globally with time. Did I get that right?
As we found out, the permeability must be local - a function of how much dust has been accumulated (local time integral) on each segment of the cross-section of the filter.

 ghorrocks October 5, 2009 19:01

Can it be done as a series of discrete steps? Run it with a clean filter, in post processing determine the dust collected and rerun with a filter with a varying resistance? You then do as many steps as are required to capture the process.

The alternate method seems to be to use an additional variable. It accumulates at the filter and the filter resistance is a function of the additional variable value.

But I suspect the timescales of the filter clagging up are way longer than the fluid timescales. In this case you don't want to use the AV approach as the simulation will take forever. The discrete run approach makes sense then as a series of steady state runs can be done which represent the flow at different stages of the filter's life. It is much easier to do.

 WalterW October 6, 2009 06:21

> Can it be done as a series of discrete steps?
That could be done, but I would prefer to automatize the procedure.

> But I suspect the timescales of the filter clagging up are way longer than the fluid timescales.
In reality: yes. What I intended to do was to simulate one step, evaluate the velocity=dust distribution, change the local loss coefficients and go on to the next step. This, in my opinion, can be done in a transient simulation. The time variable of this calculation would, of course, not correspond to physical time, but rather, like you said, indicate some stage in the life of the filter cartridge.
The problem is - I do not know how to implement a simulation of this kind.

> The alternate method seems to be to use an additional variable. It
> accumulates at the filter and the filter resistance is a function of the
> additional variable value.
Do you know exactly how to do this? I wasn't able to set up a simulation where anything is 'accumulated' somewhere...

 ghorrocks October 6, 2009 17:58

Quote:
 > Can it be done as a series of discrete steps? That could be done, but I would prefer to automatize the procedure.
A series of steady state runs can be automated.

Quote:
 > But I suspect the timescales of the filter clagging up are way longer than the fluid timescales. In reality: yes. What I intended to do was to simulate one step, evaluate the velocity=dust distribution, change the local loss coefficients and go on to the next step. This, in my opinion, can be done in a transient simulation. The time variable of this calculation would, of course, not correspond to physical time, but rather, like you said, indicate some stage in the life of the filter cartridge. The problem is - I do not know how to implement a simulation of this kind.
I think you are heading in the wrong direction. Transient simulations are time accurate, that is why they have all the time derivative terms in there. So as you say the thing can be modelled as a series of psuedo-steady steps then you definitely should use a series of steady state runs.

Quote:
 > The alternate method seems to be to use an additional variable. It > accumulates at the filter and the filter resistance is a function of the > additional variable value. Do you know exactly how to do this? I wasn't able to set up a simulation where anything is 'accumulated' somewhere...
You might not need it if you use a steady state approach. You could make the resistance of the next run a function of the flow field at the filter from the last run. This means you don't need to model the accumulation directly, just the resistance changes.

 WalterW October 7, 2009 02:21

OK, now you've convinced me. :)
I'll look into automatizing a series of steady state runs.

Can this be done in a single .def file or do I need to interface the solver with CFD Post and iterate (using Workbench or a shell script)?

Thank you very much!

 ghorrocks October 7, 2009 06:13

You may be able to automate this inside Workbench. Not sure, I am no expert in WB.

You can also do it by extracting some data from Post and feeding that back into the CCL for the next solver run. This would be done in a shell script.

 WalterW October 7, 2009 13:11

Success!

After messing around a full half of a day to have a batch script reformat the exported data from post and wrap it into a CCL file, I am proud to announce that my test case works perfectly. :)
I still have to calibrate with experimental data, but I feel very confident that that should prove no problem.

If anyone is interested in details of my solution, please feel free to ask here.

Thank you ghorrocks, without you I would still be stuck exploring the CFX User Fortran API. :)

 ckleanth October 7, 2009 15:30

Id be interested to see what you have done :D

 WalterW October 8, 2009 06:02

EDIT:

This is what I wrote to document my work. If you find anything suspicious in language and content, please let me know. :)
Have Fun!

================================================== ==============================
HOW TO Simulate Dust Accumulation on a Filter Cartridge
================================================== ==============================

INTRODUCTION: The Pseudo-Timestep Approach
--------------------------------------------------------------------------------

This document covers the set-up of a CFD simulation of an air filter system, considering the permeability change of the filter cartridge as it accumulates dust. As time goes by, the areas on the filter with high flow throughput aggregate more dust than other areas, and therefore the air resistance locally increases. This, in turn, reduces the flow through this area for future timesteps. The goal of the analysis is to predict the distribution of the dust load on a filter cartridge as it gets close to it's end of life, and the effect of uneven dust distribution on fluid flow.

This problem is approached by a series of consecutive stationary simulations of the system. After each run, for every element of a cross section of the filter cartridge, the ratio of local velocity and average velocity through the cross section is computed. This value is considered to be proportional to the newly accumulated dust for this zone of the filter cartridge.
By summing up the velocity ratios of an element on every timestep, the total amount of loaded dust in that area of the cross section is calculated. This value is then projected to all elements of the filter, and can be used by CFX to calculate local permeability coefficients.

Step ONE: Pressure Loss Coefficients
--------------------------------------------------------------------------------

In order to simulate the behaviour of a filter cartridge as a porous medium with pressure loss coefficients, you need to know its pressure drop for various velocities of flow and dust loadings when flowing through uniformly:

dP = QuadCoeff' * (v_ave)^2 + LinCoeff' * v_ave,

with the two coefficients being functions of the amount of loaded dust.

In a test case, with the dust load varying from 0 (clean filter) to 1 (maximum dust load to be considered), and the thickness of the filter cartridge being 42mm, the coefficients could be, for example,

QuadCoeff = QuadCoeff' / Filter Thickness = 300 [ kg m^-4 ]
LinCoeff = LinCoeff' / Filter Thickness
= 1500 [ kg m^-3 s^-1 ] + 15000 [ kg m^-3 s^-1 ] * DustLoad

Here, the pressure drop of the filter changes only linearly with the dust load.

Step TWO: Upgrading the Simulation File
--------------------------------------------------------------------------------

First, set up your standard stationary filter system simulation in CFX Pre, setting domains, interfaces and boundary conditions, initial conditions, solver control and output parameters, etc. If you don't want to edit any of the provided script files, the interface between dirty air side of the system and filter cartridge should be named "if1", with "if1 Side 2" being the inlet surface of the filter cartridge.

Then create a unit-less, scalar Additional Variable of unspecified type to your simulation and name it "Dust".
Also, create a User Function called "DustDistribution", with Argument Units [m],[m],[m] and Result Unit [ ]. Then you should add some points with value 0 as the initial condition.

LIBRARY:
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Variable Type = Unspecified
END
CEL:
FUNCTION: DustDistribution
Argument Units = [m],[m],[m]
Option = Interpolation
Profile Function = Off
Result Units = [ ]
INTERPOLATION DATA:
Data = 0,1,0,0,0,0,0,0,1,1,0,0,1,0,0,0
Option = Three Dimensional
END
END
END

Edit the details of any domain in your system, go to the "Fluid Models" tab and activate the Additional Variable "Dust". Set it to "Algebraic Equation" with value DustDistribution(x,y,z).

Finally, set the Isotropic Loss Coefficients of the filter domain/subdomain as a function of the "Dust" variable:

Linear Coefficient = BaseLinCoeff + AddLinCoeff * Dust

For a uniform flow distribution on the filter cartridge, the average of "Dust" is n after n pseudo-timesteps. Knowing this, you can adjust the additional coefficients to your problem.

In the example mentioned above, only the linear coefficient changes with the dust concentration. For 10 steps,

AddLinCoeff = 15000 [ kg m^-3 s^-1 ] / 10 = 1500 [ kg m^-3 s^-1 ]

Step THREE: The Script and Macro Files
--------------------------------------------------------------------------------

The following files are needed in your work directory:

- filter_test1.def Your problem's solver input file.
- run Shell script file. It does all the work for you.
- dust_mktable.cse CFD Post session file. After each pseudo-timestep,
this macro exports the normalized velocity
distribution on a filter cross section 5mm distant
from the inlet interface.
- dust_ccl_header.txt First part of the CCL script used to interpolate the
exported distribution to the "Dust" variable in CFX.
- dust_ccl_footer.txt Last part of the CCL script.

If you strictly followed the naming conventions used here, the scripts should work without modifications.

In case you would like to make changes edit the related file:
For changing the number of pseudo-timesteps or the filename of the input file, open the shell script file "run" with a text editor and change the values of the variables FILENAME or STEPS.
If the filter cartridge inlet interface's name is not "if1 Side 2" change the value of \$interface the session file "dust_mktable.cse".
Likewise, most of the behaviour can be changed by simply modifying variables in the files.

Step FOUR: Run the simulation
--------------------------------------------------------------------------------

Run the shell script file from console prompt by typing
./run

 WalterW October 9, 2009 07:22

APPENDIX: Script and macro files

dust_mktable.cse
Code:

```################################################################################ # Export change of velocity distribution to dust.csv ################################################################################ ! \$dustvar = "Dust"; # name of additional variable ! \$interface = "if1 Side 2"; # name of filter inlet interface ! \$distance = -3; # [mm] # distance from inlet interface ! \$filename = "dust.csv"; # name of table file ################################################################################ COMMAND FILE:   CFX Post Version = 12.0 END ################################################################################ # Part ONE: Export change of velocity distribution to dust.csv ################################################################################ USER SURFACE: DustFilterCrossSection   Apply Instancing Transform = On   Apply Rotation = On   Apply Scale = On   Apply Texture = Off   Apply Translation = Off   Associated Boundary = filter Default   Associated Boundary Specified = On   Blend Texture = On   Colour = 0, 0.8, 0   Colour Map = Default Colour Map   Colour Mode = Constant   Colour Scale = Linear   Colour Variable = Pressure   Colour Variable Boundary Values = Hybrid   Contour Level = 1   Culling Mode = No Culling   Domain List = /DOMAIN GROUP:All Domains   Draw Faces = On   Draw Lines = Off   File Units = m   Input File =   Instancing Transform = /DEFAULT INSTANCE TRANSFORM:Default Transform   Lighting = On   Line Colour = 0, 0, 0   Line Colour Mode = Default   Line Width = 1   Maintain Conservative Values = Off   Max = 0.0 [Pa]   Min = 0.0 [Pa]   Offset Direction = 1 , 0 , 0   Offset Distance = \$distance [mm]   Offset Mode = Uniform   Offset Type = Normal   Offset Variable = Dust   Option = Offset From Surface   Principal Axis = Z   Range = Global   Render Edge Angle = 0 [degree]   Rotation Angle = 0 [degree]   Rotation Axis From = 0 [m], 0 [m], 0 [m]   Rotation Axis To = 1 [m], 0 [m], 0 [m]   Rotation Axis Type = Principal Axis   Scale Factor = 1.0   Specular Lighting = On   Surface Drawing = Smooth Shading   Surface Name = \$interface   Texture Angle = 0   Texture Direction = 0 , 1 , 0   Texture File =   Texture Material = Metal   Texture Position = 0 , 0   Texture Scale = 1   Texture Type = Predefined   Tile Texture = Off   Transform Texture = Off   Translation Vector = 0 [m], 0 [m], 0 [m]   Transparency = 0.0   Use Mid Side Nodes = On   Visibility = On   OBJECT VIEW TRANSFORM:     Apply Reflection = Off     Apply Rotation = On     Apply Scale = On     Apply Translation = Off     Principal Axis = Z     Reflection Plane Option = XY Plane     Rotation Angle = 0 [degree]     Rotation Axis From = 0 [m], 0 [m], 0 [m]     Rotation Axis To = 1 [m], 0 [m], 0 [m]     Rotation Axis Type = Principal Axis     Scale Vector = 1 , 1 , 1     Translation Vector = 0 [m], 0 [m], 0 [m]     X = 0.0 [m]     Y = 0.0 [m]     Z = 0.0 [m]   END END USER SCALAR VARIABLE: DustNew   Boundary Values = Conservative   Calculate Global Range = On   Expression = \$dustvar + Velocity/areaAve(Velocity)@DustFilterCrossSection   Recipe = Expression   Variable to Copy = Pressure   Variable to Gradient = Pressure END EXPORT:   ANSYS Export Data = Element Heat Flux   ANSYS File Format = ANSYS   ANSYS Reference Temperature = 0.0 [K]   ANSYS Specify Reference Temperature = Off   ANSYS Supplemental HTC = 0.0 [W m^-2 K^-1]   BC Profile Type = Custom   Export Connectivity = Off   Export Coord Frame = Global   Export File = \$filename   Export Geometry = On   Export Node Numbers = Off   Export Null Data = On   Export Type = Generic   Export Units System = Current   Export Variable Type = Conservative   Include File Information = Off   Include Header = Off   Location List = DustFilterCrossSection   Null Token = null   Overwrite = On   Precision = 8   Separator = ","   Spatial Variables = X,Y,Z   Variable List = DustNew   Vector Brackets = ()   Vector Display = Scalar END >export```
run
Code:

```#!/bin/sh # main parameters FILENAME="filter_test1" #.def file name without extension STEPS=10 # number of pseudo-timesteps used to clog filter not counting the 0th. # i.e., steps=10 => runs 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 # names of macro and temporary files  CSE_FILE="dust_mktable.cse" # filename of session file for cfx post CCL_HEADER="dust_ccl_header.txt" # first part of ccl template CCL_FOOTER="dust_ccl_footer.txt" # last part of ccl template CCL_TABLE="dust.csv" # filename of table created by \$CSE_FILE (temporary) CCL_FILE="dust.ccl" # filename of the ccl file (temporary) # cfx executables CFX_SOLVER="/ansys_inc/v120/CFX/bin/cfx5solve -size 3 -smms 3" CFX_POST="/ansys_inc/v120/CFX/bin/cfx5post" # init variables i=0 params="" step="" for (( i=0; i<\$STEPS+1; i=i+1 )); do     # convert iteration number to string with leading zeroes (e.g. 013)     step=`printf "%03d" \$i`     # run cfx solver (first run: \$params="")     \$CFX_SOLVER -definition \${FILENAME}.def -fullname \${FILENAME}_\${step} \$params     # run cfx post to generate table     \$CFX_POST -batch \$CSE_FILE \${FILENAME}_\$step.res     # generate ccl file     cat \$CCL_HEADER > \$CCL_FILE       # reformat and insert table data:     cat \$CCL_TABLE | tr -d "\r" | tr "\n" "," | sed s/,\$/\\n/ >> \$CCL_FILE     cat \$CCL_FOOTER >> \$CCL_FILE     # set ccl and initial file for next iteration     params="-initial-file \${FILENAME}_\${step}.res -ccl \$CCL_FILE" done # remove temporary files rm \$CCL_FILE \$CCL_DUST_TABLE```
Code:

```LIBRARY:   CEL:     FUNCTION: DustDistribution       Argument Units = [m],[m],[m]       Option = Interpolation       Result Units = [ ]       INTERPOLATION DATA:         Data = \```
dust_ccl_footer.txt
Code:

```        Option = Three Dimensional       END     END   END END```

 ckleanth October 9, 2009 10:27

I'm quite interested so i will have a look on this once i get some free time. cheers mate

 ghorrocks October 10, 2009 06:00

Yes, excellent work Walter. Thanks for the detailed response.

 DHANDAPANI November 2, 2009 06:53

Air Filter Simulation

Great Job Done..

we are trying to simulate similar analysis.

There is a drum filter which rotates and air passes thro the filter in cicumferentail direction. Cleaned air collected at the the centre of the drum goes to the next stage filter. There are suction nozzles placed near by rotating drum filter to suck the accumulated dust on the filter. I want to simulate whole thing and find out filteration efficiency, effective Suction nozzles position related to durm filter and accmulation of duct with respect to time.

Can I use your simulation approach for this problem?

Thanks
Dhandapani

 montazer1012 April 6, 2013 01:00

Dear All
I need your help. and thank you in advance.
I want to model a basket filter or strainer with fluent. can anybody help me.I dont know if I can do it with fluent?

thank you again
regard

 ghorrocks April 6, 2013 05:07

Try the fluent forum. This is the CFX forum.

 will321321 April 22, 2014 01:37

Dear Walter,

Can I perhaps request a PDF copy of your work so I can use it as reference in my current study.

Thank you

-will

All times are GMT -4. The time now is 04:43.