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

chtMultiRegionFoam BC for fluid-fluid zones

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By Hanzo
  • 1 Post By Linse
  • 1 Post By Hanzo
  • 2 Post By Hanzo
  • 1 Post By Thamali

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2012, 06:13
Default chtMultiRegionFoam BC for fluid-fluid zones
  #1
Member
 
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16
Hanzo is on a distinguished road
Hello,

I try to set-up a case using chtMultiRegionFoam.
Later the goal is to include chemistry but at the moment I have a rather simple problem:

In the tutorial for MultiRegionHeater there is always a solid region connected to a fluid region. Therefore velocity at the interface boundaries such as
topAir_to_heater becomes simply (0 0 0).

When I have a case with two fluid zones neighbouring each other, what could be a good BC for velocity, pressure and temperature between these fluid zones? I tried

- BC "calculated": results in the following error
gradientInternalCoeffs cannot be called for a calculatedFvPatchField

- BC "inletOutlet": divergence after a few steps

I also tried some other combinations but I cannot figure out good one.

Thanks for any hints.
vpereira likes this.
Hanzo is offline   Reply With Quote

Old   November 26, 2012, 04:27
Default Fluid-Fluid BC
  #2
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
Hello Hanzo,

unfortunately there is no BC or interface yet for this problem within OpenFOAM. That's why You did not find any tutorial case for something like this! ;-)
Since quite some time I am working on a solution for that problem (low C++ skills are no advantage), but I think I still will need some days or weeks until I can release some code for something like that...

I'll keep you posted!

Thus, what I would suggest for the moment for going on: Try to get the chemistry part running! You can run the chtMultiRegion-solvers for a single zone if you first produce the geometry for the full domain and put the complete polyMesh into the folder for the single region you tell cht to solve. Of course, this puts ad absurdum the "multiregion"-part of the name, but it helps checking if the solver is capable to do what you want at all...

Cheers,
Bernhard
ZKW likes this.
Linse is offline   Reply With Quote

Old   November 26, 2012, 22:53
Default
  #3
Member
 
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16
Hanzo is on a distinguished road
Thank you for your advise Bernhard.

At the moment I am including chemFoam functionality in the multiZone framework. And make progress little by little.

About the BC:

Could you give me an idea what the main problem for an internal BC between two (say in the beginning) exact same fluids is? Isn't there an analogue treatment possible like in a decomposed case where fluid also passes some internal boundaries which the fluid should not "see" (the boundary from one decomposition region to another)?

Or a different approach for my special case:
Solve the fluid flow in the usual single domain setting and then compute chemistry for each region using the flow field. I wonder how I would then give each chemisty region it's part of the fluid properties. Any idea on that?
Hanzo is offline   Reply With Quote

Old   November 27, 2012, 05:58
Default
  #4
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
To be honest: I did not look into the decomposition methods too much because right from the beginning it was clear that this would not be sufficient for my goals.

But concerning your second idea: You might want to look into _fvSubMeshSet_ which is available in the ext-release of OpenFoam. (I do not know if by now it found its way into the official release as well!)
This tool allows to compute some equations for the complete domain (e.g. basic flow equations) and to compute additional equations on parts of the domain. If you find a way to do the second step multiple times for different parts/regions, maybe that would help you as well? The backdrop: It relies heavily on mapping which causes rather high resource demand...
Linse is offline   Reply With Quote

Old   November 27, 2012, 06:13
Default
  #5
ZKW
New Member
 
Unnikrishnan
Join Date: Nov 2012
Posts: 8
Rep Power: 14
ZKW is on a distinguished road
Thanks for the reply Linse,
& Thanks Hanzo for starting a new thread on this topic. I hope it is relevant to post the same here.

I am working on the same topic.I am trying to use the same setup (chtMultiRegionSimpleFoam) for a Closed loop system with a Fan , Initially i have set both the regions to Fluid ( air, fan )

Please take a look if
http://www.cfd-online.com/Forums/ope...tml#post393624

Am I using the correct Boundary condition ??

I also would like to have some help if using the fan or the fanPressure patch a correct option for MultiRegion Cases.
OpenFOAM-2.1.x/src/finiteVolume/fields/fvPatchFields/derived/fanPressure

