|
[Sponsors] |
February 25, 2016, 10:11 |
Decomposed case
|
#1 |
Member
Join Date: Feb 2014
Posts: 32
Rep Power: 12 |
Hi all,
I am trying to load OF decomposed case using the python simple of pv4.4. So far I used the script Code:
X = OpenFOAMReader(FileName='X.foam') X.MeshRegions = ['internalMesh'] X.CellArrays = ['U'] X.CaseType = 'Decomposed Case' print(X.TimestepValues) I see that I have to press the 'apply' button for things to load (and get the decomposed case). What is the scripting equivalent. I have tried X.ReadPipeline() and X.ReadPipelineInformation(), and X.refresh() to no avail. Any Ideas? |
|
February 26, 2016, 03:53 |
|
#2 |
Senior Member
|
Hi,
I would suggest to use the trace functionality. This would mean to do everything manually once, while tracing the steps, at the end stop the trace and than modify the python script that paraview gives you to your needs. Regards, Tom |
|
February 26, 2016, 16:35 |
|
#3 |
Member
Join Date: Feb 2014
Posts: 32
Rep Power: 12 |
Hi,
Thanks for the suggestion. The script was actually produced by the trace feature. My aim is to use the script outside of paraview (pvbatch, for example). where the code that was produced by the trace feature did not load the time steps of the decomposed case. When I used it in the paraview, I saw that I have to press the 'apply' button for things to work. However, I will try it again. |
|
February 28, 2016, 08:11 |
Problem Solved
|
#4 |
Member
Join Date: Feb 2014
Posts: 32
Rep Power: 12 |
The script is
Code:
X OpenFOAMReader(FileName='X.foam',CaseType = 'Decomposed Case') X.MeshRegions = ['internalMesh'] X.CellArrays = ['U'] X.UpdatePipeline([the time]). Code:
import vtk.numpy_interface.dataset_adapter as dsa slice1 = Slice(X) rawdata = servermanager.Fetch(slice) data = dsa.WrapDataObject(rawData) data.PointData ... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is Playstation 3 cluster suitable for CFD work | hsieh | OpenFOAM | 9 | August 16, 2015 14:53 |
Simple channel case using cyclicAMI will not converge | cbcoutinho | OpenFOAM Running, Solving & CFD | 3 | August 4, 2015 12:28 |
[OpenFOAM] ParaView 4.10 and OpenFOAM 2.3.0 Multiregion and decomposed case | romant | ParaView | 3 | April 7, 2014 15:42 |
Error reading new case | montag dp | FLUENT | 5 | September 15, 2011 06:00 |
Turbulent Flat Plate Validation Case | Jonas Larsson | Main CFD Forum | 0 | April 2, 2004 10:25 |