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-05-11 16:34:52

CH90s
User
Registered: 2020-05-04
Posts: 7

Parsing Non-valid Error

Hi everyone,

New user to the BASEMENT software, I have been unsuccessful to get a simulation to run on the v3 and v2.8 software packages, but am hoping I can learn enough to be able to get my models to run. I am working on a thesis for the University of Colorado Denver Masters program in hopes to simulate impact generated impulse waves to find the minimum mass movement size required to overtop a moraine dam from a late 1980's Glacial Lake Outburst Flood. The error message is listed below is from v3. Anyone able to workaround this?

Error Message (v3): -> parsing non-valid element #1, in file: /builds/BASEMENT/BASEMENT-OP2/src/BASEplane/setup/processing/MeshBP.cpp on line 161, version v3.0.1


Here are the messages from the console:

BASEMENT v3.0.1
BASEplane setup binary
v3.0.1
Copyright: © 2019 ETH Zurich / Laboratory of hydraulics, hydrology and glaciology (VAW)

 -> composing the model from the input file
 -> found aggregate <hydraulics_aggr>
 -> found aggregate <morphology_aggr>
 -> found aggregate <hyd_boundary_aggr>
 -> found aggregate <mor_direction_curve_aggr>
 -> found aggregate <mor_direction_ikeda_aggr>
 -> found aggregate <hyd_friction_aggr>
 -> running on 1 threads
 -> generating the content from the model components ...
 -> model component <EdgesAll/FluxesHy> is internal -> no content defined!
 -> model component <EdgesAll/FluxesMo> is internal -> no content defined!
 -> model component <CellsAll/IsWetted> is internal -> no content defined!
 -> model component <CellsAll/ChezyCoe> is internal -> no content defined!
 -> model component <CellsAll/FlowCurv> is internal -> no content defined!
 -> model component <CellsAll/BedGrdnt> is internal -> no content defined!
 -> model component <CellsAll/BedTrCap> is internal -> no content defined!
 -> model component <CellsAll/BedTrDer> is internal -> no content defined!
 -> model component <NodeStrg/StateVar> is internal -> no content defined!
 -> model component <EdModDat/LocalDat> is internal -> no content defined!
 -> model component <Parameters/InvGravity> is internal -> no content defined!
 -> model component <Parameters/InvBedPorosity> is internal -> no content defined!
 -> model component <Parameters/SedRelDensity> is internal -> no content defined!
 -> check consistency of generated content...
 -> go through the tree!
 -> succesfully validated the input file <C:/Users/chenr/OneDrive/Documents/BASEMENT_sandbox/rs_finalDatadata/test2/model.json>
 -> creating the hdf5 file <C:/Users/chenr/OneDrive/Documents/BASEMENT_sandbox/rs_finalDatadata/test2/setup.h5>...
 -> generating the content from the model components ...
 -> model component <EdgesAll/FluxesHy> is internal -> no content defined!
 -> model component <EdgesAll/FluxesMo> is internal -> no content defined!
 -> model component <CellsAll/IsWetted> is internal -> no content defined!
 -> model component <CellsAll/ChezyCoe> is internal -> no content defined!
 -> model component <CellsAll/FlowCurv> is internal -> no content defined!
 -> model component <CellsAll/BedGrdnt> is internal -> no content defined!
 -> model component <CellsAll/BedTrCap> is internal -> no content defined!
 -> model component <CellsAll/BedTrDer> is internal -> no content defined!
 -> model component <NodeStrg/StateVar> is internal -> no content defined!
 -> model component <EdModDat/LocalDat> is internal -> no content defined!
 -> model component <Parameters/InvGravity> is internal -> no content defined!
 -> model component <Parameters/InvBedPorosity> is internal -> no content defined!
 -> model component <Parameters/SedRelDensity> is internal -> no content defined!
 -> check consistency of generated content...
 -> go through the tree!
 -> reading the mesh file <C:/Users/chenr/OneDrive/Documents/BASEMENT_sandbox/rs_finalDatadata/test2/Flaz_mesh.2dm> ...

Cheers,
Cris

Last edited by CH90s (2020-05-11 16:40:18)

Offline

#2 2020-05-15 07:17:25

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

Re: Parsing Non-valid Error

Hi Cris

There seems to be a problem with your mesh. How did you generate the mesh?

Best regards
Matthias

Offline

#3 2020-05-20 06:28:08

CH90s
User
Registered: 2020-05-04
Posts: 7

