# Difference between revisions of "Tut Small Study on Conjugate Heat Transfer"

(→Download) |
AntonChupin (Talk | contribs) (why?) |
||

Line 1: | Line 1: | ||

+ | == heatTransfer == | ||

+ | {{VersionInfo}}{{Version1.3}} | ||

+ | <p> | ||

+ | This page presents a small study performed on a particular conjugate heat transfer problem. | ||

+ | There have been considered two different approaches: the complete solution, where a solid and a fluid domain are taken into account; the approximate solution, where only the fluid domain is discretised, while the solid domain is accounted through a special type of boundary condition. | ||

+ | The results consist in an implementation of a solver for the first approach, and an implementation of a new boundary condition for the second approach. | ||

+ | Both ways proved to be successful, though the complete solution cannot be parallelized since the solver (not the library) lacks this feature for the moment. However, a successful parallel computation has been performed using the second approach. | ||

+ | </p> | ||

+ | === Problem setup === | ||

+ | The problem studied is a hot air flow injected into a container coupled with the heat transfer from the flow to and into the container walls. Numerically, at the end, this will be solved in a Large Eddy Simulation framework, with a one equation transport model for the subgrid turbulent kinetic energy. | ||

+ | |||

+ | === Complete Solution === | ||

+ | The first approach was to take into account both domains, and to solve two different sets of equations: | ||

+ | <p> | ||

+ | ==== Compressible fluid flow==== | ||

+ | </p> | ||

+ | <p> | ||

+ | <math> | ||

+ | \frac{\partial\rho}{\partial t}+\nabla\cdot\rho U=0 | ||

+ | </math> | ||

+ | </p> | ||

+ | <p> | ||

+ | <math> | ||

+ | \frac{\partial\rho U}{\partial t}+\nabla\cdot\phi U-\nabla\cdot\mu\nabla U=-\nabla p | ||

+ | </math> | ||

+ | </p> | ||

+ | <p> | ||

+ | <math> | ||

+ | \frac{\partial\rho h}{\partial t}+\nabla\cdot\phi h=0 | ||

+ | </math> | ||

+ | </p> | ||

+ | |||

+ | ==== Heat conduction in the solid domain==== | ||

+ | <p> | ||

+ | <math> | ||

+ | \frac{\partial T}{\partial t}+k\cdot\Delta T=0 | ||

+ | </math> | ||

+ | </p> | ||

+ | <p> | ||

