|
[Sponsors] |
[General] Text annotation of table cell as function of time? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 28, 2014, 15:40 |
Text annotation of table cell as function of time?
|
#1 | |
Member
Lourenço SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 41
Rep Power: 12 |
Hello,
How can I do a text annotation o a table cell as function of time? I have this csv file: Quote:
The thing is that 't_index' variable is not recognized in this file import pipe, only in .foam pipe. Anyone knows how to do it? Thank you, Lourenço |
||
January 29, 2015, 06:30 |
|
#2 |
Member
Lourenço SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 41
Rep Power: 12 |
I have found a way. It is not the simplest but it works.
1) Create vtk-data unstructured files (.vtu), each one for each time step. In this example, I have some flowrates: Code:
<VTKFile type="UnstructuredGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64"> <UnstructuredGrid> <Piece NumberOfPoints="1" NumberOfCells="0"> <PointData> <DataArray type="Float64" Name="Time" format="ascii"> 0 </DataArray> <DataArray type="Float64" Name="volWater" format="ascii"> 361.981 </DataArray> <DataArray type="Float64" Name="frOutlet" format="ascii"> 0 </DataArray> <DataArray type="Float64" Name="frInlet" format="ascii"> 0 </DataArray> </PointData> <CellData> </CellData> <Points> <DataArray type="Float32" Name="Points" NumberOfComponents="3" format="ascii"> 0 0 0 </DataArray> </Points> <Cells> <DataArray type="Int64" Name="connectivity" format="ascii"> 0 </DataArray> <DataArray type="Int64" Name="offsets" format="ascii"> 1 </DataArray> <DataArray type="UInt8" Name="types" format="ascii"> 1 </DataArray> </Cells> </Piece> </UnstructuredGrid> </VTKFile> Code:
<VTKFile type="Collection" version="1.0" byte_order="LittleEndian" header_type="UInt64"> <Collection> <DataSet timestep="0" file="domainMassFlow_000.vtu"/> <DataSet timestep="0.1" file="domainMassFlow_001.vtu"/> <DataSet timestep="0.2" file="domainMassFlow_002.vtu"/> <DataSet timestep="0.3" file="domainMassFlow_003.vtu"/> 4) Use a python annotation to extract the information. e.g.: Code:
'FR Inlet: %.2f m3/s/s' % input.PointData['frInlet'][0] Last edited by wyldckat; April 26, 2015 at 15:18. Reason: Added [CODE][/CODE] markers |
|
April 20, 2015, 08:00 |
|
#3 |
Member
Lourenço SM
Join Date: Jul 2014
Location: Lisboa, Portugal
Posts: 41
Rep Power: 12 |
Hello wildcat,
Thank you for your attention. What I really would like is to do a text annotation from a table where the first column is time and the second is a variable. This table could come from csv text file. I've manage to find a way with a pvd file and a vtu file for each table row. It requires some extra work but it actually works! Do you (or anyone) has an ideia how to make it in a simple way? Lourenço [ Moderator note: Moved post from http://www.cfd-online.com/Forums/ope...ylinder-2.html ] Last edited by wyldckat; April 26, 2015 at 15:20. Reason: moved post and added moderator note |
|
April 26, 2015, 16:42 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: Have a look at this post I wrote a few minutes ago: http://www.cfd-online.com/Forums/ope...tml#post543810 - post #11
|
|
Tags |
annotation, table, time |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting up Lid driven Cavity Benchmark with 1M cells for multiple cores | puneet336 | OpenFOAM Running, Solving & CFD | 11 | April 7, 2019 01:58 |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 06:28 |
How to export time series of variables for one point? | mary mor | OpenFOAM Post-Processing | 8 | July 19, 2017 11:54 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |