Code Monkey home page Code Monkey logo

ambit-beat-proof-of-concept's Introduction

Coupling fenics-beat with ambit

This repository contains a proof of concept for coupling fenics-beat together with ambit. Note that fenics-beat uses legacy FEniCS while ambit uses dolfinx so the two simulators needs to be run independently.

The initial idea would be to first run a monodomain simulation using fenics-beat and then saving the resulting active tension in a format that can be read by ambit. The we will use that active tension to drive the mechanics simulator in ambit.

For the time being we use the demo and mesh provided by ambit in the demo solid_flow0d.

Running the Mondodomain simulator

Set up environment

We will use a docker image for legacy FEniCS

docker run --name beat -w /home/shared -v $PWD:/home/shared -it ghcr.io/scientificcomputing/fenics-gmsh:2023-11-15

Next we install the development version of fenics-beat and gotranx

python3 -m pip install git+https://github.com/finsberg/fenics-beat
python3 -m pip install git+https://github.com/finsberg/gotranx

Note that eventually we will converge on a specific version (or the latest stable version), but for the time being we will use the development version.

Run

python3 main_beat.py

Converting active tension to a format that can be read by ambit

python3 convert_Ta.py

Running Mechanics Simulator

Set up environment

Ambit currently works with dolfinx version 0.6, so we will use a docker image with this version e.g

docker run --name ambit -w /home/shared -v $PWD:/home/shared -it ghcr.io/fenics/dolfinx/dolfinx:v0.6.0

Next we install the development version of ambit

python3 -m pip install git+git+https://github.com/marchirschvogel/ambit

Run

python3 main_ambit.py

ambit-beat-proof-of-concept's People

Contributors

finsberg avatar

Watchers

 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.