Home

Awesome

<p align="center"> <img src="docs/src/assets/nnfem.gif" alt="NNFEM"/> </p>

NNFEM is a

⚠️ NNFEM.jl is now superseded by AdFem.jl, a computational-graph-based finite element library for inverse modeling. NNFEM.jl will be no longer actively developed.

Documentation

Install NNFEM

Install via Julia registery

using Pkg; Pkg.add("NNFEM")

If you intend to develop the package (add new features, modify current functions, etc.), we suggest developing the package (in the current directory (NNFEM.jl))

julia> ]
pkg> dev .

When necessary, you can delete the package (in the current directory (NNFEM.jl))

julia> ]
pkg> rm NNFEM

If you only want to use the package and do not want to install the dependencies manually, do

julia> ]
pkg> activate .
(NNFEM) pkg> instantiate

Code structure

Basic finite element library

Neural network based constitutive relations

Applications

There are several applications in research/ConstitutiveRelations/Plate and research/ConstitutiveRelations/Truss/Case1D

Troubleshooting

Python dependencies

NNFEM is based on ADCME, you need to first install ADCME.jl, which will install a private Python environment for you. Take it easy, it will NOT mess your local environment!

A bit more about what is under the hood: PyCall relies on the python version installed in $HOME/.julia/conda/3/bin/python, you can check the path with

julia> using PyCall
julia> PyCall.python

If you want to use Python packages via PyCall, install python packages, e.g., tikzplotlib, via

$HOME/.julia/conda/3/bin/python -m pip install tikzplotlib

Build customized operators

NNFEM includes some custom operators. Those operators are implemented in C++ and will be compiled automatically when you invoke Pkg.build("NNFEM"). However, in the case you encounter any compilation issue, you can go into the deps directory, and run build.jl

cd deps
julia build.jl

Submit an issue

You are welcome to submit an issue for any questions related to NNFEM.

Research

  1. Huang, Daniel Z., Kailai Xu, Charbel Farhat, and Eric Darve. "Learning Constitutive Relations from Indirect Observations Using Deep Neural Networks"

  2. Kailai Xu, Huang, Daniel Z., and Eric Darve. "Learning Constitutive Relations using Symmetric Positive Definite Neural Networks"