TheBoussinesqModel  3.2.1
 All Data Structures Files Functions Variables Typedefs Macros Pages
b_volumes.h File Reference

Go to the source code of this file.

Functions

double volume (double eta, long i)
 
double volume_subs (double eta, long i)
 
double volume_surf (double eta, long i)
 
double vertical_area (double eta, long j)
 
double vertical_area_subs (double eta, long j)
 
double vertical_area_surf (double eta, long j)
 
double wet_area (double eta, long i, double deta)
 
double min_elevation (long i)
 
double q_discharge_from_outlet_subs_line (double eta, long j)
 
double q_discharge_from_outlet_cell (double eta, long i)
 

Detailed Description

Author
Emanuele Cordano
Attention

This file is part of Boussinesq.

Boussinesq is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Boussinesq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Boussinesq. If not, see http://www.gnu.org/licenses/.

Definition in file b_volumes.h.

Function Documentation

double min_elevation ( long  i)
Author
Emanuele Cordano
Date
13 May 2009
Parameters
i(long) - index of the coarse cell
Returns
the elevation of the lowest point of the cell

initialization of elevation with a very high double float number

Definition at line 357 of file b_volumes.c.

References LONGBIN::index, min_elevation(), LONGVECTOR::nh, DOUBLEVECTOR::nh, NL, LONGVECTOR::nl, DOUBLE_GRID::novalue, DOUBLE_GRID::small_polygon_content, and stop_execution().

Referenced by main(), and min_elevation().

double q_discharge_from_outlet_cell ( double  eta,
long  i 
)
Date
14 October 2009
Author
Emanuele Cordano
Parameters
eta- (double)
i- (index of the cell)

It calculates the discharge through all boundary edges of the i-th cell in function of a value of a free surface elevation and fine-grid topography, according to what is specified in the documentation with detailed algebraic passages. It calls q_discharge_from_outlet for each boundary edge!

Returns
outflow discarge area from the i-th cell

Definition at line 441 of file b_volumes.c.

References GRID::boundary_indicator, DOUBLE_GRID::coarse, polygon_connection_attributes::connections, POLYGON::edge_indices, POLYGONVECTOR::element, polygon_connection_attribute_array::element, GRID::links, LONGVECTOR::nh, LONGVECTOR::nl, GRID::polygons, and q_discharge_from_outlet_subs_line().

Referenced by time_loop().

double q_discharge_from_outlet_subs_line ( double  eta,
long  j 
)
Parameters
EmanueleCordano
Date
14 October 2009
Parameters
eta- (double) water surface elevation;
j- (long) line indicator;

It calculates the discharge of the j-th line in function of a value of a free surface elevation and fine-grid topography, according to what is specified in the documentation with detailed algebraic passages.

Returns
outflow discarge through a boundary line

Definition at line 400 of file b_volumes.c.

References LINEVECTOR::element, DOUBLE_GRID::fine, LONGBIN::index, LINE::length2d, GRID::lines, LINEVECTOR::nh, LONGVECTOR::nh, NL, LINEVECTOR::nl, LONGVECTOR::nl, DOUBLE_GRID::novalue, PARAM::p_outlet, PARAM::p_outlet_surf, DOUBLE_GRID::small_line_content, and stop_execution().

Referenced by q_discharge_from_outlet_cell().

double vertical_area ( double  eta,
long  j 
)
Author
Emanuele Cordano
October 2009
Returns
total vertical area over the j-th line in function of water table eta.

Definition at line 193 of file b_volumes.c.

References vertical_area_subs().

double vertical_area_subs ( double  eta,
long  j 
)
Parameters
EmanueleCordano
Date
19 April 2009 (modified October 2009)
Parameters
eta- (double) water surface elevation;
j- (long) line indicator;

It calculates the (subsurface wet) vertical area of the j-th line in function of a value of a free surface elevation and fine-grid topography, according to what is specified in the documentation with detailed algebraic passages.

Returns
vertical wet area over a line between two polygons

Definition at line 211 of file b_volumes.c.

