Page 1 of 1

Solver type, scaling, units, #cores in SV

Posted: Sat Nov 25, 2017 7:36 pm
by rkdxogkr94
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

Re: Solver type, scaling, and units in SV

Posted: Sun Nov 26, 2017 11:10 pm
by wgyang
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.

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

Posted: Mon Nov 27, 2017 3:05 am
by rkdxogkr94
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?

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

Posted: Mon Nov 27, 2017 11:00 am
by wgyang
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.

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

Posted: Tue Nov 28, 2017 5:18 am
by rkdxogkr94
Oh!
Thank you for the reply! I think I have forgotten about cluster function in SV.
Thank you again!

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

Posted: Fri Dec 01, 2017 6:02 am
by rkdxogkr94
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...

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

Posted: Tue Dec 05, 2017 1:33 pm
by gmaher
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