vtf
VTF : virtual test-shock facility
T H E   G A L L E R Y
page by santiago v lombeyda



[ vtf 0 | vtf 1 | vtf 2 | vtf 3 | vtf 4 | vtf 5 | vtf 6 | vtf 7 | vtf 8 | vtf 9 | vtf A | vtf B | vtf C | vtf D | vtf E | vtf F | amr]





shocktubeSmall.mpeg

shocktubeSmall.zoom.mpeg




*   *   *






DynaVisitRecipe.py


#!/usr/bin/python
# visit -cli -geometry 320x240 -s DynaVisitRecipe.py
# visit -cli -nowin -s DynaVisitRecipe.py

# print PlotPlugins()

print "VTF VisIt Movie Frame Dumper (One-at-a-time Version) 2006 v.0.1"

HideToolbars()

windowAttributes = SaveWindowAttributes()
windowAttributes.fileName = "/dev/null/shot.vtfdyna.BLANK.png"
windowAttributes.format   = windowAttributes.PNG
windowAttributes.width    = 640
windowAttributes.height   = 480
windowAttributes.family   = 0
SetSaveWindowAttributes(windowAttributes)

viewAttributes = View3DAttributes()
annotations = AnnotationAttributes()
annotations.axesFlag=0
annotations.bboxFlag=0
annotations.triadFlag=0
annotations.gradientBackgroundStyle=annotations.TopToBottom
annotations.gradientColor1  =(255,255,255,255)
annotations.gradientColor2  =(223,223,223,255)
annotations.backgroundMode  =annotations.Gradient
annotations.userInfoFlag    =0
annotations.databaseInfoFlag=0
annotations.legendInfoFlag  =1

SetAnnotationAttributes(annotations)

first =1
viewSetup=View3DAttributes()

solidColorScale=PseudocolorAttributes()
solidColorScale.minFlag=1
solidColorScale.maxFlag=1
solidColorScale.min=0.00
solidColorScale.max=0.01
solidColorScale.colorTableName="calewhite"

fluidColorScale=PseudocolorAttributes()
fluidColorScale.minFlag=1
fluidColorScale.maxFlag=1
solidColorScale.min= 0.00
fluidColorScale.max=15.00
#fluidColorScale.colorTableName="hot"

clipSetup=ClipAttributes()
clipSetup.plane1Status=0
clipSetup.plane2Status=1
clipSetup.plane3Status=1

startFrame        = 1
endFrame          = 153
stepBetweenFrames = 1

for i in range(startFrame,endFrame,stepBetweenFrames):
	# HARDWIRED NOTICE:
	windowAttributes.fileName = "shots/shot.vtfdyna.%04i.png" % i

	# HARDWIRED NOTICE:
	solidfile = "/Volumes/Documents/viz/vtf/2006-dyna/solid/cannister.%04i.vtk" % i
	fluidfile = "/Volumes/Documents/viz/vtf/2006-dyna/fluid/fluid.%04i.vtk" % i

	SetSaveWindowAttributes(windowAttributes)
	print "Opening ",solidfile

	OpenDatabase(solidfile)
	AddPlot("Pseudocolor","Color")
	SetPlotOptions(solidColorScale)
	AddOperator("Clip")
	SetOperatorOptions(clipSetup)

	OpenDatabase(fluidfile)
	AddPlot("Pseudocolor","Density")
	SetPlotOptions(fluidColorScale)
	AddOperator("Clip")
	SetOperatorOptions(clipSetup)

	DrawPlots()
	if first == 1:
		# let visit setup near/far planes and such, then just rotate the cannister
		viewSetup = GetView3D()
		#viewSetup.viewNormal = ( -.707, 0, .707 )
		viewSetup.viewNormal = (-0.480788, 0.397592,  0.781514)
		viewSetup.viewUp =     ( 0.19518 , 0.917453, -0.346676)
		print viewSetup
		first = 0
	SetView3D (viewSetup)
	SaveWindow()
	SetActivePlots(1)
	HideActivePlots()
	SetActivePlots(0)
	HideActivePlots()
	DeleteAllPlots()
	ClearWindow()
	CloseDatabase(solidfile)
	CloseDatabase(fluidfile)

#ShowToolbars()

print "Done!"

CloseComputeEngine()
Close()

	





shocktube.uP.far.mpeg

shocktube.uP.far.slow.mpeg

shocktube.uP.mpeg

shocktube.uP.slow.mpeg

shocktube.uP.volren.mpeg

shocktube.uP.volren.slow.mpeg




ShockTubeVolumeRendering.py


#!/usr/bin/python
# visit -cli -geometry 640x480 -s ShockTubeVolumeRendering.py
# visit -cli -nowin -s ShockTubeVolumeRendering.py

# print PlotPlugins()

print "VTF VisIt Movie Frame Dumper (One-at-a-time Version) 2006 v.0.1"

HideToolbars()

false=0
true =1

