fumiya |
September 20, 2020 07:42 |
Sample case of simplified energy transport simulation for incompressible flow
2 Attachment(s)
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
{
type readFields;
libs (fieldFunctionObjects);
fields (kappaField);
readOnStart true;
}
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
|