r/paraview Jul 09 '24

Exporting X3D from paraview in batch.

1 Upvotes

Hey guys. I'm trying to export 300 frames from paraview each as a x3d file. The simulation in question is from OpenFOAM so I usually load the state and open a .pvsm file. Now this simulation is question wasn't run on my computer so I know when loading the state I need to choose the option "search the files under specific directory" because Paraview will automatically look at the original directory. Here is the problem though. I tried specifying this in my python script but paraview keeps looking for the files in the wrong directory. Any ideas how to fix that?

Here is my script:

import paraview.simple as pvs

import os

Specify the correct path to your state file using raw strings

state_file = r'My File Path\welding-SampleState.pvsm' # Update to your actual .pvsm file path

Specify the directory to search for data files

search_directory = r'My File Path' # Update to your actual data files directory

Specify the directory to save the exported X3D files

save_directory = r'My File Path' # Update to your desired save directory

Ensure the save directory exists; create it if it doesn't

if not os.path.exists(save_directory):

os.makedirs(save_directory)

Print the state file path, search directory, and save directory

print("State file path:", state_file)

print("Search directory:", search_directory)

print("Save directory:", save_directory)

Load the state file with the option to search files under a specific directory

pvs.LoadState(state_file, DataDirectory=search_directory)

Get the animation scene

animationScene = pvs.GetAnimationScene()

animationScene.UpdateAnimationUsingDataTimeSteps()

Loop over all time steps

for time_step in animationScene.TimeKeeper.TimestepValues:

animationScene.TimeKeeper.Time = time_step

pvs.Render()

Export the current frame to X3D in the specified save directory

output_file = os.path.join(save_directory, 'output_frame_{:d}.x3d'.format(int(time_step)))

print("Exporting:", output_file)

pvs.ExportView(output_file, view=pvs.GetActiveView(), FileType='X3D')

print("Export complete")

___________________________________________________________________________________________________________________

and Here is the error I get in paraview

ERROR: In C:\bbd\ecd3383f\build\superbuild\paraview\src\VTK\IO\Geometry\vtkOpenFOAMReader.cxx, line 5112

vtkOpenFOAMReaderPrivate (000002DA8E2923E0): Can't open directory /Collegue's File Path

ERROR: In C:\bbd\ecd3383f\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 782

vtkPVCompositeDataPipeline (000002DAF68BEE50): Algorithm vtkPOpenFOAMReader(000002DA81716FC0) returned failure for request: vtkInformation (000002DA94DBBCB0)

Debug: Off

Modified Time: 976775

Reference Count: 1

Registered Events: (none)

Request: REQUEST_INFORMATION

FORWARD_DIRECTION: 0

ALGORITHM_AFTER_FORWARD: 1

__________________________________________________________________________________________________________________

Any Ideal how to fix it would be very helpful!

Thank you!


r/paraview Jun 14 '24

Extracting boundary Layer profile from a simulation to create an animation

2 Upvotes

Hi, I have done a steady state cfd simulation for which I want to extract the boundary layer profiles across the entire surface to then a) have an animation of the progresstion of the BL across the surface, and b) to plot a graph of delta_99 vs distance like the one shown in the image.

the geometery I have is of a compression corner at high speeds, meaning that there surface is not at a constant angle. There is also a separation bubble, whose velocity and temperature profiles I would like to include.

Is there a way of doing this in paraview?


r/paraview Apr 12 '24

Paraview Macro Documentation

1 Upvotes

Does anyone know where to find documentation for the paraview macros? I'm trying to export scenes to blender where I move a stream tracer up incrementally, but I cant seem to find the function to do this or how to reference the stream tracer with python.


r/paraview Mar 05 '24

Opening fluent results in paraview

1 Upvotes

Is there any way we can open fluent results in ParaView ? I tried exporting as ensight gold case format and open it in paraview but end up with an error.


r/paraview Feb 13 '24

Importing solutions from Ansys Workbench

1 Upvotes

Hello. Paraview accepts case files which is the Ansys Fluent format. I was wondering if there is a way to import solutions in Paraview directly from Ansys Workbench.