windowAttributes = SaveWindowAttributes()
windowAttributes.fileName = "/dev/null/shot.shocktube.BLANK.ppm"
windowAttributes.format   = windowAttributes.PNG
windowAttributes.width    = 640
windowAttributes.height   = 480
windowAttributes.family   = 0
SetSaveWindowAttributes(windowAttributes)

lightSetup=GetLight(0)
lightSetup.direction=(-0.616,-0.596,-0.515)
lightSetup.direction=(-6,-1,-5)
SetLight(0,lightSetup)

viewAttributes = View3DAttributes()
annotations = AnnotationAttributes()
annotations.axesFlag=0
annotations.bboxFlag=1
annotations.triadFlag=0
annotations.gradientBackgroundStyle=annotations.TopToBottom
annotations.gradientColor1  =(255,255,255,255)
annotations.gradientColor2  =(223,223,223,255)
annotations.backgroundMode  =annotations.Gradient
annotations.userInfoFlag    =0
annotations.databaseInfoFlag=0
annotations.legendInfoFlag  =1

SetAnnotationAttributes(annotations)

first =1
fullview=0
volumerendering=1
viewSetup=View3DAttributes()

fluidColorScale=PseudocolorAttributes()
fluidColorScale.minFlag=1
fluidColorScale.maxFlag=1
fluidColorScale.min= 0.50
fluidColorScale.max= 1.00

fluildVolumeRendering=VolumeAttributes()
fluildVolumeRendering.useColorVarMin=1
fluildVolumeRendering.useColorVarMax=1
fluildVolumeRendering.colorVarMin= 0.50
fluildVolumeRendering.colorVarMax= 1.00
fluildVolumeRendering.opacityAttenuation = 0.8
fluildVolumeRendering.resampleTarget = 10000000
#				       10000000 max samples



clipSetup=ClipAttributes()
clipSetup.plane1Status=0
clipSetup.plane2Status=1
clipSetup.plane3Status=1

startFrame        = 1
endFrame          = 70+1
stepBetweenFrames = 1

for i in range(startFrame,endFrame,stepBetweenFrames):
	# HARDWIRED NOTICE:
	windowAttributes.fileName = "shots/shot.shocktube.%03i.png" % i

	# HARDWIRED NOTICE:
	fluidfile = "shocktube.%06i.silo" % i

	SetSaveWindowAttributes(windowAttributes)
	print "Opening ",fluidfile

	OpenDatabase(fluidfile)

	if volumerendering == 1:
		AddPlot("Volume","VAR_DENSITY/ALL_LEVELS")
		SetPlotOptions(fluildVolumeRendering)
	else:
		AddPlot("Pseudocolor","VAR_DENSITY/ALL_LEVELS")
		SetPlotOptions(fluidColorScale)
		AddOperator("Clip")
		SetOperatorOptions(clipSetup)

	DrawPlots()
	if first == 1:
		# let visit setup near/far planes and such, then just rotate the cannister
		viewSetup = GetView3D()
		# VIEW SETUP: imported from session
		# // viewSetup.viewNormal = ( -0.994206, 0.0959506, 0.0484523)
		# // viewSetup.viewUp =     (  0.0292883,0.675518, -0.736762)
		# // viewSetup.centerOfRotation = (5,0,0)
		if fullview == 1:
			viewSetup.centerOfRotation = (5,0,0)
			viewSetup.centerOfRotationSet = false
			viewSetup.eyeAngle = 2
			viewSetup.farPlane = 10.025
			viewSetup.focus = (5,0,0)
			viewSetup.imagePan = (0.00711994,0.00334017)
			viewSetup.imageZoom = 5.83332
			viewSetup.nearPlane = -10.025
			viewSetup.parallelScale = 5.01248
			viewSetup.perspective = true
			viewSetup.viewAngle = 30
			viewSetup.viewNormal = (-0.994206,0.0959506,0.0484523)
			viewSetup.viewUp = (0.0292883,0.675518,-0.736762)
		else:
			viewSetup.centerOfRotation = (5,0,0)
			viewSetup.centerOfRotationSet = false
			viewSetup.eyeAngle = 2
			viewSetup.farPlane = 10.025
			viewSetup.focus = (5,0,0)
			viewSetup.imagePan = (-0.246716,-0.0348233)
			viewSetup.imagePan = (-0.23,-0.0348233)
			viewSetup.imageZoom = 8.10077
			viewSetup.nearPlane = -10.025
			viewSetup.parallelScale = 5.01248
			viewSetup.perspective = true
			viewSetup.viewAngle = 30
			viewSetup.viewNormal = (-0.546913,0.331628,0.768706)
			viewSetup.viewUp = (0.10363,0.937954,-0.330913)
		print viewSetup
		first = 0
	SetView3D (viewSetup)
	SaveWindow()
	HideActivePlots()
	DeleteAllPlots()
	ClearWindow()
	CloseDatabase(fluidfile)

#ShowToolbars()

print "Done!"

CloseComputeEngine()
Close()