CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] funkySetFields and multiple sets and fields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2012, 14:45
Default funkySetFields and multiple sets and fields
  #1
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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?
mturcios777 is offline   Reply With Quote

Old   January 7, 2012, 17:51
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mturcios777 View Post
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
gschaider is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting initial fields using a data file for positions chrisb2244 OpenFOAM Pre-Processing 0 December 8, 2013 23:21


All times are GMT -4. The time now is 02:45.