Code Monkey home page Code Monkey logo

ho_homog's Introduction

HO_homog

The python library HO-homog is designed for:

  • Implementation of higher order homogenization scheme based on asymptotic expansion (the equivalent medium can be a generalized continuum);
  • Geometry modelling and mesh generation for periodic microstructures with high control of the mesh refinement;
  • Application of these homogenization scheme to the designed microstructures;
  • Comparison of the homogenization results with Direct Numerical Simulations (DNS).

Getting Started

The HO_homog project is developped on Ubuntu 18.04 with the programming language Python3.

The current stable release of the HO_homog Python library can be downloaded from this repository.

Prerequisites

Before using the HO_homog tools FEniCS and pip (or setuptools) must be installed.

FEniCS

To install the FEniCS on Ubuntu, run the following commands:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics

For more information about installation or instructions for other platforms see the fenicsproject website and the FEniCS reference manual.

Virtual Environment

Using a virtual environment for Python projects is recommended. HO_homog and Gmsh can be installed inside a virtual environment but FEniCS cannot.

Make a new virtual environment :

python3 -m venv /path/to/project/project_name

Then activate it :

source /path/to/project/project_name/bin/activate

Now, the HO_homog package and its dependencies can be installed inside this virtual environment (see instructions below).

Supposing FEniCS has been already installed on the system, the settings of the virtual environment should be modified to make it accessible. In /path/to/project/project_name/pyenv.cfg : include-system-site-packages = true.

Installing

The HO_homog Python package can be installed with pip.

  • Install it directly from the gitlab repository :
pip3 install git+https://[email protected]/baptiste.durand/HO_homog.git#egg=ho_homog
  • Or (recommended) download / clone the HO_homog repository, then move to the HO_homog directory and use pip :
pip install --editable .

Recommended tools

For designing microstructures and generating meshes with HO_homog features, gmsh and its SDK (Software Development Kit) must be installed.\ The gmsh SDK that containt gmsh and the python API can be downloaded from the official gmsh website. The files should then be put into the right directories by hand. In this case, make sure that the gmsh-4.6.0-Linux64-sdk/lib sub-folder is reachable by python (e.g. move this subfolder to a suitable directory by hand).\ Alternatively, both gmsh and its SDK can be downloaded and installed with pip (recommended solution) :

pip install --upgrade gmsh

The fenicstools toolbox can be useful for field reconstructions when the RVE mesh and the full_scale mesh do not match.

With the function interpolate_nonmatching_mesh_any it is possible to interpolate from a Function of any space on one mesh to a Function of any space on a different mesh.

This python package can be install with pip :

pip install cppimport
pip install git+https://github.com/mikaem/fenicstools.git --prefix=/.../lib/python3.6[or other version]/site-packages/

Built With

The HO_homog tools have been developped with Python 3.6.7. They make use of the following applications. The numbers in brackets represent the versions used for the development.

  • Python 3 (3.6.7);
  • Gmsh - Used to generate finite element meshes, by means of its API for Python (4.0.6);
  • FEniCS - Finite element computing platform (2018.1.0)

Authors

See also the graphs of all contributions to this project.

Acknowledgments

The authors acknowledge the support of the French Agence Nationale de la Recherche (ANR), under grant ANR-17-CE08-0039 (project ArchiMatHOS).

ho_homog's People

Contributors

manon222 avatar

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.