fcFEM - FEA from start to finish

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Added an example of two interconnecting tubes to the repo:


Tubes_Geometry.png
Tubes_Geometry.png (28.78 KiB) Viewed 6768 times
Tubes_Mesh.png
Tubes_Mesh.png (82.12 KiB) Viewed 6768 times
Tubes_Deformation.png
Tubes_Deformation.png (133.33 KiB) Viewed 6768 times
.xdp_Tubes_Load_Deformation.png
.xdp_Tubes_Load_Deformation.png (21.39 KiB) Viewed 6768 times
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: fcFEM - FEA from start to finish

Post by Syres »

gbParametric wrote: Mon Aug 29, 2022 12:16 pm I would be interested in testing this on Windows as well, if someone manages to get this working, any tips will be apriciated. :)
These are the most thorough instructions I found for getting scikit-sparse installed on Windows and no I haven't done it myself: https://github.com/EmJay276/scikit-spar ... stallation
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

I have reinstated the Drucker-Prager material model. This means that analyses with frictional materials are possible with the current version.

Here an example of an embankment (dike) with ditch. A very common sight in the Dutch landscape.

Cross Section of Embankment with Ditch.png
Cross Section of Embankment with Ditch.png (26.9 KiB) Viewed 3238 times

In a first analysis the material is assumed fully cohesive with a very low shear strength of 5kPa, representing undrained behavior of very soft clay.

By incrementing the self-weight it is possible to judge stability of the embankment.

fcFEM_Embankment _with_Ditch (Phi=0) Load-Deformation.png
fcFEM_Embankment _with_Ditch (Phi=0) Load-Deformation.png (20.11 KiB) Viewed 3238 times

The load-deflection curve indicates failure at a load factor of 0.5, implying the embankment is not stable.

The deformation shows a circular slip surface extending into the ditch.

fcFEM_Embankment _with_Ditch (Phi=0) Deformation.png
fcFEM_Embankment _with_Ditch (Phi=0) Deformation.png (168.63 KiB) Viewed 3238 times

If the embankment is built up slowly and water is allowed to drain from the soil skeleton, we can take account of some friction. Assuming this is a modest 10 degrees, the stability of the embankment becomes much better.

fcFEM_Embankment _with_Ditch (Phi=10) Load-Deformation.png
fcFEM_Embankment _with_Ditch (Phi=10) Load-Deformation.png (21.47 KiB) Viewed 3238 times

The load factor at failure now exceeds one, meaning the full weight can be applied.

Finally, the failure mechanism shows a smaller slip surface.

fcFEM_Embankment _with_Ditch (Phi=10) Deformation.png
fcFEM_Embankment _with_Ditch (Phi=10) Deformation.png (121.76 KiB) Viewed 3238 times
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

I have implemented the Mohr Coulomb model. Although the Drucker Prager model runs about twice as fast, it has the drawback that it only approximates the frictional behavior of soils and therefore usually over-predicts collapse loads.

I used the following smooth strip footing problem to validate the implementation of the Mohr Coulomb model:

Prandtl_1.png
Prandtl_1.png (44.66 KiB) Viewed 3129 times

and modeled this with the following coarse mesh:

Prandtl_4.png
Prandtl_4.png (162.54 KiB) Viewed 3129 times

By taking account of symmetry, only half the problem needs to be modeled.

For the chosen material parameters, the Prandtl solution predicts a collapse pressure of 14.835 times the cohesion. For the footing dimensions chosen in FreeCAD (0.5x0.25m) this yields a 909 kN collapse load. The fcFEM analysis predicts a collapse load of 928 kN or 2% above the theoretical solution.

Prandtl_2.png
Prandtl_2.png (44.54 KiB) Viewed 3129 times

Although the Prandtl solution (like most theoretical solutions for collapse loads) is only valid for material with PHI = PSI, it is used in practical engineering regardless of this limitation. To judge the validity of this approach, I repeated the analysis for PHI = 20 degrees and PSI = 0 degrees.

Prandtl_3.png
Prandtl_3.png (55.6 KiB) Viewed 3129 times

As can be seen from the load-deflection curve, now the collapse load reduces to 880 kN (3% below the Prandtl solution). So the assumption that the dilation angle PSI doesn't matter is incorrect.

