KVSlab / VaMPy

A collection of tools for pre-processing, simulating, and post-processing vascular morphologies.
https://kvslab.github.io/VaMPy
GNU General Public License v3.0
15 stars 8 forks source link

2-inlets models #122

Closed michaelbernini closed 11 months ago

michaelbernini commented 1 year ago

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

keiyamamo commented 1 year ago

Hi @michaelbernini

I’m not too familiar with more than one inlet model, but you can try running pre-processing with is_atrium flag on.

https://github.com/KVSlab/VaMPy/blob/de57ae72be4f632508476b5d766f9d2abc6a4fec/src/vampy/automatedPreprocessing/automated_preprocessing.py#L484

If I understood correctly, it should work multiple inlets/ single outlet geometry. (not sure if you have multiple inlets/outlets).

michaelbernini commented 1 year ago

Hi @keiyamamo Pre-processing with is-atrium flag on seemed to work correctly, but the subsequent CFD simulation fails to launch correctly, but underlines this error:

line 98, in create_bcs id_in[:] = info['inlet_id'] KeyError: 'inlet_id'

Furthermore, to clarify, I have multiple inlets / outlets geometries, not multi-inlet / single-outlet kinds. Thanks for your answer! Michael

keiyamamo commented 1 year ago

Hi @michaelbernini

Good to know that meshing worked well. Just to clarify, are you running Artery.py and not Atrium.py? Artery.py assumes one-inlet / multiple-outlets while Atrium.py assumes multiple-inlets / one outlet. So, you need to modify problem file based on what boundary conditions you want to prescribe. In theory, you can combine Artery.py and Atrium.py to run multiple inlets/outlets geomtry, but I haven’t done it myself.

If you could share more information (boundary conditions/ how your geometry looks like), then I think we could help you running the simulations.

Best, Kei

michaelbernini commented 1 year ago

Hello @keiyamamo Thanks for the suggestion! I will try to create a problem file which combines Atrium.py and Artery.py and see how that works.

The geometry I'm working on looks like this (2 inlets, 2 outlets): Aneurysm2_screenshot

I could share the .vtp file as well, but GitHub won't let me upload it here. Mind if I share it to you via email?

Thanks, Michael

keiyamamo commented 1 year ago

Hi @michaelbernini

Thanks for sharing the image! Unfortunately, I don’t have bandwidth to help you setting everything, but it should be possible to modify existing problem file to run your desired simulation. The specific error message that you got id_in[:] = info['inlet_id’] KeyError: 'inlet_id’ is related to the json (*_info.json) file generated after the meshing, which contains ID for specifying which part of the inlet/outlet you want to apply boundary condition for. It probably doesn’t work for your case because of multiple inlets/outlets but you can open .vtu in Paraview, check the ID, and specify in the problem file. Hope this helps and please let us know when you get specific errors.

Best, Kei

keiyamamo commented 11 months ago

Closing for now. Feel free to reopen if necessary @michaelbernini