nutofem / nuto

NuTo - yet another finite element library
https://nuto.readthedocs.io
Boost Software License 1.0
17 stars 5 forks source link

Pde jacobian adds #175

Closed pmueller2 closed 6 years ago

pmueller2 commented 6 years ago

Makes the Jacobian accessable from CellIPData and adds extended Jacobian for 2D in 3D or 1D in 2D situations.

Example: The Jacobian for 2D in 3D is a rectangular matrix(3,2). If you add the surface normal as a 3rd column you get a usual 3x3 matrix again. Its inverse can be used in the transformation of gradients just as usual giving you the so called surface gradient (i.e. the gradient with its normal component missing).

Apart from that the Jacobian columns represent the covariant basis for vectors in tangent space of the surface element and the Rows of the Inverse their reciprocals and may thus be useful in laws dealing with surfaces.

codecov[bot] commented 6 years ago

Codecov Report

Merging #175 into PDE_reviewed will increase coverage by 0.12%. The diff coverage is 98.41%.

Impacted file tree graph

@@               Coverage Diff                @@
##           PDE_reviewed     #175      +/-   ##
================================================
+ Coverage         64.59%   64.71%   +0.12%     
================================================
  Files               284      284              
  Lines             11223    11266      +43     
================================================
+ Hits               7249     7291      +42     
- Misses             3974     3975       +1
Impacted Files Coverage Δ
src/mechanics/cell/CellIpData.h 97.77% <ø> (ø) :arrow_up:
test/mechanics/cell/Jacobian.cpp 100% <100%> (ø) :arrow_up:
src/mechanics/cell/Jacobian.h 96.42% <97.29%> (-1.01%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f5c3e81...57d46a1. Read the comment docs.

joergfunger commented 6 years ago

I'm not arguing that we don't need the normals to a local 2D in 3D coordinate system I only argue that this should be not included in the Jacobian, but instead be related to a new orthogonal coordinate system attached to this integration point. E.g. when I'm interested to apply not only a pressure, but something in the tangential direction, I would need normalized basis vectors (this becomes more difficult if we would consider none-cartesian coordinates). Similar, when calculating some derivatives (say strains) I won't be able to use this approach (since I do not need the derivative with respect to the natural coordinate system). In a similar way, when we are using e.g. a 1D truss in 3D. There are assumptions about the stress-strain relation (only s_xx is not vanishing). Using the above procedure, we would violate this. My suggestion in this case would be to rotate the nodal values as well as the coordinates in a local orthogonal coordinate system, calculate element matrices in this 1D system and then blow up the matrix (or the vector) to 3D. This same rotation matrix can also be used for the calculation of pressures, but it is (as opposed to the Jacobian above) an orthogonal matrix. Thus, my suggestion is to not add this to the Jacobian, but instead introduce another rotation matrix.

pmueller2 commented 6 years ago

Since it causes more questions than enlightenment and since elements of higher codimension are not in use and its application in finite strain seems also far away I will close this pull request. When the time comes it will reopen probably in a similar fashion.