Appropiate BC's for the inlet/outlet in an air chamber
Hello foamers,
I'm working on a case with chtMultiRegionFoam solver where I have some solid regions that are covered with a vertical air chamber in order to keep the solid regions warm and protected from the solar radiation. The air chamber keeps the surface of the solid that it is in contact with warm by natural convection (no air is pumped inside the chamber). My main doubt is what sould be the proper BC's for velocity, pressure and temperature in the inlet and outlet patches? I haven't still worked with opened domains with OF until now... Many thanks in advance. Any tip or hint will be much appreciated. :) Regards, Alex |
Hi, in these days I'm running a test case where i have open space too. I set the boundary of my domain far away from the zone i want to study. I think that it's good if you set freestream for U, and set the external boundaries at fixed pressure(your inital conditon for p). Anyway I'm still looking for the best ones. Look for C++ documentation at openfoam.org for other BC. Bye
|
Hello M.C.
Thanks for your insight! Yestrday I did some tests with the inletOutlet BC and even combining inletOutlet with outletInlet at a time for both inlet and outlet. I haven't still found an answer to my problem since I can't clearly understand how theses BC's work. I'm not aware on what exactly mean inletValue and outletValue and what exactly they do... Any explanataion on that? I looked into the code but I found nothing clear to my understanding... Many thanks! Alex |
Hi,
Inlet value for outletInlet BC set the velocity value at those cells if U vector is entering domain, and viceversa for inletOutlet. This is what i learned searching theads' forum. I suppose, maybe i'm wrong, these BC have been developed to take into account recirculating effects at inlet & outlet. Have you tryed to set very low values for velocity at inlet & zeroGradient at outlet? i mean 0.001m/s so you're smoothing those effects. Changes something? |
1 Attachment(s)
Hello,
Thanks for your tips M.C. Finally I think I found a specification of BC's that may be the most suitable one for my case. At the very beggining I was trying to define the inletOutlet BC to U and here came my mistake. In my case I can't define U because this is the variable I don't have, I know that both inlet and outlet are at atmospherical pressure instead. Thus, I defined
I also tried some other options such as defining U at the inlet as pressureInletVelocity. However, I think that the way I do it in the end is more correct since air can get in and out of the domain at the inlet and the outlet. So far, this specification seems to make air behave more or less as expected. The only problem I found so far is that some cells at the inlet have a low value of temperature, something totally absurd since at the patch the temperature is fixed and hotter (more than say 25 K, sometimes even more) than in the cell center, in the attached pict you can notice it. The temperature should raise inside the chamber along the z axis since in the external patch I set up a fixed heat flux (100W/m²). In the picture you can see the geometry of my problem (Clarification: the inlet is the lower patch and the outlet is the upper one). Maybe it has something to do with the fact that I only tested this specification during only 500 seconds, which is, in my opinion, a too small period of time taking into account that the initial conditions are not very physical (fixed value of 311.15 K in the air region and 303.15 K at the adjacent solid region). I will try a longer run of say 50000 seconds to check what happens with the temperature at the cells in the inlet patch at the end of the run and I will report it here. If anyone thinks that this is not the best specification of BC's for my case and knows any other way that can better suit my needs, please, don't hesitate to let me know! I would be much grateful. Regards, Alex |
3 Attachment(s)
Dear foamers,
Finally I did manage to find a more proper specification for the BC's of my case. I changed the definition for T at the inlet as shown in the following list:
Changing the inlet (lower patch) specification for T I solve the problem of some cells adjacent to the patch having super low and unrealistic values of T. Now the T distribution at the inlet looks nice and realistic (attached you can see U and T distributions for the case of inletValue at the outlet -upper patch- equal to the inletValue at the inlet at t=501s). http://www.cfd-online.com/Forums/att...1&d=1425410917 http://www.cfd-online.com/Forums/att...2&d=1425410855 http://www.cfd-online.com/Forums/att...3&d=1425410866 At the outlet, though, both distributions are not as nice and smooth as they are in the inlet. My guess is that the problem comes from the need to define a value of T for the incoming flux. I tried to solve this problem by increasing the value of the inletValue at the outlet since T at the outlet is higher than it is at the inlet and I thought that it made sense to define a higher value of T for the incoming flux at the outlet. However, this approach does not solve my problem but it gets perhaps even worst. Another approach I tried in order to solve this issue at the outlet was to define the upper patch as zeroGradient. Using this approach I don't need to define any value of T for the incoming flux so when I first thought about this approach I thought that this was going to be the best approach to solve my case. It was not like that, I got the worst and more unphysical results instead. In the following posts I will post the results for both approaches so that you can notice what I talk about. |
3 Attachment(s)
Results obtained with an inletValue at the outlet patch 5ºC higher than in the inlet patch (t=501).
|
3 Attachment(s)
Results obtained with a zeroGradient condition for T at the outlet (t=51s).
http://www.cfd-online.com/Forums/att...1&d=1425413313 http://www.cfd-online.com/Forums/att...1&d=1425413313 http://www.cfd-online.com/Forums/att...1&d=1425413313 Note: No 0 is missing in the time, I had to manually stop the simulation after a lot of iterations because it was taking too long because of the U distribution that forced timeStep to be too small in order to keep Courant Number below 1. |
Now that the results have been shown I'd like to get some advice on what the best approach would be to solve my case. I don't know whether the first one I presented is the best approach or if there is another approach I haven't been able to find out that would give better results for my case. Any hint or advice will be very welcome and appreciated.
In case you need more info about my case to evaluate if I did something wrong, don't hesitate to ask! I only attached info about the inlet and the outlet because I think that the problem comes from their specification, but I may have specified wrong another patch or another thing that I may miss. Many thanks in advance. Best regards, Alex |
Quote:
I'm trying to set up the inletOutlet BC for the temperature. I did as follow: type inletOutlet; value $internalField; inletValue $internalField; or type inletOutlet; value 273; inletValue 573; but I get the folloeing error message: --> FOAM FATAL ERROR: request for surfaceScalarField phi from objectRegistry region0 failed available objects of type surfaceScalarField are 0() From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>] in file /home/ubuntu/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193. FOAM aborting Could you kindly hellp me with this issue? thanks! |
All times are GMT -4. The time now is 19:29. |