Errors and questions with ROMSimulations in SimVascular

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Li Xia
Posts: 11
Joined: Sun Sep 03, 2023 12:14 am

Errors and questions with ROMSimulations in SimVascular

Post by Li Xia » Fri Jul 12, 2024 5:16 am

Hello,

I have recently been using ROMSimulations in SimVascular for one-dimensional simulations, but I encountered an error (ERROR1.PNG). My model is quite simple, and even when I set the boundary condition to a simple Resistance with a value of 0, it still results in another error (ERROR2.PNG). What could be causing this?

Additionally, while troubleshooting and checking the solver_1d.in file, I have the following two questions:

1. I am trying to simulate a normal model without any stenosis, but I keep seeing "STENOSIS" in the file. How can I avoid this?

2. Regarding the SEGMENT, its length does not seem to be proportional to the number of finite elements it is divided into. Some very long SEGMENTS have very few finite elements. Why is this?

Any help will be appreciated.
Lina

Code: Select all

# ================================
# test MODEL - UNITS IN CGS
# ================================

# ==========
# MODEL CARD
# ==========
# - Name of the model (string)

MODEL test



### DO NOT CHANGE THIS SECTION - generated automatically
#
# ==========
# NODE CARD
# ==========
# - Node Name (double)
# - Node X Coordinate (double)
# - Node Y Coordinate (double)
# - Node Z Coordinate (double)

NODE 0 17.805543899536133 -3.6477386951446533 12.090696334838867
NODE 1 18.366817474365234 -0.6103779673576355 11.523380279541016
NODE 2 17.922510147094727 1.5787090063095093 11.798615455627441
NODE 3 13.767006874084473 9.380843162536621 16.468774795532227
NODE 4 13.330191612243652 10.938840866088867 17.090694427490234
NODE 5 12.977213859558105 22.23733901977539 20.64402961730957
NODE 6 14.213896751403809 27.35175132751465 21.348539352416992
NODE 7 11.413369178771973 32.098106384277344 23.75936508178711
NODE 8 13.441190719604492 9.798833847045898 18.041139602661133
NODE 9 9.174625396728516 19.51160430908203 28.99379539489746
NODE 10 7.061343669891357 23.03582763671875 29.81525421142578
NODE 11 16.23459815979004 39.71501159667969 33.920982360839844


### DO NOT CHANGE THIS SECTION - generated automatically
#
# ==========
# JOINT CARD
# ==========
# - Joint Name (string)
# - Joint Node (double)
# - Joint Inlet Name (string)
# - Joint Outlet Name (string)



### DO NOT CHANGE THIS SECTION - generated automatically
#
# ================================
# JOINTINLET AND JOINTOUTLET CARDS
# ================================
# - Inlet/Outlet Name (string)
# - Total Number of segments (int)
# - List of segments (list of int)

JOINT J0 3 IN0 OUT0
JOINTINLET IN0 1 2
JOINTOUTLET OUT0 2 3 6

JOINT J1 1 IN1 OUT1
JOINTINLET IN1 1 0
JOINTOUTLET OUT1 1 1

JOINT J2 2 IN2 OUT2
JOINTINLET IN2 1 1
JOINTOUTLET OUT2 1 2

JOINT J3 5 IN3 OUT3
JOINTINLET IN3 1 3
JOINTOUTLET OUT3 1 4

JOINT J4 6 IN4 OUT4
JOINTINLET IN4 1 4
JOINTOUTLET OUT4 1 5

JOINT J5 9 IN5 OUT5
JOINTINLET IN5 1 6
JOINTOUTLET OUT5 1 7

JOINT J6 10 IN6 OUT6
JOINTINLET IN6 1 7
JOINTOUTLET OUT6 1 8

# ============
# SEGMENT CARD
# ============
# - Segment Name (string)
# - Segment ID (int)
# - Segment Length (double)
# - Total Finite Elements in Segment (int)
# - Segment Inlet Node (int)
# - Segment Outlet Node (int)
# - Segment Inlet Area (double)
# - Segment Outlet Area (double)
# - Segment Inflow Value (double)
# - Segment Material (string)
# - Type of Loss (string - 'NONE','STENOSIS','BRANCH_THROUGH_DIVIDING','BRANCH_SIDE_DIVIDING','BRANCH_THROUGH_CONVERGING',
#                          'BRANCH_SIDE_CONVERGING','BIFURCATION_BRANCH')
# - Branch Angle (double)
# - Upstream Segment ID (int)
# - Branch Segment ID (int)
# - Boundary Condition Type (string - 'NOBOUND','PRESSURE','AREA','FLOW','RESISTANCE','RESISTANCE_TIME','PRESSURE_WAVE',
#                                     'WAVE','RCR','CORONARY','IMPEDANCE','PULMONARY')
# - Data Table Name (string)

