About cyclic boundary condition
Hi Foamers,
I am doing simulations on 2D channel flow. I need to apply periodic boundary condition in the X- direction. Is there any any tutorial or any case file which uses cyclic BC. Thanks Regards Mallikarjuna.r |
Check the OF page on cyclic BCs, if you are using any version greater than OF 2.0
http://www.openfoam.org/version2.0.0/meshing.php For tutorials check incompressible / channelFoam / channel395. The implementation of the cyclic BC given here is fairly simple, provided you have the mesh patches already created. Else you might have to do that with topoSet and createPatch. Let know if you have any questions. |
Hi Atm
Thanks for quick reply. I followed the tutorial incompressible / channelFoam / channel395. My case is 2D channel and I need cyclic BC in only one direction. When i compiled with blockMesh, checkMesh, there is no error. My doubts are: 1. I have not given any value for the fields at the cyclic boundary patch. How to give inlet BC and outlet BC. boundaryField { leftWall { type cyclic; // type fixedValue. // value uniform (0.003741 0 0); } fixedWalls { type fixedValue; value uniform (0 0 0); } rightWall { type cyclic; //type zeroGradient; } frontAndBack { type empty; } } 2. How to specify the total number of unit cells. Could you please clarify my doubts. Thanks Regards Mallikarjuna |
Hi Mallikarjuna,
The actual format should be like this : boundaryField { leftWall { type cyclic; nFaces value; startFace value matchTolerance value; neighbourPatch rightwall; } fixedWalls { type fixedValue; value uniform (0 0 0); } rightWall { type cyclic; nFaces value; startFace value matchTolerance value; neighbourPatch leftwall; } frontAndBack { type empty; } } 2. If you are asking about the "value" you need to have here for these fields, these come after you have created patches in your mesh (using topoSet or setSet ). Then, running createPatch command would automatically generate a boundary file containing the patches in a cyclic/whatever B.C. you want, with the right values for nFaces and startFace. All of this depends on how you define topoSet. Do you have the patches created for your mesh already? if so you can skip and directly go to just creating the boundary file. |
Hi Atm,
I have defined as you suggested. My boundary field for velocity is: Quote:
Quote:
Later i came to know it is taking the values which i given for the internal fields. Code:
internalField uniform (0.0037 0 0); Is there any extra code i need to add to my case file ? Thanks Regards Mallikarjuna |
If you are using ChannelFoam, You have to go to constant>transportProperties
and find: Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( "value" 0 0 ); here the value is the the velocity , 0.00347 to be specified by you. |
Hi Atm,
Thanks for quick reply. I did as you suggested. For velocity: Code:
U U [ 0 1 -1 0 0 0 0 ] ( 0.003741 0 0 ); Thanks Regards Mallikarjuna |
Hi Atm,
In my case i have not mentioned any driving force for the flow. I checked channelFoam solver, there it have additional gradp term in the momentum equation. But in my case i don't know the driving force gradp term. Instead i know velocity at inlet and pressure at outlet. Could you please suggest me what are the changes need to do to meet my requirements. Thanks Regards Mallikarjuna |
A cyclic boundary condition is one in which the conditions at the outlet are replicated at the inlet. You can either specify the 1)mass flow rate (velocity) or 2) Pressure gradient (gradP). In this case the velocity u provided will calculate the mass flow rate and the code will compute the value of gradP. For details, look up the channelFoam.C code , and the numerics of the PISO method.
Quote:
|
Hi atm,
Thanks for the reply. I changed my code by following channelFoam. I succeed in getting the velocity profile. But in my solver i have one more field (let say Temperature T). For the temperature i need to specify the fixed value at inlet. Could you please tell me what i need to change to my code to get results for temperature also. Thanks Mallikarjuna.r Mallikarjuna |
All times are GMT -4. The time now is 07:11. |