CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

how to use the cyclic boundary conditions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 2, 2013, 02:09
Default how to use the cyclic boundary conditions
  #1
New Member
 
kob
Join Date: Nov 2011
Posts: 28
Rep Power: 5
bryant_k is on a distinguished road
hello everyone
I am simulating fully developed flow in a duct. I want to use cyclic boundary according to channelFoam.Because the flow is laminar so I decided to turn off the turbulence contribution in channelFoam.I have successfully complied the solver.However, after putting out several calculating results, I find the results( both the pressure and velocity) are not correct.
I have attached my case and solver here.I hope you can check it and give me some advice.

Thank you very much!
regards!

bryant
Attached Files
File Type: gz ductflow.tar.gz (1.9 KB, 19 views)
File Type: gz mychannelFoam.tar.gz (2.8 KB, 15 views)
bryant_k is offline   Reply With Quote

Old   January 2, 2013, 06:46
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 295
Rep Power: 13
Lieven will become famous soon enough
Hi Bryant,

You should not remove the viscosity term from the momentum equation as you did it in mychannelFoam. Now, no viscosity is included at all which is not really what you want since you have a laminar flow (basically viscosity dominated flow).

Instead, write it in the generic way as done in pisoFoam and set simulationType in constant/turbulenceProperties to laminar. This way, turbulence is not modelled (so no RANS or LES) but the kinematic viscosity is still included in the momentum equation.

Regards,

L
Lieven is offline   Reply With Quote

Old   January 2, 2013, 16:55
Default
  #3
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 546
Rep Power: 18
chegdan will become famous soon enough
@Bryant

Lieven's suggestion will certainly work and is a good exercise, but changes to channelFoam aren't necessary to do what you want. To run the code on a laminar flow, just change the LESModel in constant/LESProperties to laminar and add some schemes to your fvSchemes file

Code:
    div((nu*dev(T(grad(U))))) Gauss linear;
and

Code:
    laplacian(nu,U) Gauss linear corrected;
in the correct subdict.
__________________
Dan

Find me on twitter @dancombest and LinkedIn

Last edited by chegdan; January 2, 2013 at 18:20. Reason: now it sounds more polite
chegdan is offline   Reply With Quote

Old   January 2, 2013, 17:56
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 295
Rep Power: 13
Lieven will become famous soon enough
Quote:
Originally Posted by chegdan View Post
just change the LESModel in constant/LESProperties to laminar
Did not know this was possible
Lieven is offline   Reply With Quote

Old   January 4, 2013, 02:54
Default
  #5
New Member
 
kob
Join Date: Nov 2011
Posts: 28
Rep Power: 5
bryant_k is on a distinguished road
Thanks to Lieven and chegdan.
I think I know how to modified the solver.But now I met a new problem after I converted the mesh into openfoam.When I run createPatch command,I got errors like this:
Code:
Create time

Reading createPatchDict.

Create polyMesh for time = 0

Adding new patch sinout as patch 4 from 
{
    type            cyclic;
    transform       translational;
    separationVector ( 0 0 -1 );
}


Moving faces from patch SINLET to patch 4
Moving faces from patch SOUTLET to patch 4

Doing topology modification to order faces.

cyclicPolyPatch::getGeometricHalves : Writing half0 faces to OBJ file "/home/lg88/pipeflow/solid/sinout_half0_faces.obj"
cyclicPolyPatch::getGeometricHalves : Writing half1 faces to OBJ file "/home/lg88/pipeflow/solid/sinout_half1_faces.obj"
cyclicPolyPatch::getGeometricHalves : Writing half0 face centres to OBJ file "/home/lg88/pipeflow/solid/sinout_half0.obj"
cyclicPolyPatch::getGeometricHalves : Writing half1 face centres to OBJ file "/home/lg88/pipeflow/solid/sinout_half1.obj"
--> FOAM Serious Error : 
    From function cyclicPolyPatch::getGeometricHalves(const primitivePatch&, labelList&, labelList&) const
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 515
    Patch sinout gets decomposed in two zones ofinequal size: 423 and 437
This means that the patch is either not two separate regions or one region where the angle between the different regions is not sufficiently sharp.
Please adapt the featureCos setting.
Continuing with incorrect face ordering from now on!

    From function void polyMesh::initMesh()
    in file meshes/polyMesh/polyMeshInitMesh.C at line 82
    Truncating neighbour list at 2960 for backward compatibility


--> FOAM FATAL ERROR: 
face 429 area does not match neighbour 859 by 0.682879% -- possible face ordering problem.
patch:sinout my area:0.000394872 neighbour area:0.000397577 matching tolerance:0.001
Mesh face:3809 vertices:4((-0.194753 0.471314 0.02) (-0.190602 0.462201 0.02) (-0.153875 0.4756 0.02) (-0.157228 0.48502 0.02))
Neighbour face:4239 vertices:4((-0.359964 0.361206 0.02) (-0.387117 0.331664 0.02) (-0.379107 0.325644 0.02) (-0.352399 0.354623 0.02))
Other errors also exist, only the largest is reported. Please rerun with cyclic debug flag set for more information.

    From function cyclicPolyPatch::calcTransforms()
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 200.

FOAM exiting
I have checked in this forum for solution the similar problem.They said that increasing the matchTolerance.So I increased the tolerance in file createPatchDict,but I found that the tolerance occuring at the error message didn't change at all.I think my createPatchDict file have some problem. I have uploaded my case here which is mainly about the heat transfer problem.
Thank you for your advice!

regards!

bryant
Attached Images
File Type: png QQ??20130104150400.png (15.3 KB, 15 views)
Attached Files
File Type: gz solid.tar.gz (56.0 KB, 5 views)
bryant_k is offline   Reply With Quote

Old   January 4, 2013, 10:28
Default
  #6
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 546
Rep Power: 18
chegdan will become famous soon enough
Your SOUTLET has more faces than the SINLET patch. Import your mesh, open paraFoam and select the two patches SINLET and SOUTLET, you will find extra faces on SOUTLET.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
inlet boundary conditions newOFuser OpenFOAM 1 January 10, 2013 09:08
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
snnappyHexMesh with cyclic boundary conditions longamon OpenFOAM 2 May 9, 2011 12:28
Cyclic boundary conditions in parallel thibault_pringuey OpenFOAM Bugs 1 April 2, 2011 15:21
periodic and cyclic boundary conditions Hadi Main CFD Forum 2 June 29, 2007 07:19


All times are GMT -4. The time now is 03:55.