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

Periodic BC for a Periodic Tube

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mAlletto
  • 1 Post By mfrl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 9, 2023, 22:28
Default Periodic BC for a Periodic Tube
  #1
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Hi,


I am a new user in OpenFoam. I am trying to investigate laminar flow through a axisymmetric periodic tube. Since this is a periodic tube, I am investigating the flow in one wavesection, the flow will be the same for other wavesection.



I have set the noSlip condition on the tube wall and wedge condition on the two wedges (I am studying 2D flow). However, I am not sure how to set periodic condition at the inlet and outlet. Since, this is a periodic tube, the velocity will be the same at the inlet and outlet.



I have searched online and found that I need to use "cyclic" boundary condition at the inlet and outlet. But I am not sure how to impose it at the inlet and outlet with a specified velocity there (inlet and outlet), say the velocity along the pipe axis is 1 m/s.


Any suggestion will be very helpful for me at the beginning of my OpenFOAM journey.


Thanks.
nazmulislam is offline   Reply With Quote

Old   February 12, 2023, 23:53
Default
  #2
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
I have set the u file in the 0 folder as follows:


dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type cyclic;
value uniform (1 0 0);
}

outlet
{

type cyclic;
}

pipewall
{

type noSlip;
}

wedge0
{
type wedge;
}



wedge1
{
type wedge;
}

}



and the p file in the same directory as follows:


dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField

{

inlet
{
type cyclic;
}

outlet
{
type cyclic;
value uniform 0;
}

pipewall
{
type zeroGradient;
}

wedge0
{
type wedge;
}

wedge1
{
type wedge;
}

}

Last edited by nazmulislam; February 13, 2023 at 04:09.
nazmulislam is offline   Reply With Quote

Old   February 12, 2023, 23:55
Default
  #3
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Also, I have setup the surface patches for different surfaces in the boundary file in the polyMesh folder as follows:



5

(

wedge0
{
type wedge;
physicalType wedge;
nFaces 1008;
startFace 1465;
}



outlet
{
type cyclic;
neighbourPatch inlet;
nFaces 7;
startFace 2562;
matchTolerance 0.0001;
}

inlet
{
type cyclic;
neighbourPatch outlet;
nFaces 7;
startFace 2569;
matchTolerance 0.0001;
}

wedge1
{
type wedge;
physicalType wedge;
nFaces 1008;
startFace 2487;
}

pipewall
{
type wall;
physicalType wall;
nFaces 46;
startFace 3495;
}

)

Last edited by nazmulislam; February 13, 2023 at 04:08.
nazmulislam is offline   Reply With Quote

Old   February 12, 2023, 23:56
Default
  #4
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
When I run the solver 'simpleFoam' in the terminal, I get the following message:


--> FOAM FATAL IO ERROR:

Unable to set reference cell for field p

Please supply either pRefCell or pRefPoint


file: /home/nazmul/OpenFOAM/nazmul-10/run/symmetricPipe/system/fvSolution/SIMPLE from line 46 to line 53.

From function bool Foam::setRefCell(const volScalarField&, const volScalarField&, const Foam::dictionary&, Foam::label&, Foam::scalar&, bool)

in file cfdTools/general/findRefCell/findRefCell.C at line 102.


FOAM exiting
nazmulislam is offline   Reply With Quote

Old   February 13, 2023, 01:27
Default fvsolution file
  #5
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
I added the two lines in the "SIMPLE" block in fvsolution file:


pRefCell 0;
pRefValue 0;

Last edited by nazmulislam; February 13, 2023 at 04:13.
nazmulislam is offline   Reply With Quote

Old   February 13, 2023, 04:14
Default
  #6
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
However, I received that "Sorry, the application simpleFoam has stopped unexpectedly"


Any suggestion will be very helpful for me.
nazmulislam is offline   Reply With Quote

Old   March 15, 2023, 21:35
Default
  #7
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Hi,


I have applied the cyclicAMI boundary conditions (since I have unstructured mesh) for the velocity and pressure at the inlet and outlet for the periodic tube, which is now working.


But I had to put uniform velocity inside the tube domain initially, because if I set zero velocity inside the tube (internal velocity) initially then the solver stop after 1 execution with zero velocity and pressure everywhere.


However, I tried to set uniform velocity in the x-direction (along the tube axis) at the inlet and outlet with zero internal velocity initially, it seemed to me it was not working. That is, it was stopped after 1 execution with zero velocity everywhere.


internalField uniform (0 0 0);


inlet
{
type cyclicAMI;
value uniform (1 0 0);
}

outlet
{
type cyclicAMI;
value uniform (1 0 0);
}



Is there any way to implement the above conditions with cyclicAMI boundary conditions?