Re: Parsing Non-valid Error

Hi Matthias,

Thank you for getting back to me. I had the suspicion there may be something wrong with my mesh. I generated it using the process outlined in the documentation for v3. datasets used:

- SRTM DTM 1-arc second converted to a point layer
- Digitized Breaklines
- Regions point layer
- Boundary layer

- nodestrings added to the 2dm output from the quality mesh generation process.

Not sure where to go from here.

Best,
Cris

Offline

#4 2020-05-20 10:54:46

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

Re: Parsing Non-valid Error

Hi Cris

Maybe you can post the first 3 and last 3 lines of your .2dm file. This is usually where most errors occur.

Best regards
Matthias

Offline

#5 2020-05-21 07:29:46

CH90s
User
Registered: 2020-05-04
Posts: 7

Re: Parsing Non-valid Error

Hi Matthias,

Here are the first and last few lines from my .2dm file:



MESH2D   #created automatically via BASEmesh-Plugin for QGIS
NUM_MATERIALS_PER_ELEM_1
E3T       1     136     135    7406       4
E3T       2    1350    2381    2755       3
E3T       3    7406     137     136       4

........

ND   10104 -72.873110 -46.989338 204.000000
ND   10105 -72.949181 -47.007803 204.000000
ND   10106 -73.281664 -46.943746 1405.000000
NS 1180 5518 1783 2849 1582 2257 2659 1782 2258 1181 2261 1785 2529 1583 2847 1784 2262 1182 1787 1579 1810 1584 1786 5104 -1183 inflow
NS 1178 2522 2843 3737 2523 2102 3736 3783 3739 3850 3851 2844 2503 2823 1778 1577 3792 3764 3992 2835 2654 3840 2255 3084 2524 3087 2845 3086 2834 3076 1578 2103 2833 2525 2846 3614 3615 1777 2502 3638 3639 3612 3613 3637 3636 3733 3919 3885 3886 3829 3887 3695 3661 3755 3889 3995 4061 4057 3682 3763 3845 3710 3795 3857 3779 3920 -1179 outflow






Note: Considering the number of nodestrings that the .2dm file can handle I have tried using only 30 inputs into the "outflow" designated portion of the .2dm file and had no success either.
       - if the nodestring can only handle a limited number of inputs, does that mean the rest of the nodestring values need to be added into secondary/tertiary lines, each given outflow designation?


Kind regards,
Cris

Offline

#6 2020-05-25 10:07:32

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

Re: Parsing Non-valid Error

Hi Cris
The file structure looks mostly ok. One error is the NUM_MATERIALS_PER_ELEM_1 which should be with underscore before the 1:

MESH2D   #created automatically via meshModel tool
NUM_MATERIALS_PER_ELEM 1

Also, the limitation of nodes per nodestring is currently at 40. So you would have to split up you outflow nodestring. This means you also have to define a boundary condition to each "outflow" nodestring in the model.json. E.g.

NS 1180 5518 1783 2849 1582 2257 2659 1782 2258 1181 2261 1785 2529 1583 2847 1784 2262 1182 1787 1579 1810 1584 1786 5104 -1183 inflow
NS 1178 2522 2843 3737 2523 2102 3736 3783 3739 3850 3851 2844 2503 2823 1778 1577 3792 3764 3992 2835 2654 3840 2255 3084 2524 3087 2845 3086 2834 3076 1578 2103 2833 2525 2846 -3614 outflow_1
NS 3615 1777 2502 3638 3639 3612 3613 3637 3636 3733 3919 3885 3886 3829 3887 3695 3661 3755 3889 3995 4061 4057 3682 3763 3845 3710 3795 3857 3779 3920 -1179 outflow_2

Further, you are using a mesh with the elevation information stored on the nodes. To use such a mesh in BASEMENT version 3.x you need to specify an interpolation method in the model.json. For more information have a look and the parts Introduction and Installation and User Manual of the System Manual of version 3.

Best regards
Matthias

Offline

#7 2020-05-26 09:20:12

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: Parsing Non-valid Error

Hi Matthias and Cris,

my models were running even without an interpolation specification. What is the default in this case?

Thanks!

Matteo

Offline

#8 2020-05-26 09:46:59

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

Re: Parsing Non-valid Error

Hi Matteo

The default interpolation method is "mean".

Best
Matthias

Offline

#9 2020-11-22 23:15:07