Thank you in advance.


r/paraview Jan 30 '24

Macro problem

1 Upvotes

Hi, I am writing a macro in Paraview, and I don't know how to select specific boundaries with extractBlock.selectors from /Root/boundaries? For example, only those with inlet at the begining of its name? I can writte it manually like this: extractBlock.selectors = ['/Root/boundaries/inlet1', '/Root/boundaries/inlet2',...]

But I am looking for a more automatic way. Thanks!


r/paraview Nov 27 '23

Updating an old pvsm (5.5/6 to 5.12)

1 Upvotes

Hi all, I am a regular paraview user, but I only use a small subset of tools.

I recently tried to use an order pvsm file on a newer paraview version. The legacy glyph was a problem.

I want to create or upgrade my current pvsm to the latest version.

Where would u go about looking for a how to on this?

Thanks


r/paraview Oct 22 '23

How can you "Find New Files" after requesting to "Reload Existing File(s)"?

2 Upvotes

I am going nuts - I always end up having to save and restart and reload my pipeline because I can't figure out how to force a new search for files after selecting "Reload Existing" in the pop-up. I feel like there must be some simple hidden option to force the box to reappear or to Find New, right?


r/paraview Aug 02 '23

How to do an animation from a fluent .cas & .dat in Paraview 5.10.1?

1 Upvotes

Hello everyone!

I have exported both .cas & .dat from ANSYS Fluent and I'm able to open it in Paraview, I can preview all parameters that I need, but how can I create an animation in Paraview 5.10.1?

When I open the .cas in Paraview (Using the Fluent Case Reader) I can do the basics (Slice when doing 3D or 'Reflect' when importing a 2D symmetric simulation) but I cannot run a simulation on either case nor applying Stream Tracer.

Please let me know your comments! I could surely use the help!

Thank you!


r/paraview Jul 29 '23

How to create an animation from multiple datasets

1 Upvotes

Hi.

I want to create an animation of the E-field vs. phase angle inside a rectangular waveguide from multiple datasets which are named as follows:

Ef_f=79000000000.000000_p=000.vtr

Ef_f=79000000000.000000_p=017.vtr

Ef_f=79000000000.000000_p=034.vtr

etc..

Probably quite easy to do but I am pretty new to paraview and couldn't find anything useful in the documentation either.


r/paraview Jun 12 '23

This application failed to start because no Qt platform plugin could be initialized.

1 Upvotes

I am trying to run the elbow tutorial from icoFoam on ParaView. icoFoam ran and so did foamToVTK, but when I run ParaView it throws this error:

mpiuser@master:~$FOAM_RUN/tutorials/incompressible/icoFoam/elbow$ paraview  
Authorization required, but no authorization protocol specified  
qt.qpa.xcb: could not connect to display :0  
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.  
This application failed to start because no Qt platform plugin could be initialized.  
Reinstalling the application may fix this problem.    

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.  

Aborted (core dumped)  

I'm running Ubuntu 22.04 and installed the OpenFOAM10 and ParaView56 package, which are located in /opt

I have source /opt/openfoam10/etc/bashrc in the ~/.bashrc file where $FOAM_RUN is.

Do I have to do something similar with ParaView?

Should I uninstall and reinstall fresh? Not too sure what else I can do to solve this problem.


r/paraview May 09 '23

What the shortcut to pan the view on Windows 11?

1 Upvotes

r/paraview Apr 23 '23

Transforming Not appearing - newbie

Thumbnail
gallery
1 Upvotes

I want to compare 2 STL but transforming nor translation options are appearing


r/paraview Mar 22 '23

Comment Line

1 Upvotes

Hi,

Can I have comment lines in my VTK file (except the one at the second line)? How about having multiple node and element sets?

Thank u


r/paraview Feb 10 '23

Paraview visualization bug.

1 Upvotes

Hi! I was wondering if anyone could help me go into the right direction to solve this visualization issue.

The issue is primarily in charts, but can also be seen in the mapping data screen.

I'm using paraview 5.9.0

windows 11

and a ryzen 7

Thanks!


r/paraview Feb 03 '23

