CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

How does lumpedmasswalltemperature compute temperature change?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Tobermory
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2024, 08:23
Default How does lumpedmasswalltemperature compute temperature change?
  #1
New Member
 
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2
rl3418 is on a distinguished road
Hi, I am new to OpenFOAM and I’m trying to simulate convective heat transfer between a metal wall and a fluid.

I’m using the lumpedMassWallTemperature boundary condition, which takes a heat capacity value but does not explicitly define a heat transfer coefficient. I’ve disabled conduction by setting kappa to none, yet I still observe heat transfer, which I assume is via convection. Could someone clarify how lumpedMassWallTemperature computes heat flux and whether convection is handled automatically, even without specifying a heat transfer coefficient? Thank you!
rl3418 is offline   Reply With Quote

Old   September 27, 2024, 18:33
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14
Tobermory will become famous soon enough
A good place to start is the code for the lumpedMassWallTemperature class (https://www.openfoam.com/documentati...8H_source.html).

The meat of the coding is in the updateCoeffs() function (like most boundary classes):
Code:
    const scalarField q(tkappa.ref()*snGrad());
    // Total heat in or out of the wall
    const scalar Q = gSum(q*magSf);
    Tp += -(Q/mass_/Cp_)*deltaT;
    refGrad() = 0.0;
    refValue() = Tp;
    valueFraction() = 1.0;
In other words, the code calculates the heat flux into the patch, from the temperature gradient normal to the patch and the kappa value, and uses this to update the lumped mass temperature for the patch. Is it conduction or convection? Depends how you interpret the imposed kappa value.
rl3418 likes this.
Tobermory is offline   Reply With Quote

Old   September 30, 2024, 06:44
Default
  #3
New Member
 
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2
rl3418 is on a distinguished road
Thanks for the reply. Considering that Q=-k(T_s-T_ambient)/L=h(T_ambient-T_s), I guess the thermal conductivity could be approximated by the convective heat transfer as k=h*metal_thickness.

One thing I don't understand though is what's the value of thermal conductivity used for the calculation. I guess lumpedMassWallTemperature takes in a kappa value measured in watts per meter per Kelvin (W/m·K). However, in the hot room tutorial kappa is set to none, and the heat transfer is still observed. I'm not sure what is the kappa value used in that case. (https://develop.openfoam.com/Develop...tRoom/0.orig/T)
rl3418 is offline   Reply With Quote

Old   September 30, 2024, 08:33
Default
  #4
New Member
 
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2
rl3418 is on a distinguished road
functions
{
htc
{
type heatTransferCoeff;
libs (fieldFunctionObjects);
field T;
writeControl writeTime;
writeInterval 1;
htcModel fixedReferenceTemperature;
patches (cell1 wall);
TRef 330;
}

Seems that the hot room example defined a heatTransferCoeff in controlDict. Not sure how this works.
rl3418 is offline   Reply With Quote

Old   September 30, 2024, 11:14
Default
  #5
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14
Tobermory will become famous soon enough
It is a little confusing, I have to agree, but the code is working in a different way to how you imagine it. The lumpedMassWallTemperature boundary condition is simply calculating the wall patch temperature based on a lumped capacitance model for the heat trabnsfer into/out of the wall.

Let's start with the patch definition in 0/T:
Code:
    ceiling
    {
        type            lumpedMassWallTemperature;
        kappaMethod     fluidThermo;
        kappa           none;
        mass            1000;
        Cp              4100;
        value           uniform 300.0;
    }
An entry of "none" against kappa does not mean that kappa is zero (ie no heat transfer), it just means that no value is supplied ... because it isn't needed. The line above says that the kappMethod is fluidThermo. To understand what this means, look in temperatureCoupledBase.H (https://www.openfoam.com/documentati...8H_source.html), from which the lumpedMassWallTemperatureFvPatchScalarField is derived. In the header it says:

Code:
    The thermal conductivity \c kappa may be obtained by the following methods:
      - 'lookup' : lookup volScalarField (or volSymmTensorField) with name defined by 'kappa'
      - 'fluidThermo' : use fluidThermo and default compressible::turbulenceModel to calculate kappa
      - 'solidThermo' : use solidThermo kappa()
      - 'directionalSolidThermo': uses look up for volSymmTensorField for transformed kappa vector. Field name definable in 'alphaAni', named 'Anialpha' in solid solver by default
      - 'function' : kappa, alpha directly specified as Function1
      - 'phaseSystem' : used for multiphase thermos
The tutorial case uses fluidThermo, i.e. is getting the value of kappa from the turbulence model (wall function). That's why you don't need to supply it - it's calculated as part of the simulation from the turbulence etc.

The function you spotted in the controlDict is a functionObject, i.e. a postProcessing tool - check out: https://www.openfoam.com/documentati...f.html#details. This is just a tool to calculate HTCs during or after the run, based on the flux, the wall temperature ans a user supplied reference temperature. It has no effect on the solution.

Hope that helps.
rl3418 likes this.
Tobermory is offline   Reply With Quote

Old   September 30, 2024, 11:16
Default
  #6
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14
Tobermory will become famous soon enough
Quote:
Originally Posted by Tobermory View Post
Is it conduction or convection? Depends how you interpret the imposed kappa value.
For the hot room case, with air next to the wall boundary, kappa is clearly coming from convection ... don't know what I was thinking when I wrote the above!
Tobermory is offline   Reply With Quote

Old   September 30, 2024, 12:47
Default
  #7
New Member
 
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2
rl3418 is on a distinguished road
Great, thanks for the clarification.
rl3418 is offline   Reply With Quote

Reply

Tags
convection heat flux, convective coefficient, heat boundary condition


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PEMFC tutorial case problem Suleyman41 FLUENT 2 July 15, 2023 12:16
Can I change the particle emissivity affected by diameter and temperature? Happiness Fluent UDF and Scheme Programming 0 March 14, 2022 08:10
temperature change wjchoi OpenFOAM Running, Solving & CFD 0 February 24, 2022 03:36
UDF to change heat transfer coefficient with wall temperature emmkell Fluent UDF and Scheme Programming 18 August 7, 2018 04:44
To change temperature in mass flow inlet boundary condition per iteration ajinkya201991 FLUENT 1 July 11, 2014 12:29


All times are GMT -4. The time now is 12:42.