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

[OpenFOAM] How to access a variable at two different time instances in Paraview

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Prat991

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2017, 05:14
Default How to access a variable at two different time instances in Paraview
  #1
New Member
 
Join Date: Mar 2017
Posts: 11
Rep Power: 9
Prat991 is on a distinguished road
Hello All,

Is there a way to use Programmable filter or any other filter in PARAVIEW on a variable at two different time instances? for example I have to calculate difference of scalar variable pressure p between current time instance and last time instance.

Thank you in advance.
sourav90 likes this.
Prat991 is offline   Reply With Quote

Old   June 13, 2017, 07:00
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
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 not know about such a filter, since most of the time the data is stored on the mesh including the current time step. If it is only about the difference between the current and the final time step I would suggest copying the pressure field of the final time step to every time-step that you want the result for and than call it pEnd, or pFinal, or whatever you like and than make a simple calculator filter for the visualization.

Best regards,
Tom
tomf is offline   Reply With Quote

Old   June 13, 2017, 08:56
Default
  #3
New Member
 
Join Date: Mar 2017
Posts: 11
Rep Power: 9
Prat991 is on a distinguished road
Hi Tom,

Thank you very much for your reply. I think i worte in a confusing way, SORRY for that, I want to calculate difference of scalar variable pressure p between CURRENT time instance and PREVIOUS time instance for all the time intervals FOR THE PURPOSE OF VISUALIZATION IN PARAVIEW for multiphase simulation.

in the form of algebra : mag((p-oldTime(p))/deltaT()

I have already calculated the pressure change wrt time at every timestep as a post processing function..... Now I want to Visualize this on the model in paraview.

Can you or anyone can give suggestions how to do this?
Prat991 is offline   Reply With Quote

Old   June 13, 2017, 09:04
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
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,

this confuses me a lot:
Quote:
Originally Posted by Prat991 View Post
I have already calculated the pressure change wrt time at every timestep as a post processing function..... Now I want to Visualize this on the model in paraview.
Hi, does this mean you have a variable for each time step? In that case you should be able to visualize it like any other variable. Perhaps you should share some screenshots or exact details of what you have available.

Regards,
Tom
tomf is offline   Reply With Quote

Old   June 13, 2017, 09:35
Default
  #5
New Member
 
Join Date: Mar 2017
Posts: 11
Rep Power: 9
Prat991 is on a distinguished road
Quote:
Originally Posted by tomf View Post
Hi,

this confuses me a lot:


Hi, does this mean you have a variable for each time step? In that case you should be able to visualize it like any other variable. Perhaps you should share some screenshots or exact details of what you have available.

Regards,
Tom
Hi, i can explain you taking a simple case of multiphase dambreak... I am running this damBreak case in a compressibleInterform. In its conrtoldict i have added postprocessing function - swak4Foam for the calculation of pressure change with respect to time i.e "mag((p-oldTime(p))/deltaT())".

This with generate the result data in postprocressing folder in .dat format which will give Excel graphs at the end of the run....

Now, seperately, I also want to visually see this change of pressure with respect to time in paraview.... but I dont know how to access presssre values of the mesh for previous time instance and subtract it to current time instance in paraview..

I dont know which screenshot I can put to clarify more...

Thank you.

Regards,
Pratik
Prat991 is offline   Reply With Quote

Old   June 13, 2017, 09:57
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
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
Ok, this is completely different from what I thought you had. So these .dat files are just integral data? Not for every mesh point? Than I am afraid you cannot do what you want with that data.

I would not know if one can combine .dat data with separate mesh information in ParaView. I would suggest clearly explaining this in the ParaView forum instead of the OpenFOAM one and maybe someone can help you there.

On this thread there might be someone who can help you find a way to get the data you want in a format that ParaView can work with, maybe a VTK format is possible? You would need the VTK format for the relevant patch and than put the value of your time derivatives in there for each time step from the .dat file. You can start to have a look by running foamToVTK and try to work from there.

Best regards,
Tom
tomf is offline   Reply With Quote

Old   June 13, 2017, 10:16
Default
  #7
New Member
 
Join Date: Mar 2017
Posts: 11
Rep Power: 9
Prat991 is on a distinguished road
Hi Tom, thanks for your suggestion, but that is quite complex and way out of reach as I am beginner.

At this moment we can keep the post processing data seperately. Lets assume we dont have any post processing data.(Please, sorry i brought that into all this)


So we have only openfoam generated data after run of comprissibleInterform. When we apply .foam file in paraview we will see pressure values on mesh at current time instance only for each time interval. Now similarly I want to visualize dp/dt i.e. [ (current pressure values - previous time instance pressure values)/current time step] for each time interval.

will it be anyhow possible in paraview?



Thank you.

Regards,
Pratik
Prat991 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
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 6, 2023 00:48
Setting up Lid driven Cavity Benchmark with 1M cells for multiple cores puneet336 OpenFOAM Running, Solving & CFD 11 April 7, 2019 01:58
User defined time step - Possible to put variable time stepping in it? maccheese Fluent UDF and Scheme Programming 19 June 4, 2018 10:49
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 23:40
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03


All times are GMT -4. The time now is 00:08.