If either of you have any suggestions, they are welcome.

Thanks & Regards
Unni
Attached Images
File Type: jpg Slice_air_fan3_.0100.jpg (73.2 KB, 323 views)
ZKW is offline   Reply With Quote

Old   November 27, 2012, 21:59
Default
  #6
Member
 
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16
Hanzo is on a distinguished road
Quote:
Originally Posted by Linse View Post
To be honest: I did not look into the decomposition methods too much because right from the beginning it was clear that this would not be sufficient for my goals.
Sounds interesting. Could you give an idea on what kind of BC you are working on?

Quote:
Originally Posted by Linse View Post
But concerning your second idea: You might want to look into _fvSubMeshSet_ which is available in the ext-release of OpenFoam. (I do not know if by now it found its way into the official release as well!)
This tool allows to compute some equations for the complete domain (e.g. basic flow equations) and to compute additional equations on parts of the domain. If you find a way to do the second step multiple times for different parts/regions, maybe that would help you as well? The backdrop: It relies heavily on mapping which causes rather high resource demand...
Thanks for the hint. I will have a look at fvSubMeshSet. Apart from the ressources demand it sounds quite promising.


Quote:
Originally Posted by ZKW View Post
Please take a look if
http://www.cfd-online.com/Forums/ope...tml#post393624

Am I using the correct Boundary condition ??

I also would like to have some help if using the fan or the fanPressure patch a correct option for MultiRegion Cases.
OpenFOAM-2.1.x/src/finiteVolume/fields/fvPatchFields/derived/fanPressure
I like the idea about the cyclic boundary conditions in the thread you are mentioning. Did you make any good experiences with that?

Quote:
Originally Posted by ZKW View Post
Am I using the correct Boundary condition ??
Unfortunately, I cannot say anything about the fanPressure patch. Did you ever try to setup a rather simple case using the fanPressure patch and compare to experimental or other simulation data?
Hanzo is offline   Reply With Quote

Old   December 5, 2012, 01:06
Default
  #7
Member
 
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16
Hanzo is on a distinguished road
I now have a first version of a multiRegionChemistry Solver.
So far only a transient Diffusion-Reaction equation is solved for all the
species. Chemistry seems to work fine so far, but I am now at the point where I need to have Boundary conditions for two identical phases. I would like to couple the boundary conditions of a species of neighbouring regions.

The following pictures illustrates what I am looking for:

Initial conditions at t=0s : Green color = Species A, red color = species B, white boxes are two different domains


as species A and B start to diffuse in space, the reaction for generating species C begins ( simply A + B -> C)

As can be seen on the following two pictures which show slices through the two domains

Concentration of species C at t=0s:


at t=5s


at t = 25s


As can be clearly seen, the boundary values of the left region have no influence of species C on the right region. This boundary is defined as

Code:
    cyto_to_memb
    {
        type            directMappedWall;
        nFaces          169;
        startFace       6929;
        sampleMode      nearestPatchFace;
        sampleRegion    memb;
        samplePatch     memb_to_cyto;
        offsetMode      uniform;
        offset          (0 0 0);
    }
and becomes the follwing in the 0 directory

Code:
    cyto_to_memb
    {
        type            zeoGradient;
    }
So I hoped that the species diffuse out of the left region with a zero gradient into the right region. But the coupling is not performed.

The follwing picture is a lineplot through the middle of the two regions and shows the same thing



Quote:
Originally Posted by Linse View Post
Since quite some time I am working on a solution for that problem (low C++ skills are no advantage), but I think I still will need some days or weeks until I can release some code for something like that...

I'll keep you posted!

Bernhard, did you make some progress? If not I will now start to program a similar BC like
compressible::turbulentTemperatureCoupledBaffleMix ed
which will hopefully become something like
speciesCoupledBaffleMixed.

I guess a generalization to other volScalarField values or maybe even volVectorField values (e.g. for a velocity - velocity coupling in chtMultiRegionFoam) should be similar.



Update Edit:

Okay, was easier than I thought. I used the compressible::turbulentTemperatureCoupledBaffleMix ed and wrote a speciesCoupledBaffleMixed which couples the interface values. Actually, it can be an arbitrary scalar.
I just take the geometric mean of the nearest scalar value of the internal region and the nearest scalar from the neighbouring region and apply a zero gradient.

