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

Cyclic BC for repeating geometries

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2013, 07:25
Default Cyclic BC for repeating geometries
  #1
New Member
 
Dominik Pöltl
Join Date: Jul 2013
Location: Hamburg
Posts: 21
Rep Power: 13
Yeru is on a distinguished road
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 n-th (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
-time-constant 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:
// 0/U file
type fixedValue;
value uniform (0 0 0.9036);

// 0/p file
type zeroGradient;
for all inlet patches
while the outlet is demanded as

Quote:
// 0/U file
type zeroGradient;

// 0/p file
type fixedValue;
value uniform 0;
*** preCase ***
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.
Yeru is offline   Reply With Quote

Old   July 25, 2013, 18:07
Default simpleFoam-cyclic BC-continuity
  #2
New Member
 
Juan Pablo Toro Labbe
Join Date: Jun 2013
Location: Davis CA
Posts: 7
Rep Power: 13
jptorol is on a distinguished road
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
jptorol is offline   Reply With Quote

Old   July 28, 2013, 12:11
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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 Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   December 9, 2013, 21:40
Default
  #4
New Member
 
Join Date: Mar 2012
Posts: 29
Rep Power: 14
yanxiang is on a distinguished road
Quote:
Originally Posted by ngj View Post
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
Hi Niels,

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
yanxiang is offline   Reply With Quote

Old   July 3, 2014, 10:50
Default groovyBC did the trick
  #5
New Member
 
Dominik Pöltl
Join Date: Jul 2013
Location: Hamburg
Posts: 21
Rep Power: 13
Yeru is on a distinguished road
Dear all,
using groovyBC did the trick. There is a very good and applicable tutorial here.

And here is the working p-file:
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;
    }
and the U-file
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);
Yeru is offline   Reply With Quote

Reply

Tags
cyclic, energy dissipation, gravity, periodic


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 concerning channel with constant flow rate pascool OpenFOAM Pre-Processing 1 November 16, 2012 14:04
[mesh manipulation] 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


All times are GMT -4. The time now is 14:49.