|
[Sponsors] |
May 5, 2015, 17:49 |
Render Velocity values along a slice
|
#1 |
New Member
Ashwin
Join Date: Apr 2015
Posts: 6
Rep Power: 11 |
I am a novice OpenFoam and Paraview user. I have run a tutorial case and I have converted the results into VTK using FoamToVtk. I would now like to plot/render a sliced view of the velocity values at a specific time step.
Below is the code I have so far. I am unable to figure out how to activate the velocity and display(/render/plot) it at different time steps. Code:
## list of the time steps time_step=[0,520,1021,1522,2023] ## File path file_path="/home/lpashwin/to_home_server/tutorial_case/DTCHull/VTK/" ## Case Name case_name="DTCHull_" ## File names file_names=[file_path+case_name+str(ii)+'.vtk' for ii in time_step] # Reading in the VTK Files (reader is the source as per the manual definition) reader=OpenDataFile(file_names) # Creating a Slice View sliced_view=CreateView("MultiSlice") sliced_view.YSliceValue=[1] Show(view=sliced_view) Render(view=sliced_view) |
|
May 5, 2015, 18:01 |
|
#2 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
You can use sample utility.
Code:
cp $FOAM_UTILITIES/postProcessing/sampling/sample/sampleDict system/. Code:
sample |
|
May 5, 2015, 19:45 |
|
#3 |
New Member
Ashwin
Join Date: Apr 2015
Posts: 6
Rep Power: 11 |
Thank you Cyp for the quick response. I output a VTK file using Sample. Is there any quick and dirty way to create a jpeg file from the VTK files. I am running my simulations on a linux server and creating jpg files makes it easier to view the results on my windows based client.
|
|
Tags |
pvpython vtk openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple floating objects | CKH | OpenFOAM Running, Solving & CFD | 14 | February 20, 2019 10:08 |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 23:38 |
how to extract velocity values from cells | fromain | STAR-CCM+ | 2 | May 27, 2015 15:12 |
Results of CFX Simulations | Sof_70_Usthb | CFX | 3 | July 9, 2011 07:15 |
Nodes positions + velocity and pressure values at the nodes | Lily Kabanj | FLUENT | 1 | March 13, 2000 20:21 |