Results look like the following

(have to post a new reply for the additional pictures :-/ )
Attached Images
File Type: jpg iniCon.jpg (16.6 KB, 1460 views)
File Type: jpg CL_t=0s.jpg (15.7 KB, 1447 views)
File Type: jpg CL_t=5s.jpg (16.5 KB, 1447 views)
File Type: jpg CL_t=25s.jpg (16.0 KB, 1454 views)
File Type: jpg line_CL_t=5s.jpg (18.6 KB, 1450 views)

Last edited by Hanzo; December 5, 2012 at 04:59. Reason: Updated
Hanzo is offline   Reply With Quote

Old   December 5, 2012, 05:02
Default
  #8
Member
 
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16
Hanzo is on a distinguished road
though it looks like I have a time step dependency for the chemistry So I will have a look on this later.

I will clean up the code and also consider extending it to velocityCoupledBaffleMixed.

C at t=0s


t= 5s


t=10s


t=20s
Attached Images
File Type: jpg CL_t_0s.jpg (15.5 KB, 1424 views)
File Type: jpg CL_t_5s.jpg (18.0 KB, 1423 views)
File Type: jpg CL_t_10s.jpg (16.2 KB, 1424 views)
File Type: jpg CL_t_20s.jpg (16.0 KB, 1419 views)
Hanzo is offline   Reply With Quote

Old   July 12, 2015, 19:54
Default
  #9
Member
 
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14
yhaomin2007 is on a distinguished road
Hi, Hanzo

It seems your BC is working well for velocity. I am also working on a similar problem. Would you like to share your code here? Thanks in advance.
yhaomin2007 is offline   Reply With Quote

Old   February 10, 2016, 09:29
Default
  #10
New Member
 
Join Date: Feb 2016
Posts: 1
Rep Power: 0
GSchwab is on a distinguished road
Quote:
Originally Posted by Linse View Post
unfortunately there is no BC or interface yet for this problem within OpenFOAM. That's why You did not find any tutorial case for something like this! ;-)
Since quite some time I am working on a solution for that problem (low C++ skills are no advantage), but I think I still will need some days or weeks until I can release some code for something like that...
Hi,

i am currently working on the same issue. I want to simulate a tank (with solid walls) filled with a fluid and a gas layer on top.

In the meanwhile, is there a working BC/solution available for the MultiregionFoam for liquid (fluid/gas) interfaces?

Thanks for your help in advance!
GSchwab is offline   Reply With Quote

Old   September 5, 2018, 09:25
Default
  #11
Member
 
Join Date: Feb 2018
Posts: 91
Rep Power: 8
charles4allme is on a distinguished road
Quote:
Originally Posted by Hanzo View Post
Hello,

I try to set-up a case using chtMultiRegionFoam.
Later the goal is to include chemistry but at the moment I have a rather simple problem:

In the tutorial for MultiRegionHeater there is always a solid region connected to a fluid region. Therefore velocity at the interface boundaries such as
topAir_to_heater becomes simply (0 0 0).

When I have a case with two fluid zones neighbouring each other, what could be a good BC for velocity, pressure and temperature between these fluid zones? I tried

- BC "calculated": results in the following error
gradientInternalCoeffs cannot be called for a calculatedFvPatchField

- BC "inletOutlet": divergence after a few steps

I also tried some other combinations but I cannot figure out good one.

Thanks for any hints.
Hey, Have you been able to find an answer
charles4allme is offline   Reply With Quote

Old   September 7, 2018, 11:26
Default
  #12
Member
 
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16
fxzf is on a distinguished road
Quote:
Originally Posted by charles4allme View Post
Hey, Have you been able to find an answer

Hi,


This is not possible in current OpenFOAM. The fluid-fluid interface BC is not exist. If two fluid region are conected, you should only define one fluid region. In between, you can use faceZone.
fxzf is offline   Reply With Quote

Old   September 12, 2018, 06:29
Default
  #13
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Hello ff,
Do you have any suggestions how to handle a fluid region which consists of first super heating of the fluid which then enters a chemical reactor where the fluid is converted?