I really appreciate your help.
nazmulislam is offline   Reply With Quote

Old   March 17, 2023, 16:25
Default
  #8
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
This function object ensures a given mean velocity. Hope it helps

https://www.openfoam.com/documentati...ity-force.html
nazmulislam likes this.
mAlletto is offline   Reply With Quote

Old   March 17, 2023, 18:35
Default the initial conditions are important too
  #9
New Member
 
MF
Join Date: Jan 2019
Posts: 6
Rep Power: 7
mfrl is on a distinguished road
please remember that you are solving a mixed problem (Initial + boundary value problem), therefore the initial conditions must satisfy your BC's and in your case it will also drive the problem. Please try to start the flow with the desired uniform velocity. After a while it should converge to a fully developed turbulent/laminar velocity profile. In the Schlichting book you also can find the theoretical solution.
hope it helps

mfrl






Quote:
Originally Posted by nazmulislam View Post
Hi,


I have applied the cyclicAMI boundary conditions (since I have unstructured mesh) for the velocity and pressure at the inlet and outlet for the periodic tube, which is now working.


But I had to put uniform velocity inside the tube domain initially, because if I set zero velocity inside the tube (internal velocity) initially then the solver stop after 1 execution with zero velocity and pressure everywhere.


However, I tried to set uniform velocity in the x-direction (along the tube axis) at the inlet and outlet with zero internal velocity initially, it seemed to me it was not working. That is, it was stopped after 1 execution with zero velocity everywhere.


internalField uniform (0 0 0);


inlet
{
type cyclicAMI;
value uniform (1 0 0);
}

outlet
{
type cyclicAMI;
value uniform (1 0 0);
}



Is there any way to implement the above conditions with cyclicAMI boundary conditions?


I really appreciate your help.
nazmulislam likes this.
mfrl is offline   Reply With Quote

Old   March 20, 2023, 20:05
Default
  #10
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by mfrl View Post
please remember that you are solving a mixed problem (Initial + boundary value problem), therefore the initial conditions must satisfy your BC's and in your case it will also drive the problem. Please try to start the flow with the desired uniform velocity. After a while it should converge to a fully developed turbulent/laminar velocity profile. In the Schlichting book you also can find the theoretical solution.
hope it helps

mfrl

Hello,


Thanks for your reply with your suggestion. I think, it will help me a lot to solve my flow problem.


However, could you please tell me how can I identify my "desired uniform velocity"?


Also, did you mention the book "Boundary Layer Theory" by Schlichting? If so, could you please specifically let me know where can I get the theoretical solution in this book relevant to my flow problem?


Cheers
nazmulislam is offline   Reply With Quote

Old   March 20, 2023, 20:08
Default
  #11
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
This function object ensures a given mean velocity. Hope it helps

https://www.openfoam.com/documentati...ity-force.html



Hello,


Many thanks for providing me the specific suggestion regarding my problem along with the link for obtaining the detailed information.
However, I tried to add the following lines for the internal velocity field but I got some error message:


internalField
{
type meanVelocityForce;
selectionMode all;
fields (U);
Ubar (1 0 0);
}


It seems to me I could not use this object correctly. Can you help me a little bit further.


Cheers

Last edited by nazmulislam; March 20, 2023 at 22:27.
nazmulislam is offline   Reply With Quote

Old   March 21, 2023, 02:18
Default
  #12
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I don't see a reason for an unstructured mesh. Your case can be meshed easily with blockMesh. I added the theory for your case from Hermann Schlichting, 1951.
Attached Images
File Type: jpg s1.jpg (126.6 KB, 11 views)
File Type: jpg s2.jpg (152.8 KB, 7 views)
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 26, 2023, 21:54
Default
  #13
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by piu58 View Post
I don't see a reason for an unstructured mesh. Your case can be meshed easily with blockMesh. I added the theory for your case from Hermann Schlichting, 1951.

Hello,


Thanks for your suggestion. I will try to create mesh with blockMesh.
Also, thanks for providing me the documents of equations for Poiseiuile flow.


Cheers
nazmulislam 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
Periodic Boundary condition for Helical tube. aadicfd Main CFD Forum 1 November 9, 2023 04:15
periodic straight tube flow, no mesh independent solution for pressure gradient thijs1909 FLUENT 5 May 16, 2018 10:04
curved cylindrical tube with periodic curve navid.a Fluent UDF and Scheme Programming 1 May 21, 2016 09:25
periodic boundary contion in tube banks Zhihua FLUENT 1 April 2, 2013 23:02
[ICEM] how to define periodic in icem ? mingersai ANSYS Meshing & Geometry 1 February 3, 2012 18:46


All times are GMT -4. The time now is 23:13.