Skip to main content

Compute Configurational Forces using a fast C-Extension

Project description

Readme

confore

Documentation Status

Conforce provides:

  • methods to compute for various element types the following quantities:
    • configurational forces (displacement and motion based, quasi-static)
    • configurational stresses (displacement and motion based, quasi-static)
    • first Piola-Kirchhoff stresses
    • deformation gradients
  • a code generation that generates C-code from symbolic functions
  • a C-code binding to use the generated and compiled C-code

Supported OS:

  • Windows (64-bit)
  • CentOS (64-bit)
  • other Linux distributions might work

Conforce can be used as Abaqus Plug-in or as Python 3 package.

Abaqus Plug-in

The Abaqus Plug-in contains:

  • C-code bindings to methods for the computation of configurational force, ...
  • Abaqus specific code to read and write to *.odb files
  • a GUI for the Abaqus Plug-in

Supported Abaqus versions:

  • >= Abaqus 2017

Installation

Open https://github.com/mrettl/conforce/releases and download the latest zip file called conforce_plugin_{version}.zip. The zip file has the following structure:

  • conforce_plugin_{version}.zip
    • conforce
      • conforce_abq
        • ...
      • conforce_shared
        • ...
      • conforce_abq_plugin.py
      • ...

To install the Abaqus Plug-in, unzip the file in one of the following valid plugin-folders:

  • plugin_central_dir: This is an Abaqus environment parameter. A Plug-in in this folder is accessible regardless of the home or current directory. For many installations this folder is located in C:\\SIMULIA\\CAE\\plugins\\{year}.
  • home_dir\abaqus_plugins: This is the folder in which Abaqus is started.
  • current_dir\abaqus_plugins: The current work directory can be changed inside Abaqus. Navigate to File -> Set Work Directory ... to define this folder.

The folder tree should look like:

  • plugin-folder
    • conforce
      • conforce_abq
        • ...
      • conforce_shared
        • ...
      • conforce_abq_plugin.py
      • ...

Start Abaqus and navigate in the toolbar to Plug-ins -> Conf. Force. The GUI of the Plug-in should open. If no toolbar entry called Conf. Force exists, check if the Plug-in is stored in the right folder for the Abaqus version you are using.

Usage

Open an *.odb file in Abaqus. Navigate in the toolbar to Plug-ins -> Conf. Force. The Plug-in gui opens:

plugin gui

Click Apply to compute the requested field outputs.

Python 3 Package

The Python package requires Python 3 and contains:

  • C-code bindings to methods for the computation of configurational force, ...
  • methods for symbolic computations, code generation, ...

Installation

  1. Download and unzip conforce repository.

  2. Open a shell in the unzipped folder where the setup.py file is located.

  3. conforce is installed by

    pip install "."
    

    However, in order to run examples or build the documentation, additional packages are required. The following options are available.

    • Install requirements for the examples:
      pip install ".[examples]"
      
    • Install requirements to build the documentation
      pip install ".[doc]"
      
    • Install all requirements
      pip install ".[examples, doc]"
      
  4. To uninstall the package, type:

    pip uninstall conforce
    

If git is available, the package can be installed directly from the remote repository by

pip install "conforce[examples, doc] @ git+https://github.com/mrettl/conforce"

The extras examples and doc are optional.

Usage

Configurational forces are computed using the cf_c module. The energy density e, the undeformed positions X, the displacement U and the symmetric Cauchy stress tensor S are passed to the compute_CF function alongside the element type and the computation method.

from conforce_shared import cf_c

cf_c.compute_CF(
    e_at_int_points=[[10.]],
    X_at_nodes=[[
        [0., 0.],
        [1., 0.],
        [1., 1.],
        [0., 1.],
    ]],
    U_at_nodes=[[
        [0.0, 0.0],
        [0.1, 0.0],
        [0.1, 0.0],
        [0.0, 0.0],
    ]],
    S_at_int_points=[[[
        [100., 0.0],
        [0.0, 0.0]
    ]]],
    element_type="CPE4R",
    method="dbf"
)

This yields the configurational forces at the element nodes:

array([[[ 0., -5.],
        [ 0., -5.],
        [ 0.,  5.],
        [-0.,  5.]]])

Report Bugs, Ask questions

Use the github issue tracker to report bugs and troubles or to ask questions. If you like our tool, we would be happy if you leave a star on our Github repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conforce-1.0.1b0.tar.gz (3.1 MB view hashes)

Uploaded Source

Built Distribution

conforce-1.0.1b0-py3-none-any.whl (3.1 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page