My idea was to separate this region into two regions, one where the fluid is super heated and another where the chemical reactions occur.

However, as there are no fluid to fluid boundary conditions, I considered defining the entire region as a chemical reactor with the reactions being disabled in the super heating part but I'm not sure how to accomplish this.

Regards Lasse
Swagga5aur is offline   Reply With Quote

Old   September 14, 2018, 16:14
Default
  #14
Member
 
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16
fxzf is on a distinguished road
Quote:
Originally Posted by Swagga5aur View Post
Hello ff,
Do you have any suggestions how to handle a fluid region which consists of first super heating of the fluid which then enters a chemical reactor where the fluid is converted?

My idea was to separate this region into two regions, one where the fluid is super heated and another where the chemical reactions occur.

However, as there are no fluid to fluid boundary conditions, I considered defining the entire region as a chemical reactor with the reactions being disabled in the super heating part but I'm not sure how to accomplish this.

Regards Lasse
Hi Lasse,

Sorry for the late reply. Well, I don't fully understand your case. But in my case, I modified splitRegion utilities a lot. So at your initial mesh, you may have may cellZones (Fluid 1, Fluid2, Solid 1, Solid 2, Solid 3) In my own version splitRegion, it can read a Dict where it specifies all the solid regions. Then, my version splitRegion will only cut Solid regions into independent region, the left over is one Fluid region which contains all Fluid Cellzones. So you can define your reaction happens in on cellzone.

Cheers,
ff
fxzf is offline   Reply With Quote

Old   September 14, 2018, 16:32
Default
  #15
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Thank you for your reply, and I'll try to explain myself better this time

Currently I have a catalytic reaction occurring in a region which I have defined to be from a stl file. The same is done for the super heating domain.

I could have defined them both from a single domain, however, the chemical reaction can physically only occur in the first region.
The chemical reaction converts methanol and water into hydrogen with the use of copper based pellets only found in the first region.

I chose to do this as I don't know how to apply the reactions set in the reactions file to only a part of a cellzone and not the entire zone.

Thank you for your help,
Lasse
Swagga5aur is offline   Reply With Quote

Old   November 5, 2019, 08:51
Default
  #16
Member
 
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 13
Thamali is on a distinguished road
Hi,

Thanks for all the contributors of this thread so far!

I am also doing a similar kind of simulation.
I have a porous region inside a larger fluid region. Here I consider both as fluid regions and both regions will have reactions. Currently, I am trying with "chtMultiRegionFoam".
There are two methods in my mind for creating mass transfer through the fluid-fluid interface.
Method 1:
As I know we can use "temperatureCoupledBaffleMixed" for enthalpy transfer between the two regions. And we can even use the same boundary condition for the species transfer by introducing "CO2" or whichever specie instead of "T" and "D" (diffusion coeffcient) instead of "kappa".
Similary can we make a "velcocityCoupledBaffleMixed"?
or
Isn't it possible to do via "mappedFlowRate" or "mappedVelocityFluxFixedValue" boundary conditions.

Method 2:
As earlier discussed in this thread, we can make a single fluid region (instead of two regions) and create a baffle and make cyclic boundary.
If we make a 'cyclic' boundary, all the properties are act according to a cyclic boundary (I don't have much idea about 'cyclic' boundary )?
Then we cannot make 'gas species flux/heat flux' same in both sides which is done through "temperaureCoupledbaffleMixed" boundary condition.

Please correct me if I am wrong and enlighten me with your valuable comments.
Thanks in advance.
dasith0001 likes this.
Thamali 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
Problem with running chtMultiRegionFoam after using setSet utility Victor OpenFOAM 12 March 24, 2023 01:01
Defining Solid and Fluid zones in OpenFoam foamcfd OpenFOAM 1 December 17, 2009 07:02
fluid structure interaction taru agrawal FLUENT 4 September 10, 2007 04:12
Multiple Fluid Zones Naghman Khan FLUENT 3 August 3, 2007 08:23
surface-creation on 1 of 2 overlapping fluid zones Volker Pawlik FLUENT 0 November 17, 2000 06:15


All times are GMT -4. The time now is 06:49.