Removal of mass due to reactive flow

Hi there!

I am trying to implement the process of transport of mass due to a reactive flow around the object. For the sake of argument lets say I have a sphere (from a .stl file ideally for future implementations) and some arbitrary flow around it. A grid point of the sphere should be removed if the flux around that grid point exeeds a certain value. I have given a lot of effort in trying to implement this scenario, but I don’t seem to find any already existing implementations (or forum discussions related to this) and my c++ skills are still on the weaker side.

Could any of you point me into the right direction? Any help would be greatly appreciated and in case I find a solution I’ll keep this thread updated!


Ok after some rabbit-holing I finally found an approach that gives me a satisfying solution for the moment. It is trivial for an experienced user I assume, but I’ll keep it here for anyone who faced the same question I did.

What you need is only:

defineDynamics(lattice, iX, iY, iZ, *dynamics)

to change the dynamics at a single coordinate. If you use for example BGK dynamics then use

new BGKdynamics<T, DESCRIPTOR>(omega)

for the *dynamics. At the moment I am working on efficiently looping over all relevant cells and then based on the flux I apply the new Dynamics on the cell.

If anyone wants to help I am currently wondering:
How do I estimate the flux towards a cell, such that without depending on orientation of the cell I can determine the quantity?