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

How to automatically switch boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2021, 14:22
Question How to automatically switch boundary conditions
  #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 and outlet conditions in the way that I described below.

1st iteration:
Initial conditions: Pressure (P) (experiment value) inlet -> Mass flow rate (Q)(outlet)
Result: Mass flow rate (Q) (calculated) inlet -> P and Q (calculated) at outlet

then we need to put calculated P values from the outlet of 1st iteration to the outlet initial conditions of 2nd iteration

2nd iteration:
Initial conditions: Mass flow rate (Q) (experiment value) inlet -> Pressure (P) (1st iteration calculated) (outlet)
Result: Pressure (P) (calculated) inlet -> Mass flow rate Q (calculated) at outlet

then we need to put calculated Q values from the outlet of the 2nd iteration to the outlet initial conditions of 3rd iteration

3rd iteration:
Initial conditions: Pressure (P) (experiment value) inlet -> Mass flow rate (Q) (2nd iteration calculated) (outlet)
Result: Mass flow rate (Q) (calculated) inlet -> P and Q (calculated) at outlet

and etc.

How to program such kind of algorithm in OpenFOAM? Maybe in bash or python script.

Replies will be very helpful. I appreciate every response.

Kind regards,
Nursultan
Attached Images
File Type: jpg asdasdasd.JPG (75.5 KB, 1 views)
File Type: jpg a456.jpg (64.2 KB, 1 views)
nurs134 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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
CGNS Boundary conditions using SU2 denzell SU2 3 July 9, 2018 05:58
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 04:39
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28


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