|
[Sponsors] |
How does lumpedmasswalltemperature compute temperature change? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 27, 2024, 08:23 |
How does lumpedmasswalltemperature compute temperature change?
|
#1 |
New Member
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2 |
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! |
|
September 27, 2024, 18:33 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14 |
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; |
|
September 30, 2024, 06:44 |
|
#3 |
New Member
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2 |
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) |
|
September 30, 2024, 08:33 |
|
#4 |
New Member
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2 |
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. |
|
September 30, 2024, 11:14 |
|
#5 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14 |
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; } 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 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. |
|
September 30, 2024, 11:16 |
|
#6 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14 |
||
September 30, 2024, 12:47 |
|
#7 |
New Member
Runfeng
Join Date: Sep 2024
Posts: 13
Rep Power: 2 |
Great, thanks for the clarification.
|
|
Tags |
convection heat flux, convective coefficient, heat boundary condition |
|
|
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 |