CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   funkySetFields and multiple sets and fields (http://www.cfd-online.com/Forums/openfoam-pre-processing/95895-funkysetfields-multiple-sets-fields.html)

mturcios777 January 6, 2012 15:45

funkySetFields and multiple sets and fields
 
Greetings,

This is an attempt to get a simplified version of what I outlined in the the thread located here, as I want to "fix" fields that have been mapped with inconsistent boundaries.

I'm using funkySetFields to create an initial field (mass fraction will be my example), with value -1, and then mapping data from an old mesh on top of that. Wherever the new mesh exists where the old one didn't, the mass fraction should be -1.

Now for each negative valued cell I want to find the nearest cell that does not have a negative value and copy its value over to the new one. Since the deviations in geometry are small (mainly due to remeshing using snappy with a different resolution). I'd like to do this in funkySetFields for now, but am stuck on how I would be able to check the distance between cells. Maybe I should just make my own utility?

gschaider January 7, 2012 18:51

Quote:

Originally Posted by mturcios777 (Post 338179)
Greetings,

This is an attempt to get a simplified version of what I outlined in the the thread located here, as I want to "fix" fields that have been mapped with inconsistent boundaries.

I'm using funkySetFields to create an initial field (mass fraction will be my example), with value -1, and then mapping data from an old mesh on top of that. Wherever the new mesh exists where the old one didn't, the mass fraction should be -1.

Now for each negative valued cell I want to find the nearest cell that does not have a negative value and copy its value over to the new one. Since the deviations in geometry are small (mainly due to remeshing using snappy with a different resolution). I'd like to do this in funkySetFields for now, but am stuck on how I would be able to check the distance between cells. Maybe I should just make my own utility?

Thanks for your trust in FSF, but I'm afraid this is beyond its capabilities (fiddling around with single cells) and even if it was the complexity would be similar to programming a utility for it I'm afraid


All times are GMT -4. The time now is 19:54.