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

How can I create oscillatory flow with periodic boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By joshwilliams
  • 1 Post By joshwilliams
  • 1 Post By joshwilliams

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2023, 19:28
Default How can I create oscillatory flow with periodic boundary condition
  #1
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Hi,


I am trying to observe unsteady, laminar and incompressible flow through an axisymmetric periodic tube.


I have initialised the uniform velocity (along the tube axis) inside the tube and imposed periodic boundary conditions (cyclicAMI) at the inlet and outlet.



Now, I would like to create an oscillatory flow. I found a tutorial "pitzDailyPulse" with the solver "pimpleFoam" for laminar, incompressible flow. In this tutorial, the velocities are distributed at the inlet using the trigonometric COSINE function.



However, since I have imposed cyclicAMI boundary conditions at the inlet and outlet, I cant provide velocities at the inlet. It is mentioned that previously I tried to provide velocity at the inlet with cyclicAMI boundary conditions at the inlet and outlet, it did not work. For that reason, I initialised the uniform velocity inside the tube with cyclicAMI boundary conditions at the inlet and outlet and it worked. Please see more details in the following link:
Periodic BC for a Periodic Tube



I appreciate your suggestions in this regard.


Thanks in advance.
nazmulislam is offline   Reply With Quote

Old   March 21, 2023, 04:04
Default
  #2
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 112
Rep Power: 5
joshwilliams is on a distinguished road
If your inlet and outlet should be periodic but you want to have oscillating flow, then I would think the only other option would be a time-varying source term (e.g. meanVelocityForce in fvOptions). I have not seen many examples where this is time-varying though. You may need to create your own library for this based on the meanVelocityForce implementation. Maybe there is already functionality for time-varying source term.
nazmulislam likes this.
joshwilliams is offline   Reply With Quote

Old   March 26, 2023, 21:04
Default
  #3
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by joshwilliams View Post
If your inlet and outlet should be periodic but you want to have oscillating flow, then I would think the only other option would be a time-varying source term (e.g. meanVelocityForce in fvOptions). I have not seen many examples where this is time-varying though. You may need to create your own library for this based on the meanVelocityForce implementation. Maybe there is already functionality for time-varying source term.

Hello Josh,


Many thanks for your kind suggestion and option to do this.
I am a new user in OpenFoam. So, could you please tell me more about this, preferably with an example?


Cheers,
Nazmul
nazmulislam is offline   Reply With Quote

Old   April 9, 2023, 07:54
Default
  #4
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by joshwilliams View Post
If your inlet and outlet should be periodic but you want to have oscillating flow, then I would think the only other option would be a time-varying source term (e.g. meanVelocityForce in fvOptions). I have not seen many examples where this is time-varying though. You may need to create your own library for this based on the meanVelocityForce implementation. Maybe there is already functionality for time-varying source term.

Hello Josh,


As you suggested I have created an fvOptions file (see in the attacment) consisting sinusoidal temporal function and put it in the system folder. However, it not working. That is, when I run the simulation using solver icoFoam, this file is not reading which is seen from the log file. I appreciate your kind suggestion in this regards. It is mentioned that I am using OpenFoam V10.


Cheers
Attached Images
File Type: png fvOptions.png (76.3 KB, 25 views)
nazmulislam is offline   Reply With Quote

Old   April 10, 2023, 12:27
Default
  #5
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 112
Rep Power: 5
joshwilliams is on a distinguished road
icoFoam.C does not call fvOptions as far as I am aware. Try pimpleFoam.
nazmulislam likes this.
joshwilliams is offline   Reply With Quote

Old   April 10, 2023, 23:25
Default
  #6
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by joshwilliams View Post
icoFoam.C does not call fvOptions as far as I am aware. Try pimpleFoam.
Hi Josh,

Thanks again for your suggestion.

However, I have tried with pimpleFoam and received the fatal error message as you can see in the attachment:

It is mentioned that I have only added the fvOptions file as above in the system folder. Do I need to change any codes in any specific file in OpenFoam?

Please provide me your valuable suggestions in this regard.


Cheers
Attached Images
File Type: png fatal error message.png (63.4 KB, 12 views)
nazmulislam is offline   Reply With Quote

Old   April 11, 2023, 04:38
Default
  #7
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 112
Rep Power: 5
joshwilliams is on a distinguished road
Quote:
Originally Posted by nazmulislam View Post
Hi Josh,

Thanks again for your suggestion.

However, I have tried with pimpleFoam and received the fatal error message as you can see in the attachment:

It is mentioned that I have only added the fvOptions file as above in the system folder. Do I need to change any codes in any specific file in OpenFoam?

Please provide me your valuable suggestions in this regard.


Cheers

It says you are missing keyword "format". i would check the source code or documentation to see what the keyword represents.
nazmulislam likes this.
joshwilliams is offline   Reply With Quote

Old   April 13, 2023, 06:21
Default
  #8
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by joshwilliams View Post
It says you are missing keyword "format". i would check the source code or documentation to see what the keyword represents.



Hi Josh,


Thanks for your suggestion. There was a semicolon missing after version 2.
Now, it is working.


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
Wind tunnel flow simulation boundary condition issue charan3007 SU2 0 October 21, 2021 08:27
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 01:27
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
strange flow of pressure boundary adjacent periodic condition oilsok FLUENT 2 May 26, 2012 12:51
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 05:46.