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 2015-06-18 20:14:24

sajjad
User
Registered: 2014-10-01
Posts: 102

coupling_weir bc

Dear sir,

I have been trying the coupling_weir bc to couple two subdomains 'city' and 'basin'. I encounter problems in all the three cases, I tried. I am sending log  file.

1) in the BOUNDARY block in the upstream domain 'city' I define the coupling_weir  as well as the  'file=weirlevel.txt'. In the 'downstream' subdomain 'basin' in BOUNDARY block, i define the coupling_weir but does not include  'file=weirlevel.txt'. The program does not work. Log-file reproduced below

// --------------------------------------------------
// BASEMENT log file:
// Version:  2.5.1 R// bmc file: E:\LocalF\Basement\simulComplet\retentB\run.bmc
// started:  Thu Jun 18 23:34:03 2015
// --------------------------------------------------
/*
-> InputParser: reading input from bmc file
   'E:\LocalF\Basement\simulComplet\retentB\run.bmc'
*/
PROJECT {
    title  = RetentB_integration_floodModel
    author = SH
    date   = 14.6.2015
}
DOMAIN {
    multiregion = Nime
    PARALLEL {
        number_threads = 2
    }
    PHYSICAL_PROPERTIES {
        gravity   = 9.81
        viscosity = 0.000001
        rho_fluid = 1000
    }
    BASEPLANE_2D {
        region_name = city
        GEOMETRY {
            type = 2dm
            file = nim5.2dm
            STRINGDEF {
                name               = to_basin
                node_ids           = (3009 7618 7609 7616)
                upstream_direction = left
            }
            STRINGDEF {
                name               = Inflow1
                node_ids           = ( 13 19199 3536 17919 17899 17904 14 )
                upstream_direction = left
            }
            STRINGDEF {
                name               = Inflow2
                node_ids           = (2 26206 26196 26205 3)
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow1
                node_ids           = (1612 24212 92 )
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow2
                node_ids           = (86 24933 85 )
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow3
                node_ids           = (57 27970 56)
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow4
                node_ids           = (89 30017 88)
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow5
                node_ids           = (82 29985 81 )
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow6
                node_ids           = (68 28342 28340 67)
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow7
                node_ids           = (72 29910 71)
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow8
                node_ids           = (76 27947 75)
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow9
                node_ids           = (64 22583 22559 22570 2881 22556 22543 22577 63 )
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow10
                node_ids           = (61 28280 28268 28275 60 )
                upstream_direction = left
            }
            STRINGDEF {
                name               = Outflow11
                node_ids           = (3320 21852 21284 21854 3315 21868 21856 21857 53 )
                upstream_direction = left
            }
            STRINGDEF {
                name               = pitotStOutlet
                node_ids           = (1753 30243 30235 )
                upstream_direction = left
            }
        }
        HYDRAULICS {
            PARAMETER {
                simulation_scheme           = exp
                riemann_solver              = exact
                minimum_water_depth         = 0.001
                velocity_update_partial     = volume_area
                dynamic_depth_solver        = on
                riemann_tolerance           = 1.0e-6
                geo_min_area_ratio          = 0.05
                geo_max_angle_quadrilateral = 45
                geo_min_aspect_ratio        = 0.06
            }
            FRICTION {
                type                = strickler
                default_friction    = 30
                input_type          = index_table
                index               = ( 1   )
                friction            = (  30)
                wall_friction       = off
                grain_size_friction = no
            }
            BOUNDARY {
                type                 = hydrograph
                string_name          = Inflow1
                file                 = maxinflow1.txt
                slope                = 10.0
                max_interval         = 20
                number_of_iterations = 5000
                weighting_type       = conveyance
                precision            = -1.0
                wse_calc_method      = average
            }
            BOUNDARY {
                type                 = hydrograph
                string_name          = Inflow2
                file                 = inflow2.txt
                slope                = 10.0
                max_interval         = 20
                number_of_iterations = 5000
                weighting_type       = conveyance
                precision            = -1.0
                wse_calc_method      = average
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow1
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow2
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow3
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow4
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow5
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow6
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow7
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow8
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow9
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow10
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = Outflow11
            }
            BOUNDARY {
                type        = zero_gradient
                string_name = pitotStOutlet
            }
            BOUNDARY {
                type        = coupling_weir
                string_name = to_basin
                name        = interf_city
                file        = weirlevel.txt
                my          = 0.85
            }
            INITIAL {
                type = dry
            }
        }
        TIMESTEP {
            CFL                  = 0.95
            total_run_time       = 15000
            minimum_time_step    = 0.0001
            maximum_time_step    = 100.0
            initial_time_step    = 1.0
            start_time           = -1.0
            ignore_wave_celerity = off
            morph_cycle          = off
        }
        OUTPUT {
            output_time_step  = 10000
            console_time_step = 200
            restart_time_step = 2000
        }
    }
    BASEPLANE_2D {
        region_name = basin
        GEOMETRY {
            type = 2dm
            file = retentbs.2dm
            STRINGDEF {
                name               = inflow_cross_section
                node_ids           = ( 46 37 29 22 )
                upstream_direction = right
            }
        }
        HYDRAULICS {
            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
                geo_min_area_ratio          = 0.05
                geo_max_angle_quadrilateral = 45
                geo_min_aspect_ratio        = 0.06
            }
            FRICTION {
                type                = strickler
                default_friction    = 30
                wall_friction       = off
                grain_size_friction = no
            }
            BOUNDARY {
                type        = coupling_weir
                string_name = inflow_cross_section
                name        = interf_retentB
                my          = 0.85
            }
            INITIAL {
                type = dry
            }
        }
        TIMESTEP {
            CFL                  = 0.95
            total_run_time       = 15000
            minimum_time_step    = 0.0001
            initial_time_step    = 0.001
            maximum_time_step    = 100.0
            start_time           = -1.0
            ignore_wave_celerity = off
            morph_cycle          = off
        }
        OUTPUT {
            output_time_step  = 10000.0
            console_time_step = 300.0
            restart_time_step = 1E32
            SPECIAL_OUTPUT {
                type               = element_centered
                format             = ascii
                output_time_step   = 5000
                values             = ( depth )
                ids_instead_coords = no
                threshold_wse      = -1000000
            }
            SPECIAL_OUTPUT {
                type               = element_centered
                format             = ascii
                output_time_step   = 500
                values             = ( wse)
                ids_instead_coords = no
                threshold_wse      = -1000000
            }
            SPECIAL_OUTPUT {
                type                = stringdef_history
                output_time_step    = 100
                stringdefs          = ( inflow_cross_section )
                stringdef_values    = ( Q )
                flush_all_num_steps = 0
                history_one_file    = no
                threshold_wse       = -1000000
            }
            SPECIAL_OUTPUT {
                type             = balance
                balance_values   = (water_volume)
                output_time_step = 200
                threshold_wse    = -1000000
            }
        }
    }
    COUPLINGS {
        PARAMETER {
            max_time_level             = 4
            factor_time_step_reduction = 1.0
            server                     = yes
            ip_address                 = localhost
            port                       = 5000
            max_buffer                 = 2000
            packet_size                = 1000
            log_network                = off
        }
        COUPLING {
            type                 = sequential
            upstream_subdomain   = city
            downstream_subdomain = basin
            two_way_coupling     = no
            average_steps        = 1
            print_series         = no
            espilon              = 1E-6
            HYDRAULICS {
                upstream_interface   = interf_city
                downstream_interface = interf_retentB
            }
        }
    }
}

