Solver type, scaling, units, #cores in SV

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Taehak Kang
Posts: 39
Joined: Thu Jun 22, 2017 7:03 pm

Solver type, scaling, units, #cores in SV

Post by Taehak Kang » Sat Nov 25, 2017 7:36 pm

Hello,

I recently came up with some questions about SV. Here are the things that I am curious about:
1. What type of solving method is SV using? From tutorial it seems its DNS for me but I am not sure of the type yet.
2. Is there an easy way to scale the model to certain units? mm to cm for example.
3. At deformable section in simulation tab , what is the unit for shear constant? Also, how is it calculated? Using ordinary relation of E,G,and v, it doesn't give 0.83333 value...
4. In simulation tab, does "number of processes" mean the number of cores used or threads?

Thank you,
Taehak Kang

User avatar
Weiguang Yang
Posts: 110
Joined: Mon Apr 07, 2008 2:17 pm

Re: Solver type, scaling, and units in SV

Post by Weiguang Yang » Sun Nov 26, 2017 11:10 pm

1. SV solves Navier-Stokes equations by using a SUPG finite element solver without turbulence models.
2. For VTP models, SV can't scale models. You can scale the model by modifying the vtp file. My colleague Abhay wrote a python script. You can try that.

#Python script to scale a vtp model
#Use at your own risk
# <^>
#-----
#(~ ~)
# /(`
# )

import vtk

#Read your model
#FileName="your_input_file.vtp"
# Change i/p FileName,scaling, o/p Filename
FileName="glenn_newSV.vtp"
datareader = vtk.vtkXMLPolyDataReader()
datareader.SetFileName(FileName)
datareader.Update()

#define the scaling on the model
#(0.1,0.1,0.1) if you are going from mm to cm
scalemodel=vtk.vtkTransform()
scalemodel.Scale(0.1,0.1,0.1)

#Send the model through the transform filter
transformfilter=vtk.vtkTransformFilter()
transformfilter.SetInputConnection(datareader.GetOutputPort())
transformfilter.SetTransform(scalemodel)

a_dataObject=vtk.vtkDataObject()
a_dataObject.setInputConnection(transformfilter.GetOutput())
modelwrite=vtk.vtkXMLPolyDataWriter()
#modelwrite.SetInput(transformfilter.GetOutput()) --- older version of vtk uses this
modelwrite.SetInputData(transformfilter.GetOutput()) ### newer version of vtk uses this
modelwrite.SetFileName("glenn_newSV_cm.vtp")
modelwrite.Write()


# <^>
#-----
#(~ ~)
# /(`
# )


3. The shear constant is unitless. It should be called shear correction parameter that was set to 5/6.
4. On a machine with N CPUs and M cores on each cpu, you can run N*M processes. You may run more processes than N*M with lower efficiency.

User avatar
Taehak Kang
Posts: 39
Joined: Thu Jun 22, 2017 7:03 pm

Re: Solver type, scaling, units, #cores in SV

Post by Taehak Kang » Mon Nov 27, 2017 3:05 am

Thank you so much!
Your reply just gave answer to all my questions without any complication. Thank you so much again!
I still got one more question though. Is there any way to increase the limit(48 threads) of process uses in SV?

User avatar
Weiguang Yang
Posts: 110
Joined: Mon Apr 07, 2008 2:17 pm

Re: Solver type, scaling, units, #cores in SV

Post by Weiguang Yang » Mon Nov 27, 2017 11:00 am

I don't think SV solver limits the number of processors. We have used hundreds of processors on clusters. The number of processors is limited by machines not SV.

User avatar
Taehak Kang
Posts: 39
Joined: Thu Jun 22, 2017 7:03 pm

Re: Solver type, scaling, units, #cores in SV

Post by Taehak Kang » Tue Nov 28, 2017 5:18 am

Oh!
Thank you for the reply! I think I have forgotten about cluster function in SV.
Thank you again!

User avatar
Taehak Kang
Posts: 39
Joined: Thu Jun 22, 2017 7:03 pm

Re: Solver type, scaling, units, #cores in SV

Post by Taehak Kang » Fri Dec 01, 2017 6:02 am

Hello,
Um by the way would copy/paste of the code work? The thing is that I am totally unfamiliar with low-level computing language like python.... At least I changed the directory in cmd to load the script by saving the whole script in your post as "i.py"... setting environmental variable and typing py i.py didn't work...
Totally lost...

Thank you for reading it...

User avatar
Gabriel Maher
Posts: 32
Joined: Tue Feb 09, 2016 9:17 am

Re: Solver type, scaling, units, #cores in SV

Post by Gabriel Maher » Tue Dec 05, 2017 1:33 pm

Hi Taehak,

To run the python script Weiguang showed you will need to install the python vtk package. You can take a look at https://pypi.python.org/pypi/vtk

Best,

Gabriel

POST REPLY