CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Functions on internal patches (https://www.cfd-online.com/Forums/openfoam-post-processing/106227-functions-internal-patches.html)

gl_sb August 22, 2012 10:24

Functions on internal patches
 
Hello,

I have a problem with OF and I would be very glad, if someone can help me!

Inside my fluid domain I have an "internal patch" on which I want to get some Information about the flow field and the mesh. The "internal patch" was already meshed in Ansa so after the export from Ansa to OF 2.0 I get a faceZones entry in the polyMesh-folder.
Now I need the following values of every single face of the "internal patch":
- Velocity
- Area
- Coordinates of the face centres

First I tried to get these values through the following function definition in the controlDict:

Values_internal_patch
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log true;
valueOutput true;
source faceZone;
sourceName internal_patch;
operation sum;
fields
(
phi
U
);
}

I did't get the U values because for faceZones it is not possible to access VolFields. For this we need a patch as source. So I continued convert the faceZone "internal_patch" into two patches with cyclic boundary conditions via the createBaffle command:

createBaffles internal_patch '(internal_patch_1 internal_patch2)'

I got the following result in my boundary file:

internal_patch_1
{
type cyclic;
nFaces 1779;
startFace 6094853;
matchTolerance 0.0001;
neighbourPatch internal_patch_2;
}
internal_patch_2
{
type cyclic;
nFaces 1779;
startFace 6096632;
matchTolerance 0.0001;
neighbourPatch internal_patch_1;
}

In all the variable file in the 0 folder I added the following lines:

internal_patch_1
{
type cyclic;
}
internal_patch_2
{
type cyclic;
}

And defined a new function within my controlDict:

Values_internal_patch_1
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log true;
valueOutput true;
source patch;
sourceName internal_patch_1;
operation sum;
fields
(
phi
U
);
}

Now I get phi and U, but only 889 values are printed to the output file and not 1779. Note that the patch consits of 1779 single faces (1414 Tias and 365 Quads). When I use the function in connection with for example the "Inlet" boundary, everything is fine and I get the same number of entries in the output files for every variable like faces forming the "Inlet".

Has anybody an idea? Thanks for every hint :)

Kentin March 8, 2013 04:10

Create internal mesh patches
 
Hi !

I have been very interested in this old post :

http://www.cfd-online.com/Forums/ope...l-patches.html

I am currently facing the same problem, did you figure out your problem?

Thanks in advance,

Kentin


All times are GMT -4. The time now is 10:16.