isabo
User
Registered: 2020-11-03
Posts: 6

Re: Parsing Non-valid Error

Hello everyone
I’m new to BASEMENT and currently using v3.0.2 with the aim of modelling the flood behaviour of a small catchment area.
I haven’t been able to determine the cause of the same error output Cris has mentioned:
"-> parsing non-valid element #1, in file: Z:\src\BASEplane\setup\processing\MeshBP.cpp on line 161, version v3.0.2"

The console output was:

BASEMENT v3.0.2
BASEplane setup binary
v3.0.2
Copyright: (C) 2020 ETH Zurich / Laboratory of hydraulics, hydrology and glaciology (VAW)

 -> composing the model from the input file
 -> found aggregate <hydraulics_aggr>
 -> found aggregate <hyd_friction_aggr>
 -> found aggregate <hyd_source_aggr>
 -> found aggregate <hyd_flood_aggr>
 -> running on 1 threads
 -> generating the content from the model components ...
 -> model component <EdgesAll/FluxesHy> is internal -> no content defined!
 -> model component <CellsAll/IsWetted> is internal -> no content defined!
 -> model component <CellsAll/ChezyCoe> is internal -> no content defined!
 -> model component <CellsAll/FloodVar> is internal -> no content defined!
 -> model component <Parameters/InvGravity> is internal -> no content defined!
 -> check consistency of generated content...
 -> go through the tree!
 -> succesfully validated the input file <C:/Program Files/BASEMENT_302/bin/EZG_3_Test/model.json>
 -> creating the hdf5 file <C:/Program Files/BASEMENT_302/bin/EZG_3_Test/setup.h5>...
 -> generating the content from the model components ...
 -> model component <EdgesAll/FluxesHy> is internal -> no content defined!
 -> model component <CellsAll/IsWetted> is internal -> no content defined!
 -> model component <CellsAll/ChezyCoe> is internal -> no content defined!
 -> model component <CellsAll/FloodVar> is internal -> no content defined!
 -> model component <Parameters/InvGravity> is internal -> no content defined!
 -> check consistency of generated content...
 -> go through the tree!
 -> reading the mesh file <C:/Program Files/BASEMENT_302/bin/EZG_3_Test/new_Backup_EZG_3.2dm> ...

I’m assuming there’s something not quite right with my mesh (generated in SMS), so here’s the first and last few lines of it:

MESH2D
MESHNAME "Mesh_Generator"
E3T 1 1 3 2 1
E3T 2 111 54 53 2
E3T 3 110 53 52 2
E3T 4 111 53 110 2
...
ND 94772 2.68084927e+006 1.23961580e+006 8.09268200e+002
ND 94773 2.68084921e+006 1.23961880e+006 8.09167600e+002
ND 94774 2.68084950e+006 1.23962137e+006 8.09239000e+002
ND 94775 2.68084995e+006 1.23962402e+006 8.09260700e+002

In case you wonder: I deliberately chose not to define any node strings for in and outflows this time.
Thanks a lot and kind regards,
Isabel

Offline

#10 2020-11-23 09:18:39

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

Re: Parsing Non-valid Error

Hi Isabel

Try deleting the line:

MESHNAME "Mesh_Generator

from your mesh or replace it with:

NUM_MATERIALS_PER_ELEM 1

I hope this solves the issue.

Best regards
Matthias

Offline

#11 2020-11-23 13:46:59

isabo
User
Registered: 2020-11-03
Posts: 6

Re: Parsing Non-valid Error

Hi Matthias

Great, it did solve the issue. Thank you very much! big_smile

Kind regards
Isabel

Offline

#12 2021-02-25 10:46:23

AnaJuarez
User
From: Trondheim, Norway
Registered: 2020-08-24
Posts: 2

Re: Parsing Non-valid Error

Hi, I am getting a similar error.

Console Output

