JuliaFEM / JuliaFEM.jl

The JuliaFEM software library is a framework that allows for the distributed processing of large Finite Element Models across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage.
http://juliafem.github.io/JuliaFEM.jl/latest/
MIT License
250 stars 66 forks source link

Add postprocessing features #100

Closed ahojukka5 closed 7 years ago

ahojukka5 commented 7 years ago

Introduction

This is related to issue #94. Purpose of this pull request is to improve postprocessing abilities so that we can do more realistic analysis of results. More or less this involves reading the quantities from secondary fields, like stress, strain, check contact pressures, reaction forces and so on. Key point in here was to create a standard way to do postprocessing after solution of primary field is found and write these results to Xdmf file ready for visual inspection using Paraview.

As a result, we now have new variable postprocess_fields in datatype Problem, where names of optional fields are stored. After that user must define new function postprocess!(problem, time, field_name) and function is automatically run by solver for problem after solution. The idea in action can be seen for example, here and here is test.

Example

We analyze the same splitted unit block as in contact patch tests,

image

image

Relevant commands in test file are

push!(upper.postprocess_fields, "strain", "stress")
push!(lower.postprocess_fields, "strain", "stress")
for bc in [bc_upper, bc_lower, bc_sym13, bc_sym23]
    push!(bc.postprocess_fields, "reaction force")
end
push!(interface.postprocess_fields, "contact pressure")

Results

Deformed shape is already known

image

For example, strain and stress component 6, extrapolated from Gauss points to elements:

image

image

Parts has different modulus of elasticity, for that reason strain of upper block differs from lower but stress is still constant. Contact pressure:

image

Reaction force:

image

Further notes

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.9%) to 90.171% when pulling eff89a0c4bc0170f08e21deffc1c0f64670a2711 on feature/postprocess into 48006a144d27d5b3512c4ebd6ad0fb077624e4ca on master.