
[Sponsors] 
July 3, 2013, 06:25 
Cyclic BC for repeating geometries

#1  
New Member
Dominik Pöltl
Join Date: Jul 2013
Location: Hamburg
Posts: 15
Rep Power: 5 
Hi @ all,
I'm doing my bachelor thesis on a boundary condition for repeating geometries in OpenFOAM. *** the aim *** The cyclic boundary condition or anything alike shall be used on repeating geometries, e.g. a helical hollow fibre or a simple pipe. The smallest repeating section shall be used. Inlet and outlet shall be coupled as: Everything that leaves the geometry at location x+dx and time t1 shall be put back into the geometry at location x and time t2. In mathematical terms: u(x1+dx,t1)=u(x1,t2) The aim is to reconstruct the local data of the nth (at location x_n) repetition of the geometry by looking at the time data for t_n=x_n/u_0. For the used geometry, a stationary parabolic profile should be gained after x>6*d. *** the problem *** In one sentence, the problem is, that I'm constantly losing energy by mantle friction and the applied cyclic coupling allows no continuous input of energy. *** General assumptions *** So far, the general assumptions are: monophase (water) incompressible fluid Re<90 at all times simpleFoam as solver timeconstant flow through inlet (so far, will change in latter process) and of course periodic geometry, of which the smallest repeating section is meshed *** Mesh *** I'm running everything on a simple 3D pipe with d=1mm and l=1mm. It is strictly oriented in direction of positive z. The mantle is defined with an no slip demand. The inlet and the outlet are of type cyclic and coupled as neighbourPatches. Although the orientation of the inlet's and the outlet's face normal vector is antiparallel and checkMesh is fussing about it, the coupling works. *** initial conditions *** In order to start a simulation, I chose Quote:
while the outlet is demanded as Quote:
In order to "fill" the internal field with information, I made a so called preCase. The mesh is the same, except that inlet and outlet carry the values described above and are _not_ coupled als cyclic neighbour patches. This geometry is the calculated for 0.1s using simpleFoam as solver. After gaining this data for the whole field, I start the cyclic case at 0.1s and use mapFields for the 0.1 data. By using this trick, I overrode the impossibility to demand initial values for patches of the type cyclic. *** results and problem *** From the start time 0.1s until the end time 2s, the u profile in z direction is steadily decreasing until it reaches a trivial zero profile. Physically impossible? Tell me about it So the wall friction is slowly stealing all the juice. The upcoming questions are: How to put it back? homogenously over a certain patch? homogenously over the whole volume? By using an artificial gravity? How can I define its strength? How can I customize it cell by cell to let it be parallel to the face normal? Hope, you tasted blood and are eager to help me out. Thank anyway for reading the whole thing. 

July 25, 2013, 17:07 
simpleFoamcyclic BCcontinuity

#2 
New Member
Juan Pablo Toro Labbe
Join Date: Jun 2013
Location: Davis CA
Posts: 7
Rep Power: 5 
Dear Yeru:
1) How did you manage the drop pressure through your pipe? If you are using a cyclic boundary condition for the pressure (inlet/outlet), means that continuity will not be accomplished (you are losing water at every iteration, eventually for your case it seems that you have lost all the water). If such is the case I would recommend you to use a cyclic BBCC for all the other variables, except pressure (ideally use zero gradient for the inlet and a value of 0 for the outlet), although I am not sure how to implement that (due to differences in the patches). Regards, JP 

July 28, 2013, 11:11 

#3 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,735
Rep Power: 29 
Dear Yeru,
Welcome to the forum. What you experience is quite natural, since you do not have a driving force in the domain, which can balance skin friction and form drag from the geometry. If you are using a recent version of OpenFOAM I would suggest that you take a look at the jumpCyclic boundary condition. This conditions allows you to specify a constant pressure loss across the length of the channel. Kind regards, Niels
__________________
Please note that I do not use the Friendfeature, so do not be offended, if I do not accept a request. 

December 9, 2013, 21:40 

#4  
New Member
Join Date: Mar 2012
Posts: 29
Rep Power: 7 
Quote:
If possible, could you give more details on the implementation? I didn't seem to find a tutorial case for this type of BC. Also, I am quite curious that in the tutorial case channel1395, the same BC is used but the flow can keep going. So is the boxTurb16. No jumpCyclic BC is imposed. Thanks, Yanxiang 

July 3, 2014, 09:50 
groovyBC did the trick

#5 
New Member
Dominik Pöltl
Join Date: Jul 2013
Location: Hamburg
Posts: 15
Rep Power: 5 
Dear all,
using groovyBC did the trick. There is a very good and applicable tutorial here. And here is the working pfile: Code:
innerRect0_front { type groovyBC; variables "p_Rect0back{innerRect0_back}=sum(p*mag(Sf()))/sum(mag(Sf()));p_Rect0front=sum(p*mag(Sf()))/sum(mag(Sf()));f_relax=0.5;"; valueExpression "(p_Rect0front + f_relax*(p_Rect0back  p_Rect0front))"; value $internalField; } innerRect0_back { type zeroGradient; } Code:
innerRect0_front { type zeroGradient; } innerRect0_back { type groovyBC; variables "Q_front{innerRect0_front}=1*sum(phi);Q_back=sum(phi);f_relax=0.3;"; valueExpression "(Q_back + f_relax*(Q_front  Q_back))/sum(mag(Sf()))*normal()"; value uniform (0 0 0.15); 

Tags 
cyclic, energy dissipation, gravity, periodic 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Cyclic boundary conditions concerning channel with constant flow rate  pascool  OpenFOAM PreProcessing  1  November 16, 2012 14:04 
Cyclic Mesh Error  vbchris  OpenFOAM Meshing & Mesh Conversion  4  November 15, 2012 14:04 
Cyclic bc. and overlapGgi  Pekka  OpenFOAM  12  February 15, 2012 08:10 
Problem with cyclic patches  sven  OpenFOAM Running, Solving & CFD  0  December 5, 2011 15:27 
Pressure instability with rhoSimpleFoam  daniel_mills  OpenFOAM Running, Solving & CFD  44  February 17, 2011 18:08 