|
[Sponsors] |
March 25, 2017, 05:24 |
Periodic Boundary Condition
|
#1 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 |
Hello to all,
In many papers, to simulate a fully developed flow in a geometry (pipe or channel), i've seen is practice, to avoid modelling a long pipe, to implement periodic boundary condition at the inlet and outlet. Can someone explain me how to implement this method? Thanks for help |
|
March 25, 2017, 15:35 |
|
#2 | |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
Quote:
Code:
inlet { type cyclic; neighbourPatch outlet; faces ((0 1 2 3)); // insert your particular vertex numbers } outlet { type cyclic; neighbourPatch inlet; faces ((4 5 6 7)); // insert your particlular vertex numbers } Code:
inlet { type cyclic; } outlet { type cyclic; } |
||
March 27, 2017, 05:28 |
|
#3 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 |
Hello IrishMan, thanks for your fast reply and sorry for my late one.
I have a doubt, how can i define an initial velocty at the inlet with a cyclic BC? Many thanks |
|
March 27, 2017, 05:45 |
|
#4 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello
what I would do to initialize your velocity, is to change the internalField value. |
|
March 27, 2017, 22:21 |
|
#5 |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
As agustinov pointed out, you could set your internal mesh to a uniform velocity. You could also use something like swak4foam to create a particular velocity profile. However, you also need something to keep your flow moving. The meanVelocityForce fvOption (OpenFOAM-3.0.x) introduces a force term to the NS equations in order to maintain a user-defined bulk velocity.
|
|
March 30, 2017, 14:53 |
|
#6 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 |
Thanks guys for your replies.
I made all you said me but unfortunately after launching pimpleFoam this error occurs Code:
--> FOAM FATAL IO ERROR: Unable to set reference cell for field p Please supply either pRefCell or pRefPoint file: /home/roby/Scrivania/Auxiliary/system/fvSolution.PIMPLE from line 57 to line 58. From function void Foam::setRefCell ( const volScalarField&, const volScalarField&, const dictionary&, label& scalar&, bool ) in file cfdTools/general/findRefCell/findRefCell.C at line 125. here my U,p and blockMesh file U Code:
dimensions [ 0 1 -1 0 0 0 0 ]; internalField uniform (0 0.42 0); boundaryField { inlet { type cyclic; } walls { type fixedValue; value uniform (0 0 0); } outlet { type cyclic; } } P Code:
dimensions [ 0 2 -2 0 0 0 0 ]; internalField uniform 0; boundaryField { inlet { type cyclic; } walls { type zeroGradient; } outlet { type cyclic; } } blocjMeshDict Code:
boundary ( walls { type wall; faces ( (3 2 1 0) (0 1 5 4) (4 5 6 7) (2 3 7 6) ); } inlet { type cyclic; neighbourPatch outlet; faces ( (0 4 7 3) ); } outlet { type cyclic; neighbourPatch inlet; faces ( (1 2 6 5) ); } ); Many thanks |
|
March 31, 2017, 07:25 |
|
#7 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Please take a look here. since you are not imposing a pressure value in your BC-s, the solver is asking for it. you have to give it in your fvSolution, as you see from your error, inside the PIMPLE dictionary. In this way, you will have a reference pressure to compute the pressure field.
https://github.com/OpenFOAM/OpenFOAM...tem/fvSolution |
|
May 2, 2017, 10:03 |
|
#8 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 |
Sorry for the thread bumping but the solutions proposed above seem not to work good for my case, because the flow seems to slow down very quickly respect the value i want to impose at the inlet. This must be because there is no a driving force.
Maybe the problem could be fixed by setting a value of flowrate. The informations i have are the density and the inlet velocity (uniform). I read some threads about the same problem but no one has given me a completely solution. |
|
May 2, 2017, 10:47 |
|
#9 | |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
Quote:
|
||
May 2, 2017, 10:57 |
|
#10 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 |
Hi fatirishman,
unfortunately i'm on OF 2.3.0 and it seems meanVelocityForce fvOptionis is only for OF 3.0. Can i use it evenly? And if yes, how? Many thanks for your help |
|
May 2, 2017, 16:33 |
|
#11 |
Member
Matt
Join Date: Oct 2012
Posts: 39
Rep Power: 14 |
I can't remember what it is called, but I know OF 2.4.0 had something similar. Just do a google search for OpenFOAM fvOptions.
|
|
May 3, 2017, 04:21 |
|
#12 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi,
take a look to this fvOption https://github.com/OpenFOAM/OpenFOAM...plicitSource.H or to the boundaryFoam solver https://github.com/OpenFOAM/OpenFOAM...e/boundaryFoam With one of them you should reach the setup you are looking for. |
|
May 17, 2017, 06:01 |
|
#13 |
Senior Member
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10 |
Thank you both guys for your help.
I post the solution for future users In OpenFOAM 2.3.x the following linked fvOptions file must be put into the system directory. You can also refer to the tutorial in $FOAM_TUTORIALS/incompressible/pimpleFoam/channel395/ I also test it in OpenFoam v-1612+ but the syntax is a bit different and there is no an example to look for, so i link the complete case below Hope it helps |
|
July 13, 2018, 12:45 |
Periodic Boundary Condition for Temperature
|
#14 |
New Member
nahideh
Join Date: Jun 2018
Posts: 2
Rep Power: 0 |
Hello to all,
I read your description about fvOption, it was helpful for velocity and pressure, but how about Temperature, how can I have Periodic Boundary Condition for Temperature field? Thank you all |
|
July 19, 2018, 06:40 |
|
#15 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi
keep a cyclic temperature is simple. You need to know your heat balance, it is, the amount of heat that you introduce (or remove) inside the domain. Then, set this amount in a similar entry in your fvOptions, where you extract (or add) the same amount of heat. Remember to be coherent with units! |
|
July 23, 2018, 11:18 |
|
#16 |
New Member
nahideh
Join Date: Jun 2018
Posts: 2
Rep Power: 0 |
Thank you agustinvo; what you explained seems to be suitable for constant wall heat flux, isn't it?
The problem I have faced is constant wall temperature, a brief description of the problem is like this: The system considered for the problem, consisted bank of tubes containing a flowing fluid at one temperature that is immersed in a second fluid in cross flow at a different temperature. and one more thing, is this all based on article of Patankar et al. (1977), “Fully developed flow and heat transfer in ducts having streamwise-periodic variation of cross-sectional area”? Best Regards |
|
September 28, 2018, 23:12 |
|
#17 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
Hello All,
I want to solve a vortex stretching problem in which we have a drop at C(0.5,0.75) in a square of unit size. Now the streamline is given as \psi = (1/\pi)*\cos(\pi*t/T)*\sin^2(\pi*x)*\sin^2(\pi*y) The problem is that the Boundary Conditions for all variables is periodic for all four patches that surrounds the domain. If we have a inlet and outlet I can define the neighboring patch for inlet as outlet and vice versa. As shown in the examples above. But what if all the patch is periodic, what should be the neighboring patches for top, bottom, left and right. |
|
November 28, 2018, 08:02 |
|
#18 |
New Member
Fraser Monaghan Brash
Join Date: Nov 2018
Posts: 1
Rep Power: 0 |
Hello,
I am new to using OpenFoam and have a problem involving a 3D channel with fluid between 2 flat plates (that are being heated). I am looking to implement cyclic boundary conditions on the fluid and include a heat sink to subtract the calculated heat flux at each time step to ensure no exponential heating. I am unsure as to how to do this and any suggestions or advice would be greatly appreciated. Many thanks, Fraser |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Problem in setting Boundary Condition | Madhatter92 | CFX | 12 | January 12, 2016 05:39 |
Unsteady Periodic Boundary Condition | EMolina | SU2 | 0 | July 24, 2014 17:16 |
About periodic boundary condition. | kohel_11 | FLUENT | 3 | July 30, 2013 08:37 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |