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

[OpenFOAM] Display center of mass with mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 3, 2015, 12:04
Post
  #21
Member
 
Muhammad Usman
Join Date: Feb 2014
Posts: 91
Rep Power: 0
13msmemusman is on a distinguished road
Thank you sir it has already been successful. Thanks a lot for this kind help.
Sincerely
Usman
13msmemusman is offline   Reply With Quote

Old   June 12, 2018, 20:43
Default
  #22
New Member
 
Hale
Join Date: Apr 2018
Posts: 7
Rep Power: 8
Hale_812 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
...The following took me some considerable time to program. Steps to use:
In ParaView (I tested this in ParaView 4.1.0), select from the menu "Sources" the "Programmable Source".

It now shows at least 3 options, which should be populated as follows:

Output Data Set Type: vtkPolyData

Script:

My test file "test.csv" contains this:

Dear wyldckat.


I have similar goal of loading datalogger-style time-voltage readings .csv table as time-varying data source.


Surprisingly, ParaView still does not have this fundamental featureж I mean, interpreting time data. Upon searching with Google, I found your post from 2015.


Unfortunately, I am not a programmer, and have little Idea about Paraview Python API, so I can not make your script working on my system.
And my system is ParavView 5.5.0 x64 for Win64, official build.


First, using manuals, I tried tweaking it for time-voltage 2-column data file. But I could create just 2 timesteps, "0" and "1", with wrong values not present in the table.
Then I just tried executing your example with your test-file without change. And got this error message:


Traceback (most recent call last): File "<string>", line 19, in <module>
File "<string>", line 44, in RequestData
NameError: global name 'arrayX' is not defined



Can you please help solving this problem?
Hale_812 is offline   Reply With Quote

Old   June 12, 2018, 21:14
Default
  #23
New Member
 
Hale
Join Date: Apr 2018
Posts: 7
Rep Power: 8
Hale_812 is on a distinguished road
Oh, Increadible! I just got an idea why didn't it work with your example.
ParaView 5 can execute Python programmable Source ONLY ONCE! After that, it should be closed and restarted. So weird.


Anyway, I see, your code can load only 2 timesteps "0", and "1" from the whole table.


I tried my table with 770 values from 0 to 7.714910349e-009 s.
And it loaded the final value only. I guess, because it did not find 1s timestep, and obeyed directive "elif arrayT[-1] <= req_time:"


When calling SetOutputTimesteps(self, (0, 7.6147167081e-009)) with 7.6147167081e-009s timestep as an argument, it reads the value for time=0 instead. But the added time is 7.61472e-009.


So, is there a way to import all the timesteps with float-format time data?
And a way of resetting the numpy environment before the script is executed, so I don't have to restart ParaView every time?
Hale_812 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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
Prescribed Translating Cylinder Mesh for Added Mass Problem (Transient FSI) Lloyd Sullivan CFX 5 August 7, 2018 08:11
Gambit problems Althea FLUENT 22 January 4, 2017 03:19
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 11:14
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38


All times are GMT -4. The time now is 01:03.