User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2020-04-03 13:39:50

Sebastian Schwindt
User
From: Stuttgart, Germany
Registered: 2020-03-31
Posts: 3

BASEMENT 3.x XDMF conversion

Hi,

The new BASEMENT 3.x version performs well (great job - big thanks to the developers!) and I successfully ran it on a small river section. The result visualization in ParaView and the export Python script (BMv3NodestringResults.py) worked well for me, too. Now, I got stuck when it comes to the conversion of the XDMF contents to any other file format. ParaView enables exporting some points, but in its function as viewing-tool, it does not enable the extraction of all points of one variable at one timestep (well, please correct me if I'm wrong here, in particular regarding the statement "all points"). The Python script only extract statistical key values of the results, but no geospatial arrays. So I tried to import the results.h5 file in QGIS, which ends up in some weird raster representations.

Google guided me to a presentation from Klaus Schmalzl who explains the problem of point export after triangulation and he presents the tool Basement_post_W.exe with usable result exports.

A lot of text until here, just to ask the following questions:

(1) Is there a better way or are there more detailed instructions to use ParaView to extract all points of one variable at one (preferably the end) timestep?

(2) Is there a way to use the Crayfish plugin and QGIS to consistently import and convert the results.xdmf file (it didn't work for me on QGIS 3.10/12 on Linux Mint and Windows 10)?

(3) Is Klaus Schmalzl's tool available to the community?

Thanks and best regards,
Sebastian

Offline

#2 2020-04-03 15:33:07

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: BASEMENT 3.x XDMF conversion

Hi Sebastian

We appreciate your positive feedback to version 3.x!

(1) In ParaView you can export element-based results to as CSV  file. Therefore (i) load the .xdmf file, (ii) apply the ParaView-Filter "Cell Centers" (iii) change to the time step of interest, (iii) with CTRL + s you can save the currently selected layer (select CellCenters-layer) in the pipeline-browser to several file types, e.g. "Comma or Tab Delimited Files"  (iv) during this process choose "Point-data".

You also have the option to save multiple time steps.

(2) In QGIS 3.1x, you can open the .2dm-mesh file of your simulation in the "Data Source Manager" --> MESH. Afterwards, open the "Layer Properties" of the mesh, go to "Source"-->"Assign Extra Data Set to Mesh" and choose the corresponding .xdmf file. To visualize certain data, you must activate the data set under "Symbology"-->"Groups" by clicking on the grey square on the right side (should change to colored square).

(3) The Post-Processing tools developed by Klaus Schmalzl will hopefully be available to the community soon.

Best regards
Matthias

Offline

#3 2020-04-03 18:12:40

Sebastian Schwindt
User
From: Stuttgart, Germany
Registered: 2020-03-31
Posts: 3

Re: BASEMENT 3.x XDMF conversion

Hi Matthias,

Thanks, that was helpful. Still, I am having some issues with the solutions:

(1) ParaView only exports 20 points per timestep and parameter (no idea why - I check the metadata, where I found ~4000 pts per timestep and parameter, which are also correctly plotted in ParaView, but not exported to csv).

(2) Assigning results.xdmf to my mesh file crashes QGIS.

(3) That would be great - his tool seems to work well.

Best,
-Sebastian

Offline

#4 2020-04-08 10:31:54

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: BASEMENT 3.x XDMF conversion

Hi Sebastian

(1) not sure where the problem lies here...

(2) have a look at this topis: http://people.ee.ethz.ch/~basement/foru … hp?id=5261

Best regards
Matthias

Offline

#5 2020-04-08 13:35:22

Sebastian Schwindt
User
From: Stuttgart, Germany
Registered: 2020-03-31
Posts: 3

Re: BASEMENT 3.x XDMF conversion

Hi Matthias,

The answer described in issue (2) solved the problem by using QGIS.

Thanks,
-Sebastian

Offline

#6 2022-05-30 19:35:38

Nicola
User
From: Trento
Registered: 2022-05-01
Posts: 1

Re: BASEMENT 3.x XDMF conversion

Hi,
I have a similar problem; i want to export the results of one variable at a certain timestep,  as .csv, and  i need all the points.

So, i' m following  Matthias's explanation with Paraview at issue (1), that was very helpful, but  i still having some issues :

Paraview exports only certain points, distributed on lines, and i don' t understand the reason why i cant' export all the points, that are also correctly plotted by Paraview (correct me if i'm wrong regarding the 'all points' idea,  i may  have misunderstood the way Paraview exports data).

Is there another possible solution?

Thanks and best regards,

Nicola

EDIT: I solved the problem using Crayfish' s tools to extract vertices and faces in QGis.

Last edited by Nicola (2022-05-31 21:19:25)

Offline

Board footer

Powered by FluxBB