/*
-> Domain: Input file has been successfully parsed and passed preliminary
   validation
-> *** Start Simulation ***
-> OpenMP: Computation is executed in parallel using 2 threads
-> Domain Initialized
-> initialize domain done
-> do network communicator
-> chars done
-> do network communicator for done
-> network communication done
-> initialize networkcommunication done
-> BASEplane: Initialization of SubDomain 'city
-> Reserving the vectors for nodes, elements & edges
-> InputSMS: Number of Nodes = 31311
-> InputSMS: Number of Elements = 48751
-> Checking disjoint nodes ...
-> Checking the area of elements ...
-> Checking the aspect ratio of elements ...


*******************************************************************************
*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*
*******************************************************************************
-> Some elements in the mesh are too thin!
   These elements may cause instabilities in the program!
   See the file geofile_Grid.err for the element numbers.
-> Checking for concave quadrilateral elements ...
-> Checking for ambiguous quadrilateral elements ...


*******************************************************************************
*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*
*******************************************************************************
-> Some ambiguous quadrilateral elements were found !
   These elements may cause instabilities in the program!
   See the file XXX_Grid.err for the element numbers
   where XXX is the name of the grid File.
-> InputSMS: Number of Edges = 80139
-> InputSMS: Total mesh area = 171517 m2
-> BASEplane: Initialization of SubDomain 'basin
-> Reserving the vectors for nodes, elements & edges
-> InputSMS: Number of Nodes = 169
-> InputSMS: Number of Elements = 144
-> Checking disjoint nodes ...
-> Checking the area of elements ...
-> Checking the aspect ratio of elements ...
-> Checking for concave quadrilateral elements ...
-> Checking for ambiguous quadrilateral elements ...
-> InputSMS: Number of Edges = 312
-> InputSMS: Total mesh area = 57600 m2


*******************************************************************************
*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Error !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*
*******************************************************************************
-> Error at the definition of the boundary serie.
   A boundary serie must have at least two pairs of values!
   Please correct and complete the used boundary serie.
-> Domain: Simulation stopped due to errors

*/
2) In the 2nd case,  in the BOUNDARY block in the upstream domain 'city' I define the coupling_weir  as well as the  'file=weirlevel.txt'. In the 'downstream' subdomain 'basin' in BOUNDARY block, i  include  'file=weirlevel.txt'.  (both the files are same ). RESULT: the console output shows outflow 'to_basin' but no water enters into 'basin' subdomain.

