Giter Club home page Giter Club logo

Comments (10)

adtzlr avatar adtzlr commented on May 23, 2024

Gauss-Legendre points and weights are now calculated by numpy (#96). Two improvements should be made:

  • check if cell_type is Quad or Hexahedron, else raise NotImplementError
  • for linear quadratures the point ordering should be permuted in order to match cell ordering.

The first point is probably not a good idea because this also works for higher order elements if a permuted quadrature is applied,

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

permutations are

  • Quad permute = [0, 1, 3, 2]
  • Hexahedron permute = [0, 1, 3, 2, 4, 5, 7, 6]

set them as default for order=1 and dim=2 or 3

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

Fixed for line, quad and hexahedron by #97 . For all other types, projection is still wrong. Probably add a warning or something else.

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

Another method is to use discontinous stress fields. This involves a disconnected mesh (see #101 and #102 ) as well as an inverse quadrature rule (see #103 and #104). Further work has to be done on modified regions, fields.

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

There was a typo in tovoigt which affected all versions <= 1.0.1. fixed; see #105 and #106

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

Another method is to use discontinous stress fields. This involves a disconnected mesh (see #101 and #102 ) as well as an inverse quadrature rule (see #103 and #104). Further work has to be done on modified regions, fields.

this code does the job (getting started example):

# ...
from felupe.math import dot, det, transpose, tovoigt

s = dot(P(F), transpose(F)) / det(F)

s2 = tovoigt(s).T.reshape(-1, 6)
m2 = mesh.as_discontinous()
q2 = quadrature.inv()
r2 = felupe.Region(m2, element, q2, grad=False)
f2 = felupe.Field(r2, dim=6, values=s2)

cauchy2 = f2.interpolate().T.reshape(-1, 6)

v2 = displacement.values[mesh.cells].reshape(-1, 3)
u2 = felupe.Field(r2, dim=3, values=v2)

felupe.tools.save(
    r2,
    u2,
    filename="result_with_cauchy_dg.vtk",
    point_data={"CauchyStress": cauchy2},
)

image

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

and this is the result from tools.topoints() (stress values translated from quadrature to mesh points; averaged), same colormap as above.

image

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

What is missing:

  • add a tools.project function for the stress projection to mesh-points (basically the code-snippet above)
  • argument to average results
  • check how to handle mixed field problems

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024
  • add tools.project() to Getting Started Example (see tests)

from felupe.

adtzlr avatar adtzlr commented on May 23, 2024

What about axisymmetric analyses?

from felupe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.