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

Changing Boundary Conditions during processing

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By rassilon
  • 1 Post By rassilon
  • 1 Post By jackmarlowe
  • 1 Post By rassilon
  • 1 Post By al.csc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2009, 18:06
Default Changing Boundary Conditions during processing
  #1
Member
 
Join Date: Mar 2009
Location: Sydney, New South Wales, Australia
Posts: 42
Rep Power: 17
rassilon is on a distinguished road
Hi Folks,

I need to arrange to change the boundary condition from an inletOutlet to a Wall during the simulation run.

My run is 10 seconds long, and for the first 1.5 seconds, the BC must function as an InletOutlet, reading in pressure values from an external file. However after 1.5 seconds, I need the BC to change to a Wall and allow no mass transfer through the BC for the remainder of the run.

How do I do this? I have tried running the model with the inletOutlet condition, stopping it, editing the BC, then using the mapFields -consistent command to attempt to restart the simulation from the last iteration, however this just produces nonsense when I post process the run.

Is there something I am missing? Any help would be greatly appreciated - this is the last hurdle to getting this particular model running smoothly.

Cheers,


R
the_ichthyologist likes this.
rassilon is offline   Reply With Quote

Old   November 24, 2009, 19:33
Default
  #2
Member
 
Join Date: Mar 2009
Location: Sydney, New South Wales, Australia
Posts: 42
Rep Power: 17
rassilon is on a distinguished road
Quote:
Originally Posted by rassilon View Post
Hi Folks,

I need to arrange to change the boundary condition from an inletOutlet to a Wall during the simulation run.

My run is 10 seconds long, and for the first 1.5 seconds, the BC must function as an InletOutlet, reading in pressure values from an external file. However after 1.5 seconds, I need the BC to change to a Wall and allow no mass transfer through the BC for the remainder of the run.

How do I do this? I have tried running the model with the inletOutlet condition, stopping it, editing the BC, then using the mapFields -consistent command to attempt to restart the simulation from the last iteration, however this just produces nonsense when I post process the run.

Is there something I am missing? Any help would be greatly appreciated - this is the last hurdle to getting this particular model running smoothly.

Cheers,


R

Apologies for shamelessly bumping this thread - Is there anybody out there that has any ideas about how to switch the boundary condition during the simulation?

Cheers,


R
the_ichthyologist likes this.
rassilon is offline   Reply With Quote

Old   February 8, 2010, 03:52
Default Changing Boundary Conditions during processing
  #3
New Member
 
Join Date: Jul 2009
Posts: 7
Rep Power: 16
jackmarlowe is on a distinguished road
Hi rassilon,
I need to find an answer to your question too, I'd be happy if you inform me about any progress you had about it.

This question is of great significance since it skips over a laborious procedure such dynamic mesh construction, I think it is a brilliant idea to change the BC type in a transient, simple/prompt analysis.

I read Fluent 6.3 user guides about this subject and the closest application I found is the use of programs called WAVE and GT-Power, in which it is claimed that BC's can be modified in a transient analysis. If anyone has any experiance about them, it would be great if they share their knowledge about them.

It seems we've to write UDF's, but I am not yet comfortable with them.
In the future I would even request the modification of BC's depending on some internal data from inside the solution domain during the transient analysis, but I guess it can wait for now.
the_ichthyologist likes this.
jackmarlowe is offline   Reply With Quote

Old   February 8, 2010, 18:04
Default
  #4
Member
 
Join Date: Mar 2009
Location: Sydney, New South Wales, Australia
Posts: 42
Rep Power: 17
rassilon is on a distinguished road
Quote:
Originally Posted by jackmarlowe View Post
Hi rassilon,
I need to find an answer to your question too, I'd be happy if you inform me about any progress you had about it.

This question is of great significance since it skips over a laborious procedure such dynamic mesh construction, I think it is a brilliant idea to change the BC type in a transient, simple/prompt analysis.

I read Fluent 6.3 user guides about this subject and the closest application I found is the use of programs called WAVE and GT-Power, in which it is claimed that BC's can be modified in a transient analysis. If anyone has any experiance about them, it would be great if they share their knowledge about them.

It seems we've to write UDF's, but I am not yet comfortable with them.
In the future I would even request the modification of BC's depending on some internal data from inside the solution domain during the transient analysis, but I guess it can wait for now.

Hi Jack,

I have had a good pointer as to how to get it off of the ground, but am really struggling to get it implemented at the moment.

Essentially, by using a re-written mixed boundary condition we can achieve switching from one condition type - say inlet - to another - say a wall - at a specified time or when a specific condition is met.

It has been suggested that by utilising an if-then-else procedure in the boundary condition code, then switching can be achieved. So for my case, it should look something like this:

IF time <= 1.5 seconds, THEN boundary condition = inletOutlet
ELSE boundary condition = wall

For an experienced programmer, it should be a reasonably simple task to get this going.

