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

Small toolkit for reconstructing and interpolating fields

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2012, 19:33
Default Small toolkit for reconstructing and interpolating fields
  #1
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

After looking into the issue described in this thread: http://www.cfd-online.com/Forums/ope...rsion-dat.html - I decided to look deeper into this and created a couple of hopefully useful utilities based on OpenFOAM technology for both direct usage, as well as educational purposes:
This thread is therefore hereby open for traditional QA related to this project

Best regards,
Bruno
chegdan, elvis and zfaraday like this.
__________________
wyldckat is offline   Reply With Quote

Old   January 19, 2015, 12:56
Question
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Dear Bruno,

I'm working in a case where I need to create some fields with the function object ExpressionField. These fields are of the type surfaceScalarField (I tried to do it with volScalarFields but I had problems since these fields are manipulated only at patches). As they are surfaceScalarFields I can't display them in paraview, for this reason I asked in another thread what I could do regarding this issue. I was told about the tool you developed (you can find more info here:using swak4foam to implement a BC for heat convection with h(Tamb,Twall)) so I gave it a try to see if it was what I really needed.

At first, it looked like it was going to suit my needs perfectly. However, when I tried it I found out that it was developed to work only for single domain cases (it has no -region flag). My case is a multi region one so, as far as I know, this tool is not usable in my case. Is there any solution to it?

Thanks in advance.


Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   January 19, 2015, 14:48
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Alex,

Quote:
Originally Posted by zfaraday View Post
However, when I tried it I found out that it was developed to work only for single domain cases (it has no -region flag). My case is a multi region one so, as far as I know, this tool is not usable in my case. Is there any solution to it?
I've added this to my to-do list just now. The solution isn't straight forward, but it's almost as good. Problem is that I won't be able to look into this before this coming weekend.

If you want to try and solve this on your own, have a look at the source codes for the utilities in OpenFOAM. You can find the path to their main folder by running:
Code:
echo $FOAM_UTILITIES
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 19, 2015, 15:00
Default
  #4
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
I've added this to my to-do list just now. The solution isn't straight forward, but it's almost as good. Problem is that I won't be able to look into this before this coming weekend.
No problem, there's no haste. Just let us know when you solve it!

Thanks.

Best regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   January 25, 2015, 16:42
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Alex,

I've pushed just now the requested change. The "-region" should now work as intended... uh, after you download/"git pull" to update the source code and then rebuild, otherwise it won't work

Problem is that the utility "reconstructSurfaceField" will not do what you're looking for. More details are explained here:

If you need to see the surface scalar fields, then try using the following steps (should work with OpenFOAM 2.*):
  1. Use foamToVTK to export the "surfaceFields", for example:
    Code:
    foamToVTK -region topAir -surfaceFields
  2. Open the files present in the example folder "VTK/topAir/surfaceFields".
  3. Now apply the filter "Glyphs" in ParaView. Don't forget to change the glyph to "Sphere" instead of "Arrow", in order to make it easier to visualize.
This is because foamToVTK only provides the surface fields in the centre of the faces .

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
interpolate, reconstruct


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



All times are GMT -4. The time now is 09:44.