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

Small toolkit for reconstructing and interpolating fields

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 3 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   July 14, 2012, 19:33
Default Small toolkit for reconstructing and interpolating fields
  #1
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings to all!

After looking into the issue described in this thread: conversion in .dat - 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, 13:56
Question
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 275
Rep Power: 12
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
__________________
I'm newbie in OpenFOAM's world and not an English-speaking, so if I make any mistake a correction will be welcome!
zfaraday is offline   Reply With Quote

Old   January 19, 2015, 15:48
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 16:00
Default
  #4
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 275
Rep Power: 12
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
__________________
I'm newbie in OpenFOAM's world and not an English-speaking, so if I make any mistake a correction will be welcome!
zfaraday is offline   Reply With Quote

Old   January 25, 2015, 17:42
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 22:39.