kvslab / bloodflow Goto Github PK
View Code? Open in Web Editor NEWImplementation of the 1D blood flow equations using FEniCS
License: BSD 3-Clause "New" or "Revised" License
Implementation of the 1D blood flow equations using FEniCS
License: BSD 3-Clause "New" or "Revised" License
Can we use this model to model an asymmetric artery tree? Also, practically the values of the 3 elements Windkessel model are not similar in every terminal artery; So, can we change those things to different terminal arteries?
Thanks in advance.
I am running
sudo python3 demo_arterybranch.py config/demo_arterybranch.cfg
in the provided Docker container after quickfix #40 (sudo is needed because of permission issues in the container as we need to create directories).
After a certain number of time steps, I get the error below.
It seems to happen when we try to save our solution to disk.
Any help is appreciated!
sudo python3 demo_arterybranch.py config/demo_arterybranch.cfg
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
--- Instant: compiling ---eration: 0, Time-step 12000999
In instant.recompile: The module did not compile with command 'cmake -DDEBUG=TRUE .', see '/home/fenics/.cache/instant/python3.5/error/dolfin_b22667cb6442e14d73fb79a9460785f63d1930a7/compile.log'
Traceback (most recent call last):
File "demo_arterybranch.py", line 66, in <module>
main(sys.argv[1])
File "demo_arterybranch.py", line 62, in main
an.solve(q_ins, Nt_store, N_cycles_store, store_area, store_pressure)
File "/home/fenics/shared/arteryfe/artery_network.py", line 793, in solve
artery.update_pressure()
File "/home/fenics/shared/arteryfe/artery.py", line 240, in update_pressure
f=self.f, A0=self.A0, A=self.Un.split(True)[0]
File "/usr/lib/python3/dist-packages/dolfin/functions/expression.py", line 679, in __new__
mpi_comm=kwargs.get("mpi_comm"))
File "/usr/lib/python3/dist-packages/dolfin/compilemodules/expressions.py", line 266, in compile_expressions
mpi_comm=mpi_comm)
File "/usr/lib/python3/dist-packages/dolfin/compilemodules/expressions.py", line 183, in compile_expression_code
mpi_comm=mpi_comm)
File "/usr/lib/python3/dist-packages/dolfin/compilemodules/jit.py", line 70, in mpi_jit
return local_jit(*args, **kwargs)
File "/usr/lib/python3/dist-packages/dolfin/compilemodules/compilemodule.py", line 603, in compile_extension_module
**instant_kwargs)
File "/usr/local/lib/python3.5/dist-packages/instant/build.py", line 577, in build_module
build_system)
File "/usr/local/lib/python3.5/dist-packages/instant/build.py", line 158, in recompile
instant_error(msg % (cmd, compile_log_filename_dest))
File "/usr/local/lib/python3.5/dist-packages/instant/output.py", line 96, in instant_error
raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile with command 'cmake -DDEBUG=TRUE .', see '/home/fenics/.cache/instant/python3.5/error/dolfin_b22667cb6442e14d73fb79a9460785f63d1930a7/compile.log'
Aborted (core dumped)
I found an interesting bug here. The gist of it is that XDMF can't handle 1D very well, so I believe sticking to Matplotlib for visualisation is best.
I suggest the following workflow:
This issue is part of this JOSS review.
It would be good to have an explicit command to run the example set up, e.g.:
python3 demo_arterybranch.py config/demo_arterybranch.cfg
in the README, or at least some help when the user just calls:
python3 demo_arterybranch.py
Would help get them started :)
This issue is part of the JOSS paper review.
There seems to be a formatting issue with a couple of the references:
@Olufssen:2000 and @Kolachalama:2007
which appear in the final sentence of the paper.
Issue:
First steps:
git clone https://github.com/KVSlab/bloodflow.git
git checkout tags/v1.1
docker build -t arteryfe:2017.2.0 .
With the docker build command, I get an error
File "/tmp/easy_install-u88_yo62/h5py-3.2.1/setup.py", line 37
f"numpy >={np_min}; python_version{py_condition}"
^
SyntaxError: invalid syntax
The command '/bin/sh -c cd bloodflow && sudo python3 setup.py install && cd ..' returned a non-zero code: 1
Proposed workaround
The file setup.py does not specify a version for h5py, so it seems setuptools tries to download the newest version 3.2.1.
From the release date of your paper I suggest 2.10.0 could work (Sept. 2019).
Do
git clone https://github.com/KVSlab/bloodflow.git
git checkout tags/v1.1
first, then define required version of h5py here:
install_requires=['fenics == 2017.2.0', 'numpy', 'h5py == 2.10.0'], # Optional
Update Dockerfile to use repo that we cloned manually before:
FROM quay.io/fenicsproject/stable:2017.2.0
USER root
RUN sudo apt-get update && sudo apt-get -y install git python3-setuptools
RUN sudo apt-get autoremove
COPY ./* bloodflow/
RUN cd bloodflow && sudo python3 setup.py install && cd ..
The docker build command finishes and I am able to start the container with
docker run --rm -ti -v $(pwd):/home/fenics/shared -w /home/fenics/shared "arteryfe:2017.2.0"
.
Where are the parameters root_vessel and end_vessel meant to be defined? From the code in test_artery.py it seems they should be defined in the cfg file, but they are not defined in the cfg files supplied in the package. The tests should run using the same cfg files as a non-testing simulation.
The same problem comes up with parameter "T" in test_artery_network.py.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.