The sensitivity to PSI can be explained as follows. When the soil dilates at failure and is restricted to do so due to physical or modelling constraints, the pressure will go up and increase the frictional strength. In the current analysis the combination of a high Poission's ratio and limited mesh size makes the analysis extra sensitive to the choice of dilation angle.
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

A better demonstration of the effect of dilation is the so-called trapdoor problem. It represents a trapdoor under a layer of soil that is raised to measure the resistance. The latter case is representative of a flat anchor pulled from the soil.

In the first analysis I take friction angle PHI=30 degrees and dilation angle PSI=0 degrees to represent a realistic non-dilatent soil. The cohesion is kept at 10 kPa in all analyses. The first picture shows that the deformation at failure is restricted to a rather narrow region above the trapdoor.

Trapdoor_Psi=0_deformation.png
Trapdoor_Psi=0_deformation.png (134.3 KiB) Viewed 3077 times

This is even better visible if we project the velocity arrows at failure:

Trapdoor_Psi=0_deformation_PV.png
Trapdoor_Psi=0_deformation_PV.png (185.46 KiB) Viewed 3077 times

However, if we increase the dilation angle to PSI=30 degrees, the deformation spreads out over the width of the model

Trapdoor_Psi=30_deformation.png
Trapdoor_Psi=30_deformation.png (139.51 KiB) Viewed 3077 times

and the velocity arrows show a conical slip surface

Trapdoor_Psi=30_deformation_PV.png
Trapdoor_Psi=30_deformation_PV.png (339.92 KiB) Viewed 3077 times

Due to the longer slip surface, the collapse load in the second analysis is also much higher than in the first analysis

Screenshot from 2022-09-22 16-08-23.png
Screenshot from 2022-09-22 16-08-23.png (51 KiB) Viewed 3077 times

So, this example conclusively demonstrates the importance of dilation for collapse analyses
User avatar
NewJoker
Veteran
Posts: 3017
Joined: Sun Oct 11, 2020 7:49 pm

Re: fcFEM - FEA from start to finish

Post by NewJoker »

HarryvL wrote: Thu Sep 22, 2022 9:46 am I have implemented the Mohr Coulomb model.
Great, especially since CalculiX doesn't support this material model and the Drucker-Prager model is also unavailable there normally (but at least it can be found as an example of UMAT subroutine in the documentation).
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Syres wrote: Wed Aug 31, 2022 4:27 pm
gbParametric wrote: Mon Aug 29, 2022 12:16 pm I would be interested in testing this on Windows as well, if someone manages to get this working, any tips will be apriciated. :)
These are the most thorough instructions I found for getting scikit-sparse installed on Windows and no I haven't done it myself: https://github.com/EmJay276/scikit-spar ... stallation
The README on the GitHub repo for Scikit-Sparse was updated late last year with a section on Windows installation: https://github.com/scikit-sparse/scikit ... /README.md. I don't have a Windows machine so cannot test it myself.
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

The following should work:

1) download Miniforge3: https://github.com/conda-forge/miniforg ... x86_64.exe
2) run the installer: Miniforge3-Windows-x86_64.exe
3) find and run Miniforge Prompt on your system - this opens a Miniforge Prompt: (base) C:\"path">
4) create a new virtual environment: (base) C:\"path"> mamba create --name fcFEM (or any other name of your choice)
5) change into the new environment: (base) C:\"path"> mamba activate fcFEM (or the other name you chose)
6) install freeCAD and dependencies: (fcFEM) C:\"path"> mamba install freecad scipy numba matplotlib scikit-sparse (with spaces and no commas)
7) check with python if the dependencies can be imported: (fcFEM) C:\"path"> python
8) >>> import scipy.sparse
9) >>> import sksparse.cholmod
10) if no problems quit python and start freecad: (fcFEM) C:\"path"> freecad

The details of where to install fcFEM itself can be found in the README file: https://github.com/HarryvL/fcFEM-basic#readme

Could somebody with a Windows machine please test this and let us know?
Last edited by HarryvL on Mon Oct 02, 2023 3:40 pm, edited 2 times in total.
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

I tried this on my friendly neighbour's Windows machine and it works.

PS: I did hit this problem: viewtopic.php?t=36087&start=40#p710705 and solved it with the workaround here: viewtopic.php?t=36087&start=40#p679070
Post Reply