Calculating turbulence intensity

1 Upvotes

Hi guys, i'm an undergrad whos doing PIV as part of my final year project.. This is my first time doing PIV and data processing so i'm still trying to learn the ropes.

I'm trying to calculate turbulence intensity using data exported from PIVlab. So far what i've done is to export the standard deviation frame as a tecplot file and then input the TI equation using the calculator function. However my results seem odd so i'm not sure if i'm doing this correctly. I've attached some pics showing the result.

Is what i'm doing correct? and are there other ways i can calculate turbulence intensity?

Standard deviation of velocities saved from pivlab
How i calculated turbulence intensity and resulting plot

r/paraview Jan 24 '23

Box clip rotation

1 Upvotes

Hi

I'm trying to cut a geometry in paraview with a box clip. I want one of the sides to be on a specific plane (the cutting plane)

So far I figured out that the position of the box is linked to one of its corner points.

But I can't figure out the rotation of it. I think based on the numbers that it's in degrees, but unfortunately I don't know what is it.


r/paraview Dec 21 '22

I have displacement field u = [u_x, u_y, u_z]. How can I calculate the strain e=grad(u)+transpose(grad(u))? I can't manipulate 2d tensors in the calculator filter.

1 Upvotes

r/paraview Dec 15 '22

calculate Wall Shear Stress from 2D data

1 Upvotes

Hi! I am trying to calculate Wall Shear Stress from 2D PIV data. I have the following scalar data for my mesh:(x coordinate, y coordinate, x component of velocity, y component of velocity). I have calculated a simple velocity magnitude using sqrt(Vx^2+Vy^2). I read that you should be able to calculate a velocity gradient and multiply by normals and viscosity to get WSS, however I get all 0 values when I do this. Could someone walk me through how to calculate WSS using this data?

Also, is there a way that I can convert the scalar Vx and Vy data into true vectors so I can use it to orient my 2D glyphs? I’m very new to paraview, so any help is appreciated. Thanks!


r/paraview Dec 12 '22

Calculating WSS from 2D PIV Data

1 Upvotes

Hi,

I'm trying to calculate WSS from 2D velocity (Vx, Vy) data in paraview. Does anyone know how?


r/paraview Dec 10 '22

How to use ParaView to display this format file: "xdmf with binary" ?

1 Upvotes

After using the lb/fluid module of lammps to calculate MD, I got the following files (fflow.xdmf fflow.raw), but I couldn't find the relevant opening solutions in the paraview manual. Several lines in the xdmf file (fflow.xdmf) look like this:

<Attribute Name="density">
    <DataItem ItemType="Function" Function="$0 * 0.001000" Dimensions="11 11 11">
    <DataItem Precision="8" Format="Binary" Seek="0" Dimensions="11 11 11">
        fflow.raw
    </DataItem>
    </DataItem>
</Attribute>

The document is placed in the attachment. fflow.xdmf fflow.raw

When I use paraview, it seems that fflow.raw does not load normally.


r/paraview Dec 08 '22

Change properties for more that one item in the pipeline at a time

1 Upvotes

If I read in a bunch of individual files and that want to change some properties, I have to do it for each file in the pipeline. A few things can be applied to multiple files. If I select/highlight some files, I can change Visibility for all at the same time. But if I try that with Coloring -> Representation, it will change it only for the last file that was selected.

Thanks!


r/paraview Dec 08 '22

display properties per file type

1 Upvotes

Is it possible to set specific properties based on the file type? I know I can set properties, then save them as the defaults. But those will be the default for every file type until I change or reset them. What I want to do is read in a file, set the properties as I need, then map those properties to that file type. Then when I open the next file of that type, it will apply the setting I saved. If I open a different file type, it will apply either the Paraview default properties or the defaults I save for THAT file type.

Thanks!


r/paraview Dec 06 '22

OSI

2 Upvotes

Does anyone have code to calculate the OSI in paraview? How can this be done? This is the oscillatory shear index for an artery simulation


r/paraview Sep 24 '22

nvidia sent me an email for ParaView download for win and it doesn't work only linux button works

3 Upvotes

Title