Переглянути джерело

fixed figures in pdf with subfigs

tags/A^0
gtheler 6 роки тому
джерело
коміт
371a8c4f79
1 змінених файлів з 64 додано та 3 видалено
  1. +64
    -3
      pipe-linearized.md

+ 64
- 3
pipe-linearized.md Переглянути файл

@@ -260,9 +260,35 @@ if(output_format, html,
]])
divert(0)

forloop(i, 1, n_grids, [[
![Mesh for $n=[[]]i$](pipe-mesh-[[]]i.png){[[#]]fig:mesh[[]]i width=80%}
]])

dnl forloop(i, 1, n_grids, [[
dnl ![Mesh for $n=[[]]i$](pipe-mesh-[[]]i.png){[[#]]fig:mesh[[]]i width=80%}
dnl ]])

:::: {#fig:mesh12}
![$n=1$](pipe-mesh-1.png){#fig:mesh1 width=90%}

![$n=2$](pipe-mesh-2.png){#fig:mesh2 width=90%}

Parametric grids with\ $n$ elements through the pipe thickness.
::::

:::: {#fig:mesh34}
![$n=1$](pipe-mesh-3.png){#fig:mesh3 width=90%}

![$n=2$](pipe-mesh-4.png){#fig:mesh4 width=90%}

Parametric grids with\ $n$ elements through the pipe thickness.
::::

:::: {#fig:mesh56}
![$n=1$](pipe-mesh-5.png){#fig:mesh5 width=90%}

![$n=2$](pipe-mesh-6.png){#fig:mesh6 width=90%}

Parametric grids with\ $n$ elements through the pipe thickness.
::::


![Comparison between first (left) and second-order (right) elements. Even though both of them have the same number of elements, the latter can better represent curved surfaces at the cost of having many more nodes.](distorted.png){#fig:distorted}

@@ -287,10 +313,14 @@ Let us now switch to analyze the stresses, where the difference between first an

![Radial normal stress $\sigma_r(r) = \sigma_3(r)$](sigmar.svg){#fig:sigmar}

:::: {#fig:sigmas-l-theta}
![Longitudinal normal stress $\sigma_l(r) = \sigma_2(r)$](sigmal.svg){#fig:sigmal}

![Tangential normal stress $\sigma_\theta(r) = \sigma_1(r)$](sigmatheta.svg){#fig:sigmatheta}

Longitudinal and tangential normal stresses
::::

The reason of this behavior is that in first-order tetrahedra, the derivatives of the shape functions are uniform in space. Therefore, the stresses (that depend on the gradient of the displacements) are uniform throughout each element. The values of these uniform stresses are somehow an average of the contribution of each of the four nodes of the tetrahedron. For those elements that are in the bulk of the domain, the processes of computing the stresses at the nodes---which depends on the finite-element code implementation but in general involves averaging back the contributions of each of the elements that share a node---gives reasonable results because some of the element would contribute by defect and some by excess to the final nodal average. But those nodes that are located in the internal (external) faces of the pipe will have elements contributing only with values by excess (defect). Therefore, first-order elements will mostly give incorrect stresses at $r=a$ and $r=b$, overestimating them in the former and underestimating them in the latter. This is exactly the behavior of the first-order stresses obtained in [@fig:sigmar;@fig:sigmal;@fig:sigmatheta]. Second-order elements still have non-uniform spatial derivatives and they can recover (almost^[The rate of convergence of the stresses in the nodes located in the boundary of the domain is linear, while it is quadratic in the bulk.]) the real values for the stresses at the nodes located in the boundary of the domain.

## Linearized stresses {#sec:linearized}
@@ -303,30 +333,49 @@ Figures [-@fig:M_tresca]--[-@fig:MB_3] show the membrane $\text{M}$ and membra

This last statement can be explained using the uniform-derivative reasoning explained in [@sec:stresses]. As the membrane stress is essentially an average along the stress classification line, the excess and defect errors committed by the first-order grids in $r=a$ and $r=b$ almost cancel out. Therefore, the error for computing $\text{M}$ with linear elements is not that relevant. However, the membrane plus bending stress is a first-order momentum of the stress distribution. This time, the deviations do not cancel out and they both contribute with the same sign to the value of linearized stress. It is this effect that gives such a slow convergence for $\text{MB}$.

:::: {#fig:tresca}
![Membrane Tresca stresses](M_tresca.svg){#fig:M_tresca}

![Membrane plus bending Tresca stresses.](MB_tresca.svg){#fig:MB_tresca}

Linearized Tresca stresses
::::

:::: {#fig:vonmises}
![Membrane Von Mises stresses.](M_vonmises.svg){#fig:M_vonmises}

![Membrane plus bending Von Mises stresses.](MB_vonmises.svg){#fig:MB_vonmises}

Linearized Von Mises stresses
::::


:::: {#fig:principal1}
![Membrane principal stresses 1.](M_1.svg){#fig:M_1}

![Membrane plus bending principal stresses 1.](MB_1.svg){#fig:MB_1}

Linearized principal stresses\ 1
::::



:::: {#fig:principal2}
![Membrane principal stresses 2.](M_2.svg){#fig:M_2}

![Membrane plus bending principal stresses 2.](MB_2.svg){#fig:MB_2}

Linearized principal stresses\ 2
::::

:::: {#fig:principal3}
![Membrane principal stresses 3.](M_3.svg){#fig:M_3}

![Membrane plus bending principal stresses 3.](MB_3.svg){#fig:MB_3}

Linearized principal stresses\ 3
::::

## Computational resources {#sec:resources}

As evident as it it that second-order elements give far superior results than linear ones, any fair analysis needs to compare solutions that involve similar amounts of computational efforts both in [random-access memory](https://en.wikipedia.org/wiki/Random-access_memory) and number of [floating-point operations](https://en.wikipedia.org/wiki/FLOPS)---otherwise we would end up comparing apples and oranges. That is to say, we might be comparing results from a run that takes one week with a one-second execution and then conclude that the first scheme gives better results than the second. Yes, it does, but it is not a fair comparison.
@@ -335,14 +384,22 @@ Roughly speaking, the CPU and memory consumption depend non-linearly on the size

In effect, the number of elements as a function of $n$ is the same for both grids, as it can seen in [@fig:elements-vs-n]. But the number of nodes is far higher in the second-order grid for the same $n$ ([@fig:nodes-vs-n]). This leads to more CPU and memory, as shown in [@fig:cpu-vs-n; @fig:memory-vs-n].

:::: {#fig:ele-nodes-vs-n}
![The number of elements vs. $n$ is the same for both grids.](elements-vs-n.svg){#fig:elements-vs-n}

![The number of nodes vs. $n$ is higher for the second-order case.](nodes-vs-n.svg){#fig:nodes-vs-n}

Elements and nodes vs.\ $n$
::::

:::: {#fig:cpu-mem-vs-n}
![CPU time vs. $n$](cpu-vs-n.svg){#fig:cpu-vs-n}

![Memory vs. $n$](memory-vs-n.svg){#fig:memory-vs-n}

CPU time and memory vs.\ $n$
::::

## Error as a function of CPU time {#sec:error}

So, on the one hand, for a fixed $n$, second-order elements give far better results than linear elements. On the other hand, the former consume far more computational resources than the latter. Therefore, in order to compare apples and apples, in principle the comparison of results should be performed by fixing the number of _nodes_ (and, again, not the number of _elements_) as discussed above. But given that the problem we are solving does have analytical solutions, we can also analyze the errors associated to each of the finite-element formulations as a function of the computational effort.
@@ -351,10 +408,14 @@ Figures [-@fig:error-M-vs-cpu] and [-@fig:error-MB-vs-cpu] show a log-log plot o

These two figures quantitatively illustrate the effect discussed in [@sec:linearized] that the membrane and the membrane plus bending stress are zero and first-order moments respectively. In the former case, the excess and defect errors of the extreme nodes cancel out whereas in the latter case they do not.

:::: {#fig:errors-vs-n}
![Error in the computation of membrane stress.](error-M-vs-cpu.svg){#fig:error-M-vs-cpu}

![Error in the computation of membrane plus bending stress.](error-MB-vs-cpu.svg){#fig:error-MB-vs-cpu}

Errors vs.\ $n$
::::

# Conclusions {#sec:conclusions}

There are a few conclusion we can draw out of the results obtained in this report:

Завантаження…
Відмінити
Зберегти