# Sample case of simplified energy transport simulation for incompressible flow

 Register Blogs Members List Search Today's Posts Mark Forums Read

September 20, 2020, 08:42
Sample case of simplified energy transport simulation for incompressible flow
#1
Senior Member

Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 15
I've attached a simplified energy transport simulation case for incompressible flow with the following functionality in OpenFOAM v2006:
• energyTransport: to solve a simplified energy transport equation
• readFields: to read kappa value to be able to use externalWallHeatFluxTemperature boundary condition
• externalWallHeatFluxTemperature: to set heat flux boundary condition

Settings of readFields and energyTransport function objects in system/controlDict
Code:
```    readKappaFields
{
libs        (fieldFunctionObjects);

fields      (kappaField);

}

energyTransport
{
type            energyTransport;
libs             (solverFunctionObjects);

enabled         true;
writeControl    outputTime;
writeInterval   1;

field           T;
phi             phi;

// Thermal properties
Cp              Cp    [J/kg/K]  1e3;
kappa           kappa [W/m/K]   0.0257;
rhoInf          rho   [kg/m^3]  1.2;

write           true;

fvOptions
{
}
}```
Settings of heat flux boundary condition(q=500[W/m^2]) in 0.orig/T
Code:
```    hole
{
type            externalWallHeatFluxTemperature;
mode            flux;
q               uniform 500;
kappaMethod     lookup;
kappa           kappaField;
value           uniform 300;
}```
where kappa value is read from 0.orig/kappaField
Code:
```/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       volScalarField;
object      kappaField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 1 -3 -1 0 0 0];

internalField   uniform 0.0257;

boundaryField
{
inlet
{
type             fixedValue;
value            \$internalField;
}

outlet
{
type             fixedValue;
value            \$internalField;
}

up
{
type            symmetry;
}

hole
{
type             fixedValue;
value            \$internalField;
}

frontAndBack
{
type            empty;
}
}```
Hope this helps,
Fumiya
Attached Images
 T.png (56.7 KB, 5 views)
Attached Files
 ellipsekkLOmega_energyTransport.zip (19.4 KB, 0 views)
__________________
[Personal]