BASEMENT v3.1.0
BASEplane setup binary
v3.1.0
Copyright: (C) 2020 ETH Zurich / Laboratory of hydraulics, hydrology and glaciology (VAW)

 -> composing the model from the input file
 -> found aggregate <hydraulics_aggr>
 -> found aggregate <hyd_boundary_aggr>
 -> found aggregate <hyd_friction_aggr>
 -> running on 1 threads
 -> generating the content from the model components ...
 -> model component <EdgesAll/FluxesHy> is internal -> no content defined!
 -> model component <CellsAll/IsWetted> is internal -> no content defined!
 -> model component <CellsAll/ChezyCoe> is internal -> no content defined!
 -> model component <NodeStrg/StateVar> is internal -> no content defined!
 -> model component <EdModDat/LocalDat> is internal -> no content defined!
 -> model component <Parameters/InvGravity> is internal -> no content defined!
 -> check consistency of generated content...
 -> go through the tree!
 -> succesfully validated the input file <C:/Users/anaj/Desktop/02_Gaua/30Q2p7/model.json>
 -> creating the hdf5 file <C:/Users/anaj/Desktop/02_Gaua/30Q2p7/setup.h5>...
 -> generating the content from the model components ...
 -> model component <EdgesAll/FluxesHy> is internal -> no content defined!
 -> model component <CellsAll/IsWetted> is internal -> no content defined!
 -> model component <CellsAll/ChezyCoe> is internal -> no content defined!
 -> model component <NodeStrg/StateVar> is internal -> no content defined!
 -> model component <EdModDat/LocalDat> is internal -> no content defined!
 -> model component <Parameters/InvGravity> is internal -> no content defined!
 -> check consistency of generated content...
 -> go through the tree!
 -> reading the mesh file <C:/Users/anaj/Desktop/02_Gaua/00Mesh/Contorno3mMesh.2dm> ...

Error output
parsing non-valid element #1, in file: N:\src\BASEplane\setup\processing\MeshBP.cpp on line 198, version v3.1.0

This is how my mesh loooks like:

MESH2D
NUM_MATERIALS_PER_ELEM 2 
E3T 1 2287 2286 3424 2
E3T 2 3424 2286 3423 2
E3T 3 2287 3424 3425 2
E3T 4 3426 2289 2288 2
...
ND 103497 5.62298640e+005 6.99983255e+006 3.88968887e+001
ND 103498 5.62300379e+005 6.99983425e+006 3.88551178e+001
ND 103499 5.62302472e+005 6.99983597e+006 3.88207397e+001
ND 103500 5.62304912e+005 6.99983745e+006 3.87266579e+001
NS  50747 51903 51902 -1 in
NS  1161 1160 1159 1158 1157 1156 1155 1154 1153 1152 1151 51901 51900 51899 51898 51897 56866 56865 -56864 out

I have also added Interpolation method: "mean", since the elevation information stored on the nodes.

Anyone can help with this?

Best regards,
Ana

Offline

#13 2021-02-26 11:21:40

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: Parsing Non-valid Error

Hi Ana,
have you properly defined all the regions (i.e. matid) in your model file?
Maybe check also the matid of your mesh file in qgis
Matteo

Last edited by Matteo Facchini (2021-02-26 11:22:06)

Offline

#14 2021-02-26 13:48:08

AnaJuarez
User
From: Trondheim, Norway
Registered: 2020-08-24
Posts: 2

Re: Parsing Non-valid Error

Hi Matteo,

I used SMS, not Basemesh. I define two materials 1 Gauariver and 2 Field

This is how my model file looks:

{
  "SETUP": {
    "DOMAIN": {
      "BASEPLANE_2D": {
        "GEOMETRY": {
          "INTERPOLATION": {
            "method": "mean"
          },
          "REGIONDEF": [
            {
              "index": [
                2
              ],
              "name": "Field"
            },
            {
              "index": [
                1
              ],
              "name": "GauaRiver"
            }
          ],
          "STRINGDEF": [
            {
              "name": "in",
              "upstream_direction": "right"
            },
            {
              "name": "out",
              "upstream_direction": "left"
            }
          ],
          "mesh_file": "C:/Users/anaj/Desktop/02_Gaua/00Mesh/Contorno3mMesh.2dm"

I can see both materials 1 and 2 in the 6th column of the 2dm file.

Best
Ana

Offline

#15 2021-03-01 09:35:34

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: Parsing Non-valid Error

Ok, sometimes it happens to me that i miss 1 region point and i have one region with matid = 0.
I find this out with qgis usually, just by importing the mesh and using the material id to set the colors.
I hope this helps
Matteo

Offline

#16 2021-03-01 14:18:29

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

Re: Parsing Non-valid Error

Hi Ana

One Problem is the tag "NUM_MATERIALS_PER_ELEM 2" on the second line of your 2DM file. This should be "NUM_MATERIALS_PER_ELEM 1" since there is no elevation information on the elements.

Best regards
Matthias

Offline

Board footer

Powered by FluxBB