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

chtMultiRegionFoam BC for fluid-fluid zones

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Linse

Reply
 
LinkBack Thread Tools 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: 6
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.
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: Magdeburg/Geneva
Posts: 178
Blog Entries: 1
Rep Power: 7
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: 6
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: Magdeburg/Geneva
Posts: 178
Blog Entries: 1
Rep Power: 7
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: 4
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
Baffle/Cyclic Region Creation

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, 66 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: 6
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
Baffle/Cyclic Region Creation

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: 6
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, 198 views)
File Type: jpg CL_t=0s.jpg (15.7 KB, 199 views)
File Type: jpg CL_t=5s.jpg (16.5 KB, 198 views)
File Type: jpg CL_t=25s.jpg (16.0 KB, 199 views)
File Type: jpg line_CL_t=5s.jpg (18.6 KB, 199 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: 6
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, 196 views)
File Type: jpg CL_t_5s.jpg (18.0 KB, 195 views)
File Type: jpg CL_t_10s.jpg (16.2 KB, 195 views)
File Type: jpg CL_t_20s.jpg (16.0 KB, 195 views)
Hanzo is offline   Reply With Quote

Old   July 12, 2015, 18:54
Default
  #9
Member
 
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 54
Rep Power: 5
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

Reply

Thread Tools
Display Modes

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 On
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 10 September 10, 2012 09:30
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 03:12
Multiple Fluid Zones Naghman Khan FLUENT 3 August 3, 2007 07: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 15:26.