Find neighbouring cells by CEL expression
Hello everybody,
i want to model the following : If one cell exceeds a certain threshold, I want to insert to all adjacent cells a source term. Do you know if that is possible with the use of CEL? or do you have any suggestions how I could solve my problem ? Is an additional flux through the cell wall an option in CFX? thank you very much in advance |
There is no simple way of doing exactly what you want.
But you might come close enough if you define an additional variable as a diffusive variable, then apply a source term to that variable based on your "certain threshold". The variable will then diffuse into adjacent cells and you can use some sort of threshold to pick that up. But this is relying on you to tune the diffusion to be equivalent to a cell thickness. What do you mean by "flux through to cell wall option"? CFX has some variables like this, but I have no idea what you are trying to do or why you are trying to do it, so I cannot say if they are relevant. |
Thanks for your answer.
I already had the idea with the diffusive variable. Unfortunately, it doesn't work like that, because the cells are not the same size everywhere. And I did not find the right settings for the diffusion coefficient , so that really only the adjacent cells are targeted. The additional diffusive variable is not reset after each time step and thus spreads further and further in the domain from the initial cell exceeding the threshold. Therefore I cannot formulate a threshold for the diffusive variable that only contains the adjacent cells. I'm sorry I didn't write this in my first post that I have tried something like this already. By "flux through the cell wall option" I mean that in CFX it might be possible to transmit an additional variable normal to one cell wall into the next cell. I don't know if such a thing is possible but my understanding of the Fine Volume Method is that fluxes at the surfaces of each finite volume are calculated. If i could define fluxes just into the adjacent cells i dont need the source term in these cells What variables do you mean? Maybe I can take a closer look at them. And do you have maybe other ideas? Some more information about my case will probably help you: I have a diffusive additional variable with a very low diffusion coefficient to model a concentration of solids that stick to the wall over time. These are created by a positive flux on the wall boundary condition. If cells on the wall exceed a certain concentration, solids should also be deposited in the neighbouring cells. I want to achieve this with a source term in the neighbouring cells. |
You should not try to model a process at such a low level. Any approach where you try to model progress cell by cell is bound to have problems with mesh independence, convergence and physical realism.
Also, CFX does not give you easy access to adjacent element arrays. So what you are proposing is really hard to do. CFX is a partial differential solver, so you should express models like this as partial differential equations. Then effects like growth, motion and diffusion can be modelled using normal source, convection and diffusion terms. For example, your comment "If cells on the wall exceed a certain concentration, solids should also be deposited in the neighbouring cells" is particularly troubling. This sounds like a diffusion process, and if it is it should be modelled using a diffusive variable. Can you explain what you are doing in more detail? What are the solids sticking to the surface? What controls whether it sticks or not? How does it spread to the neighbouring areas? What makes it turn from a diffusive material to stationary, "stuck", non-diffusive material? |
The non-easy way (ie, the only way I can think of to do what you are directly asking for) is by user fortran and accessing the adjacent element matrix in the MMS. I have no idea how to do this, other than knowing where to look and that with a LOT of work it can probably be done. Good luck if you decide to give it a go (you will need it) :)
This is a bit wacky, but have a look at the wall film model. It has some similarities with what you are trying to do and it might give you some ideas. Another wacky idea is to do it as a multiphase model. When you reach your threshold you use a source term to generate some second phase stuff (it would have to be a fluid, so use a crazy high viscosity to stop it moving much), and the multiphase model will automatically handle if you generate enough second phase stuff that it spills over into adjacent elements. |
All times are GMT -4. The time now is 12:21. |