kvslab / vampy Goto Github PK
View Code? Open in Web Editor NEWA collection of tools for pre-processing, simulating, and post-processing vascular morphologies.
Home Page: https://kvslab.github.io/VaMPy
License: GNU General Public License v3.0
A collection of tools for pre-processing, simulating, and post-processing vascular morphologies.
Home Page: https://kvslab.github.io/VaMPy
License: GNU General Public License v3.0
Point to make
p
is unused since pressure term disappears in the process of extracting tangential component.Hi,
I have been using meshing on my Mac book only but decided to try using Saga for that.
However, I have a problem installing morphman
on Saga.
I followed the instruction here : https://vampy.readthedocs.io/en/latest/installation.html#installing-morphman-on-linux
but I get the following error when I run some morphman command
morphman-curvature --ifile /P0157P/P0157_flowext.vtp --ofile /P0157P/0157P.vtp --smooth-line False --iterations 100 --smooth-factor-line 1.8 --region-of-interest commandline --region-points 47.9111 1.18506 57.6931 54.3899 25.933 61.386 --poly-ball-size 250 250 250
Traceback (most recent call last):
File "/Applications/anaconda3/envs/morphman/bin/morphman-curvature", line 33, in <module>
sys.exit(load_entry_point('morphman==1.1', 'console_scripts', 'morphman-curvature')())
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/pkg_resources/__init__.py", line 473, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2447, in load
return self.resolve()
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2453, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/morphman-1.1-py3.6.egg/morphman/__init__.py", line 2, in <module>
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/morphman-1.1-py3.6.egg/morphman/manipulate_area.py", line 11, in <module>
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/morphman-1.1-py3.6.egg/morphman/common/__init__.py", line 2, in <module>
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/morphman-1.1-py3.6.egg/morphman/common/centerline_operations.py", line 14, in <module>
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/morphman-1.1-py3.6.egg/morphman/common/vessel_reconstruction_tools.py", line 6, in <module>
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/morphman-1.1-py3.6.egg/morphman/common/vmtk_wrapper.py", line 10, in <module>
File "/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/vmtk/vtkvmtk.py", line 12, in <module>
from .vtkvmtkIOPython import *
ImportError: dlopen(/Applications/anaconda3/envs/morphman/lib/python3.6/site-packages/vmtk/vtkvmtkIOPython.so, 2): Library not loaded: @rpath/libvtkpng-8.1.1.dylib
Referenced from: /Applications/anaconda3/envs/morphman/lib/libvtkvmtkIOPythonD.dylib
Reason: image not found
I would appreciate if anyone managed to install morphman on Saga before and could help me.
Best,
Hi,
I’m trying to improve compute_flow_metrices.py
and facing an issue.
Inside compute_flow_metrices.py
, there is a part where you get the u_mean
# Get u mean
u_mean_file_path = file_path_x.replace("u0.h5", "u%d_mean.h5")
for i in range(3):
tmp_file = HDF5File(MPI.comm_world, u_mean_file_path % i, "r")
tmp_file.read(u0, "u_mean/avg")
tmp_file.close()
assign(u_mean.sub(i), u0)
However, it does not seem like we compute u_mean in the Artery.py
.
I checked previous commits but I could not find the codes where u_mean is actually computed.
So, my question is
Artery.py
?Any suggestions are welcome and thanks in advance !
Best,
Kei
Save P2 solution at every timestep - by keeping/reusing the mesh information and just updating the solution only.
The above also needs to be updated in the Checkpoint folder so that during restart, the correct i.e P2 solution is used.
The saved P2 solution should be in a convenient format such that it can be projected onto the "fluid" only domain to generate hemodynamic indices at every timestep.
Currently @t-natarajan is working on this issue.
Hi,
I just download vmtk, FEniCS and Vampy and trying it out. However, I get the following error when I run the command:
python automatedPreProcessing/automatedPreProcessing.py -m diameter -i test/Case_test_artery/artery.vtp -c 1.3
--- Working on case: artery
--- Load model file
--- Get centerlines
--- No smoothing of surface
--- Computing distance to sphere
--- Computing mesh
Not capping surface
Remeshing surface
Iteration 1/10
Iteration 2/10
Iteration 3/10
Iteration 4/10
Iteration 5/10
Iteration 6/10
Iteration 7/10
Iteration 8/10
Iteration 9/10
Iteration 10/10
Final mesh improvement
Computing projection
Generating boundary layer
Capping inner surface
Remeshing endcaps
Iteration 1/10
Iteration 2/10
Iteration 3/10
Iteration 4/10
Iteration 5/10
Iteration 6/10
Iteration 7/10
Iteration 8/10
Iteration 9/10
Iteration 10/10
Final mesh improvement
Computing sizing function
Generating volume mesh
TetGen command line options: pq1.414000q10.000000q165.000000YsT1.000000e-08zQm
Internalerror in findedge(): Unable to find an edge in subface.
zsh: segmentation fault python automatedPreProcessing/automatedPreProcessing.py -m diameter -i -c 1.
Aneurysm workflow is currently intended for (carotid) artery models. An improvement is to allow other vascular models.
The proposed enhancement will adjust the meshing parameters used in automatedPreProcessing.py
to work sufficiently for atrial models.
Hi,
This post is meant for potential improvement and not really an issue.
I did meshing for some model and VaMPy worked fine with no particular error message.
However, the resulting mesh did not have boundary layer. Only the inlet or outlet had boundary layer as you can see the attached.
I changed the arguments -flo
-fli
and the problem was solved but decided to report it here. I’m guessing this is vmtk
problem and maybe there is nothing we can do but it would be ideal if VaMPy could through some error message :)
Used command where no boundary layer was made.
python automatedPreProcessing/automatedPreProcessing.py -m diameter -i /Users/keiyamamoto/Documents/models_aneurisk_healthy/P0251/surface/model_clipped.vtp -c 0.5 -fli 1 -flo 1
Best,
Kei
On line 543, we have
parser.add_argument('-a', '--aneurysm',
dest="aneu",
type=str2bool,
default=True,
help="Determine weather or not the model has a aneurysm. Default is False.”) <---line 543
Default is False, but it is set to True. Very small and easy to fix though :)
Hi!
We're a team trying to run a simulation on the left atrium and have encountered an error that we're not able to solve.
We've used VaMPy to preprocess our mesh, and previously tried with a mesh provided as a VaMPy test (as we assume that mesh is okay) and after running
oasis NSfracStep problem=Artery mesh_path=models/artery/artery.xml.gz save_solution_after_cycle=0
we've run into this error:
=== Mesh information === X range: 25.1176 to 42.5953 (delta: 17.4777) Y range: 24.3107 to 37.2822 (delta: 12.9715) Z range: 22.3903 to 44.4398 (delta: 22.0495) Number of cells: 158380 Number of cells per processor: 158380 Number of edges: 0 Number of faces: 320834 Number of facets: 320834 Number of vertices: 27982 Volume: 249.2360 Number of cells per volume: 635.4619 Creating initial folders === Initial pressure and area fraction === Boundary ID=2, pressure: 0.32641, area fraction: 0.33467 Boundary ID=3, pressure: 0.67359, area fraction: 0.66533 Traceback (most recent call last): File "/Users/maria/miniconda3_86/envs/vampy_env/bin/oasis", line 8, in <module> sys.exit(main()) ^^^^^^ File "/Users/maria/miniconda3_86/envs/vampy_env/lib/python3.11/site-packages/oasis/run_oasis.py", line 11, in main from oasis import NSfracStep File "/Users/maria/miniconda3_86/envs/vampy_env/lib/python3.11/site-packages/oasis/NSfracStep.py", line 172, in <module> vars().update(pre_solve_hook(**vars())) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/maria/miniconda3_86/envs/vampy_env/lib/python3.11/site-packages/oasis/problems/NSfracStep/Artery.py", line 177, in pre_solve_hook eval_dict["centerline_u_x_probes"] = Probes(probe_points.flatten(), V) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Probes() takes no arguments
We've tried with our own mesh and got the exact same error, for which we haven't found anything in the documentation.
If someone has experienced this error before or has any knowledge on how to fix it we would be really happy to use some advice!
Thank you so much!
I noticed that print_mesh_summary
is not correct when running with MPI. There are two problems in this function
We are taking sum
of information gathered from all the processors, but taking sum for computing minimum and maximum values of coordinate is simply wrong. We need switch to MPI.reduce
or take minimum/maximum after gathering information.
Number of faces, faces, facets, and vertices are wrong due to ghost boundary. We are counting the shared boundary twice. Fixing this issue is not immediately clear to me although I’m also not sure if the number of facets and vertices are that important...
Finally, VaSP
also has this functionality ( which also has the same problem as I described). So perhaps, we can have this function in one place?
What’s your opinion on this @johannesring ?
In Artery.py
the sampled velocity using probe points is saved to separate files based on the time step. This could be improved by saving all probes to a single file over all time steps for the respective components (u0,u1,u2 and p).
compute_flow_and_simulation_metrics.py
currently compute all the metrics. However, it is nice to add a feature that will allow users to choose which metrics to be computed.In most of the biomedical simulations, we would at least compute WSS. Therefore, it makes more sense that we compute WSS during the simulation rather than as post-process. Since the velocity is already available during the simulation, it should be computationally inexpensive to compute WSS on the fly.
Hi, I'm trying to install vampy on my machine, but I keep running into issues. Eventually I got it to work by trying this on Linux. So I'm wondering:
It is not clear in the readme which OS and python versions are supported. The documentation says it can be installed via pip, so I naively tried to install via pip (python 3.10) on Windows (pip install vampy
), but this did not work. If there is a version available on pypi, it would be great if the project page could be linked in the readme.
Then I cloned the repo and installed via pip install .
. This failed the tests, because I needed dolfin
.
This time I followed the installation instructions, and it turns out that I was also not able to install this using conda
.
PS > conda env update --file environment.yml --name your_environment
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
- fenics
I then tried on linux, and this takes a very long time to install:
$ conda env update --file environment.yml --name your_environment
Eventually it did something and it seems to work.
Hi,
I found an error in the following part of automatedPreProcessing.py
Shouldn’t this be compute_centers_for_meshing
instead of compute_centers
?
If so, the arguments need to be changed as well.
Best,
Kei
Same problem as KVSlab/VaSP#157
Aneurysm workflow is currently intended for (carotid) artery models. An improvement is to allow other vascular models.
The proposed enhancement will allow the user to apply physiological boundary conditions to atrial models.
Hi, I'm trying out vampy for the JOSS review (openjournals/joss-reviews#5278). These are some issues I run into with the examples in the documentation. This is on Linux using Python 3.9 with the development version of vampy. I'm not sure if I did something wrong with the installation. Two error seem to be related to 'tetgen' inside of dolfin, and the other with some gzip related error.
Artery tutorial fails on tetgen part:
$ vampy-mesh -m constant -el 0.3 -i c0001/model.vtp -bl False
...
Generating volume mesh
TetGen command line options: pq1.414000q10.000000q165.000000YsT1.000000e-08zQm
Internalerror in findedge(): Unable to find an edge in subface.
2023-03-29 06:23:15.179 ( 654.314s) [ FE135740]vtkvmtkTetGenWrapper.cx:433 ERR| vtkvmtkTetGenWrapper (0x55fb77b60c10): TetGen quit with an exception.
An error occurred during tetrahedralization. Will only output surface mesh.
Writing Dolfin file.
Segmentation fault
The artery example also fails with tetgen.
$ vampy-mesh -i models/artery/artery.vtp -c 1.3
Generating volume mesh
TetGen command line options: pq1.414000q10.000000q165.000000YsT1.000000e-08zQm
Internalerror in findedge(): Unable to find an edge in subface.
2023-03-29 06:36:54.786 ( 62.973s) [ F3E0B740]vtkvmtkTetGenWrapper.cx:433 ERR| vtkvmtkTetGenWrapper (0x55cadc27b6f0): TetGen quit with an exception.
An error occurred during tetrahedralization. Will only output surface mesh and boundary layer.
Assembling final mesh
2023-03-29 06:36:54.788 ( 62.975s) [ F3E0B740] vtkThreshold.cxx:84 WARN| vtkThreshold::ThresholdByUpper was deprecated for VTK 9.1 and will be removed in a future version.
Writing Dolfin file.
Segmentation fault
Finally, I get this error when running the simulation example:
$ oasis NSfracStep problem=Artery mesh_path=../../../models/artery/artery.xml.gz save_solution_after_cycle=0
Importing problem module Artery:
/home/stef/python/vampy/src/vampy/simulation/Artery.py
=== Starting simulation for case: artery ===
{...}
Traceback (most recent call last):
File "/home/stef/miniconda3/envs/your_environment/bin/oasis", line 8, in <module>
sys.exit(main())
File "/home/stef/miniconda3/envs/your_environment/lib/python3.10/site-packages/oasis/run_oasis.py", line 11, in main
from oasis import NSfracStep
File "/home/stef/miniconda3/envs/your_environment/lib/python3.10/site-packages/oasis/NSfracStep.py", line 60, in <module>
vars().update(post_import_problem(**vars()))
File "/home/stef/miniconda3/envs/your_environment/lib/python3.10/site-packages/oasis/problems/__init__.py", line 212, in post_import_problem
mesh = mesh(**NS_parameters)
File "/home/stef/python/vampy/src/vampy/simulation/Artery.py", line 82, in mesh
mesh = Mesh(mesh_path)
RuntimeError: gzip error: iostream error
I only get -1
for inlet/outlet ids in the generated _info.json
file. This can be reproduced by running the pre-processing command from the documentation:
$ python automatedPreProcessing/automatedPreProcessing.py -m diameter -i test/Case_test_artery/artery.vtp -c 1. -v
--- VERBOSE MODE ACTIVATED ---
Namespace(coarseningFactor=1.0, compressMesh=True, config=None, edgeLength=None, fileNameModel='test/Case_test_artery/artery.vtp', flowExtension=True, inletFlowExtLen=5, isAtrium=False, meshingMethod='diameter', outletFlowExtLen=5, refineRegion=False, regionPoints=None, smoothingFactor=0.25, smoothingMethod='no_smooth', verbosity=True, viz=True)
--- Working on case: artery
--- Load model file
> --- Surface overview:
> Total number of triangles: 7485.
> Total number of points: 3862.
>
> --- Check the surface.
> Found 0 NaN cells.
>
> --- Cleaning the surface.
> Done.
>
> --- Check the surface.
> Found 0 NaN cells.
>
--- Get centerlines
Generic Warning: In /opt/vmtk/build/VTK/Common/Core/vtkInstantiator.cxx, line 265
vtkInstantiator::CreateInstance was deprecated for VTK 8.1 and will be removed in a future version.
--- No smoothing of surface
Generic Warning: In /opt/vmtk/build/VTK/Common/Core/vtkInstantiator.cxx, line 265
vtkInstantiator::CreateInstance was deprecated for VTK 8.1 and will be removed in a future version.
Generic Warning: In /opt/vmtk/build/VTK/Common/Core/vtkInstantiator.cxx, line 265
vtkInstantiator::CreateInstance was deprecated for VTK 8.1 and will be removed in a future version.
--- Computing distance to sphere
Generic Warning: In /opt/vmtk/build/VTK/Common/Core/vtkInstantiator.cxx, line 265
vtkInstantiator::CreateInstance was deprecated for VTK 8.1 and will be removed in a future version.
--- Computing mesh
Not capping surface
Remeshing surface
Iteration 1/10
Iteration 2/10
Iteration 3/10
Iteration 4/10
Iteration 5/10
Iteration 6/10
Iteration 7/10
Iteration 8/10
Iteration 9/10
Iteration 10/10
Final mesh improvement
Computing projection
Generating boundary layer
Capping inner surface
Remeshing endcaps
Iteration 1/10
Iteration 2/10
Iteration 3/10
Iteration 4/10
Iteration 5/10
Iteration 6/10
Iteration 7/10
Iteration 8/10
Iteration 9/10
Iteration 10/10
Final mesh improvement
Computing sizing function
Generating volume mesh
TetGen command line options: pq1.414000q10.000000q165.000000YsT1.000000e-08zQm
Assembling final mesh
Writing Dolfin file.
> Filling the network structure with the raw data.
> Edge Id 0, Length = 20.926261936201335 and Radius = 1.5854219039155049.
> Edge Id 1, Length = 1.5152341479454194 and Radius = 1.3571045640806467.
> Edge Id 2, Length = 1.516347368341809 and Radius = 1.3269456762053606.
> Edge Id 3, Length = 7.3859423025786155 and Radius = 1.2563070515757548.
> Edge Id 4, Length = 9.950315865498277 and Radius = 0.8910189856930304.
>
--- Saving probes points in: test/Case_test_artery/artery_probe_point
--- Computing flow rates and flow split, and setting boundary IDs
0.6653286444908748
[25.545785903930664, 32.91733169555664, 39.25808334350586]
CellEntityId: 0
meshPoint: 25.545782, 32.917332, 39.258083
[[0, 0.6653286444908748]]
0.33467135550912513
[42.23830032348633, 36.459251403808594, 42.29662322998047]
CellEntityId: 0
meshPoint: 42.238297, 36.459255, 42.296631
[[0, 0.6653286444908748], [0, 0.33467135550912513]]
I am the inlet, Sup?
[35.0918083190918, 25.711116790771484, 23.167619705200195]
CellEntityId: 0
meshPoint: 35.091747, 25.710567, 23.167894
[[0, 2.3685035494957836], [0, 0.6653286444908748], [0, 0.33467135550912513]]
--- Visualizing flow split at outlets, inlet flow rate, and probes in VTK render window.
--- Press 'q' inside the render window to exit.
--- Removing unused pre-processing files
We can then look at the resulting .json
file:
$ cat test/Case_test_artery/artery_info.json
{"check_surface": true, "inlet": [37.53396246650002, 28.701023665341463, 29.764423977244984], "inlet_area": 7.640334030631561, "outlet0": [31.53277724129813, 31.689644977024624, 40.97726227896554], "outlet0_area": 5.2748878013715705, "outlet1": [38.179210157279506, 34.845898731645335, 42.98822306437665], "outlet1_area": 2.5463910434470907, "mean_flow_rate": 2.3685035494957836, "area_ratio": [0.6653286444908748, 0.33467135550912513], "inlet_id": [-1], "outlet_ids": [-1, -1]}
Any idea what the problem is?
In Artery.py
the velocity components are currently stored into separate files (u0.h5
,u1.h5
,u2.h5
). Considering the postprocessing scripts assigns the components to a vector function regardless, an improvement is to save the components as a vector solution instead (e.g. u.h5
).
Hello,
I am just getting started with VaMPy. I was following the documentation and got stuck when running CFD. These are the issues I am facing.
I tried to run CFD with VaMPy's conda environment and run the command oasis NSfracStep problem=Artery mesh_path=../../../models/artery/artery.xml.gz save_solution_after_cycle=0
, this is the error I get.
Then I tried to use OasisMove with the command oasismove NSfracStepMove problem=Artery dynamic_mesh=False mesh_path=../../../models/artery/artery.xml.gz save_solution_after_cycle=0
, but it says zsh: command not found: oasismove
. This leads me to use the OasisMove conda environment instead of VaMPy. But I get this error message if I do that.
If I run the command oasismove NSfracStepMove problem=Artery dynamic_mesh=False mesh_path=../../../models/artery/artery.xml.gz save_solution_after_cycle=0
VaMPy's Docker container, it again says that oasismove is not found. The same error is shown when I use oasis in VaMPy's container.
If I use OasisMove's Docker container, it gives the error ModuleNotFoundError: No module named 'vampy'
. Is there a way to build an OasisMove docker image that has VaMPy available?
Thanks,
Labib
T
is defined as total simulation time, but I’m guessing it is actually the length of single cardiac cycle ?
I get the following warnings during the pre-processing.
Not sure if it is really a problem, but maybe worth looking.
WARNING: POTENTIAL CONNECTIVITY ISSUE.
A distance between connected points is suspicious.
The segment(s) of CELL ID VTK [0, 3]
and, the segment(s) of CELL ID VTK [1] will be considered
as connected. Please check if this action was expected.
WARNING: POTENTIAL CONNECTIVITY ISSUE.
A distance between connected points is suspicious.
The segment(s) of CELL ID VTK [0, 3]
and, the segment(s) of CELL ID VTK [4] will be considered
as connected. Please check if this action was expected.
Found a few issues when following the documentation:
--case simulation/results_artery/data/[RUN_NUMBER]/Solutions
should be --case simulation/results_artery/artery/data/[RUN_NUMBER]/Solutions
(missing artery
).visualize_probes.py
gives the following error:
$ python automatedPostProcessing/visualize_probes.py --case simulation/results_artery/artery/data/1/Solutions
Traceback (most recent call last):
File "automatedPostProcessing/visualize_probes.py", line 108, in <module>
visualize_probes(folder, dt, no_of_cycles)
File "automatedPostProcessing/visualize_probes.py", line 46, in visualize_probes
u_probe = np.load(u, allow_pickle=True)
File "/home/johannr/miniconda3/envs/oasis/lib/python3.8/site-packages/numpy/lib/npyio.py", line 407, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'simulation/results_artery/artery/data/1/Solutions/u_x_100.probes'
--case simulation/results_artery/artery/data/1/Solutions
to --case simulation/results_artery/artery/data/1/Probes
(using Probes
folder instead of Solutions
folder) gives the following error:
$ python automatedPostProcessing/visualize_probes.py --case simulation/results_artery/artery/data/1/Probes
Traceback (most recent call last):
File "automatedPostProcessing/visualize_probes.py", line 108, in <module>
visualize_probes(folder, dt, no_of_cycles)
File "automatedPostProcessing/visualize_probes.py", line 46, in visualize_probes
u_probe = np.load(u, allow_pickle=True)
File "/home/johannr/miniconda3/envs/oasis/lib/python3.8/site-packages/numpy/lib/npyio.py", line 407, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'simulation/results_artery/artery/data/1/Probes/u_x_200.probes'
u_x_200.probes
in the results folder:
$ find . -name "*.probes"
./simulation/results_artery/artery/data/1/Probes/u_y_100.probes
./simulation/results_artery/artery/data/1/Probes/u_x_100.probes
./simulation/results_artery/artery/data/1/Probes/u_z_100.probes
./simulation/results_artery/artery/data/1/Probes/p_100.probes
Hi @hkjeldsberg,
With -sc 0.001
flag, VaMPy seems to fail generating probes. There is only one probe point at the inlet.
@johannesring is investigating the issue right now.
Hi,
I need to mesh and run CFD simulations of vascular geometries with more than one inlet. I can't figure out what to change in the .py codes in order to correctly select the inlets and outlets of my models. Can I get some help?
Best,
Michael
Hi all,
When executing the vampy-mesh command we encountered the following error.
To fix it we have to modify the file vmtkmeshwriter.py in the function WriteDolfinMeshFile the part of:
Even so we still do not see the mesh in the display window although it generates well the xml.gz and json files of the mesh.
I attache here the black screen as it shows:
Thanks Henrik for helping us to solve the first part, let's see if someone knows how to solve the second part.
Hi,
I have tried to use compute_flow_metrics.py
on Saga, but it does not work with more than 2 processors.
It works fine on single processor and also it works parallel on my laptop, but not on Saga in my case.
The error message is different based on the number of processors, but, for example, I get the following error message with 4 processors.
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 10168 on node c5-9 exited on signal 11 (Segmentation fault).
So, I’m wondering what I’m doing wrong. Since it works parallel on my laptop, I do not think it is a problem of compute_flow_metrics.py
itself.
Does anyone have similar experience ?
Best,
Kei
Currently, the velocity and pressure is saved as .h5
format to reduce the storage space.
However, .h5
format is not visualizable, and should be added to the post-processing, either as a separate script or part of the existing scripts.
The scripts compute_wss
and compute_flow_metrics
has functionality that can be combined into one single postprocessing script.
HI @hkjeldsberg ,
I was trying to run the automatedPreProcessing.py
for one of the case from aneurisk data set (one of ten healthy data set I got from you).
However, I got the following error message.
--- Working on case: P0086
--- Load model file
--- Get centerlines
--- No smoothing of surface
--- Computing distance to sphere
--- Computing flow rates and flow split, and setting boundary IDs
Traceback (most recent call last):
File "automatedPreProcessing/automatedPreProcessing.py", line 505, in <module>
run_pre_processing(**read_command_line())
File "automatedPreProcessing/automatedPreProcessing.py", line 321, in run_pre_processing
find_boundaries(path.join(dir_path, case_name), mean_inflow_rate, network, mesh, verbose_print, is_atrium)
File "/Users/keiyamamoto/Documents/Aneurysm_workflow/automatedPreProcessing/common.py", line 608, in find_boundaries
surfaceCellEntityIdsArray.DeepCopy(boundarySurface.GetCellData().GetArray('CellEntityIds'))
TypeError: ambiguous call, multiple overloaded methods match the arguments
Have you seen this error message before ?
I used paraview to clip some part of the model and exported as vtp
file before running automatedPreProcessing.py
.
Best,
Kei
Hi @hkjeldsberg
I just re-downloaded VamPy and faced an issue when running the test case. I think the problem is that inlet_id
and outlet_id
are all -1 in json file (see the attached screenshot), which later produces an error when creating boundary conditions. Could you maybe look into this problem?
I am encountering following error for running the simulation using Oasis for artery
example as shown in the documentation
nikhil@fsi:~/VaMPy/simulation$ oasis NSfracStep problem=Artery mesh_path=../test/Case_test_artery/artery.xml.gz T=9.61 save_solution_after_cycle=0 && cd ..
error as follows
nikhil@fsi:~/VaMPy/simulation$ oasis NSfracStep problem=Artery mesh_path=../test/Case_test_artery/artery.xml.gz T=9.61 save_solution_after_cycle=0 && cd ..
Importing problem module Artery:
/home/nikhil/VaMPy/simulation/Artery.py
=== Starting simulation for case: artery ===
Running with the following parameters:
{'AB_projection_pressure': False,
'DynamicSmagorinsky': {'Cs_comp_step': 1},
'KineticEnergySGS': {'Ce': 1.05, 'Ck': 0.08},
'ModifiedCross': {'a_param': 0.34,
'lam': 3.736,
'm_param': 2.406,
'mu_inf': 0.00372,
'mu_o': 0.09,
'rho': 1085},
'Smagorinsky': {'Cs': 0.1677},
'T': 1902,
'Wale': {'Cw': 0.325},
'area_inlet': [],
'area_ratio': [],
'cardiac_cycle': 951,
'checkpoint': 500,
'dt': 0.0951,
'dump_probe_frequency': 100,
'folder': 'results_artery/artery',
'id_in': [],
'id_out': [],
'iters_on_first_timestep': 2,
'killtime': None,
'krylov_solvers': {'monitor_convergence': False},
'les_model': 'NoModel',
'max_error': 1e-06,
'max_iter': 1,
'mesh_path': '../test/Case_test_artery/artery.xml.gz',
'nn_model': 'NoModel',
'nu': 0.0033018,
'nu_nn_krylov_solver': {'method': 'WeightedAverage',
'preconditioner_type': 'jacobi',
'solver_type': 'cg'},
'nut_krylov_solver': {'method': 'WeightedAverage',
'preconditioner_type': 'jacobi',
'solver_type': 'cg'},
'output_timeseries_as_vector': True,
'plot_interval': 10,
'pressure_degree': 1,
'pressure_krylov_solver': {'preconditioner_type': 'hypre_amg',
'solver_type': 'gmres'},
'print_intermediate_info': 100,
'print_velocity_pressure_convergence': False,
'restart_folder': None,
'save_solution_after_cycle': 1,
'save_solution_frequency': 5,
'save_step': 10,
'scalar_krylov_solver': {'preconditioner_type': 'jacobi',
'solver_type': 'bicgstab'},
'solver': 'IPCS_ABCN',
't': 0.0,
'testing': False,
'tstep': 0,
'use_krylov_solvers': True,
'velocity_degree': 1,
'velocity_krylov_solver': {'preconditioner_type': 'jacobi',
'solver_type': 'bicgstab'},
'velocity_update_solver': {'low_memory_version': False,
'method': 'default',
'preconditioner_type': 'jacobi',
'solver_type': 'cg'}}
Traceback (most recent call last):
File "/home/nikhil/anaconda3/envs/vampy_environment/bin/oasis", line 33, in <module>
sys.exit(load_entry_point('oasis', 'console_scripts', 'oasis')())
File "/home/nikhil/Oasis/oasis/run_oasis.py", line 11, in main
from oasis import NSfracStep
File "/home/nikhil/Oasis/oasis/NSfracStep.py", line 60, in <module>
vars().update(post_import_problem(**vars()))
File "/home/nikhil/Oasis/oasis/problems/__init__.py", line 212, in post_import_problem
mesh = mesh(**NS_parameters)
File "/home/nikhil/VaMPy/simulation/Artery.py", line 79, in mesh
mesh = Mesh(mesh_path)
RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
*** [email protected]
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error: Unable to read data from XML file.
*** Reason: Not a DOLFIN XML file.
*** Where: This error was encountered inside XMLFile.cpp.
*** Process: 0
***
*** DOLFIN version: 2019.1.0
*** Git changeset: ba376b6aebd7a9bc089be46b50bdd9f5c548fb91
*** -------------------------------------------------------------------------
Can someone please help me with this ?
Hi @hkjeldsberg
If I understand correctly, save_frequency
is the time step frequency used during the simulation, while step
is how often you want to save the outputs.
Here, saved_time_steps_per_cycle
is divided by both save_frequency
and step
, but shouldn’t it be only save_frequency
?
After the recent commit aa9d0d, which introduced changes to the setup_model_network
function in preprocessing_common.py
, I get the following error when trying to generate a mesh for models with only one inlet and one outlet:
Traceback (most recent call last):
File "/home/johannr/miniconda3/envs/vampy/bin/vampy-mesh", line 8, in <module>
sys.exit(main_meshing())
File "/home/johannr/dev/simula/VaMPy/src/vampy/automatedPreprocessing/automated_preprocessing.py", line 630, in main_meshing
run_pre_processing(**read_command_line())
File "/home/johannr/dev/simula/VaMPy/src/vampy/automatedPreprocessing/automated_preprocessing.py", line 399, in run_pre_processing
network, probe_points = setup_model_network(centerlines, file_name_probe_points, region_center, verbose_print,
File "/home/johannr/dev/simula/VaMPy/src/vampy/automatedPreprocessing/preprocessing_common.py", line 695, in setup_model_network
flowSplitting.ComputeAlphas(network, verbose_print)
File "/home/johannr/dev/simula/VaMPy/src/vampy/automatedPreprocessing/NetworkBoundaryConditions.py", line 36, in ComputeAlphas
raise RuntimeError('The network has only one outlet.')
RuntimeError: The network has only one outlet.
To reproduce this, try to run the mesh generation for a model with only one inlet and one outlet, such as a cylinder or stenosis.
Before the mentioned commit, this worked fine. Is this something that should be supported by vampy-mesh
?
Hi,
I found out that the compute_hemodynamic_indices.py
does not run properly when using more than two cores.
I have not figured out what is causing the problem, but will investigate and report it here.
WSS
looks fine but other indices may not be correct (for example, containing none values).
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.