|
[Sponsors] |
June 20, 2007, 06:52 |
Hi,
Maybe the subject is a bi
|
#1 |
Member
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 99
Rep Power: 17 |
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 |
|
June 20, 2007, 09:44 |
You can't. faceSets are only i
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
June 20, 2007, 12:08 |
Hi Radu!
You're right about
|
#3 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
June 21, 2007, 04:05 |
Glad you answered Berhnard.
|
#4 |
Member
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 99
Rep Power: 17 |
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? |
|
June 25, 2007, 14:54 |
Hi Radu!
For "reading" it m
|
#5 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Visualizing a surfScalarField on a faceSet not a patch | r2d2 | ParaView | 0 | January 5, 2009 07:24 |
Calculate Mass Flow in a faceSet during calculation | torvic | OpenFOAM Running, Solving & CFD | 1 | August 11, 2008 19:05 |
[OpenFOAM] FaceSet representation | r2d2 | ParaView | 2 | April 2, 2008 07:50 |
Finding neighbouring cells when looping over faces in faceSet | olwi | OpenFOAM Running, Solving & CFD | 2 | December 13, 2007 08:03 |