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

How to automatically switch inlet conditions from velocity to pressure and vice versa

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2021, 01:42
Exclamation How to automatically switch inlet conditions from velocity to pressure and vice versa
  #1
New Member
 
Nursultan
Join Date: May 2021
Posts: 5
Rep Power: 4
nurs134 is on a distinguished road
Hello everyone,

I need automatically switch inlet conditions from velocity to pressure and vice versa.

For example:
1st iteration: velocity inlet -> pressure outlet
2nd iteration: Generated pressure as inlet -> velocity outlet
3rd iteration: Generated velocity as inlet -> pressure outlet and etc.

How to program such kind of algorithm in OpenFOAM?

Kind regards,
Nursultan
nurs134 is offline   Reply With Quote

Old   May 28, 2021, 10:26
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
First up, I have to admit that I have no idea why you would want to do this, since it seems a little crazy to me. Perhaps you are running the solver for more that one iteration between the different boundary setups? Otherwise, the solution will not adapt quickly enough for your BCs to have an impact ...

Regardless, to answer your question, the simplest way would be to set up a run script that updates the boundaries using the foamDictionary command, runs the solver for one iteration (or more hopefully), then updates the BCs again and runs again etc. Fairly easy to code up in a bash script.

Good luck!
Tobermory 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
Porous zone - setup of lab air tunnel - velocity v's pressure drop RobertW FLUENT 1 May 26, 2020 09:27
Another discussion on velocity-pressure coupling toodles Main CFD Forum 16 January 6, 2018 14:45
Bed pressure loss vs velocity plot kamranian Fluent Multiphase 0 October 10, 2016 04:33
Venturi pressure not being conserved! criville'99 FLUENT 1 June 24, 2014 12:14
mass flow inlet Denis Tschumperle FLUENT 7 August 9, 2000 02:19


All times are GMT -4. The time now is 12:38.