|
[Sponsors] |
chtMultiRegionFoam BC for fluid-fluid zones |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 14, 2012, 06:13 |
chtMultiRegionFoam BC for fluid-fluid zones
|
#1 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16 |
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. |
|
November 26, 2012, 04:27 |
Fluid-Fluid BC
|
#2 |
Senior Member
|
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 |
|
November 26, 2012, 22:53 |
|
#3 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16 |
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? |
|
November 27, 2012, 05:58 |
|
#4 |
Senior Member
|
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... |
|
November 27, 2012, 06:13 |
|
#5 |
New Member
Unnikrishnan
Join Date: Nov 2012
Posts: 8
Rep Power: 14 |
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 |
|
November 27, 2012, 21:59 |
|
#6 | |||
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16 |
Quote:
Quote:
Quote:
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? |
||||
December 5, 2012, 01:06 |
|
#7 | |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16 |
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); } Code:
cyto_to_memb { type zeoGradient; } The follwing picture is a lineplot through the middle of the two regions and shows the same thing Quote:
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 :-/ ) Last edited by Hanzo; December 5, 2012 at 04:59. Reason: Updated |
||
December 5, 2012, 05:02 |
|
#8 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 16 |
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 |
|
July 12, 2015, 19:54 |
|
#9 |
Member
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14 |
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. |
|
February 10, 2016, 09:29 |
|
#10 | |
New Member
Join Date: Feb 2016
Posts: 1
Rep Power: 0 |
Quote:
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! |
||
September 5, 2018, 09:25 |
|
#11 | |
Member
Join Date: Feb 2018
Posts: 91
Rep Power: 8 |
Quote:
|
||
September 7, 2018, 11:26 |
|
#12 |
Member
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16 |
||
September 12, 2018, 06:29 |
|
#13 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
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 |
|
September 14, 2018, 16:14 |
|
#14 | |
Member
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16 |
Quote:
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 |
||
September 14, 2018, 16:32 |
|
#15 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
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 |
|
November 5, 2019, 08:51 |
|
#16 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 13 |
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. |
|
|
|
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 |