CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   cyclic boundary conditions with sampledIsoSurface (http://www.cfd-online.com/Forums/openfoam-solving/103872-cyclic-boundary-conditions-sampledisosurface.html)

Teddy PICHARD June 28, 2012 06:23

cyclic boundary conditions with sampledIsoSurface
 
Dear all,

I am new with openfoam.
I try to simulate the temperature variations in a channel flow (using channelFoam) with cyclic boundary conditions. I added a temperature transport equation with a source term depending on the average velocity over a section normal to the flow. To do that, I created a volScalarField x of the x coordinate of each cell center. Then I created
sampledIsoSurfaces (constant x).

The problem is that my boundary conditions are of type cyclic and when I run the solver, I get that response :

->FOAM FATAL ERROR
Unhandled coupledPolyPatch type cyclic

From function isoSurface::collocatedFaces(const coupledPolyPatch&) const
in file sampledSurface/isoSurface/isoSurface.C at line 94.

I checked isoSurface.C and apparently only cyclicPolyPatch and processorPolyPatch types work in this case but they are not available for boundary types.

If anyone has an idea how to solve it...

Regards,
Teddy

Teddy PICHARD July 4, 2012 10:45

Hi all,

Apparently the problem appears when I call the function sample of sampleIsoSurface (I am sampling U.component(0)).

I just tested it using wall boundary conditions instead of periodic ones. The call of sample works perfectly, even if my conditions are neither cyclicPolyPatch nor processorPolyPatch (just zeroGradient and fixedValue). Do you know what these patches refers to? I am not sure that it is directly linked to the boundary conditions.


I still do not know if the problem is a misdeclaration of the argument of the function sample or if it is the call that is not correct.

This is how i create my averaged value :
Foam::sampledIsoSurface iso("iso",mesh,dictiso);
a = average(iso.sample(U.component(0)));
where my dictionary 'dictiso' is
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object iso;
}
type isoSurface;
isoField x;
isoValue 0.025;
interpolate true;
average true;
If anyone can help, please comment.

Regards,
Teddy.

brugiere_olivier July 9, 2012 11:39

Hello Teddy

I just saw your post on the isosurface and I have the same problem as you.
In my configuration, I also have periodic conditions and when I use the sample program, I've the same error message as you.

For instant, I've not found anything on the forum to change this bug, I still look ...

If you have ideas or someone else ...

Thank you in advance

Olivier

Teddy PICHARD July 10, 2012 04:55

Hi,

I have checked the files. When I call the function sample (from sampledIsoSurface.C) it calls the function sampleField that calls updateGeometry() (always in the same file).
But I do not see where the function collocatedFaces (from isoSurface.C) is called.
Apparently it is not used with wall conditions because the error should be the same.

I have not find anything on it too. Maybe we are the firsts.:)

Have you tried the debug mode?
I think I am running out of ideas...

Teddy

Teddy PICHARD July 15, 2012 07:12

Hi everyone,

for those interested, I think I found a solution. Instead of using sampledIsoSurface I used sampledIsoSurfaceCell. This class is declared similarily and has the same member function.
But using average function in this case might cause floating point exceptions. I turned the regularise false in the surface dictionnary and the calculation seems OK.

styleworker January 16, 2013 08:59

Hello Teddy,

thank you for your suggestion. I was facing the same problem with cyclic boundaries and functions in controlDict. I changed my controlDict from isoSurface to isoSurfaceCell and now I'm able to run the MRFInterFoam solver.

The problem right now is that I cannot restrict the isoSurface, e.g. alpha value = 0.5, to a special patch. With type isoSurface I was able to rectrict the surface via exposedPatchName to a specified patch. I've tried it with isoSurfaceCell, but I just get the complete interface (alpha=0.5) in all dimensions.

Teddy PICHARD January 22, 2013 14:19

Hi,

I am sorry but I do not know much about that and i have not used openFOAM since last summer.
Maybe you could check the exact definition of these isoSurfaceCell to see how it differs from the isoSurface. Maybe there is a tool to change the patch.
Or you could create a new field that has a particular value where you want to restrict your surface (i am not sure if this is your problem).

waynezw0618 March 21, 2013 19:09

hi Styleworker
 
could you please paste relaive part of you controlDict. I did so and then the solver can skip the previous errors but did not out put the results on the demand the surface.


All times are GMT -4. The time now is 08:12.