diff --git a/README.md b/README.md old mode 100755 new mode 100644 index faed78e926bb8e38d9e9a9a296df7ae5e0b0ecc9..8b137891791fe96927ad78e64b0aad7bded08bdc --- a/README.md +++ b/README.md @@ -1,1176 +1 @@ -# 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** | -:-------------------------------| -| - - - - - **Temperature distribution over time** | -:-------------------------------| - | - - - - ---- -## Simple Wall 11 - -### Model definition -This benchmark show how to set transient solver with diffuse split method for the thermal shock capturing. In the wide range problems, thermal shock capturing have to be part of the simulation process, for example in the problems including thermal contact or in the phase change problems where small time step length have to be used. - -!!! 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$295\ [K]$, - * Constant temperature - set to region **LEFT**,$Temperature = 300\ [K]$, - * Duration Time$t = 100 \ [s]$, - * Constant Time Step$\Delta t = 0.5\ [s]$- - ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_11geo.png?style=centerme) - - -### Configuration definition - -Diffuse split stabilization method for shock capturing is enabled by option **DIFFUSION_SPLIT** and have to be set to **TRUE**. {== (Default value of this option is **FALSE**) ==}. If is first load step set as a transient solver and user specify some Dirichlet boundary condition, user can include this initial boundary condition to initial temperature at the beginning of the transient solver. This is done by option **INIT_TEMP_RESPECT_BC**. If is **INIT_TEMP_RESPECT_BC** set to **FALSE** initial temperature vector is assembled only from initial value which is specify in oblect **INITIAL_TEMPERATURE**. {== (Default value of this option is **TRUE**) ==} - -!!! config "ECF Configuration file >> squareSimpleWall_temperature_11.ecf" - python hl_lines="67 68" - {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_11.ecf !} -  - -:rocket: **Example how to run ESPRESO:** - -bash hl_lines="1" -$ espreso 1 1 2 2 5 5 -c squareSimpleWall_temperature_11.ecf - - -### Results - -From the results bellow, we can see that if **DIFFUSION_SPLIT** option is set to **FALSE** temperature field contain at the beginning nonphysical behavior (oscillations in the temperature field). This oscillations is depicted by purple color. Minimal temperature in the simulation have to be 295 [K], but in the results is some smaller value of the temperature. But if user set **DIFFUSION_SPLIT** option to **TRUE**, nonphysical oscillation vanish as you can see in the second video. - - **Thermal Shock Stabilization - FALSE - results with oscillations** | -:-------------------------------| -
| - - - - **Thermal Shock Stabilization - TRUE** | -:-------------------------------| -
| - - - ---- - -## Simple Wall 12 - -### Model definition - -This benchmark show how to solve phase change problem by the nonlinear transient solver. In this example we set material model with enabling phase change WATER/ICE for ice melting process simulation. - -!!! example "Numerical model definition:" - * 2D square $a = 0.01\ [m]$ - * Constant thickness $1\ [m]$ set to all elements - * Nonlinear transient solver - * Duration Time $t = 10\ [s]$, - * Constant Time Step $\Delta t = 0.1\ [s]$ - * Material model 01: - * Linear model ISOTROPIC with **PHASE CHANGE**, - * Set to region **ALL_ELEMENTS**, - * Latent Heat $333.5\ [kJ \cdot kg^{-1}]$, - * Phase Change Temperature $T_{PC}= 273.15\ [K]$, - * Transition Interval $\Delta_{T} = 2\ [K]$, - * Smooth Step Function order is set to 1. - * PHASE 01 - ICE - * Thermal conductivity $\lambda= 2.5\ [W\cdot m^{-1}\cdot K^{-1}]$, - * Density $\rho= 920\ [kg\cdot m^{-3}]$, - * Heat capacity $c_{p}= 2050\ [J\cdot kg^{-1}\cdot K^{-1}]$, - * PHASE 02 - WATER - * Thermal conductivity $\lambda= 0.6\ [W\cdot m^{-1}\cdot K^{-1}]$, - * Density $\rho= 1000\ [kg\cdot m^{-3}]$, - * Heat capacity $c_{p}= 4200\ [J\cdot kg^{-1}\cdot K^{-1}]$, - * Uniform initial temperature $270\ [K]$ - * Constant temperature - set to region **RIGHT**, $Temperature = 320\ [K]$ - - ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_12.png?style=centerme) - -### Configuration definition - -For the phase change simulations, user have to specify material parameters for two material phases in the material model definition and setup parameters of the apparent heat capacity method which are **PHASE_CHANGE_TEMPERATURE**, **TRANSITION_INTERVAL**, **LATENT_HEAT** and order of the transition function **SMOOTH_STEP_ORDER**. Nonlinear solver have to be used for this type of the simulation. - -!!! config "ECF Configuration file >> squareSimpleWall_temperature_12.ecf" - python hl_lines="45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69" - {! ./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_12.ecf !} -  - -:rocket: **Example how to run ESPRESO:** - -bash hl_lines="1" -$mpirun -np 4 espreso 2 2 4 4 50 50 -c squareSimpleWall_temperature_12.ecf - - -### Results - -On the results bellow is depicted temperature, phase, latent heat and heat flux distribution over time. - - **Temperature and Phase distribution over time** | -:-------------------------------| - | - - - - - **Latent Heat and Heat Flux distribution over time** | -:-------------------------------| - | - - - - ---- - -## Simple Wall 13 - -### Model definition - -This benchmarks show how to set translation motions as a function of spatial coordinates - definition of the advection therm. Discretization of the advection-diffusion equation leads to solution of the non-symmetric systems and stabilization techniques as a consistent SUPG, CAU or inconsistent stabilization is needed. - -!!! example "Numerical model definition:" - * 2D square$a = 1\ [m]$- * Constant thickness$1\ [m]$set to all elements - * Material model 01: - * Linear model ISOTROPIC, - * 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}]$, - * Set to region **ALL_ELEMENTS** - * Uniform initial temperature$293.15\ [K]$- * Constant temperature - set to region **LEFT**,$Temperature = 280\ [K]$- * Constant temperature - set to region **TOP**,$Temperature = 800\ [K]$- * Translation Motion - set to **ALL_ELEMENTS** - * Velocity in X direction$u_{x}=500*(Y-0.5)$- * Velocity in Y direction$u_{y}= -500*(X-0.5)$- - ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_13.png?style=centerme) - - !!! info "Stabilization" - **Consistent stabilization** - In ESPRESO standard SUPG (Streamline Upwind Petrov Galerkin method) or CAU (Consistent Approximate Upwind) stabilization techniques for advection-diffusion problems have to be use. - - **Inconsistent stabilization** - Stabilization by adding isotropic diffusion in the form$K_{id}=\delta_{id}h\left\Vert \mathbf{U}\right\Vert$- to the diffusion coefficient, where$U_{id}$term is tuned by parameter -$\delta_{id}$. Rule how to set the tuned parameter is in form:$\delta_{id}=0.5/q$, - where$q$is the order of the basis functions. This inconsistent - stabilization is possible to combine with previous ones stabilization - techniques. The original problem is then in the modified - form - - $$- -\nabla\cdot\left(\left(K+K_{id}\right)\nabla T\right)+\varrho\cdot c_{p}\cdot\mathbf{u}\cdot\nabla T=f. -$$ - -### Configuration definition - -For the simulation of the advection-diffusion problem user have to specify type of stabilization method (line 65), non-symmetric linear solver (line 78) and specify directional translation motion vector on the element sets (line 87-92). Configuration file for this example is in the list bellow. - -!!! config "ECF Configuration file >> squareSimpleWall_temperature_13.ecf" - python hl_lines="65 78 87 88 89 90 91 92" - {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_13.ecf!} -  - -:rocket: **Example how to run ESPRESO:** - -bash hl_lines="1" -$ mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_13.ecf - - -### Results - -The following figures were created in EnSight using ESPRESO results and showing temperature field and velocity profile. These results are contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_13/*. - -**Temperature Distribution** |**Translation Motion Direction** | -:-------------------------------:|:-------------------------------:| -![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_13.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_translation_13.png) - ---- -## Simple Wall 14 - -### Model definition - -This benchmark is the same as a previous one, but instead steady-state solver transient solver is used. Also in this type of simulation with nonzero advection therm, options for solution of the non-symmetric systems and stabilization techniques as a consistent SUPG, CAU or inconsistent stabilization is needed. - -!!! example "Numerical model definition:" - * 2D square $a = 1\ [m]$ - * Constant thickness $1\ [m]$ set to all elements - * * Linear transient solver - * Duration Time $t = 0.05$, - * Constant Time Step $\Delta t = 0.0005$ - * Material model 01: - * Linear model ISOTROPIC, - * 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}]$, - * Set to region **ALL_ELEMENTS** - * Uniform initial temperature $293.15\ [K]$ - * Constant temperature - set to region **LEFT**, $Temperature = 280\ [K]$ - * Constant temperature - set to region **TOP**, $Temperature = 800\ [K]$ - * Translation Motion - set to **ALL_ELEMENTS** - * Velocity in X direction $u_{x}=500*(Y-0.5)$ - * Velocity in Y direction $u_{y}= -500*(X-0.5)$ - - ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_13.png?style=centerme) - -### Configuration definition - -Configuration file for this example is in the list bellow. - -!!! config "ECF Configuration file >> squareSimpleWall_temperature_14.ecf" - python hl_lines="67 94 95 96 97 98 99" - {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_14.ecf!} -  - -:rocket: **Example how to run ESPRESO:** - -bash hl_lines="1" -$mpirun –np 4 espreso 2 2 2 2 50 50 -c squareSimpleWall_temperature_14.ecf - - -### Results - -The following figures shown temperature distribution in the square at the 3 times. These result is contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_14/*. - -**Temperature - Time**$\ 5e^{-4}$|**Temperature - Time**$\ 2.5e^{-2}$| **Temperature - Time**$\ 5e^{-2}$| -:-------------------------------:|:-------------------------------:|:-------------------------------:| -![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_14a.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_14b.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_14c.png) - - - - **Temperature distribution over time** | -:-------------------------------| - | - - - ---- -## Simple Wall 15 - - -### Model definition - -This benchmarks show how to solve nonlinear steady-state problem with translation motions as a function of spatial coordinates and how to set adaptive precision of inexact Newton Raphson method. Discretization of the advection-diffusion equation leads to solution of the non-symmetric systems and stabilization techniques as a consistent SUPG, CAU or inconsistent stabilization is needed. - -!!! example "Numerical model definition:" - * 2D square$a = 1\ [m]$- * Constant thickness$1\ [m]$set to all elements - * Material model 01: - * Linear model ISOTROPIC, - * 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}]$, - * Set to region **ALL_ELEMENTS** - * Uniform initial temperature$293.15\ [K]$- * Constant temperature - set to region **LEFT**,$Temperature = 280\ [K]$- * Constant temperature - set to region **TOP**,$Temperature = 800\ [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 - * Translation Motion - set to **ALL_ELEMENTS** - * Velocity in X direction$u_{x}=500*(Y-0.5)$- * Velocity in Y direction$u_{y}= -500*(X-0.5)$- - ![simpleWall_geometry](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simple_wall_15.png?style=centerme) - - -### Configuration definition - - -!!! config "ECF Configuration file >> squareSimpleWall_temperature_15.ecf" - python hl_lines="1" - {!./../benchmarks/heat_transfer/generator/2D/squareSimpleWall_temperature_15.ecf!} -  - -:rocket: **Example how to run ESPRESO:** - -bash hl_lines="1" -$ mpirun –np 4 espreso 2 2 2 2 100 100 -c squareSimpleWall_temperature_15.ecf - - -### Results - -The following figures were created in EnSight using ESPRESO results and showing temperature field and velocity profile. These results are contained in the :open_file_folder:*results/< DATE >/squareSimpleWall_temperature_15/*. - -**Temperature Distribution** |**Translation Motion Direction** | -:-------------------------------:|:-------------------------------:| -![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_15a.png) | ![](/espreso_fem/benchmarks/heat_transfer/2D/heat2D_benchmarks/img/simpleSquare_temperature_15b.png) - - -
- - **Newton Raphson Convergence History - constant GMRES precision** $\epsilon = 1e^{-8}$ | -:-------------------------------| -| - -
- - -#### Adaptive Precision - -In this section we specify Newton Raphson method with adaptive precision control for inner iterative solver. For solution of the nonlinear problems very small precision of the inner iterative solver have to be used ($\epsilon < 1e^{-8}$). For first few iteration of the Newton method is not necessary to have that small precision, but is possible with decreasing residuals in Newton method, decreasing precision of the inner solver adaptively and save some number of iterations of the inner solver by this method. -For example, we start with precision of the iterative solver $\epsilon=1e^{-4}$ and then adaptive precision control automatically decrease precision according to the Newton method requirements. - -Settings of the adaptive precision control is in the list bellow. User have to set option **ADAPTIVE_PRECISION** to **TRUE** in the **NONLINEAR_SOLVER** object and specify two constant which influence behavior of the adaptive precision control **R_TOL** and **C_FACT**. Last modification is setting of the **PRECISION** option to the larger value. - -!!! config "Adaptive precision control settings " - python hl_lines="15 16 17 23" - NONLINEAR_SOLVER { - METHOD NEWTON_RAPHSON; - - CHECK_TEMPERATURE TRUE; - CHECK_HEAT TRUE; - REQUESTED_TEMPERATURE_RESIDUAL 1E-5; - REQUESTED_HEAT_RESIDUAL 1E-4; - - STEPPING FALSE; - SUBSTEPS 1; - MAX_ITERATIONS 50; - LINE_SEARCH TRUE; - TANGENT_MATRIX_CORRECTION FALSE; - - ADAPTIVE_PRECISION TRUE; - R_TOL 0.1; - C_FACT 0.4; - } - - FETI { - METHOD TOTAL_FETI; - PRECONDITIONER DIRICHLET; - PRECISION 1E-04; - ITERATIVE_SOLVER GMRES; - REGULARIZATION ALGEBRAIC; - } -  - -On the graph bellow is depicted convergence history of the Newton with adaptive precision and starting precision $\epsilon=1e^{-4}$. Newton with fixed precision for all of th Newton iterations $\epsilon=1e^{-8}$ is depicted in previous graph. If we sum up all linear solver iterations from every Newton iteration, a)adaptive precision $GMRES_{it}=256$, b)constant precision $GMRES_{it}=343$ we obtain for this simple 2D example difference in number of performed iterations $\Delta=87$. This approach can be usefully used for complex geometries, where number of iterations significantly increases with decreasing precision of the inner linear solvers, and save by adaptive precision lot of computational time, because in the iterative solver most time consuming part of the solver is matrix vector product. - -
- - **Newton Raphson Convergence History - Adaptive precision** | -:-------------------------------| -| - -
- - -History of adaptively decreased precision is depicted on the next graph. - -
- - **History of the adaptive precision in GMRES** | -:-------------------------------| -| - -
- -Unconverged nonlinear solver residual history is depicted on next graph. If user set larger precision of the inner solver than is precision of the Newton method, solution does not converge. {== Be careful when setting up the combine iterative solvers precision. ==} - -
- - **Newton Raphson Convergence History - constant GMRES precision** $\epsilon < 1e^{-4}$ | -:-------------------------------| -| - -
- - - - - - - - - \ No newline at end of file