Skip to content

Commit e2543fd

Browse files
committed
Move Inc_Heated_Cylinders tutorial file to multiphysics/steady_cht.
1 parent 53e9d5a commit e2543fd

File tree

1 file changed

+203
-0
lines changed

1 file changed

+203
-0
lines changed
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
---
2+
title: Heated Cylinders with Conjugate Heat Transfer
3+
permalink: /tutorials/Inc_Heated_Cylinders/
4+
written_by: oleburghardt
5+
for_version: 7.0.0
6+
revised_by: talbring
7+
revision_date: 2020-03-03
8+
revised_version: 7.0.2
9+
solver: MULTIPHYSICS
10+
requires: SU2_CFD
11+
complexity: advanced
12+
follows:
13+
---
14+
15+
![Coupled_CHT](../../tutorials_files/incompressible_flow/Inc_Heated_Cylinders/images/coupled_cht.png)
16+
17+
## Goals
18+
19+
This tutorial builds on the [laminar flat plate with heat transfer tutorial](/tutorials/Inc_Laminar_Flat_Plate/) where incompressible solver with solution of the energy equation is introduced.
20+
The following capabilities of SU2 will be showcased in this tutorial:
21+
22+
- Setting up a multiphysics simulation with Conjugate Heat Transfer (CHT) interfaces between zones
23+
- Solution of the energy equation in solids
24+
- Steady, 2D, laminar, incompressible, Navier-Stokes equations
25+
- Discrete adjoint solutions and sensitivities for heat-related objective functions
26+
27+
The intent of this tutorial is to introduce a simple multiple physical zones case (one incompressible flow domain, three solid domains) where solvers are coupled by sharing a common interface.
28+
29+
## Resources
30+
31+
The resources for this tutorial can be found in the [incompressible_flow/Inc_Heated_Cylinders](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders) directory in the [tutorial repository](https://github.com/su2code/Tutorials). You will need the configuration files for all physical zones ([flow_cylinder.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/flow_cylinder.cfg), [solid_cylinder1.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solid_cylinder1.cfg), [solid_cylinder2.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solid_cylinder2.cfg), [solid_cylinder3.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solid_cylinder3.cfg)), the cofiguration file to invoke a multiphysics simulation run ([cht_2d_3cylinders.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/cht_2d_3cylinders.cfg)) and the mesh file ([mesh_cht_3cyl.su2](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/mesh_cht_3cyl.su2)).
32+
33+
34+
## Tutorial
35+
36+
The following tutorial will walk you through the steps required when solving for a coupled CHT solution incorporating multiple physical zones. It is assumed you have already obtained and compiled the SU2_CFD code for a serial computation. If you have yet to complete these requirements, please see the [Download](/docs_v7/Download/) and [Installation](/docs_v7/Installation/) pages.
37+
38+
### Background
39+
40+
CHT simulations become important when we cannot assume an isomthermal wall boundary or when we even have no suitable temperature distribution estimate at hand. This is typically the case when a wall happens to be the boundary of a solid (e.g. metal) part and heat transfer across the boundary cannot be neglected.
41+
The correct interface temperature distribution has then to be found by the simulation run as well, that is, by coupling energy quantities in all zones.
42+
43+
### Problem Setup
44+
45+
This problem will solve for the incompressible flow over three cylinders as well as for the heat equation in all cylinders that are coupled by energy conservation across the interfaces.
46+
47+
The following flow conditions that are set to match the Reynolds number of 40. For hollow cylinders with outer diameters of 1m:
48+
- Density (variable) = 0.00042 kg/m^3
49+
- Farfield Velocity Magnitude = 3.40297 m/s
50+
- Farfield Flow Direction, unit vector (x,y,z) = (1.0, 0.0, 0.0)
51+
- Farfield Temperature = 288.15 K
52+
- Viscosity (constant) = 1.7893e-05 kg/(m-s)
53+
- Specific heat (constant) = 1004.703 J/(kg-K)
54+
- Prandtl Number (constant) = 0.72
55+
56+
The hollow cylinders will have the same material properties for its density (set to 0.00042 kg/m^3) and specific heat but a 4 times higher thermal conductivity of 0.1 W/(m-K).
57+
A constant temperature boundary condition of 350 K on the inner core drives the heating in the solid and fluid zones.
58+
59+
### Mesh Description
60+
61+
The computational mesh for the fluid zone is composed 33700 elements (quad-dominant). The far-field boundary contains 80 line elements and the cylinders surfaces all have 400 line elemtents.
62+
The meshes for all three cylinders are composed of 4534 elements (quad-dominant) each, their inner diamaters are composed of 40 line elements, at their outer diamaters the mesh matches the one of the fluid zone.
63+
64+
![Lam Plate Mesh](../../tutorials_files/incompressible_flow/Inc_Heated_Cylinders/images/heated_cylinders_mesh.png)
65+
Figure (1): Figure of the computational mesh with all four physical zones.
66+
67+
Uniform velocity boundary conditions are used for the farfield.
68+
69+
### Configuration File Options
70+
71+
Several of the key configuration file options for this simulation are highlighted here. First we show how we start a multiphysics simulation run incorporating CHT by choosing the following options in a main config file [cht_2d_3cylinders.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/cht_2d_3cylinders.cfg) (see [https://su2code.github.io/docs/Multizone](https://su2code.github.io/docs/Multizone) how to setup a multiphysics simulation in general):
72+
73+
```
74+
MARKER_ZONE_INTERFACE= (cylinder_outer1, cylinder_inner1, cylinder_outer2, cylinder_inner2, cylinder_outer3, cylinder_inner3)
75+
%
76+
%
77+
MARKER_CHT_INTERFACE= (cylinder_outer1, cylinder_inner1, cylinder_outer2, cylinder_inner2, cylinder_outer3, cylinder_inner3)
78+
```
79+
80+
By setting `MARKER_CHT_INTERFACE` for the outer diameters, temperature and heat flux data will be exchanged between the solvers at these boundaries in each outer iteration.
81+
82+
As in the [laminar flat plate with heat transfer tutorial](/tutorials/Inc_Laminar_Flat_Plate/), we activate the energy equation in the flow domain config ([flow_cylinder.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/flow_cylinder.cfg)) but this time we allow for variable density as the heat input causes a non-neglectable influence on the density:
83+
84+
```
85+
% ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------%
86+
%
87+
% Density model within the incompressible flow solver.
88+
% Options are CONSTANT (default), BOUSSINESQ, or VARIABLE. If VARIABLE,
89+
% an appropriate fluid model must be selected.
90+
INC_DENSITY_MODEL= VARIABLE
91+
%
92+
% Solve the energy equation in the incompressible flow solver
93+
INC_ENERGY_EQUATION = YES
94+
```
95+
96+
With the energy equation with variable density active, a value for the specific heat at constant pressure (Cp) should be specified as well as an appropriate fluid model that relates temperature and density.
97+
98+
```
99+
% ---- IDEAL GAS, POLYTROPIC, VAN DER WAALS AND PENG ROBINSON CONSTANTS -------%
100+
%
101+
% Fluid model (STANDARD_AIR, IDEAL_GAS, VW_GAS, PR_GAS,
102+
% CONSTANT_DENSITY, INC_IDEAL_GAS)
103+
FLUID_MODEL= INC_IDEAL_GAS
104+
%
105+
% Specific heat at constant pressure, Cp (1004.703 J/kg*K (air)).
106+
% Incompressible fluids with energy eqn. only (CONSTANT_DENSITY, INC_IDEAL_GAS).
107+
SPECIFIC_HEAT_CP= 1004.703
108+
```
109+
110+
The config files for the solid zones are quite short and mostly identical. E.g. for the first cylinder in upstream direction ([solid_cylinder1.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solid_cylinder1.cfg)), we have to invoke the heat equation solver by
111+
112+
```
113+
% Physical governing equations (EULER, NAVIER_STOKES,
114+
% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY,
115+
% POISSON_EQUATION)
116+
SOLVER= HEAT_EQUATION
117+
```
118+
and then set in inner (core) diameter temperature to 350 K (as mentioned above), that is we set
119+
120+
```
121+
% -------------------- BOUNDARY CONDITION DEFINITION --------------------------%
122+
%
123+
MARKER_ISOTHERMAL= ( core1, 350.0 )
124+
```
125+
126+
The solid's material properties are chosen as follows.
127+
```
128+
% Solid density (kg/m^3)
129+
SOLID_DENSITY= 0.00021
130+
%
131+
% Solid specific heat (J/kg*K)
132+
SPECIFIC_HEAT_CP_SOLID = 1004.703
133+
%
134+
% Solid thermal conductivity (W/m*K)
135+
THERMAL_CONDUCTIVITY_SOLID= 0.1028
136+
```
137+
138+
### Running SU2
139+
140+
The CHT simulation for the provided mesh will execute relatively quick, given that the coupled outer loop has to converge to a interface temperature solution as well. To run this test case, follow these steps at a terminal command line:
141+
1. Move to the directory containing the config files and the mesh files. Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path.
142+
2. Run the executable by entering
143+
144+
```
145+
$ SU2_CFD cht_2d_3cylinders.cfg
146+
```
147+
148+
at the command line.
149+
3. SU2 will print residual updates with each outer iteration of the flow solver, and the simulation will terminate after reaching the specified convergence criteria.
150+
4. Files containing the results will be written upon exiting SU2. The flow solution can be visualized in ParaView (.vtk) or Tecplot (.dat for ASCII).
151+
152+
153+
### Discrete adjoint solutions
154+
155+
For optimization purposes, SU2 can perform discrete adjoint solutions for multiphysics simulations as well. Given the solution files from all the zones, we only have to change `MATH_PROBLEM` from `DIRECT` to
156+
157+
```
158+
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT, DISCRETE_ADJOINT)
159+
MATH_PROBLEM= DISCRETE_ADJOINT
160+
```
161+
162+
in the main config file.
163+
SU2 will then compute coupled discrete adjoint solutions for all physical zones for a given objective function. Note that all cross dependencies from the CHT coupling at the interfaces are captured by default to give accurate sensitivities later on.
164+
165+
As for this test case, the objective function will be the sum of all integrated heat fluxes at the CHT interfaces. This can be done by setting
166+
167+
```
168+
% For a weighted sum of objectives: separate by commas, add OBJECTIVE_WEIGHT and MARKER_MONITORING in matching order.
169+
OBJECTIVE_FUNCTION= TOTAL_HEATFLUX
170+
%
171+
% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated
172+
MARKER_MONITORING= (cylinder_outer1, cylinder_outer2, cylinder_outer3)
173+
```
174+
175+
in [flow_cylinder.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/flow_cylinder.cfg) and
176+
177+
```
178+
% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated
179+
MARKER_MONITORING= ( NONE )
180+
```
181+
182+
in [solid_cylinder1.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solid_cylinder1.cfg), [solid_cylinder2.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solid_cylinder2.cfg) and [solid_cylinder3.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solid_cylinder3.cfg).
183+
One could also set objective functions in all the solid config files seperately which would in the end give same results.
184+
185+
Based on all four solution files from the different zones ([solution_flow_0.dat](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solution_flow_0.dat), [solution_flow_1.dat]([../../](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/)Inc_Heated_Cylinders/solution_flow_1.dat), [solution_flow_2.dat](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solution_flow_2.dat), [solution_flow_3.dat](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Heated_Cylinders/solution_flow_3.dat)) that can be found in the directory that contains the config files and the mesh, we start the discrete adjoint run by entering
186+
187+
```
188+
$ SU2_CFD_AD cht_2d_3cylinders.cfg
189+
```
190+
191+
### Results
192+
193+
Results are given here for the SU2 discrete adjoint solutions for the integrated heat fluxes from all three solid cylinders into the incompressible fluid flow.
194+
Surface node sensitivities can be obtained from the discrete adjoint solutions via
195+
196+
```
197+
$ SU2_DOT_AD cht_2d_3cylinders.cfg
198+
```
199+
200+
and be checked against finite differences to find a perfect agreement.
201+
202+
![Coupled_CHT_Sens](../../tutorials_files/incompressible_flow/Inc_Heated_Cylinders/images/heated_cylinders_sens.png)
203+
Figure (2): Heat flux sensitivities obtained from the discrete adjoint flow solution (blue) and the discrete adjoint heat solutions (red), their sum giving the correct result. Note the sensitivity change in downstream direction in both directions and magnitude.

0 commit comments

Comments
 (0)