SEGMENT branch0_seg0 0 3.1565949265892743 5 0 1 1.8213608403864117 1.6594931325571387 0.0 MAT1 NONE 0.0 0 0 NOBOUND NONE
SEGMENT branch0_seg1 1 2.2649531643882552 5 1 2 1.6594165429783 1.6594165429783 0.0 MAT1 STENOSIS 0.0 0 0 NOBOUND NONE
SEGMENT branch0_seg2 2 10.07158805403534 8 2 3 2.138795478697102 2.770041787526552 0.0 MAT1 NONE 0.0 0 0 NOBOUND NONE
SEGMENT branch1_seg0 3 12.921922275101482 14 4 5 2.3627905552831474 0.472247708588712 0.0 MAT1 NONE 0.0 0 0 NOBOUND NONE
SEGMENT branch1_seg1 4 5.403578601676259 5 5 6 0.32521673825497743 0.32521673825497743 0.0 MAT1 STENOSIS 0.0 3 0 NOBOUND NONE
SEGMENT branch1_seg2 5 6.258079314275602 5 6 7 0.47478943891278647 0.47429632814212797 0.0 MAT1 NONE 0.0 0 0 RESISTANCE RESISTANCE_0
SEGMENT branch2_seg0 6 23.778699474335646 14 8 9 2.2107608479899135 0.16258436368178236 0.0 MAT1 NONE 0.0 0 0 NOBOUND NONE
SEGMENT branch2_seg1 7 4.230925125407669 5 9 10 0.10534849060307112 0.10534849060307112 0.0 MAT1 STENOSIS 0.0 6 0 NOBOUND NONE
SEGMENT branch2_seg2 8 23.003107397116846 5 10 11 0.15255383867136918 0.10350909423045199 0.0 MAT1 NONE 0.0 0 0 RESISTANCE RESISTANCE_1


DATATABLE RESISTANCE_0 LIST
0.0 100
0.0 0.0
ENDDATATABLE

DATATABLE RESISTANCE_1 LIST
0.0 300
0.0 0.0
ENDDATATABLE



DATATABLE INFLOW LIST
 0.000000 5.000000
 1.000000 5.000000
ENDDATATABLE


# ==================
# SOLVEROPTIONS CARD
# ==================
# - Solver Time Step (double), 
# - Steps Between Saves (int), 
# - Max Number of Steps (int)
# - Number of quadrature points for finite elements (int), 
# - Name of Datatable for inlet conditions (string)
# - Type of boundary condition (string - 'NOBOUND','PRESSURE','AREA','FLOW','RESISTANCE','RESISTANCE_TIME','PRESSURE_WAVE',
#                                        'WAVE','RCR','CORONARY','IMPEDANCE','PULMONARY')
# - Convergence tolerance (double), 
# - Formulation Type (int - 0 Advective, 1 Conservative), 
# - Stabilization (int - 0 No stabilization, 1 With stabilization)

SOLVEROPTIONS 0.001 1 10 2 INFLOW FLOW 1.0e-5 1 1

# =============
# MATERIAL CARD
# =============
# - Material Name (string)
# - Material Type (string - 'LINEAR','OLUFSEN')
# - Material Density (double)
# - Material Viscosity (double)
# - Material PRef (double)
# - Material Exponent (double)
# - Material Parameter 1 (double)
# - Material Parameter 2 (double)
# - Material Parameter 3 (double)

MATERIAL MAT1 OLUFSEN 1.06 0.04 0.0 2.0 1000000000000000.0 -20.0 1000000000.0

# ============
# OUTPUT CARD
# ============
#
# 1. Output file format. The following output types are supported:
#		TEXT. The output of every segment is written in separate text files for the flow rate, pressure, area and Reynolds number. The rows contain output values at varying locations along the segment while columns contains results at various time instants.
#		VTK. The results for all time steps are plotted to a 3D-like model using the XML VTK file format.
# 2. VTK export option. Two options are available for VTK file outputs:
#		0 - Multiple files (default). A separate file is written for each saved increment. A pvd file is also provided which contains the time information of the sequence. This is the best option to create animations.
#		1 - The results for all time steps are plotted to a single XML VTK file.

OUTPUT TEXT

Attachments
model.PNG
model.PNG (44.26 KiB) Viewed 487 times
ERROR2.PNG
ERROR2.PNG (8.29 KiB) Viewed 487 times
ERROR1.PNG
ERROR1.PNG (8.88 KiB) Viewed 487 times

User avatar
Martin Pfaller
Posts: 60
Joined: Tue Oct 01, 2019 10:23 am

Re: Errors and questions with ROMSimulations in SimVascular

Post by Martin Pfaller » Fri Jul 12, 2024 2:38 pm

Hi Lina,

I removed a couple of zeros from your "Material Parameter 1," and it runs nicely now.

Regarding your questions:

1) The STENOSIS detection is performed automatically and indicates variations in your branch's cross-sectional area. This doesn't necessarily mean that there is an anatomical stenosis. If there is not, the actual STENOSIS value should be small.
2) The number of finite elements should be proportional to the length of each segment. There is, however, a minimum number of segments:
https://github.com/SimVascular/SimVascu ... #L375-L378

I hope these answers help. To analyze your model more, we need the contents of the ROMsimulation folder for your SimVascular project.

Martin

POST REPLY