-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate ex21 and add new convergence test #75
Comments
Either this was renamed to ex21 at some point or there was a typo. |
Picking up here from the duplicate #318. I recall that I also noticed some anomalies in gdmcbain/fenics-tuto-in-skfem#3 in translating the FEniCS tutorial 06 elastostatic cantilever problem. There it was FEniCS that was inaccurate but the anomaly went away when its mesh was refined. I'm a bit worried by this issue. I'll try to get to bottom of it. I assume it's not |
Ta for Day & Romera (2004). Rather than exact solutions to a continuous problem though, I'm particularly interested in exact or at least accurate eigensolutions of the discrete finite element problem on a definite mesh with definite elements. There's some on a very simple geometry and mesh in:
It's a 550 × 50 × 5 mm cuboidal cantilever, fixed at one of the small ends, meshed with 44×4×1 hexahedra. I presume these are S2 #314. The eigenfrequencies quoted for this very coarse mesh are similar to the analytical values from one-dimensional Euler–Bernoulli beam theory. I've had these checked in ANSYS and it gives the same values for 'linear' elements which I presume are the same as |
An even coarser example:
Example 5.3 (§5.8) is a cube fixed on one side, reduced to a quarter (½×½×1) by the two planes of symmetry, and meshes with two cubical |
I'll also check the thermal eigenvalues of beams.msh and its refinements; that would be a good test, touching everything except the linear elastic bilinear form. |
…and the mass bilinear form, since the problem is scalar rather than vector. So also the element is just The thermal version, beams_thermal.py.txt, seems to behave fine: with
Here's the fundamental thermal mode on the second refinement. |
Back on the original elastic problem on the original mesh, I repeated the eigencalculation with L = eigh(Kint.toarray(), Mint.toarray())[0][:len(L)]
print('Natural frequencies (eigh):', np.sqrt(L) / 2 / np.pi) and obtained
which is identical to the results of Similarly with
identical to (Recall from #318 that the fundamental frequency is estimated as 80, 61, 47, … on the 0th, 1st, 2nd, … refined meshes.) |
As a test of np.linalg.norm(u[ib.nodal_dofs], np.inf, axis=1) The results:
which seems reasonable. N. B.:—This example uses |
Modifying ex11 to use m = MeshTet.init_tensor(*[(0., 1.)]*3)
m.refine(4)
e1 = ElementTetP1() gives:
which is not quite as good as the original hexahedra but still clearly convergent to the same limit. |
Here's a script to reproduce the example of Ghodge et al (2018): ghodge.py.txt but using It's actually not so bad:
which does look as though it's tending towards the values [13.476, 84.458, 134.76] quoted in the paper. The refinement here is only in the x and y directions, there's always only one cell through the z-thickness. This, I think, explains why the third mode seems to be converging faster than the first two: it's a 'yawing' mode, in the xy-plane. Perhaps what's required for ex21 is |
Some guesses:
I should try learning more about eigenvalue problems. |
Tricks?! How interesting. (Right now I wish that such examples weren't so interesting because I have some to solve, but, nevertheless, how interesting!) What counts as tricks? Different quadratures? Mixed methods involving stress or strain instead of the current 'displacement' formulation? Exotic elements? Macroelements?
I did try that, yes. I think
Yes, but Thanks! |
O. K. I've found an easy fix:
This works here too:
There are fancier tricks (reduced quadrature, bubble functions, …) but this'll do for now; I'll modify ex21 accordingly. |
A further thought on this (I'll launch a new issue if it goes anywhere). The switch from I suspect what's happening is that In short, ‘I should try learning more about eigenvalue problems’ too. |
There's no need for skullduggery like swapping the stiffness and mass, |
The 'fixed' boundary conditions are only applied to nodal degrees of freedom, scikit-fem/docs/examples/ex21.py Lines 28 to 32 in 0973571
but since the elements were upgraded to quadratic in #322, that's not all of them. |
Checked the eigenvalues in ex17 and they seem to be a bit high for my taste, so I'm not sure whether the equations are correct or not.
Found an analytical test case from https://cfwebprod.sandia.gov/cfdocs/CompResearch/docs/elast.pdf.
Todo: implement a convergence test.
The text was updated successfully, but these errors were encountered: