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

cyclic boundary conditions with sampledIsoSurface

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2012, 07:23
Default cyclic boundary conditions with sampledIsoSurface
  #1
New Member
 
Teddy PICHARD
Join Date: Jun 2012
Posts: 5
Rep Power: 14
Teddy PICHARD is on a distinguished road
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 is offline   Reply With Quote

Old   July 4, 2012, 11:45
Default
  #2
New Member
 
Teddy PICHARD
Join Date: Jun 2012
Posts: 5
Rep Power: 14
Teddy PICHARD is on a distinguished road
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.
Teddy PICHARD is offline   Reply With Quote

Old   July 9, 2012, 12:39
Default
  #3
Member
 
Brugiere Olivier
Join Date: Mar 2009
Posts: 34
Rep Power: 17
brugiere_olivier is on a distinguished road
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
brugiere_olivier is offline   Reply With Quote

Old   July 10, 2012, 05:55
Default
  #4
New Member
 
Teddy PICHARD
Join Date: Jun 2012
Posts: 5
Rep Power: 14
Teddy PICHARD is on a distinguished road
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 is offline   Reply With Quote

Old   July 15, 2012, 08:12
Default
  #5
New Member
 
Teddy PICHARD
Join Date: Jun 2012
Posts: 5
Rep Power: 14
Teddy PICHARD is on a distinguished road
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.
Teddy PICHARD is offline   Reply With Quote

Old   January 16, 2013, 08:59
Default
  #6
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 15
styleworker is on a distinguished road
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.
styleworker is offline   Reply With Quote

Old   January 22, 2013, 14:19
Default
  #7
New Member
 
Teddy PICHARD
Join Date: Jun 2012
Posts: 5
Rep Power: 14
Teddy PICHARD is on a distinguished road
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).
Teddy PICHARD is offline   Reply With Quote

Old   March 21, 2013, 19:09
Default hi Styleworker
  #8
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 309
Rep Power: 18
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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.
waynezw0618 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cyclic boundary conditions tuulio OpenFOAM Running, Solving & CFD 0 April 6, 2012 13:07
snnappyHexMesh with cyclic boundary conditions longamon OpenFOAM 2 May 9, 2011 13:28
Cyclic boundary conditions in parallel thibault_pringuey OpenFOAM Bugs 1 April 2, 2011 16:21
periodic and cyclic boundary conditions Hadi Main CFD Forum 2 June 29, 2007 08:19
A problem about setting boundary conditions lyang Main CFD Forum 0 September 19, 1999 19:29


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