|
[Sponsors] |
[OpenFOAM] Correctly loading my casefiles via pvpython |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 17, 2016, 18:53 |
Correctly loading my casefiles via pvpython
|
#1 |
New Member
Sara
Join Date: Dec 2013
Posts: 10
Rep Power: 12 |
Hi Everyone,
I am in the process of using pvpython from Paraview for my post-processing needs. While I have used the python tracer in Paraview to learn exactly what commands I will need for pvpython script, I am just getting stuck with what I think is the OpenFOAM case loading (i.e. transition from using the 'paraFoam' command to loading my OpenFOAM case data using pvpython). Thus, can someone possibly guide me on what these steps would look like. I have been looking through other forum threads, but still can't seem to find the exact answer. I was looking at this thread, and it looks like this is the command I should use: Code:
cfd_OpenFOAM = PV3FoamReader( FileName='/home/cfd/cfd.OpenFOAM' ) Or should I be using the Code:
foamToVTK Thanks for your help. Sincerely, Sara |
|
August 18, 2016, 04:34 |
|
#2 |
New Member
Join Date: Mar 2015
Posts: 12
Rep Power: 11 |
Hi Sara,
I have just started to do some basic scripting with the trace function, so I am not an expert on this, but you can just create a blank file (e.g. cfd.OpenFOAM, case.OpenFOAM, ... ) and place it in the simulation folder. Opening VTK files should be a bit faster as this is native to paraview, however IMO for big cases it takes longer to convert the case to VTK format than the gain on loading in paraview. Let me know if this helps you somewhat. Sincerly, Jens |
|
August 18, 2016, 10:37 |
|
#3 |
New Member
Sara
Join Date: Dec 2013
Posts: 10
Rep Power: 12 |
So what does the beginning of your pvpython script look like?
The issue I am having is that when I do the trace method, the data is already loaded (via paraFoam command). But when I try to strictly run it via pvpython, I am having trouble determining which commands to use to actually load the data. Thanks for your help. |
|
August 18, 2016, 10:44 |
|
#4 |
New Member
Join Date: Mar 2015
Posts: 12
Rep Power: 11 |
The beginning is pretty straight forward
Code:
try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() case_foam = OpenFOAMReader( FileName='/home/path/case.foam' ) |
|
Tags |
pvpython |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] difficulties installing swak4foam | newbie29 | OpenFOAM Community Contributions | 120 | October 21, 2022 05:01 |
Identifying Markers in a CGNS Mesh | tjim | SU2 | 3 | October 12, 2018 02:21 |
[General] Loading the correct time step with pvpython | Jack001 | ParaView | 1 | April 4, 2016 08:14 |
[General] problem with pvpython when loading state involving Plot Over Lines | hadrien51 | ParaView | 1 | October 17, 2012 12:18 |
Linux Batch - Star-CCM+ .. running Sims in batchmode | eRzBeNgEl | STAR-CCM+ | 3 | August 29, 2011 05:43 |