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

interpolation of 2D slice from a 3D field in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2015, 10:20
Default interpolation of 2D slice from a 3D field in OpenFOAM
  #1
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Hi All,

In OpenFOAM, when I have the three dimensional fields, say velocity, can we interpolate a 2D slice from the 3D results during the post process stage? Thank you so much.

OFFO
openfoammaofnepo is offline   Reply With Quote

Old   December 3, 2015, 15:35
Default
  #2
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Anybody knows this?....
openfoammaofnepo is offline   Reply With Quote

Old   December 8, 2015, 16:04
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
Hi OFFO,

I'm going to use this thread of yours to answer both the original question and the questions you've sent me via PM.

First about the original question here:
Quote:
Originally Posted by openfoammaofnepo View Post
can we interpolate a 2D slice from the 3D results during the post process stage?
It really depends on the time of interpolation you're looking for. If you want to do a slice similarly to how it's done with ParaView, then you can either use the sample utility or the respective function object. You've got several solutions to choose from: https://github.com/OpenFOAM/OpenFOAM...ple/sampleDict - but I guess the main ones you're looking for would be:
  • cuttingPlane
  • sampledTriSurfaceMesh

As for the questions asked via PM:
Quote:
Originally Posted by openfoammaofnepo
Probably you know the Openfoam utility "patchIntegate", which can be used to calculate the mass flow rate when we use it for "phi". However, this calculation is only for the boundary surfaces. If I would like to calculate an internal surface, is this possible?
My answer was:
Quote:
Quick answer: you need to create a faceZone and use the respective function object.
Since you didn't specify a thread where you asked about this, I won't point you to one or two that already talk about this
Then you asked:
Quote:
Thank you so much for your reply. When you say "create a faceZone", do you mean I need to have a face (created when generating the mesh) for that location ?

I use ICEM CFD to generate the mesh. So I can create an internal face there. Is this the faceZone you mentioned? For the internal face, there is a problem. It does not appear in the constant/polymesh/boundary. So this is not a boundary and then we cannot use patchIntegrate to get the mass flow rate over that surface.
A few reference posts where I and other people have already written about this (i.e. continue reading the threads starting from that post):
The faceZones should not appear in "constant/polymesh/boundary", they should appear in "constant/polymesh/faceZones".

If you want to use the utility patchIntegrate, then you will need to convert the faceZone to a baffle and define the boundary conditions for the new double-sided patch to be cyclic. Sorry, I'm in a hurry right now and I'm not able to look for a good example on how to do this. Search for createBaffles or run:
Code:
find $FOAM_TUTORIALS -name "createBafflesDict"
Best regards,
Bruno
__________________
wyldckat 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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
Trying to implement interpolation in openFOAM deji OpenFOAM Programming & Development 20 May 29, 2021 01:45
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
Would OpenFOAM be good for this shortterm project distributed force field brooksmoses OpenFOAM Running, Solving & CFD 2 November 2, 2005 03:58


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