CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Decomposed case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2016, 10:11
Default Decomposed case
  #1
Member
 
Join Date: Feb 2014
Posts: 32
Rep Power: 12
yeharav is on a distinguished road
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)
in OpenFOAM python console.

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?
yeharav is offline   Reply With Quote

Old   February 26, 2016, 03:53
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
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
tomf is offline   Reply With Quote

Old   February 26, 2016, 16:35
Default
  #3
Member
 
Join Date: Feb 2014
Posts: 32
Rep Power: 12
yeharav is on a distinguished road
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.
yeharav is offline   Reply With Quote

Old   February 28, 2016, 08:11
Default Problem Solved
  #4
Member
 
Join Date: Feb 2014
Posts: 32
Rep Power: 12
yeharav is on a distinguished road
The script is
Code:
X OpenFOAMReader(FileName='X.foam',CaseType = 'Decomposed Case')
X.MeshRegions = ['internalMesh']
X.CellArrays = ['U']

X.UpdatePipeline([the time]).
To access the data we use the

Code:
import vtk.numpy_interface.dataset_adapter as dsa

slice1 = Slice(X) 
rawdata =  servermanager.Fetch(slice)
data = dsa.WrapDataObject(rawData)
data.PointData ...
yeharav is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 23:34.