3) In the 3rd case,  in the BOUNDARY block in the upstream domain 'city' I define the coupling_weir  as well as the  'file=weirlevel.txt'. In the 'downstream' subdomain 'basin' in BOUNDARY block, i  include  'file=weirlevel_2.txt'.  (both the files are different ).RESULT: the console output shows outflow 'to_basin' but no water enters into 'basin' subdomain.


Thanking you for your kind help.

Offline

#2 2015-06-19 09:59:31

Stephan Kammerer
Developer
Registered: 2015-03-31
Posts: 67

Re: coupling_weir bc

Hi Sajjad,

a weir boundary condition can only be used at an outflow boundary, in your case the domain 'city'. This is described in the documentation of the tag 'type' in the 'BOUNDARY' block.
Since the inflow into your downstream subdomain 'basin' comes from the coupled upstream subdomain 'city', you have to use a boundary condition of type 'coupling_hydrograph' for the inflow into the domain 'basin'.
...
BASEPLANE_2D {
     region_name = basin
(...)
BOUNDARY {
                type        = coupling_hydrograph
                string_name = inflow_cross_section
                name        = interf_retentB
                my          = 0.85
...

Hope this helps!
Stephan

Offline

#3 2015-06-19 10:44:40

sajjad
User
Registered: 2014-10-01
Posts: 102

Re: coupling_weir bc

Hello,

Thanks a lot for your kind help. In the doc, it is also written that 'to couple subdomains via weir, please use the coupling_weir boundary'. So it's kind of confusing that if weir and zhydrograph bc's cannot be used for coupling than what purpose is served by having coupling_weir and coupling_zhydrograph b. conds. Regards

Offline

#4 2015-06-19 11:38:18

Stephan Kammerer
Developer
Registered: 2015-03-31
Posts: 67

Re: coupling_weir bc

Hi Sajjad,

please don't get me wrong. Of course you can use weir and zhydrograph for coupling, but only as outflow bc at the upstream subdomain (city)!! If you use 'coupling_weir', the outflow of the upstream domain is calculated using a weir formula (Poleni). The calculated discharge is then used as inflow hydrograph into the coupled downstream subdomain (basin). Therefore you need to define 'coupling_hydrograph' as upstream bc of your domain 'basin'.

I hope it's clear now,
Stephan

Offline

#5 2015-06-19 15:32:43

sajjad
User
Registered: 2014-10-01
Posts: 102

Re: coupling_weir bc

Hi,stephen

if I understand you correctly, then the following change is ok? Please confirm.

BASEPLANE_2D {
     region_name= city
(...)
BOUNDARY {
                type        = coupling_zhydrograph or coupling_weir
                string_name = inflow_cross_section
                name        = interf_retentB
                my          = 0.85
}
BASEPLANE_2D {
     region_name = basin
(...)
BOUNDARY {
                type        = coupling_hydrograph
                string_name = inflow_cross_section
                name        = interf_retentB
                my          = 0.85
...
Regards

Offline

#6 2015-06-19 20:26:19

sajjad
User
Registered: 2014-10-01
Posts: 102

Re: coupling_weir bc

Hi,

I have made changes to the run file as suggested by you

BASEPLANE_2D {
        region_name = city
        GEOMETRY {
            type = 2dm
            file = nim5.2dm
            STRINGDEF {
                name               = to_basin
                node_ids           = (3009 7618 7609 7616)
                upstream_direction = left
            }
    }
            BOUNDARY {
                type        = coupling_weir
                string_name = to_basin
                name        = interf_city
                file        = weirlevel.txt
                my =0.85
            }
    BASEPLANE_2D {
        region_name = basin
        GEOMETRY {
..
BOUNDARY {
                type        = coupling_hydrograph
                string_name = inflow_cross_section
                name        = interf_retentB
                my= 0.85
            }
despite that no water goes to 'basin' subdomain as verified by balance_basin file.
Any suggestions?

Regards

Offline

Board footer

Powered by FluxBB