chtMultiRegionFoam BC for fluid-fluid zones
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.
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...
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?
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...
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
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.
If either of you have any suggestions, they are welcome.
Thanks & Regards
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 = 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
The follwing picture is a lineplot through the middle of the two regions and shows the same thing
Bernhard, did you make some progress? If not I will now start to program a similar BC like
which will hopefully become something like
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.
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 :-/ )
though it looks like I have a time step dependency for the chemistry :eek: 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
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.
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!
|All times are GMT -4. The time now is 03:35.|