Commit 80f0992f by Jan Zapletal

parent d1f7c2a4
README.md 100755 → 100644
 # Heat Transfer Module - 2D Basic Test Cases In this section, we would like to show you how to run the ESPRESO solver for problems of heat transfer in 2D. In the following, you can find how to set ESPRESO Configuration File and run ESPRESO in sequential or parallel mode. Benchmarks cover wide range of options for solution problems from linear steady-state to nonlinear transient problems. List of benchmarks: * [Simple Wall 01](#simple-wall-01): Linear steady-state, Dirichlet BC. * [Simple Wall 02](#simple-wall-02): Linear steady-state, Dirichlet BC as a function. * [Simple Wall 03](#simple-wall-03): Linear steady-state, linear convection. * [Simple Wall 04](#simple-wall-04): Nonlinear steady-state, Symmetric variant of Newton-Raphson, nonlinear material model, nonlinear external forced convection, setting for modification of Newton method - Full Newton-Raphson, non-symmetric problem and sub-stepping definition. * [Simple Wall 05](#simple-wall-05): Linear transient (time dependent), monitoring results. * [Simple Wall 06](#simple-wall-06): Load steps definition - combination steady-state with transient solver. * [Simple Wall 07](#simple-wall-07): Load steps definition - three following transient solvers. * [Simple Wall 08](#simple-wall-08): Linear steady-state, multiple material models definition * [Simple Wall 09](#simple-wall-09): Linear steady-state, anisotropic material model * [Simple Wall 10](#simple-wall-10): Transient solver - automatic time stepping * [Simple Wall 11](#simple-wall-11): Transient solver - thermal shock stabilization * [Simple Wall 12](#simple-wall-12): Nonlinear transient solver - Phase change simulation by apparent heat capacity method. * [Simple Wall 13](#simple-wall-13): Linear steady-state solver with translation motions (nonzero advection therm), non-symmetric linear solver, consistent stabilization * [Simple Wall 14](#simple-wall-14): Linear transient solver with translation motions (nonzero advection therm), non-symmetric linear solver, consistent stabilization * [Simple Wall 15](#simple-wall-15): Nonlinear steady state solver with adaptive precision in Newton Raphson method, translation motions (nonzero advection therm), non-symmetric linear solver, consistent and inconsistent stabilization --- ## Simple Wall 01 ### Model definition This benchmark show how to solve simple linear steady-state heat transfer problem with one material model and simple Dirichlet boundary condition !!! example "Numerical model definition:" * 2D square $a = 1\ [m]$ * Constant thickness $1\ [m]$ set to all elements * Material – Aluminum alloy, Isotropic material model, Thermal conductivity $\lambda= 154\ [W\cdot m^{-1}\cdot K^{-1}]$, set to all elements * Uniform initial temperature $293.15\ [K]$ * Constant temperature - set to region **LEFT**, $Temperature = 320\ [K]$ * Constant temperature - set to region **RIGHT**, $Temperature = 380\ [K]$ ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_001.png?style=centerme) ### Configuration definition In the following block you can find how ESPRESO Configuration File looks like for this example. !!! config "ECF Configuration file >> squareSimpleWall_temperature_01.ecf" python {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_01.ecf!}  Computational mesh for this simple wall example is generated by internal ESPRESO mesh generator which is designed for fast parallel benchmarking of the physical solvers. This was specified by GENERATOR input parameter (line 3). Simple wall is created in GENERATOR object (lines 6-39). We specify there grid shape and then, we set length of the 2D grid. For boundary condition definition, we have to specify NODES component (LEFT, RIGHT, line 16-19). Element type is set to quadratic square (line 21). Then we have to specify number of clusters, domains, and elements in each directions which serve to domain decomposition definition as is depicted on figure bellow. ![Hybrid Decomposition](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/HTFETI.png) ### Run the solver In this section, solver execution with different parallel strategies (sequential, MPI, OpenMP) are described. :rocket: **How to run ESPRESO without MPI:** The following command show how to set only one domain discretized by 50 finite elements on the square edge. bash hl_lines="1" $espreso 1 1 1 1 50 50 -c squareSimpleWall_temperature_01.ecf  Six input arguments has meaning of discretization parameters and are defined in ecf file as a input arguments [ARG0-5]. First two arguments are number of clusters in X and Y direction (in this example set to 1, that mean 1x1 clusters per body), next two arguments are number of domains in X and Y direction (in this example set to 1, that mean 1x1 domains per cluster) and last two arguments are number of elements per domain edge in X and Y direction (set to 50, that mean 50x50 elements per domain). Option -c define path to ESPRESO ecf file. :rocket: **How to run ESPRESO without MPI, but with OpenMP parallelization:** In this example we show how to set example with 2 FETI domains per square edge (2x2 domains per 1x1 clusters) with$50^2$elements per domain. bash hl_lines="1"$ espreso 1 1 2 2 50 50 -c squareSimpleWall_temperature_01.ecf  !!! info "Note" We have to set environment variable for OpenMP parallelization. In this example we are able to set number of threads to 4, because we have four domains (OpenMP parallelization in ESPRESO is over domains and MPI parallelization is over clusters) bash $set threading.default  :rocket: **How to run ESPRESO with MPI, but without OpenMP parallelization:** Now we show how to run example with 2 FETI clusters per square edge (2x2 clusters with 1x1 domains) with$50^2$elements per domain (uniform decomposition) bash hl_lines="1"$ mpirun –np 4 espreso 2 2 1 1 50 50 -c squareSimpleWall_temperature_01.ecf  :rocket: **How to run ESPRESO with combination of OpenMP and MPI parallelization:** In the following command we show how to run 16 FETI domain with 50 elements per domain edge, 4 clusters - MPI, 4 domains per cluster - OpenMP bash hl_lines="1" $mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_01.ecf  ### Results After solution is done, we can find result database files in the folder which we specify in the OUTPUT object. In this example, we set EnSight file format as the output database. Results are store in new folder :open_file_folder:*results/< DATE >/< name_of_ECF_file >* which is located in root folder of the ESPRESO unless otherwise stated. **Temperature Distribution** | :-------------------------------:| ![simple_wall_01_result_01](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_01.png?style=centerme)| !!! info "Note" EnSight case Gold file format is possible open not only in EnSight, but in commonly used open source postProcessing tools like [ParaView](https://www.paraview.org/) or [VisIt](https://wci.llnl.gov/simulation/computer-codes/visit) also. --- ## Simple Wall 02 ### Model definition This benchmark show how to set Dirichlet boundary condition and thickness as a function of spatial coordinates. Model is the same as in previous example - linear steady-state heat transfer. !!! info "Note" ESPRESO solver use mathematical expression toolkit library [ExprTk](http://partow.net/programming/exprtk/) for parsering and evaluation mathematical expression. Thanks to that, lot of boundary condition, material parameters or geometrical definition can by set as a function dependent variables. User can also specify depended variables as a tabular data. !!! example "Numerical model definition:" * 2D square$a = 1\ [m]$* Thickness as a function$f(x,y)=1+x$, set to all elements * Material – Aluminum alloy, Isotropic material model, Thermal conductivity$\lambda= 154\ [W\cdot m^{-1}\cdot K^{-1}]$, set to all elements * Uniform initial temperature$293.15\ [K]$* Constant temperature - set to region **LEFT**,$Temperature = 320+10\times Y\ [K]$* Constant temperature - set to region **RIGHT**,$Temperature = 380\ [K]$![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_002.png?style=centerme) ### Configuration definition In the following block you can find how ESPRESO Configuration File looks like for this example. Example is almost the same like previous one and function definition of the temperature definition and thickness setting are highlighted in the code list. !!! config "ECF Configuration file >> squareSimpleWall_temperature_02.ecf" python hl_lines="62 79" {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_02.ecf!}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1"$ mpirun –np 4 ./espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_02.ecf  ### Results The following figures were created in EnSight using ESPRESO results. These results are contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_02/*. **Temperature Distribution** |**Total Heat Flux Distribution** | :-------------------------------:|:-------------------------------:| ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_02.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_heat_flux_02.png) --- ## Simple Wall 03 ### Model definition This benchmark show how to set convection boundary condition. Numerical solver is set to linear steady-state heat transfer. !!! example "Numerical model definition:" * 2D square $a = 1\ [m]$ * Constant thickness $1\ [m]$, set to all elements * Material – Aluminum alloy, Isotropic material model, Thermal conductivity $\lambda= 154\ [W\cdot m^{-1}\cdot K^{-1}]$, set to all elements * Uniform initial temperature $293.15\ [K]$ * Constant temperature - set to region **LEFT**, $Temperature = 280\ [K]$ * Convection - set to region **RIGHT**, * heat transfer coefficient - $HTC = 10\ [W\cdot m^{-2}\cdot K^{-1}]$, * Ambient temperature - $Temperature = 500\ [K]$ ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_001.png?style=centerme) ### Configuration definition In the following block you can find how ESPRESO Configuration File looks like for this example. Convection boundary condition definition is highlighted. User specify heat transfer coefficient as a function of temperature or spatial coordinates and ambient temperature. !!! config "ECF Configuration file >> squareSimpleWall_temperature_03.ecf" python hl_lines="87 88 89 90 91 92 93" {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_03.ecf!}  ###Results The following figure (temperature distribution) was created in EnSight using ESPRESO results. These results are contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_03/*. On the right side of the square is new boundary temperature defined by convection set 305.29 [K].
