#. # NAFEMS LE11 “Solid Cylinder/Taper/Sphere-Temperature” benchmark
#.
#. ::: {#fig:nafems-le11-problem}
#. ![Problem statement](nafems-le11-problem.png){width=48%}
#. ![Structured hex mesh](nafems-le11-mesh.png){width=48%}
#. 
#. The NAFEMS LE11 problem formulation
#. :::
#.
#. Following the spirit from LE10, note how easy it is to give a
#. space-dependent temperature field in FeenoX.
#. Just write $\sqrt{x^2+y^2}+z$ like `sqrt(x^2 + y^2) + z`!
#.
#$ $ gmsh -3 nafems-le11.geo
#$ [...]
#$ $ feenox nafems-le11.fee
#$ sigma_z(A) = -105.04 MPa
#$ wall time  = 3.24 seconds
#$ $
# NAFEMS Benchmark LE-11: solid cylinder/taper/sphere-temperature
PROBLEM mechanical 3D
READ_MESH nafems-le11.msh

# linear temperature gradient in the radial and axial direction
# as an algebraic expression as human-friendly as it can be
T(x,y,z) := sqrt(x^2 + y^2) + z

BC xz     v=0       # displacement vector is [u,v,w]
BC yz     u=0       # u = displacement in x
BC xy     w=0       # v = displacement in y
BC HIH'I' w=0       # w = displacement in z

E = 210e3*1e6       # mesh is in meters, so E=210e3 MPa -> Pa
nu = 0.3            # dimensionless
alpha = 2.3e-4      # in 1/ºC as in the problem
SOLVE_PROBLEM

# for post-processing in Paraview
WRITE_MESH nafems-le11.vtk VECTOR u v w   T sigmax sigmay sigmaz

PRINT "sigma_z(A) =" %.2f sigmaz(1,0,0)/1e6 "MPa" SEP " "
PRINT "wall time  =" %.2f wall_time() "seconds"  SEP " "
#> ::: {#fig:nafems-le11-result}
#> ![Problem statement](nafems-le11-temperature.png){width=48%}
#> ![Structured hex mesh](nafems-le11-sigmaz.png){width=48%}
#> 
#> The NAFEMS LE11 problem results
#> :::
