Fixed heat flux BC in buoyantPimpleFoam
Hi,
I am running buoyantPimpleFoam with a builtin boundary condition for heat transfer based on heat transfer coefficient (aphaWall) and outside temperature (Tinf) like this: window { type wallHeatTransfer; alphaWall uniform 1.5; Tinf uniform 263; value uniform 293.; } This work perfectly. Now I want to impose a fixed heat flux ( eg 50 W/sq m) on a patch (radiator). How do I do this in the solver? Is there a builtin BC condition for this. I know that the solver demands boundary conditions for temperature but the enthalpy is used for solving the energy equation. Can anybody give me a hint? Regards Bjorn 
Hi!
Check out this BC (for RAS turbulence models): src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature. It applies for the heated boundary patch as a temperature boundary condition like that: Code:
heatedPatch Aram 
Hi Aram!
It works like a charm! Thank you very much rgds Bjorn 
Hi Aram,
One thing that is unclear about the BC: is power q given in Watts or Watts per sq m for the patch in question? rgds Bjorn 
hi bjorn!
see src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C lines 176  202. if you set Code:
heatSource power; Code:
heatSource flux; cheers! aram 
Hi Aram,
Thanks again! This clarified the situation rgds Bjorn 
Dear Aram,
In the calculation of gradient() [ turbulentHeatFluxTemperatureFvPatchScalarField.C, lines 180 and 185 ], effective thermal conductivity is calculated as (Cp*alphaEff). I guess it should have been (Cp*alphaEff.Rho). 
Please read (Cp*alphaEff.Rho) as (Cp*alphaEff*Rho)

hi!
alpha = a*rho = k/cp (kg/s/m) denotes the effective enthalpy (energy) diffusivity, whereas "a" (m^2/s) stands for the thermal diffusivity. hence, conductivity k = cp*alpha. cheers, aram 
Code:
heatedPatch 
Quote:
Code:
value uniform 293.0; Aram 
Setting a variable heat flux for laminar flow
Hello,
I´m relatively new in applying OpenFoam. My question is if anyone can give me an advice where I have to search if I want to apply a heat flux to walls in case of laminar flows (solver rhoSimpleFoam). I`d like to have access to all wall cells and want to set a different heat flux for every cell according to values which I get from somewhere else (measured or calculated data). I think an approach like using src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature would be right. But I can use this only for turbulent flows ? Or do you think that I could use a RAScode for laminar flow and replace the values Ap, Cpp, alphaEffp in such a manner that I get the desired heat flux? Thanks in advance for any information Matthias 
Nearest matching BC for your requirement is timeVaryingMappedFixedValue. You have to tweak around slightly to make it timeVaryingMappedFixedHeatFlux. in base class inherit fixedGradient instead fixedValue.
Quote:

Hi Chandramurthy,
many thanks for your reply. I got also an other advice from Aran (see above). He wrote me, that I should govern the laminar heat flux with the temperature gradient (Fourier's law) on the respective patch (fixedGradient). I`ll search in both ways ... but ... as I`m a beginner it will take a lot of time to succeed. If I will be successful I will post the result in the forum. Greetings Matthias 
It appears that the turbulentHeatFluxTemperature only works for heat gains and not heat losses, is that correct? Or am I doing something wrong? I just tried making the "q" value a negative number, but I get a heat gain. Is there a way to make this work or am I stuck with temperature gradients?

Hi Kevin,
it should work in both ways (for positive and negative gradient). This would be physically and numerically right. Maybe, the code uses somewhere only the absolute value of and nobody tried it before, or you made something wrong. The flux is not independent from your coordinate system ! Be sure that you "think" in the right direction. Greetings Matthias 
Matthais,
Sorry, I forgot that I never got back to you. You are correct that this BC handles negative heat transfer. At one point, I did see what appeared to be heat gain, but I think somehow my turbulence model was causing it to create pockets of heat (and a heat loss overall). Thanks for your help. 
It looks like this boundary condition has changed in ver 2.0. I now get the error "Keyword K is undefined in [my boundary condition]" Anyone know what that means?

Quote:
Code:
hotWall Aram 
Thanks. I didn't realize there were examples in the code for these things.
Issue now is that it's saying "KName is undefined." As you showed, that's not listed in the example. I see somewhere online that it's "CHARACTER*(*) array of species names," but I don't know what that means :( 
All times are GMT 4. The time now is 16:21. 