References LINEVECTOR::element, DOUBLE_GRID::fine, LONGBIN::index, LINE::length2d, GRID::lines, LINEVECTOR::nh, LONGVECTOR::nh, NL, LINEVECTOR::nl, LONGVECTOR::nl, DOUBLE_GRID::novalue, DOUBLE_GRID::small_line_content, and stop_execution().

Referenced by t_st_operator_element_subs(), and vertical_area().

double vertical_area_surf ( double  eta,
long  j 
)
Parameters
EmanueleCordano
Date
22 October 2009
Parameters
eta- (double) water surface elevation;
j- (long) line indicator;

It calculates the (surface wet) vertical area of the j-th line in function of a value of a free surface elevation and fine-grid topography, according to what is specified in the documentation with detailed algebraic passages.

Returns
(surface) vertical wet area over a line between two polygons

Definition at line 251 of file b_volumes.c.

References LINEVECTOR::element, DOUBLE_GRID::fine, LONGBIN::index, LINE::length2d, GRID::lines, LINEVECTOR::nh, LONGVECTOR::nh, NL, LINEVECTOR::nl, DOUBLE_GRID::novalue, DOUBLE_GRID::small_line_content, and stop_execution().

Referenced by b_advection(), t_st_advection_operator_element(), and update_F1_wet_vert_area().

double volume ( double  eta,
long  i 
)

map of instantaneous water mass error

Author
Emanuele Cordano
Date
October 2009
Returns
the volume of the i-th cell of the i-th cells

Definition at line 63 of file b_volumes.c.

References volume_subs(), and volume_surf().

Referenced by Newton_convergence(), and time_loop().

double volume_subs ( double  eta,
long  i 
)
Author
Emanuele Cordano (modified October 2009)
Date
17 April 2009
Parameters
eta- (double) value of water-table level
i- (long) index of the (coarse) cell

It calculates the (subsurface water) volume of the i-th cell in function of a value of a free surface elevation and fine-grid topography, according to what is specified in the documentation with detailed algebraic passages.

Returns
water volume contained in a cell

Definition at line 136 of file b_volumes.c.

References POLYGON::area2D, POLYGONVECTOR::element, DOUBLE_GRID::fine, LONGBIN::index, LONGVECTOR::nh, DOUBLEVECTOR::nh, NL, LONGVECTOR::nl, GRID::polygons, DOUBLE_GRID::small_polygon_content, and stop_execution().

Referenced by volume().

double volume_surf ( double  eta,
long  i 
)
Author
Emanuele Cordano (modified October 2009)
Date
22 October 2009
Parameters
eta- (double) value of water-table level
i- (long) index of the (coarse) cell

It calculates the (surface water) volume of the i-th cell in function of a value of a free surface elevation and fine-grid topography, according to what is specified in the documentation with detailed algebraic passages.

Returns
(surface water) water volume contained in a cell

Definition at line 80 of file b_volumes.c.

References POLYGON::area2D, POLYGONVECTOR::element, DOUBLE_GRID::fine, LONGBIN::index, LONGVECTOR::nh, DOUBLEVECTOR::nh, NL, LONGVECTOR::nl, GRID::polygons, DOUBLE_GRID::small_polygon_content, and stop_execution().

Referenced by volume().

double wet_area ( double  eta,
long  i,
double  deta 
)
Author
Emanuele Cordano
Date
8 May 2009
Parameters
eta- (double) value of water-table level
i- (long) index of the (coarse) cell
deta- (double) water surface delta utilized for derivate (area_horiz)

It calculates the volume of the i-th cell in function of a value of a free surface elevation and fine-grid topography, according to what is specified in the documentation with detailed algebraic passages. The wet area is the derivative respect to the variable eta of the stored volume calculated by function volume()

Returns
wet area of the i-th cell

modified by Emanuele Cordano on 2

Definition at line 294 of file b_volumes.c.

References POLYGON::area2D, POLYGONVECTOR::element, DOUBLE_GRID::fine, LONGBIN::index, LONGVECTOR::nh, DOUBLEVECTOR::nh, NL, LONGVECTOR::nl, DOUBLE_GRID::novalue, GRID::polygons, DOUBLE_GRID::small_polygon_content, and stop_execution().

Referenced by b_smatrix_element().