cyclic boundary conditions with sampledIsoSurface
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...
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 :
a = average(iso.sample(U.component(0)));where my dictionary 'dictiso' is
FoamFileIf anyone can help, please comment.
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
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...
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.
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.
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).
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 18:58.|