Quick start: your first model

In this tutorial you model a copper bar. One end is held at 20 °C, a heat flux of 100 kW/m² enters the other end, and all other faces are insulated. Heat flows along the bar, so the temperature rises linearly from the cold end to the hot end. The answer is easy to check by hand, so you can see that the whole chain works: geometry, material, physics, mesh, Elmer and post-processing.

What you will learn
  • Start a model with the Model Wizard.

  • Define parameters with units.

  • Create geometry and pick faces in the Graphics window.

  • Add a material and boundary conditions.

  • Mesh, solve, plot along a line, and evaluate a maximum.

Table 1. Model at a glance

Space dimension

3D

Physics

Heat Transfer in Solids (ht)

Study

Stationary

Solve time

about 1 second (511 nodes)

Expected result

maximum temperature 45 °C at the hot end

1. Create the model

  1. Start Elmer Studio. The New window opens. (Later, use File  New or Ctrl+N.)

    New window
    Figure 1. The New window: Model Wizard, Blank Model or an Application Library example
  2. Click Model Wizard.

  3. Under Select Space Dimension, click 3D.

  4. Under Select Physics, expand Heat Transfer, select Heat Transfer in Solids (ht) and click Add. It appears under Added physics interfaces.

    Model Wizard
    Figure 2. Choosing the physics in the Model Wizard
  5. Click Study, select Stationary and click Done.

The Model Builder now holds an empty model with the usual nodes: Global Definitions, Component 1 (with Geometry 1, Materials, Heat Transfer in Solids, Mesh 1), Study 1 and Results. The Heat Transfer interface already contains its default features: Solid 1, Initial Values 1 and Thermal Insulation 1 on all exterior boundaries.

COMSOL users will recognise every node. Coming from COMSOL lists the few differences.

2. Parameters

Parameters keep the model easy to change. Values may carry units in square brackets. Elmer Studio converts everything to SI before Elmer sees it.

  1. Click Home  Parameters, or select Global Definitions › Parameters 1 in the Model Builder.

  2. Type into the table (click an empty row to add a line):

    Name Expression Description

    L

    10[cm]

    Bar length

    W

    2[cm]

    Bar width

    H

    1[cm]

    Bar height

    T0

    20[degC]

    Temperature of the cold end

    q0

    1e5[W/m^2]

    Heat flux into the hot end

The Value column shows each parameter’s evaluated value.

Parameters table
Figure 3. Parameters with units

3. Geometry

  1. Click Geometry  Block (in the Primitives group). Block 1 appears under Geometry 1.

  2. In the Settings window, under Size and Shape, enter Width L, Depth W and Height H. Leave the position at the origin.

  3. Click Geometry  Build All, or press F8.

The Graphics window shows the bar, 10 cm long in x. The Messages pane reports 1 domains, 6 boundaries, 12 edges, 8 points.

Block geometry
Figure 4. The bar after Build All
F7 (Build Selected) builds the geometry up to the selected node, and F8 builds everything. Form Union at the end of the sequence is added for you.

4. Material

  1. Click Home  Add Material. The Add Material window opens on the right.

  2. Expand Built-in, select Copper and click Add to Component.

Copper appears under Materials and applies to all domains. Its Settings window has a Material Contents table. Each property the physics needs (here thermal conductivity, density and heat capacity) is marked as present. Copper’s thermal conductivity is 400 W/(m·K).

Material settings
Figure 5. Copper, with the properties the physics uses

5. Boundary conditions

You select boundaries by clicking them in the Graphics window. Hover a face to highlight it in red; click to add it to the selection (blue). Click it again to remove it. See Selections for more.

Cold end: fixed temperature

  1. In the Model Builder, right-click Heat Transfer in Solids and choose Boundaries  Temperature. Or use Physics  Boundaries  Temperature.

  2. Click the end face at x = 0 (boundary 1, the small face on the left). Its number appears in the selection list.

  3. Set Temperature T0 to T0.

Temperature boundary condition
Figure 6. Temperature 1 on boundary 1

Hot end: heat flux

  1. Right-click Heat Transfer in Solids and choose Boundaries  Heat Flux.

  2. Rotate the view (drag with the left mouse button) until you see the far end of the bar, at x = L, and click it (boundary 6).

  3. Keep Flux type General inward heat flux and set Heat flux q0 to q0.

Heat flux boundary condition
Figure 7. Heat Flux 1 on boundary 6, the far end of the bar

The four long faces keep the default Thermal Insulation. A later feature overrides an earlier one on the same boundary, as in COMSOL.

6. Mesh

  1. Click Home  Build Mesh.

The default mesh is physics-controlled with element size Normal: 226 quadratic tetrahedra and 511 nodes. The Messages pane reports the counts and the minimum element quality. Change the size with Home  Element Size, or add your own Size and Free Tetrahedral nodes (see Mesh).

Mesh
Figure 8. The mesh

7. Solve

  1. Click Home  Compute, or press Ctrl+=.

Elmer Studio writes the Elmer input files, runs ElmerSolver and loads the result. While it runs, the Progress pane and the Convergence Plot tab show its progress. When it is done, two default plot groups appear under Results: Temperature (ht) and Isothermal Contours (ht). The temperature plot opens.

Temperature plot
Figure 9. Temperature: cold (dark) at x = 0, hot (light) at x = L

8. Plot the temperature along the bar

  1. Click Results  Cut Line (in the Datasets group). Cut Line 1 appears under Results › Datasets.

  2. Enter Point 1: x 0, y W/2, z H/2; Point 2: x L, y W/2, z H/2.

  3. Click Results  1D Plot Group. It comes with a Line Graph 1.

  4. Select Line Graph 1. Set Dataset to Cut Line 1, y-axis expression to T and Unit to °C.

  5. Click Plot at the top of the Settings window.

Line graph of temperature
Figure 10. Temperature along the centre line of the bar

The graph is a straight line from 20 °C to 45 °C.

9. Evaluate the maximum

  1. Click Results  Volume Maximum (in the Evaluation group).

  2. In the Expressions table, enter T with unit degC.

  3. Click Evaluate.

The Table pane shows the maximum, 45, and where it is: at x = 0.1 m, on the hot end.

Volume Maximum in the Table pane
Figure 11. Volume Maximum: 45 °C at x = L

10. Check the result

With insulated sides, all the heat q0 flows along the bar. Fourier’s law then gives a linear profile:

\[T(x) = T_0 + \frac{q_0\,x}{k}, \qquad T(L) = 20\ ^\circ\mathrm{C} + \frac{10^5\ \mathrm{W/m^2}\times 0.1\ \mathrm{m}}{400\ \mathrm{W/(m\,K)}} = 45\ ^\circ\mathrm{C}\]

Elmer Studio’s answer is exactly this, because quadratic elements represent a linear field without error.

11. Save

Press Ctrl+S and choose a file name. The model is saved as an .esm file, together with its solution, so the plots are still there when you open it again.

Where next

  • Change a parameter (for example q0), then press Ctrl+=. The geometry, mesh and solution update.

  • Sweep it: right-click Study 1, add a Parametric Sweep over q0, and plot the maximum temperature against it with a Global Evaluation. The Busbar tutorial shows how.

  • See the Elmer input: Study  Show Elmer Input File shows the .sif that was generated.

  • Learn the desktop in The desktop and Keyboard and mouse, or continue with the Tutorials.

tools/screenshot_docs.py in the source repository builds this exact model in the real GUI. It recreates these screenshots and checks the 45 °C.