CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Streamline Coloring Question - How to show integration along a path? (https://www.cfd-online.com/Forums/cfx/150376-streamline-coloring-question-how-show-integration-along-path.html)

FrankS March 20, 2015 16:33

Streamline Coloring Question - How to show integration along a path?
 
I want to color streamlines in CFD Post with cumulative exposure to a scalar field. For example, let's say I want to design a UV water treatment device by flowing water with parasites through a straight pipe with a turbulence generator. Let's also say that the UV light is represented in the simulation by a scalar field and that the goal of the simulation is to determine the effectiveness of different turbulence generators in exposing the parasites to the UV field. Finally, let's say that the parasites are very small and follow the flow streamlines perfectly so that the working fluid is water and no particle tracking is involved.

What I want out of CFD Post is to colour streamlines with cumulative exposure to the scalar field and I have yet to figure out how to get it to do this. I want to see the exposure along different paths visually. My problem is different from the example I gave but much harder to explain and an answer to the above will work just as well for what I have actually done. I am able to integrate along the streamlines and get the answer I am looking for but showing cumulative exposure along streamlines would be great for the paper I am writing.

Any help is greatly appreciated.

ghorrocks March 21, 2015 03:49

I would make a particle user variable for UV exposure and make it integrate up along its particle track. I think you will have to rerun the solver to do this.

FrankS March 23, 2015 12:44

I did try to do this with a transport equation source where the scalar field was the source and I specified diffusion to be zero. I guess I am misunderstanding the meaning of the solution to the material derivative as the solution I get is not the accumulation of exposure but seems to show the relative exposure between 2 points on a path. I figured that I would get the exposure along a path as the material derivative is the rate of change along a path. I am meeting with my Prof's today so I can clear up my understanding of this.

Does defining a user variable as a particle user source require the use of a Fortran routine?

Thanks for the reply.

ghorrocks March 23, 2015 16:37

On closer inspection I suspect you will need a user fortran routine for this as you suggest.

You can do it using a scalar field transport equation as you have done, but if there is significant slip between the particles and fluid this will not work.


All times are GMT -4. The time now is 15:17.