Unfortunately, I am not a programmer by trade, and I am getting very swamped in the code for the boundary condition. At a basic level, I have tried simply copying and renaming the boundary condition and recompiling that, but am getting loads of errors at compile time.

If you have had any experience of re-writing boundary conditions, I would love to hear it!


R
j-avdeev likes this.
rassilon is offline   Reply With Quote

Old   February 9, 2010, 05:52
Default
  #5
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi guys,

Have a look at groovyBC, a utility for mixed boundary conditions. In Contrib groovyBC you can find details and examples.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 9, 2010, 19:46
Default
  #6
Member
 
Join Date: Mar 2009
Location: Sydney, New South Wales, Australia
Posts: 42
Rep Power: 17
rassilon is on a distinguished road
Quote:
Originally Posted by gwierink View Post
Hi guys,

Have a look at groovyBC, a utility for mixed boundary conditions. In Contrib groovyBC you can find details and examples.

I've had a good look at groovyBC in the past, but don't think that I can utilise it in my particular problem at the moment, though I may be able to do so later on, as in the fullness of time I would like to be able to read in a pressure function as opposed to a time file data set.

At the moment I need a a multiphase solver with a boundary condition that can be switched from one state to another at a specific point in time, where the time data is read in from a file.

Using the interFoam solver, I am attempting to modify the timeVaryingUniformFixedValue boundary condition (I have successfully got this working to read in time data from an external file) to perform my switching function.

I think I could really benefit from an idiots guide to writing my own Boundary Functions...


R
rassilon is offline   Reply With Quote

Old   February 11, 2010, 02:51
Default Changing Boundary Conditions during processing
  #7
New Member
 
Join Date: Jul 2009
Posts: 7
Rep Power: 16
jackmarlowe is on a distinguished road
Thank you for the suggestion gwierink. It looks useful but I'd like to try Fluent's own functions without downloading extra software.
In Fluent 6.3 Udf Manual I came cross to this example about setting up mass flow rate for user determined time intervals (Pdf page 113). It may work for my case. To simulate the wall condition, I am going to try setting
mass flow rate = 0 for some t.
I hope Fluent do not restrict the choice of inlet (or outlet) BC type preference while one BC is set this way.
I can not try this right now (I am away from my computer) but as soon as I get any result, I will share it here.

Regards,
M.
jackmarlowe is offline   Reply With Quote

Old   April 29, 2010, 12:52
Default
  #8
Member
 
Nick Gardiner
Join Date: Apr 2009
Location: Chichester, UK
Posts: 94
Rep Power: 17
NickG is on a distinguished road
Hi guys

Have you had any luck? I have a similar problem in that I want a boundary condition on a revolving cylinder to change between inlet and outlet depending upon a points position relative to the stationary frame. I looked at groovyBC but, although I didn't try it I thought it was for varying the parameters of a single type rather than varying types.

What have you found out?

Cheers Nick
NickG is offline   Reply With Quote

Old   April 29, 2010, 12:54
Default
  #9
Member
 
Nick Gardiner
Join Date: Apr 2009
Location: Chichester, UK
Posts: 94
Rep Power: 17
NickG is on a distinguished road
There's a basic how to write your own boundary condition here: http://openfoamwiki.net/index.php/Ho...dary_condition

N
NickG is offline   Reply With Quote

Old   April 30, 2010, 04:22
Default
  #10
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Nick,

Quote:
I looked at groovyBC but, although I didn't try it I thought it was for varying the parameters of a single type rather than varying types.
Is it perhaps an idea to switch the face/patch normal between positive and negative velocity at the inlet/outlet depending on revolution time (rather than position)?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   April 30, 2010, 05:27
Default
  #11
Member
 
Nick Gardiner
Join Date: Apr 2009
Location: Chichester, UK
Posts: 94
Rep Power: 17
NickG is on a distinguished road
Hi Gijs

Thanks for the idea. Unfortunately I want a constant input from one side (from a stationary point of view) and an outlet on the other at the same time as the cylinder rotates so I don't a time dependent solution will work as such. However it opens up a method I hadn't thought of... Thanks

Nick
NickG is offline   Reply With Quote

Old   November 24, 2022, 07:35
Default changeDictionary
  #12
Member
 
Al Csc
Join Date: Jul 2018
Posts: 30
Rep Power: 7
al.csc is on a distinguished road
It is 2022, quite late but I found out this tool to change boundary conditions on patches: changeDictionary
As always:
Code:
foamGetDict changeDictionaryDict
To get a starting point dictionary in your case/system folder
Laurenz likes this.
al.csc 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
Implementation of boundary conditions for FVM Tom Main CFD Forum 7 August 26, 2014 05:58
Defining "Neutral" boundary conditions? (force=0) MW FLUENT 5 October 5, 2009 04:55
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 01:54
Boundary Conditions Jan Ramboer Main CFD Forum 11 August 16, 1999 08:59


All times are GMT -4. The time now is 02:11.