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

ID of a faceSet

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 20, 2007, 06:52
Default Hi, Maybe the subject is a bi
  #1
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 96
Rep Power: 8
r2d2 is on a distinguished road
Hi,
Maybe the subject is a bit confusing, or it does not fully describe what I want, but I want to do get the label of a faceSet (that is not a boundary patch) and then use values of some variables onto that face.
For a boundary patch I did:
label mylabel=mesh.boundaryMesh().findPatchID("myname");
const polyPatch &mypatch=mesh.boundaryMesh()[mylabel];
scalarField &p_mypatch=p.boundaryField()[mylabel];
vectorField &vel_mypatch=U.boundaryField()[mylabel];

forAll(p_mypatch,fI){
Info<<mypatch.faceCentres()[fI]<<" "<<p_mypatch[fI]<<endl;
}

..and I want to do the same but for a faceSet.
Anyone?
Cheers,
Radu
r2d2 is offline   Reply With Quote

Old   June 20, 2007, 09:44
Default You can't. faceSets are only i
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
You can't. faceSets are only identified by their name and only loaded when you explicitely ask for them (with a faceSet-constructor). Maybe you are looking for faceZones?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   June 20, 2007, 12:08
Default Hi Radu! You're right about
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Radu!

You're right about faceI.key(). The problem is that U and p are vol-Fields. They are only stored on the cells. To get their values on the faces you'll have to interpolate to a surface-Field. Don't know if you'll want to do that (depends on what you want to do)

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   June 21, 2007, 04:05
Default Glad you answered Berhnard.
  #4
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 96
Rep Power: 8
r2d2 is on a distinguished road
Glad you answered Berhnard.
What I want to do is to be able, in a coupled solver, to exchange info (U,p,gradients etc) not only between boundary patches but also faceSets. (something like being able to do the coupling operations from your very own readCoupling.H of icoStructFoam (is yours isnīt it?) and then use that "exchange" for passing things from one domain to the other). Maybe wonīt prove very helpful for what I am aiming at (fuell cell "sandwiched" multi-domain simulations) but the way I see it, I would probably like to be able to do that.
Radu

BTW linearInterpolate(U)[faceKeI()] or something similar, wonīt do the trick?
r2d2 is offline   Reply With Quote

Old   June 25, 2007, 14:54
Default Hi Radu! For "reading" it m
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Radu!

For "reading" it might be OK (for instance reading from the faceSet, writing to a patch). For writing (another faceSet instead of the patch) I don't think so.

The linearInterpolate-Thing should work. But create a temporary Variable for it ouside the loop. otherwise the interpolation gets calculated for ALL the faces in the grid for every access to a face in the faceSet)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visualizing a surfScalarField on a faceSet not a patch r2d2 OpenFOAM Paraview & paraFoam 0 January 5, 2009 08:24
Calculate Mass Flow in a faceSet during calculation torvic OpenFOAM Running, Solving & CFD 1 August 11, 2008 19:05
FaceSet representation r2d2 OpenFOAM Paraview & paraFoam 2 April 2, 2008 07:50
Finding neighbouring cells when looping over faces in faceSet olwi OpenFOAM Running, Solving & CFD 2 December 13, 2007 09:03


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