CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Mixing cyclic and wall boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By al_th
  • 1 Post By tguozden

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2015, 10:17
Default Mixing cyclic and wall boundary condition
  #1
New Member
 
Al_th
Join Date: Apr 2015
Posts: 19
Rep Power: 11
al_th is on a distinguished road
Hi,

I am looking at a boundary condition that would let me switch between a cyclic (periodic) boundary condition and a wall boundary condition.

I found that I can use groovyBC (and swak4foam) to implement basic if/else conditions based on field values. What bothers me is the following sentence :

Quote:
It is very important to note, that no form of patch-to-patch interpolation of the fields is performed. If the number of faces on the local and remote patches are not identical, entire fields cannot be mirrored from remote patches to local patches.
If my two patches are identical (I created the two patches using createBaffles that basically gives me a master and a slave patch with exactly the same number of cells), does this mean that I can ACTUALLY mirror pressures, velocities and everything else ?

In the case that groovyBC is not adapted to my problem, do you know any other BC that could be appropriate ? Or should I reimplement the BC by mixing cyclic and wall (I assume this is doable).

Best regards,

Al_th
al_th is offline   Reply With Quote

Old   May 13, 2015, 15:35
Default
  #2
Member
 
Join Date: Apr 2015
Location: EU
Posts: 38
Rep Power: 11
roadRunner is on a distinguished road
I'm not sure if I understood your question correctly, you can define different boundary conditions for different fields, if that is what you want.
So AFAI understand, you should be able to use cyclic for pressure and fixed value for velocity (but I don't see how is that useful).

e: oh, now I see that you want conditional BC
__________________
beep-beep
roadRunner is offline   Reply With Quote

Old   May 17, 2015, 16:42
Default
  #3
New Member
 
Al_th
Join Date: Apr 2015
Posts: 19
Rep Power: 11
al_th is on a distinguished road
Dear roadRunner,

Yes, what I want is conditional boundary conditions. Specifically, I want to be able to control my boundary conditions through time or depending on specific values of my fields (pressure gradients, current local velocity, ect).

Any appropriate boundary conditions ?

Best regards,

al_th
al_th is offline   Reply With Quote

Old   August 16, 2015, 02:01
Default
  #4
New Member
 
Join Date: Mar 2014
Posts: 23
Rep Power: 12
Majed is on a distinguished road
Hello al_th

Have you had any success in implementing such a BC?

Best regards,

Hessam
Majed is offline   Reply With Quote

Old   August 17, 2015, 04:27
Default
  #5
New Member
 
Al_th
Join Date: Apr 2015
Posts: 19
Rep Power: 11
al_th is on a distinguished road
Quote:
Originally Posted by Majed View Post
Hello al_th

Have you had any success in implementing such a BC?

Best regards,

Hessam

Hi Hessam,

I am sorry to tell you that I did not directly implemented the BC. Specifically because I'm an OpenFoam newbie and I was not quite sure how I could bind them as even the base type of the two are not the same (http://cfd.direct/openfoam/user-guide/boundaries/).

However, I succeeded in doing what I wanted using an alternative tricky route.

First, using the "timing" method, I used the controlDict file to set up my timer, stop the simulation when I needed to change the BC, and relaunched it with the proper boundary condition with a script as if you were starting a new simulation except your fields are not 0 anymore.

The second thing I needed was to open or close a wall depending on the field itself. What I did is the following :

In the *.cpp file of my solver, I wrote a little piece of code that look at the values I need, and if it reaches my stop condition : write a file and stop the simulation. In my launching script, if I detect this file, I switch my boundary conditions and restart the simulation.

This is more complicated than my initial request, but it works for what I do.
acgnipper and Majed like this.
al_th is offline   Reply With Quote

Old   October 16, 2015, 10:28
Default Cyclic for velocity and fixed value for pressure
  #6
New Member
 
Tomas
Join Date: Feb 2015
Posts: 4
Rep Power: 11
tguozden is on a distinguished road
Hello roadRunner, I am trying to solve a case in which I have cyclic boundary conditions for velocity and impose values to pressure. But I am forced to define the cyclic condition already in the blockMeshDict. How can I avoid this step?

Thanks,

Tomás.-


Quote:
Originally Posted by roadRunner View Post
I'm not sure if I understood your question correctly, you can define different boundary conditions for different fields, if that is what you want.
So AFAI understand, you should be able to use cyclic for pressure and fixed value for velocity (but I don't see how is that useful).

e: oh, now I see that you want conditional BC
FlameSlave likes this.
tguozden is offline   Reply With Quote

Old   September 20, 2019, 05:06
Default
  #7
New Member
 
Erik
Join Date: Sep 2019
Posts: 4
Rep Power: 7
FlameSlave is on a distinguished road
Quote:
Originally Posted by tguozden View Post
Hello roadRunner, I am trying to solve a case in which I have cyclic boundary conditions for velocity and impose values to pressure. But I am forced to define the cyclic condition already in the blockMeshDict. How can I avoid this step?

Thanks,

Tomás.-

I am trying to do something similar. I want to impose cyclic boundary conditions for the flow field but fixedValue on two patches in a box for an external electric potential. Any idea how to approach this?
FlameSlave 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
[Commercial meshers] icem fluent mesh with cyclic boundary condition jiejie OpenFOAM Meshing & Mesh Conversion 2 February 24, 2020 04:34
interFoam and cyclic boundary condition issue General_Gee OpenFOAM Running, Solving & CFD 17 October 8, 2018 10:33
Why Menter's SST model low-Re issue has not been seriously investigated? vkrastev OpenFOAM 58 January 8, 2018 16:20
cyclic boundary violates mass conservation Maik OpenFOAM Running, Solving & CFD 13 August 23, 2016 10:25
Cyclic ACMI Boundary Condition for moving bar linear cascade JackW OpenFOAM Programming & Development 0 February 17, 2015 16:17


All times are GMT -4. The time now is 21:20.