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-07 11:02:03

chri_and
User
Registered: 2017-07-27
Posts: 34

Error using INNER_BOUNDARY with hqrelation

Hello

I'm performing a 2D Simulation with Basement V2.8. I'd like to implement an inner boundary at a bridge and use the type hqrelation . I have prepared the hqrelation file with two columns (water elevation with values a.s.l. and the corresponding discharge).

The first x-value of boundary serie is equal 646.271 m (I got this from the error message, see point 3 below)

1) If the first value in my table is smaller than 646.271 m I get the following error:

EXCEPTION -> Division by zero in slope calculation in boundary serie!, in file:
   ..\src\BoundarySerie.cpp on line 162, Version: 2.8 R5771, compiled at: May
   31 2018, 15:20:23

The table looks like this
645.71    5
646.36    10
646.66    20
646.89    30
.....

2) If the first value in my table is equal  646.271 m I get the same error as above.

The table looks like this
646.271      5
646.36    10
646.66    20
646.89    30
.....

3) If the first value in my table is larger than 646.271 m I get following error:

ERROR -> x-value (usually = time) smaller than first x-value of boundary serie!
   (x-value: 646.271 first value: 646.3)


The table looks like this
646.3    5
646.36    10
646.66    20
646.89    30
.....

What do I do wrong? How can I set up my hqrelation file correctly?

Here my log file

DOMAIN {
	multiregion = xxxxx
	BASEPLANE_2D {
		region_name = xxxx
		GEOMETRY {
			type = 2dm
			file = xxxx.2dm
			STRINGDEF {
				name               = inflow
				node_ids           = (31 656 657 658 30 659 660 29 661 662 28 663 664 27 665 666 26 667 668 25 669 670 24 671 672 23 673 674 22 675 676 21 677 678 20 679 680 19 681 682 18)
				upstream_direction = right
			}
			STRINGDEF {
				name               = outflow
				node_ids           = (134 755 135 756 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 757 758 170)
				upstream_direction = right
			}
			STRINGDEF {
				name               = inflow_BW
				node_ids           = (598 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 557 789 790 791 792 793 794 795 796 372)
				upstream_direction = right
			}
			STRINGDEF {
				name               = outflow_BW
				node_ids           = (574 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 371)
				upstream_direction = right
			}
		}
		HYDRAULICS {
			BOUNDARY {
				type                 = hydrograph
				string_name          = inflow
				file                 = Inflow_stationary_20m2s.txt
				slope                = 86
				max_interval         = 20
				number_of_iterations = 5000
				weighting_type       = conveyance
				dynamic_slope        = no
				precision            = -1.0
				wse_calc_method      = average
			}
			BOUNDARY {
				type            = hqrelation
				string_name     = outflow
				slope           = 9
				weighting_type  = conveyance
				wall_flux       = no
				dynamic_slope   = no
				wse_calc_method = average
				conveyance_type = tables
			}
			INITIAL {
				type = dry
			}
			FRICTION {
				type                = strickler
				default_friction    = 30
				input_type          = index_table
				index               = (1 2 3)
				friction            = (25 30 35)
				wall_friction       = off
				grain_size_friction = no
			}
			PARAMETER {
				simulation_scheme              = exp
				riemann_solver                 = exact
				minimum_water_depth            = 0.05
				riemann_tolerance              = 1.0e-6
				velocity_update_partial        = volume_area
				dynamic_depth_solver           = on
				dynamic_depth_solver_precision = 0.005
				geo_min_area_ratio             = 0.05
				geo_max_angle_quadrilateral    = 45
				geo_min_aspect_ratio           = 0.06
			}
			INNER_BOUNDARY {
				type            = hqrelation
				string_name1    = outflow_BW
				string_name2    = inflow_BW
				file            = PQ_Bezieh.txt
				momentum_factor = 1.0
			}
		}
		TIMESTEP {
			start_time           = 0.0
			total_run_time       = 7200
			CFL                  = 0.95
			minimum_time_step    = 0.0001
			maximum_time_step    = 100.0
			initial_time_step    = 1.0
			ignore_wave_celerity = off
			morph_cycle          = off
		}
		OUTPUT {
			console_time_step = 1000
			restart_time_step = 1E32
			SPECIAL_OUTPUT {
				format           = sms
				type             = node_centered
				values           = (depth wse velocity abs_velocity z_element tau specific_discharge )
				output_time_step = 500
				threshold_wse    = -1000000
			}
		}
	}
	PHYSICAL_PROPERTIES {
		gravity   = 9.81
		viscosity = 1e-06
		rho_fluid = 1000
	}
	PARALLEL {
		number_threads = 10
	}
}

Offline

#2 2020-05-20 08:30:04

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

Re: Error using INNER_BOUNDARY with hqrelation

Hi

The case that you should go for is case 1) where the first value in the boundary serie is smaller than the first x-value (646.271 m).

The error "Division by zero in slope calculation in boundary serie!" only occurs if two x-values in the boundary serie (in your case the elevation a.s.l) are the same.

I hope this helps!

Best regards
Matthias

Offline

#3 2020-05-22 07:46:50

chri_and
User
Registered: 2017-07-27
Posts: 34

Re: Error using INNER_BOUNDARY with hqrelation

Hi Matthias

Thanks for your replay. I could solve the error "Division by zero in slope calculation in boundary serie!". In fact I had duplicates in the x-value. I went for case 1) where the first value in the boundary serie is smaller than the first x-value but then I get the following error: 

ERROR -> Error at the definition of the boundary serie.
   The value is smaller than the smallest value of Boundary condition.

The table looks like this
645.71    5
646.36    10
646.66    20
646.89    30
.....

When the first value ist equal or larger than 646.271 I get the error that I mentioned in the first Post

How can I solve this new error?

Regards

Offline

#4 2020-05-25 09:44:58

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

Re: Error using INNER_BOUNDARY with hqrelation

Hi

I would try setting the first row in your table to something definitely below any value occuring at the boundary. For example:

600.0      0
645.71    5
646.36    10
646.66    20
646.89    30

Best regards
Matthias

Offline

Board footer

Powered by FluxBB