CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Patch to Patch mapping

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mcdonalds
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2013, 15:13
Default Patch to Patch mapping
  #1
Member
 
Ronald McDonald
Join Date: Jul 2012
Posts: 38
Rep Power: 13
mcdonalds is on a distinguished road
Hi OpenFoamers,

I have a really simple question and desire a simple, if possible, response.

I have two boxes connected to each other. I have labelled those adjacent boundaries patch1 and patch2. I have one mesh throughout the whole domain. I want to be able to have two fields throughout the domain, where one ends at patch 1 and the values are transferred onto another field via patch 2. Is this possible in openFoam, if so how can I go about doing this?

Best,

Benjamin
the_ichthyologist likes this.
mcdonalds is offline   Reply With Quote

Old   March 6, 2013, 17:32
Default
  #2
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 Benjamin,

You could have told me in the PM you sent me that you had asked this question here on this thread

Anyway, for other readers, the core of the answer I gave in the private message was:
Quote:
For your question, I can only think of groovyBC, section 3.6 "Accessing fields from other patches": http://openfoamwiki.net/index.php/Co..._other_patches
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 6, 2013, 19:40
Default Thanks, Bruno
  #3
Member
 
Ronald McDonald
Join Date: Jul 2012
Posts: 38
Rep Power: 13
mcdonalds is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Benjamin,

You could have told me in the PM you sent me that you had asked this question here on this thread

Anyway, for other readers, the core of the answer I gave in the private message was:
Best regards,
Bruno
Thanks, Bruno. My bad.

So I think I got the patch to patch mapping working with groovybc. The only thing is I'm getting a light warning message.
HTML Code:
Time = 0.145

--> FOAM Warning : 
    From function ExpressionResult::getUniformInternal(const label size,bool noWarn)
    in file ExpressionResult/ExpressionResultI.H at line 322
    The minimum value 999.96 and the maximum 999.96 differ. I will use the average 999.96
DICPCG:  Solving for H2O, Initial residual = 8.52782e-07, Final residual = 8.52782e-07, No Iterations 0
DICPCG:  Solving for H2, Initial residual = 8.11531e-07, Final residual = 8.11531e-07, No Iterations 0
--> FOAM Warning : 
    From function ExpressionResult::getUniformInternal(const label size,bool noWarn)
    in file ExpressionResult/ExpressionResultI.H at line 322
    The minimum value 999.96 and the maximum 999.96 differ. I will use the average 999.96
DICPCG:  Solving for H2O, Initial residual = 8.52782e-07, Final residual = 8.52782e-07, No Iterations 0
DICPCG:  Solving for H2, Initial residual = 8.11531e-07, Final residual = 8.11531e-07, No Iterations 0
Let me know what you think,

Benjamin
mcdonalds is offline   Reply With Quote

Old   March 7, 2013, 08:17
Default
  #4
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 Benjamin,

That's one strange warning... there must be something beyond "999.96"... such as "99.96324231235"... but I guess it's perfectly OK.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 7, 2013, 11:51
Default
  #5
Member
 
Ronald McDonald
Join Date: Jul 2012
Posts: 38
Rep Power: 13
mcdonalds is on a distinguished road
Hi Bruno,

So I ran my simulation with no boundary patches (the ones I were mapping) and found that my results there are linear. Which is theoretically correct. However, when I try to use groovyBC to combine the two patches I get linear up to the coupled patches then a parabolic after the patch, which is theoretically incorrect. Any ideas on how to solve this?

I heard that pointtopointinterpolation.H is another way to go. I have no idea how to use the header file, however. Any thoughts, and/or direction would be greatly helpful.

Benjamin
mcdonalds is offline   Reply With Quote

Old   March 7, 2013, 16:38
Default
  #6
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 Benjamin,

I'm confused... didn't you want to map one field to another different field? Something like mapping "T" to "p" (temperature to pressure) or something like that?

Or do you want to map a single field, e.g. "T", from one patch to another patch?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 7, 2013, 19:06
Default
  #7
Member
 
Ronald McDonald
Join Date: Jul 2012
Posts: 38
Rep Power: 13
mcdonalds is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Benjamin,

I'm confused... didn't you want to map one field to another different field? Something like mapping "T" to "p" (temperature to pressure) or something like that?

Or do you want to map a single field, e.g. "T", from one patch to another patch?

Best regards,
Bruno
Hey Bruno,

At first I wanted to do the former, but now I want to do the latter, namely map within a single field one patch to another patch. I've been trying to use patchtopatchinterpolation.H but i haven't been able to get it to work. And groovyBC did work (there's an example of it in the link you provided) but the physics came out incorrectly.

Any help would be great.

Sincerely,

Benjamin
mcdonalds is offline   Reply With Quote

Old   March 8, 2013, 18:18
Default
  #8
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 Benjamin,

Right now I don't have time to do any tests, but here is a quick hint - run this command:
Code:
grep -R map $FOAM_TUTORIALS
It will give you a list of lines from files in the tutorials that have "map" somewhere in those lines. The keywords to then look for are "mappedField" or similar!

Good luck!
Bruno
Michael@UW likes this.
__________________
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
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 05:37
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 11:25
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 02:34
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 04:52.