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
Solver type, scaling, units, #cores in SV
- Taehak Kang
- Posts: 39
- Joined: Thu Jun 22, 2017 7:03 pm
- Weiguang Yang
- Posts: 110
- Joined: Mon Apr 07, 2008 2:17 pm
Re: Solver type, scaling, and units in SV
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.
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.
- Taehak Kang
- Posts: 39
- Joined: Thu Jun 22, 2017 7:03 pm
Re: Solver type, scaling, units, #cores in SV
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?
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?
- Weiguang Yang
- Posts: 110
- Joined: Mon Apr 07, 2008 2:17 pm
Re: Solver type, scaling, units, #cores in SV
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.
- Taehak Kang
- Posts: 39
- Joined: Thu Jun 22, 2017 7:03 pm
Re: Solver type, scaling, units, #cores in SV
Oh!
Thank you for the reply! I think I have forgotten about cluster function in SV.
Thank you again!
Thank you for the reply! I think I have forgotten about cluster function in SV.
Thank you again!
- Taehak Kang
- Posts: 39
- Joined: Thu Jun 22, 2017 7:03 pm
Re: Solver type, scaling, units, #cores in SV
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...
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...
- Gabriel Maher
- Posts: 32
- Joined: Tue Feb 09, 2016 9:17 am
Re: Solver type, scaling, units, #cores in SV
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
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