turbulentHeatFluxTemperature doesn't work with buoyantBoussinesqPimpleFoam
Dear all,
I am using OF 1612 on Centos 7, it was installed by following the tutorial on OFWiki. I am currently modifying the hotRoom tutorial case under solver buoyantBoussinesqPimpleFoam to specify a constant heat flux at the floor. The modified BC for T is as below: Code:
boundaryField Code:
Starting time loop Code:
case mtFluidThermo: So can anybody give me some ideas on where has gone wrong, or do you have any idea how to apply a constant heat flux at the wall. Many thanks, Yeru |
From the error message it looks like the bc would pull kappa from thermo. However, the boussinesq class of solvers does not actually create thermo. Additionally an incompressible turbulence model is created. So I'm not sure that you'll be able to use this bc with buoyantBoussinesqPimpleFoam.
Caelan |
Hi Caelan,
Even though the solver doesn't create thermo, from the first few lines of source code of temperatureCoupledBase.C as shown in my thread, it should automatically evaluate kappa = kappaEff. I think your second point is very valid, as this BC may only work for compressible solver. So if I can't use this BC with buoyantBoussinesqPimpleFoam, do you know which BC can I use to set a constant heat flux? Kind regards, Yeru |
I'd mentioned the thermo bit because the error mentioned thermo -- perhaps it didn't try to get kappaEff from the turbulence model because it's not a compressible one?
In any case, if it's a constant heat flux you can compute the associated temperature gradient using q = k*A*dt/dx. Caelan |
Quote:
|
Quote:
Does is mean I just need to use fixedGradient at the wall for the temperature? Can you tell me which kappa I should use in the calculation, is it the the thermal diffusivity of the fluid? Or the kappaEff calcuated incorporating the turbulence? Many thanks, Yeru |
Yes, this would mean that you could use a fixed temperature gradient. This is Fourier's Law (https://en.wikipedia.org/wiki/Thermal_conduction), where k is the fluid's thermal conductivity in this case. However, now that I think about it, this would only be appropriate if you are resolving the boundary layer (where conduction is the dominant mode of heat transfer).
Caelan |
Hey Caelan,
Yes, I am solving the wall as I am running LES without wall modelling. I suppose my dT/dx should be negative as the heat flux is from the wall to the internal fluid? Also, a silly question, I suppose conduction, based on Fourier's Law, is normally governing the heat transfer in the solid, why it is applicable here? Yeru |
I suppose it is often associated with solids, but on a macro scale conduction through a gas is still the same -- the thermal conductivity is just a lot lower. I agree that the gradient will be negative. This is the first thing I thought of to approximate a gradient -- If any one else has a better idea I'd invite them to step in.
Caelan |
Thanks Caelan, I will try the fixedGradient for now. Yeru
|
Hi,Yeru did you get the correct constant wall heat flux using the k of fluid? also what can we use to calculate wall heat flux for a turbulent case here(for wall at constant temp), my alphat file is not genrating number = nut/prt . am i missing something. i am running buoyantBoussinesqPimpleFoam for LES, and wall is fully resolved so i have not used any wall functions here.
|
Quote:
So how can I really set the constant heat flux BC? Maybe kappaMethod:fluid is not suitable for my case.Thank you. |
Could you use something a bit more derivative like patch mass flow, temp etc and do energy balance?
|
Quote:
|
Let's back up. What solver are you using and what is your problem. Where are you checking the heat flux/energy balance? To your question, yes kappa would be the thermal conductivity of your fluid. In the absence of radiation (are you including it?), conduction would be the dominant mode of heat transfer in the boundary layer so setting a temperature gradient sounds like a good way to set a constant heat flux (how much is kappa of your fluid actually changing?).
Caelan |
Quote:
I am using buoyantSimpleFoam to solve the heat tranfer of supercritical CO2 flows in a vertical pipe. The walls have 3 parts: the start and the end are isothermo walls and the middle wall is given constant heat flux q. I use tabular method to get these thermoproperties e.g. kappa rho Cp H... so that kappa is changing with T and P and is read from tabulated tables. I want to check the heat flux on the wall after simulation. I found the utility:wallHeatFlux gives different values in post-Processing and on-running, whcih makes me very confused. Then I want to check the energy balance between INLET and OUTLET. So I calculated (h*phi)out - (h*phi)in and q*s and found that they are not equal. The thermoproperties close to critical point of CO2 is changing rapidly.From 298.15K to 310K, kappa is changing from 0.0888 to 0.076. I am using externalWallHeatFluxTemperature BC and not sure if kappaMethod:fluidThermo is suitable for my case. I have no idea about these questions above. Any hint is highly appreciated. |
Fair warning -- I have not worked with supercritical fluids before. However, I might be able to address a few points :
- for the wallHeatFlux utility : how much different are the values? I am not sure why they would be different, but a quick scan of the code suggests they shouldn't be. - for the energy balance : I'd recommend writing down energy terms at each boundary and making sure everything is all accounted for. Caelan |
Quote:
If I use postProcess -func wallHeatFlux, I will get : min/max/integ(WALL) = 21240.6, 65211.9, 28.4312. 28.4312W >> 16.83W. If I use #include wallHeatFlux to get value when running. It presents :WALL 1.725975e+04 3.073739e+04 1.693862e+01. 16.93W is closer to 16.83W. So I am confused about the different results. In my case, there are inlet and outlet and two interiors. I am not sure if openfoam will recognize interior and I think it will have no influence. So (h*phi)out - (h*phi)in = q*s is the right method to check energy terms? are there other terms which may be ignored easily? |
Are the runTime values from the end of your simulation? Re the energy balance is this a 2d simulation?
Caelan |
Quote:
My case is 3D simulation. It is a vertical pipe with constant heat flux on the middle wall and the start and end of the wall are isoThermo walls. |
All times are GMT -4. The time now is 00:54. |