**Temperature Distribution** | :-------------------------------:| ![simple_wall_03_result_01](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_03.png?style=centerme)|
--- ## Simple Wall 04 ### Model definition This benchmark show how to solve nonlinear steady-state heat transfer problem with nonlinear temperature dependent material model and nonlinear external forced convection at boundary. !!! example "Numerical model definition:" * 2D square $a = 1\ [m]$ * Constant thickness $1\ [m]$, set to all elements * Material – nonlinear temperature dependent, Isotropic material model, Thermal conductivity $\lambda= 2+10\times (TEMPERATURE/20)^2\ [W\cdot m^{-1}\cdot K^{-1}]$, set to all elements * Uniform initial temperature $293.15\ [K]$ * Constant temperature - set to region **LEFT**, $Temperature = 280\ [K]$ * nonlinear external forced convection - set to region **RIGHT**, heat transfer coefficient based on Nusselt number * type of external convection: EXTERNAL_FORCED * Ambient temperature: $Temperature = 360\ [K]$ * Length: $1\ [m]$ * Fluid velocity: $10\ [m/s]$ * Fluid type: water * Constant temperature - set to region **TOP**, $Temperature = 800\ [K]$ ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_004.png?style=centerme) !!! info "Note" Nonlinear convection is based on Nusselt number as a function of Prandtl nad Reynolds numbers. Material parameters of fluid medium are evaluated at average of surface and ambient temperature $(T_{surf}+T_{amb})/2$. Heat transfer coefficient is evaluated as follows: $$HTC=\begin{cases} 2\cdot\frac{k}{L}\cdot\frac{0.3387\cdot\mathrm{Pr^{1/3}}\cdot\mathrm{R_{el}^{1/2}}}{\left(1+\left(0.0468/\mathrm{Pr}\right)^{2/3}\right)^{1/4}} & R_{el}\leq5\cdot10^{5}\\ 2\cdot\frac{k}{L}\cdot\mathrm{Pr^{1/3}}\left(0.037\cdot\mathrm{R_{el}^{4/5}}-871\right) & R_{el}>5\cdot10^{5} \end{cases}$$ $$\mathrm{R_{el}}=\frac{\rho\cdot Y\cdot L}{\mu},\quad\mathrm{Pr}=\frac{\mu\cdot c_{p}}{k},$$ where material data $\rho,\mu,c_{p},k$ are set as a piecewise polynomial curves. ESPRESO contain lot of nonlinear convection types for example external natural convection on vertical wall, inclined wall, horizontal cylinder, between horizontal plates and on sphere, internal natural convection between parallel plates or in circular tube, external forced convection plates and internal forced convection in tube. User can also specify his own variant of nonlinear convection by temperature dependent heat transfer coefficient table or function. ### Configuration definition Nonlinear behavior of the ESPRESO solver is allowed by the MODE NONLINEAR option in load step settings definition (line 74). Next step will be definition of the nonlinear solver options which are set in NONLINEAR_SOLVER object (line 77-91), were we have to set convergence parameters, substepping behavior, line search and type of Newton Raphson solver. TANGENT_MATRIX_CORRECTION option is used for switching between symmetric and full Newton Raphson method. If TANGENT_MATRIX_CORRECTION is set to true, linear solver must be set to non-symmetric version. !!! config "ECF Configuration file >> squareSimpleWall_temperature_04.ecf" python hl_lines="74 77" {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_04.ecf !}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1" $mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_04.ecf  ###Results The following figures were created in EnSight using ESPRESO results. These results are contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_04/*. **Temperature Distribution** |**Total Heat Flux Distribution** | :-------------------------------:|:-------------------------------:| ![simple_wall_04_result_01](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_04.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_heat_flux_04.png) On the next graph is depicted residuals convergence history of Newton Raphson iterations, red line shows temperature residual and green line shows heat residual history. **Newton Raphson Convergence History - symmetrized variant** | :-------------------------------| | #### Full Newton Raphson ESPRESO allows to user set Full Newton-Raphson method for solving nonlinear problems. This functionality is enabled by setting TANGENT_MATRIX_CORRECTION option to true in nonlinear solver definition. For full Newton method, non-symmetric solver of the linearized system of the algebraic equations is needed. In the following block you can find setting of non-symmetric iterative solver, in this example solver is set to GMRES. Matrix regularization in the FETI solver must be set to algebraic variant. !!! config "ECF Configuration file >> Full Newton-Raphson setting" python hl_lines="14 21 22" {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_04_a.ecf !}  Residual convergence history of the Full Newton Raphson method is depicted on the graph bellow. Notice that problem converged in three Newton iterations only, instead of five iterations in previous symmetrized variant of the Newton method. **Newton Raphson Convergence History - Full non-symmetric** | :-------------------------------| | #### Sub-Stepping definition For the highly nonlinear problems, sub-stepping method for gradually increased loading can be perform. Sub-stepping is turn on by setting STEPPING option to TRUE. Next, user have to set number of the substeps. These settings is highlighted in the following block. !!! config "ECF Configuration file >> Full Newton-Raphson with sub-stepping" python hl_lines="9 10" {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_04_b.ecf !}  On the following graph, residual convergence history of the Full Newton Raphson method with three sub-steps, is depicted. **Newton Raphson Convergence History - Full non-symmetric with SubStepping** | :-------------------------------| | --- ## Simple Wall 05 ### Model definition This benchmark show how to solve linear transient heat transfer problem with simple boundary condition and show how to monitoring computed variables. !!! example "Numerical model definition:" * 2D square$a = 1\ [m]$, * Constant thickness$1\ [m]$, set to all elements, * Material – Isotropic material model, set to all elements * Thermal conductivity$\lambda= 5\ [W\cdot m^{-1}\cdot K^{-1}]$, * Density$\rho= 1\ [kg\cdot m^{-3}]$, * Heat capacity$c_{p}= 1\ [J\cdot kg^{-1}\cdot K^{-1}]$, * Uniform initial temperature$293.15\ [K]$, * Constant temperature - set to region **LEFT**,$Temperature = 480\ [K]$, * Constant temperature - set to region **TOP**,$Temperature = 800\ [K]$, * Monitoring average and minimum temperature on the region **RIGHT**, * Duration Time$t = 0.1$, * Constant Time Step$\Delta t = 0.001$![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_004.png?style=centerme) ### Configuration definition Transient solver in the ESPRESO solver is allowed by the TYPE TRANSIENT option in load step settings definition (line 73). User have to specify duration time of the current load step (line 72). Then behavior of the transient solver is set in TRANSIENT_SOLVER object. User specify there type of time discretization scheme and size of the time step. In the OUTPUT object, setting of the variables monitoring on the specific region with specific output statistic is shown. If user define some monitoring options in configuration file, solver store define statistical data to text file *ecf_file_name.emr* which is located in results folder. !!! config "ECF Configuration file >> squareSimpleWall_temperature_05.ecf" python hl_lines="72 73 77 78 79 80 107" {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_05.ecf !}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1"$ mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_05.ecf  ### Results The following video (temperature distribution) was created in EnSight using ESPRESO results. These result is contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_05/*.
**Temperature distribution over time** | :-------------------------------|
|
This example contain also monitoring of temperature statistic on the **RIGHT** region. Average and minimal temperature value over time are depicted in the following graph. Monitoring data is sorted in the text file with CSV format *< NAME of ecf >.emr*
**Temperature Monitoring** | :-------------------------------| |
--- ## Simple Wall 06 ### Model definition This benchmark show how to set multiple load steps - combination of the steady state solver as a first load step and following transient solver as a second load step. !!! example "Numerical model definition:" * 2D square $a = 1\ [m]$, * Constant thickness $1\ [m]$, set to all elements, * Material – Isotropic material model, set to all elements * Thermal conductivity $\lambda= 2\ [W\cdot m^{-1}\cdot K^{-1}]$, * Density $\rho= 1\ [kg\cdot m^{-3}]$, * Heat capacity $c_{p}= 1\ [J\cdot kg^{-1}\cdot K^{-1}]$, * Uniform initial temperature $293.15\ [K]$, * Load steps definition: !!! important "First Load Step" * Linear steady-state solver * Constant temperature - set to region **LEFT**, $Temperature = 280\ [K]$, * Constant temperature - set to region **TOP**, $Temperature = 530\ [K]$, * Convection - set to region **RIGHT**, * heat transfer coefficient - $HTC = 12\ [W\cdot m^{-2}\cdot K^{-1}]$, * Ambient temperature - $Temperature = 500\ [K]$ !!! important "Second Load Step" * Linear transient solver * Duration Time $t = 0.1$, * Constant Time Step $\Delta t = 0.005$ * Constant temperature - set to region **LEFT**, $Temperature = 280\ [K]$, * Convection - set to region **RIGHT**, * heat transfer coefficient - $HTC = 12\ [W\cdot m^{-2}\cdot K^{-1}]$, * Ambient temperature - $Temperature = 1200\ [K]$ ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_004.png?style=centerme) ### Configuration definition For the definition of the multiple load steps number of load steps have to be define (line 46). Then object *LOAD_STEP_SETTINGS* contain *n* object which has name of the load step (line 73, 100). Load step definition contain boundary condition definition, transient and nonlinear solver settings and settings of the linear solver. !!! config "ECF Configuration file >> squareSimpleWall_temperature_06.ecf" python hl_lines="46 73 100" {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_06.ecf !}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1" $mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_06.ecf  ### Results The following figures shown temperature distribution in the square at the end of the load step 1 and 2. These result is contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_06/*. **Temperature Distribution - Loas Step 1** |**Temperature Distribution - end of Load Step 2** | :-------------------------------:|:-------------------------------:| ![simple_wall_04_result_01](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_06b.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_06c.png) **Temperature distribution over time** | :-------------------------------| | --- ## Simple Wall 07 ### Model definition This benchmark show how to set multiple load steps - three transient load steps. !!! example "Numerical model definition:" * 2D square$a = 1\ [m]$, * Constant thickness$1\ [m]$, set to all elements, * Material – Isotropic material model, set to all elements * Thermal conductivity$\lambda= 2\ [W\cdot m^{-1}\cdot K^{-1}]$, * Density$\rho= 1\ [kg\cdot m^{-3}]$, * Heat capacity$c_{p}= 1\ [J\cdot kg^{-1}\cdot K^{-1}]$, * Uniform initial temperature$293.15\ [K]$, * Load steps definition: !!! important "First Load Step" * Linear transient solver * Duration Time$t = 0.1$, * Constant Time Step$\Delta t = 0.005$* Constant temperature - set to region **LEFT**,$Temperature = 293.15\ [K]$, * Constant temperature - set to region **TOP**,$Temperature = 530\ [K]$, * Convection - set to region **RIGHT**, * heat transfer coefficient -$HTC = 12\ [W\cdot m^{-2}\cdot K^{-1}]$, * Ambient temperature -$Temperature = 500\ [K]$!!! important "Second Load Step" * Linear transient solver * Duration Time$t = 0.1$, * Constant Time Step$\Delta t = 0.005$* Constant temperature - set to region **LEFT**,$Temperature = 293.15\ [K]$, * Constant temperature - set to region **TOP**,$Temperature = 530\ [K]$, * Convection - set to region **RIGHT**, * heat transfer coefficient -$HTC = 12\ [W\cdot m^{-2}\cdot K^{-1}]$, * Ambient temperature -$Temperature = 1200\ [K]$!!! important "Third Load Step" * Linear transient solver * Duration Time$t = 0.1$, * Constant Time Step$\Delta t = 0.005$* Constant temperature - set to region **LEFT**,$Temperature = 293.15\ [K]$, * Constant temperature - set to region **TOP**,$Temperature = 530\ [K]$, * Convection - set to region **RIGHT**, * heat transfer coefficient -$HTC = 12\ [W\cdot m^{-2}\cdot K^{-1}]$, * Ambient temperature -$Temperature = 1200\ [K]$* Heat flow - set to region **BOTTOM** -$Q = 2000\ [W \cdot m^{-2}]]$, ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_07.png?style=centerme) ### Configuration definition For the definition of the multiple load steps number of load steps have to be define (line 47). Then object *LOAD_STEP_SETTINGS* contain *n* object which has name of the load step (line 73, 105, 137). Load step definition contain boundary condition definition, transient and nonlinear solver settings and settings of the linear solver. !!! config "ECF Configuration file >> squareSimpleWall_temperature_07.ecf" python hl_lines="47 73 105 137" {! ././../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_07.ecf !}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1"$ mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_07.ecf  ### Results The following figures shown temperature distribution in the square at the end of the load step 1, 2 and 3. These result is contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_07/*. **Temperature - end of Load Step 1** |**Temperature - end of Load Step 2** | **Temperature - end of Load Step 3** | :-------------------------------:|:-------------------------------:|:-------------------------------:| ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_07b.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_07c.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_07d.png)
**Temperature distribution over time** | :-------------------------------|
|
--- ## Simple Wall 08 ### Model definition This benchmark show how to set multiple material models to different element regions. FIn this example ESPRESO mesh generator is used for creating element regions in the form of the cheeseboard. !!! example "Numerical model definition:" * 2D square $a = 1\ [m]$ * Constant thickness $1\ [m]$ set to all elements * Material model 01: * Linear Isotropic, * Thermal conductivity $\lambda= 1\ [W\cdot m^{-1}\cdot K^{-1}]$, * Set to region **MAT_01** * Material model 02: * Linear Isotropic, * Thermal conductivity $\lambda= 1e4\ [W\cdot m^{-1}\cdot K^{-1}]$, * Set to region **MAT_02** * Uniform initial temperature $293.15\ [K]$ * Constant temperature - set to region **LEFT**, $Temperature = 293.15\ [K]$ * Constant temperature - set to region **TOP**, $Temperature = 530\ [K]$ * Convection - set to region **RIGHT**, * Heat transfer coefficient - $HTC = 12\ [W\cdot m^{-2}\cdot K^{-1}]$ * Ambient temperature - $Temperature = 500\ [K]$ ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_08.png?style=centerme) ### Configuration definition In this example we specify two element regions **WHITE** and **BLACK** in the ESPRESO mesh generator. Now is possible tt set on the element regions specific material models as is shown in the line 72, 73 in the configuration file bellow. !!! config "ECF Configuration file >> squareSimpleWall_temperature_08.ecf" python hl_lines="1" {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_08.ecf!}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1" $mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_08.ecf  ### Results The following figures were created in EnSight using ESPRESO results. These results are contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_08/*. **Temperature Distribution** |**Total Heat Flux Distribution** | :-------------------------------:|:-------------------------------:| ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_08.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_heat_flux_08.png) For larger jumps in the material coefficients and using FETI domain decomposition method, solution with different conjugate projection is needed, or user can try to specify number of restarts in the full orthogonal conjugate gradient method for decrease number of iterations of the CG method. User can specify number of restarts and number of iteration when restart is performed. {== (These method can rapidly decrease number of iteration for very large coefficient jumps without any time consuming preconditioner like GenEO is, but settings of this parameter is based on heuristic approach and is for experimental use only) ==} !!! config "FETI solver options for restarted CG" python hl_lines="6 7 8" {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_08.a.ecf!}  For example in the graph bellow is depicted comparison of the standard CG method with heuristic restarted approach for material jump **KXX in MAT_02 set to 1E9** and solver settings as is depicted in previous code list. **Iterative Solver Convergence History** | :-------------------------------| ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/full_cg.png)| --- ## Simple Wall 09 ### Model definition This benchmark show how to define anisotropic material model in ESPRESO by rotated coordinate system or by definition of the material matrix. !!! example "Numerical model definition:" * 2D square$a = 1\ [m]$* Constant thickness$1\ [m]$set to all elements * Material model 01: * Linear model DIAGONAL, * Thermal conductivity in X direction$\lambda_{X}= 0.1\ [W\cdot m^{-1}\cdot K^{-1}]$, * Thermal conductivity in Y direction$\lambda_{Y}= 100\ [W\cdot m^{-1}\cdot K^{-1}]$, * Rotated Cartesian coordinate system * Rotation around X axis$R_X = 0$; * Rotation around Y axis$R_Y = 0$; * Rotation around Z axis$R_Z = 45°$; * Thermal conductivity$\lambda= 1\ [W\cdot m^{-1}\cdot K^{-1}]$, * Set to region **MAT_01** * Material model 02: * Linear Isotropic, * Thermal conductivity$\lambda= 1\ [W\cdot m^{-1}\cdot K^{-1}]$, * Set to region **MAT_02** * Uniform initial temperature$293.15\ [K]$* Constant temperature - set to region **LEFT**,$Temperature = 293.15\ [K]$* Constant temperature - set to region **RIGHT**,$Temperature = 530\ [K]$![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_09.png?style=centerme) !!! info "Note" In the ESPRESO is possible to define 4 material models for thermal conductivity, Isotropic, Diagonal, Symmetric ans Anisotropic. User can specify every single value in thermal conductivity tensor. For thermal conductivity tensor is possible define different coordinate system (Cartesian, Cylindrical and Spherical) where global conductivity tensor is then define by $$\mathbf{k_{G}}=\mathbf{T}^{T}\cdot \mathbf{k} \cdot \mathbf{T}$$ where$\mathbf{T}$is transformation matrix containing direction cosines between local and global coordinate systems and$\mathbf{k}$is conductivity matrix in local coordinate system. ### Configuration definition In this example we specify two element regions **WHITE** and **BLACK** in the ESPRESO mesh generator. Now is possible to set on the element regions specific material models as is shown in the line 72, 73 in the configuration file bellow. !!! config "ECF Configuration file >> squareSimpleWall_temperature_09.ecf" python hl_lines="1" {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_09.ecf!}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1"$ mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_09.ecf  ### Results The following figures were created in EnSight using ESPRESO results. These results are contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_09/*. **Temperature Distribution** |**Total Heat Flux Distribution** | :-------------------------------:|:-------------------------------:| ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_09.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_heat_flux_09.png) #### Cartesian by function Now, if we define rotation angle of the Z axis in Cartesian coordinate system for example as a function of the spatial coordinate: $$\varphi = 50 * sin((Y-0.25)*8*\pi)$$ !!! config "Rotation as a function definition" python hl_lines="7" MAT_01 { COORDINATE_SYSTEM { TYPE CARTESIAN; ROTATION { X 0; Y 0; Z 50 * sin( (Y-0.25)* 8 * pi ); } } THERMAL_CONDUCTIVITY { MODEL DIAGONAL; KXX 0.1; KYY 100; } }  resulted thermal field is depicted on the figure bellow. **Temperature Distribution** |**Total Heat Flux Distribution** | :-------------------------------:|:-------------------------------:| ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_09b.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_heat_flux_09b.png) #### Cylindrical coordinates In this modification of the [Simple Wall 09](#simple-wall-09) we define cylindrical coordinate system in the centre of the core of the model. !!! example "Cylindrical system definition :" * 2D square $a = 1\ [m]$ * Constant thickness $1\ [m]$ set to all elements * Material model 01: * Linear model DIAGONAL, * Thermal conductivity in X direction $\lambda_{X}= 0.1\ [W\cdot m^{-1}\cdot K^{-1}]$, * Thermal conductivity in Y direction $\lambda_{Y}= 100\ [W\cdot m^{-1}\cdot K^{-1}]$, * Cylindrical coordinate system * Rotation around X axis $R_X = 0$; * Rotation around Y axis $R_Y = 0$; * Rotation around Z axis $R_Z = 45°$; * Thermal conductivity $\lambda= 1\ [W\cdot m^{-1}\cdot K^{-1}]$, * Set to region **MAT_01** * Material model 02: * Linear Isotropic, * Thermal conductivity $\lambda= 1\ [W\cdot m^{-1}\cdot K^{-1}]$, * Set to region **MAT_02** ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_09c.png?style=centerme) !!! config "Cylindrical coordinate system definition" python hl_lines="4 5 6 7 8" MAT_01 { COORDINATE_SYSTEM { TYPE CYLINDRICAL; CENTER { X 0.5; Y 0.5; Z 0; } } THERMAL_CONDUCTIVITY { MODEL DIAGONAL; KXX 0.1; KYY 100; } }  **Temperature Distribution** |**Total Heat Flux Distribution** | :-------------------------------:|:-------------------------------:| ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_09c.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_heat_flux_09c.png) --- ## Simple Wall 10 ### Model definition This benchmark show how to set transient solver with automatic time stepping method based on response eigenvalue. !!! example "Numerical model definition:" * 2D square $a = 1\ [m]$, * Constant thickness $1\ [m]$, set to all elements, * Material – Isotropic material model, set to all elements * Thermal conductivity $\lambda= 60\ [W\cdot m^{-1}\cdot K^{-1}]$, * Density $\rho= 7000\ [kg\cdot m^{-3}]$, * Heat capacity $c_{p}= 400\ [J\cdot kg^{-1}\cdot K^{-1}]$, * Uniform initial temperature $293.15\ [K]$, * Constant temperature - set to region **LEFT**, $Temperature = 380\ [K]$, * Constant temperature - set to region **TOP**, $Temperature = 480\ [K]$, * Monitoring average on the region **RIGHT**, * Duration Time $t = 500 \ [s]$, * Initial Time Step $\Delta t = 10\ [s]$ * Minimum Time Step $\Delta t = 1\ [s]$ * Maximum Time Step $\Delta t = 50\ [s]$ ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_004.png?style=centerme) !!! info "Note" Automatic time stepping method is based on response eigenvalue which is used in the computation of the time step length. The response eigenvalue is defined as: $$\lambda=\frac{\mathbf{\Delta T^{T}}\cdot\mathbf{K}\cdot\mathbf{\Delta T}}{\mathbf{\Delta T^{T}}\cdot\mathbf{M}\cdot\mathbf{\Delta T}}$$ ### Configuration definition Automatic time stepping method is enabled if **ALLOWED** option is set to **TRUE** in **TRANSIENT_SOLVER** object. User the specify minimal and maximal time step length, oscillation limit (default value 0.5) and Increase/Decrease factor (default value 3). !!! config "ECF Configuration file >> squareSimpleWall_temperature_10.ecf" python hl_lines="74 82 84 85 86 87 88 89 90" {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_10.ecf !}  :rocket: **Example how to run ESPRESO:** bash hl_lines="1" \$ espreso 1 1 2 2 50 50 -c squareSimpleWall_temperature_10.ecf  ### Results At the following graph is depicted changing of the time step length during the calculation. Time step length is automatically changed by the decrease/increase factor.
**Time step length change** | :-------------------------------| |
Average temperature value over time is depicted in the following graph. As you can see, at the beginning of the calculation, time step length is held on the smallest value and then if is possible, automatic time stepping method increase time step length step by step to maximal value. Monitoring data is sorted in the text file with CSV format *< NAME of ecf >.emr*
**Temperature Monitoring** | :-------------------------------| |