|
[Sponsors] |
turbulentHeatFluxTemperature doesn't work with buoyantBoussinesqPimpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 20, 2018, 16:28 |
turbulentHeatFluxTemperature doesn't work with buoyantBoussinesqPimpleFoam
|
#1 |
Member
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12 |
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 { floor /*{ type fixedValue; value uniform 300; // Original }*/ { type compressible::turbulentHeatFluxTemperature; heatSource flux; q uniform 10e5; value uniform 293.15; kappaMethod fluidThermo; kappa none; Qr none; } ceiling { type fixedValue; value uniform 300; } fixedWalls { type zeroGradient; } } Code:
Starting time loop Courant Number mean: 0 max: 0 Time = 2 PIMPLE: iteration 1 --> FOAM FATAL ERROR: Kappa defined to employ fluidThermo method, but thermo package not available From function Foam::tmp<Foam::Field<double> > Foam::temperatureCoupledBase::kappa(const scalarField&) const in file turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C at line 142. FOAM exiting Code:
case mtFluidThermo: { typedef compressible::turbulenceModel turbulenceModel; word turbName(turbulenceModel::propertiesName); if ( mesh.foundObject<turbulenceModel>(turbName) ) { const turbulenceModel& turbModel = mesh.lookupObject<turbulenceModel>(turbName); return turbModel.kappaEff(patchi); } else if (mesh.foundObject<fluidThermo>(basicThermo::dictName)) { const fluidThermo& thermo = mesh.lookupObject<fluidThermo>(basicThermo::dictName); return thermo.kappa(patchi); } else if (mesh.foundObject<basicThermo>(basicThermo::dictName)) { const basicThermo& thermo = mesh.lookupObject<basicThermo>(basicThermo::dictName); return thermo.kappa(patchi); } else { FatalErrorInFunction << "Kappa defined to employ " << KMethodTypeNames_[method_] << " method, but thermo package not available" << exit(FatalError); } break; } 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 |
|
July 21, 2018, 17:55 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
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 |
|
July 21, 2018, 19:57 |
|
#3 |
Member
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12 |
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 |
|
July 21, 2018, 21:03 |
|
#4 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
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 |
|
July 21, 2018, 21:29 |
|
#5 | |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 |
Quote:
|
||
July 22, 2018, 08:35 |
|
#6 |
Member
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12 |
Thanks, Caelan and Peter,
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 |
|
July 22, 2018, 11:05 |
|
#7 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
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 |
|
July 23, 2018, 16:48 |
|
#8 |
Member
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12 |
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 |
|
July 23, 2018, 17:43 |
|
#9 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
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 |
|
July 24, 2018, 07:17 |
|
#10 |
Member
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12 |
Thanks Caelan, I will try the fixedGradient for now. Yeru
|
|
December 2, 2018, 15:58 |
|
#11 |
New Member
priyesh kakka
Join Date: Jan 2018
Posts: 13
Rep Power: 8 |
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.
|
|
January 14, 2019, 09:50 |
|
#12 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
Quote:
So how can I really set the constant heat flux BC? Maybe kappaMethod:fluid is not suitable for my case.Thank you. |
||
January 14, 2019, 10:17 |
|
#13 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 |
Could you use something a bit more derivative like patch mass flow, temp etc and do energy balance?
|
|
January 14, 2019, 10:25 |
|
#14 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
I use (h*phi)out - (h*phi)int = q*s to check energy balance, but it is not correct. So I doubt that the actual q is not the same as the setting one and the result of using wallHeatFlux makes me more confused.
|
|
January 14, 2019, 13:15 |
|
#15 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
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 |
|
January 17, 2019, 23:47 |
|
#16 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
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. |
||
January 18, 2019, 00:26 |
|
#17 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
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 |
|
January 18, 2019, 03:56 |
|
#18 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
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? |
||
January 18, 2019, 17:19 |
|
#19 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
Are the runTime values from the end of your simulation? Re the energy balance is this a 2d simulation?
Caelan |
|
January 18, 2019, 22:31 |
|
#20 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
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. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
RP_Set_Integer does not work in parallel | 86lolo | Fluent UDF and Scheme Programming | 2 | July 3, 2014 12:37 |
Does CX_Interpret_String work in parallel? | 86lolo | Fluent UDF and Scheme Programming | 2 | June 30, 2014 05:36 |
Companies that lease software & hardware for cloud-based work? | Catthan | ANSYS | 0 | June 18, 2014 11:53 |
Why do the Plant library cases don't work? | Alumna | Phoenics | 6 | June 22, 2004 13:08 |
why my In-Form doesn't work? | green | Phoenics | 2 | May 27, 2004 22:03 |