+ | The written solver is called ''conjHeat'', and is based on two other existing OpenFOAM solvers, namely ''rhoTurbFoam'' and ''laplacianFoam'' (still I have to mention this is a slightly modified version from the one written by Daniele Panara [[http://openfoam.cfd-online.com/cgi-bin/forum/show.cgi?tpc=1&post=9566#POST9566| Heat transfer with solid elements (conduction)]]). The sources are accesible through the following link: [[Media:conjHeat.tgz| file sources]]. | ||

+ | The test case consists in a solid can (see Figure 1b), in which a hot fluid (700 K) is injected with 0.1m/s through a small area (green face in Figure 1). The exterior wall surface of the can is kept at a constant temperature of 300 K. | ||

+ | [[Image:ttt1.png|thumb|Figure 1: Solid and Fluid Domains]] | ||

+ | </p> | ||

+ | <p> | ||

+ | The case considered here [[Media:2regions.tgz|case files]] is laminar so no turbulence models or subgrid scale models are involved, however the solver is able to compute turbulent flows too (RANS). Thus, the initial values needed to be set are: temperature, velocity, and pressure. | ||

+ | |||

+ | ==== Initial and Boundary Conditions ==== | ||

+ | For an easier localization, the boundaries are shown in Figure 2:[[Image:complete_domain_bc.png|thumb|Figure 2: Boundary Conditions Sketch]] | ||

+ | </p> | ||

+ | <p> | ||

+ | The temperature conditions for the fluid domain are set as following: a uniform internal temperature field is set at 700 K as initial value inside the fluid domain; a fixed value of 700 K is set for the fluid interface boundary; temperature at inlet is kept constant at 700 K; at the outlet a zero gradient boundary condition is set for the temperature. | ||

+ | In the solid region, the following temperature boundary conditions are set: 600 K uniform internal field as initial condition; 300 K at the walls; zero temperature gradient at the solid surface. | ||

+ | The velocity conditions are set only for the fluid domain: a uniform internal velocity field is set at (0, 0, 0.1) m/s as initial value; 0 m/s at the fluid interface; 0.1 m/s at the inlet; zero gradient at the outlet | ||

+ | The pressure conditions are set also only for the fluid domain: a uniform internal pressure field is set at 100000 Pa; zero gradient at the fluid interface; zero gradient at inlet; 99990 Pa at outlet. | ||

+ | The fluid domain is considered to be filled with air, while the solid domain has a thermal conductivity of 202.5 kg*m/s3/K and a thermal diffusivity of 2.407e-5 m2/s. | ||

+ | </p> | ||

+ | |||

+ | ==== Results for the Two Regions Case==== | ||

+ | The case was computed for 20 seconds of flow time, and the results are presented in Figure 3. | ||

+ | [[Image:ttt2.png|thumb|Figure 3: Temperature and Velocity Fields]] | ||

+ | Although the case is laminar, the velocity field has not reached yet a stationary state. | ||

+ | Figure 3 left, shows the temperature distribution in the whole field (solid and fluid). It can be noticed a smooth variation at the interface between the solid and fluid domain, represented with a black line. The inlet velocity vectors are shown too. | ||

+ | Figure 3 right, is a representation of the velocity field in the fluid domain and the temperature field in the solid domain. Although the temperature field is more evenly distributed, the velocity is highly unsteady. | ||

+ | |||

+ | ===Pseudo-Heat Transfer=== | ||

+ | The second approach was to consider only the influence of the solid domain on the fluid one. This is aquired through a special thermal boundary condition, where a one dimensional heat equation is solved: | ||

+ | <p> | ||

+ | <math> | ||

+ | \frac{\partial T}{\partial t}+k\cdot\frac{\partial^2 T}{\partial n^2}=0 | ||

+ | </math> | ||

+ | </p> | ||

+ | where n is the wall normal direction. | ||

+ | <p> | ||

+ | An existing solver ''rhoTurbFoam'' was modified from URANS to LES solution type, and called ''pseudoConjHeat''. A new boundary condition namely ''heatFluxFixedValue'' was implemented for this solver, which computes a one dimensional heat equation. The source files can be downloaded from here: [[Media:pseudoConjHeat.tgz|file sources]]. | ||

+ | The test case consists of a fluid cylinder, filled with hot air (700K), in which a colder air stream (400K) is injected with 0.1 m/s through a small area (green face in Figure 4). | ||

+ | [[Image:domain.png|thumb|Figure 4: Computational Domain]] | ||

+ | The ''heatFluxFixedValue'' simulates the wraping of the fluid domain with a solid wall of 1mm thickness. The exterior surface of the solid wall is kept at a constant temperature of 600K. | ||

+ | </p> | ||

+ | ====Initial and Boundary Conditions==== | ||

+ | Disregarding the solid domain and its associated boundaries, the name of each boundary is the same with those specified in Figure 2. | ||

+ | The turbulence kinetic energy conditions are set as following: uniform initial field of 0 m2/s2; 0 m2/s2 at the fluid interface; 2e-5 m2/s2 at the inlet, and 0 m2/s2 at the outlet. | ||

+ | The apparent sub grid scale turbulence viscosity conditions are set as following: 0 initial value inside the domain; zero gradient for the rest of boundaries. | ||

+ | The temperature conditions are set as following: 700 K initial temperature distribution; at the fluid interface Tin = 600 K, Tmid = 700 K and Tout = 700 K. Together with the temperature, few other thermal properties are specified at the fluid interface boundary: | ||

+ | *k_solid 0.05; /*thermal diffusivity of the solid material*/ | ||

+ | *rho_solid 0.021; /*density of the solid material*/ | ||

+ | *c_solid 1700; /*heat capacity of the solid material*/ | ||

+ | *dx_solid 0.001; /*thickness of the virtual wall*/ | ||

+ | Short descriptions for the new boundary parameters are presented in the following sketch (Figure 5). | ||

+ | [[Image:heatFluxFixedValue.png|thumb|Figure 5: Virtual Wall]] | ||

+ | The temperature at the inlet has a value of 400 K. At the outlet, a zero temperature gradient is considered. | ||

+ | The pressure conditions are set as following: constant internal distribution of 100000 Pa as initial condition; zero gradient at the fluid interface; zero gradient at the inlet, and 99990 Pa at the outlet. | ||

+ | The velocity conditions are specified in the following: constant internal distribution of (0, 0, -0.1) m/s as initial condition; 0 m/s at the fluid interface; 0.1 m/s at the inlet, and zero gradient at the outlet. | ||

+ | The fluid domain is considered to be air. | ||

+ | The considered case is turbulent, and consequently a one equation SGS closure model is used. All the case files are accesible here: [[Media:small_geometry.tgz|case files]] | ||

+ | |||

+ | ====Results for the Pseudo Conjugate Heat Transfer Case==== | ||

+ | The case was run for 15s, both in serial and parallel, with the same results. | ||

+ | The instantaneous temperature distribution and the corresponding velocity distribution are displayed in Figure 6. | ||

+ | [[Image:temp_vel.png|thumb|Figure 6: Temperature and Velocity Fields]] | ||

+ | Both fields are highly unsteady, which is a characteristic of turbulent flows. As expected, although the outside of the virtual solid wall is kept at a constant temperature of 600K, the interface between the virtual domain and the fluid domain has variations in temperature. | ||

+ | |||

+ | ==Download== | ||

+ | <p> | ||

+ | The sources of the complete approach solver: [[http://openfoamwiki.net/images/9/99/ConjHeat.tgz conjHeat - solver]] | ||

+ | </p> | ||

+ | <p> | ||

+ | The asociated case files: [[http://openfoamwiki.net/images/3/3d/2regions.tgz conjHeat - case files]] | ||

+ | </p> | ||

+ | <p> | ||

+ | The sources for the second approach (integrating a one dimensional heat equation on a virtual wall) can be downloaded here: | ||

+ | [[http://openfoamwiki.net/images/d/dd/PseudoConjHeat.tgz pseudoConjHeat - solver]] | ||

+ | </p> | ||

+ | The case files for this solver: [[http://openfoamwiki.net/images/2/24/Small_geometry.tgz pseudoConjHeat - case files]] | ||

+ | |||

+ | [[Category:Heat transfer|*]] |

## Revision as of 13:14, 21 October 2013

## 1 heatTransfer

This page presents a small study performed on a particular conjugate heat transfer problem. There have been considered two different approaches: the complete solution, where a solid and a fluid domain are taken into account; the approximate solution, where only the fluid domain is discretised, while the solid domain is accounted through a special type of boundary condition. The results consist in an implementation of a solver for the first approach, and an implementation of a new boundary condition for the second approach. Both ways proved to be successful, though the complete solution cannot be parallelized since the solver (not the library) lacks this feature for the moment. However, a successful parallel computation has been performed using the second approach.

### 1.1 Problem setup

The problem studied is a hot air flow injected into a container coupled with the heat transfer from the flow to and into the container walls. Numerically, at the end, this will be solved in a Large Eddy Simulation framework, with a one equation transport model for the subgrid turbulent kinetic energy.

### 1.2 Complete Solution

The first approach was to take into account both domains, and to solve two different sets of equations:

#### 1.2.1 Compressible fluid flow

#### 1.2.2 Heat conduction in the solid domain

The written solver is called *conjHeat*, and is based on two other existing OpenFOAM solvers, namely *rhoTurbFoam* and *laplacianFoam* (still I have to mention this is a slightly modified version from the one written by Daniele Panara [Heat transfer with solid elements (conduction)]). The sources are accesible through the following link: file sources.
The test case consists in a solid can (see Figure 1b), in which a hot fluid (700 K) is injected with 0.1m/s through a small area (green face in Figure 1). The exterior wall surface of the can is kept at a constant temperature of 300 K.

The case considered here case files is laminar so no turbulence models or subgrid scale models are involved, however the solver is able to compute turbulent flows too (RANS). Thus, the initial values needed to be set are: temperature, velocity, and pressure.

#### 1.2.3 Initial and Boundary Conditions

For an easier localization, the boundaries are shown in Figure 2:The temperature conditions for the fluid domain are set as following: a uniform internal temperature field is set at 700 K as initial value inside the fluid domain; a fixed value of 700 K is set for the fluid interface boundary; temperature at inlet is kept constant at 700 K; at the outlet a zero gradient boundary condition is set for the temperature. In the solid region, the following temperature boundary conditions are set: 600 K uniform internal field as initial condition; 300 K at the walls; zero temperature gradient at the solid surface. The velocity conditions are set only for the fluid domain: a uniform internal velocity field is set at (0, 0, 0.1) m/s as initial value; 0 m/s at the fluid interface; 0.1 m/s at the inlet; zero gradient at the outlet The pressure conditions are set also only for the fluid domain: a uniform internal pressure field is set at 100000 Pa; zero gradient at the fluid interface; zero gradient at inlet; 99990 Pa at outlet. The fluid domain is considered to be filled with air, while the solid domain has a thermal conductivity of 202.5 kg*m/s3/K and a thermal diffusivity of 2.407e-5 m2/s.

#### 1.2.4 Results for the Two Regions Case

The case was computed for 20 seconds of flow time, and the results are presented in Figure 3.

Although the case is laminar, the velocity field has not reached yet a stationary state. Figure 3 left, shows the temperature distribution in the whole field (solid and fluid). It can be noticed a smooth variation at the interface between the solid and fluid domain, represented with a black line. The inlet velocity vectors are shown too. Figure 3 right, is a representation of the velocity field in the fluid domain and the temperature field in the solid domain. Although the temperature field is more evenly distributed, the velocity is highly unsteady.

### 1.3 Pseudo-Heat Transfer

The second approach was to consider only the influence of the solid domain on the fluid one. This is aquired through a special thermal boundary condition, where a one dimensional heat equation is solved:

where n is the wall normal direction.

An existing solver *rhoTurbFoam* was modified from URANS to LES solution type, and called *pseudoConjHeat*. A new boundary condition namely *heatFluxFixedValue* was implemented for this solver, which computes a one dimensional heat equation. The source files can be downloaded from here: file sources.
The test case consists of a fluid cylinder, filled with hot air (700K), in which a colder air stream (400K) is injected with 0.1 m/s through a small area (green face in Figure 4).

The *heatFluxFixedValue* simulates the wraping of the fluid domain with a solid wall of 1mm thickness. The exterior surface of the solid wall is kept at a constant temperature of 600K.

#### 1.3.1 Initial and Boundary Conditions

Disregarding the solid domain and its associated boundaries, the name of each boundary is the same with those specified in Figure 2. The turbulence kinetic energy conditions are set as following: uniform initial field of 0 m2/s2; 0 m2/s2 at the fluid interface; 2e-5 m2/s2 at the inlet, and 0 m2/s2 at the outlet. The apparent sub grid scale turbulence viscosity conditions are set as following: 0 initial value inside the domain; zero gradient for the rest of boundaries. The temperature conditions are set as following: 700 K initial temperature distribution; at the fluid interface Tin = 600 K, Tmid = 700 K and Tout = 700 K. Together with the temperature, few other thermal properties are specified at the fluid interface boundary:

- k_solid 0.05; /*thermal diffusivity of the solid material*/
- rho_solid 0.021; /*density of the solid material*/
- c_solid 1700; /*heat capacity of the solid material*/
- dx_solid 0.001; /*thickness of the virtual wall*/

Short descriptions for the new boundary parameters are presented in the following sketch (Figure 5).

The temperature at the inlet has a value of 400 K. At the outlet, a zero temperature gradient is considered. The pressure conditions are set as following: constant internal distribution of 100000 Pa as initial condition; zero gradient at the fluid interface; zero gradient at the inlet, and 99990 Pa at the outlet. The velocity conditions are specified in the following: constant internal distribution of (0, 0, -0.1) m/s as initial condition; 0 m/s at the fluid interface; 0.1 m/s at the inlet, and zero gradient at the outlet. The fluid domain is considered to be air. The considered case is turbulent, and consequently a one equation SGS closure model is used. All the case files are accesible here: case files

#### 1.3.2 Results for the Pseudo Conjugate Heat Transfer Case

The case was run for 15s, both in serial and parallel, with the same results. The instantaneous temperature distribution and the corresponding velocity distribution are displayed in Figure 6.

Both fields are highly unsteady, which is a characteristic of turbulent flows. As expected, although the outside of the virtual solid wall is kept at a constant temperature of 600K, the interface between the virtual domain and the fluid domain has variations in temperature.

## 2 Download

The sources of the complete approach solver: [conjHeat - solver]

The asociated case files: [conjHeat - case files]

The sources for the second approach (integrating a one dimensional heat equation on a virtual wall) can be downloaded here: [pseudoConjHeat - solver]

The case files for this solver: [pseudoConjHeat - case files]