flopy.mf6.coordinates.modelgrid module
- class ModelCell(cellid)[source]
Bases:
object
Represents a model cell
- Parameters:
cellid (str) – id of model cell
Notes
Examples
- class ModelGrid(model_name, simulation_data, grid_type)[source]
Bases:
object
Base class for a structured or unstructured model grid
- Parameters:
- grid_type : ()
returns the grid type
- grid_type_consistent : ()
returns True if the grid type is consistent with the current simulation data
- grid_connections_array : ()
for DiscretizationType.DISU grids, returns an array containing the number of connections of it cell
- get_horizontal_cross_section_dim_arrays : ()
returns a list of numpy ndarrays sized to the horizontal cross section of the model grid
- get_model_dim : ()
returns the dimensions of the model
- get_model_dim_arrays : ()
returns a list of numpy ndarrays sized to the model grid
- get_row_array : ()
returns a numpy ndarray sized to a model row
- get_column_array : ()
returns a numpy ndarray sized to a model column
- get_layer_array : ()
returns a numpy ndarray sized to a model layer
- get_horizontal_cross_section_dim_names : ()
returns the appropriate dimension axis for a horizontal cross section based on the model discretization type
- get_model_dim_names : ()
returns the names of the model dimensions based on the model discretization type
- get_num_spatial_coordinates : ()
returns the number of spatial coordinates based on the model discretization type
- num_connections()[source]
returns the number of model connections. model discretization type must be DIS
- num_cells_per_layer()[source]
returns the number of cells per model layer. model discretization type must be DIS or DISV
- get_all_model_cells()[source]
returns a list of all model cells, represented as a layer/row/column tuple, a layer/cellid tuple, or a cellid for the DIS, DISV, and DISU discretizations, respectively
Notes
Examples
- static get_grid_type(simulation_data, model_name)[source]
Return the type of grid used by model ‘model_name’ in simulation containing simulation data ‘simulation_data’.
- Parameters:
simulation_data (MFSimulationData) – object containing simulation data for a simulation
model_name (str) – name of a model in the simulation
- Returns:
grid type
- Return type:
- class UnstructuredModelCell(cellid, simulation_data, model_name)[source]
Bases:
ModelCell
Represents an unstructured model cell
- Parameters:
- get_cellid : ()
returns the cellid
- get_top : ()
returns the top elevation of the model cell
- get_bot : ()
returns the bottom elevation of the model cell
- get_area: ()
returns the area of the model cell
- get_num_connections_iac : ()
returns the number of connections to/from the model cell
- get_connecting_cells_ja : ()
returns the cellids of cells connected to this cell
- get_connection_direction_ihc : ()
returns the connection directions for all connections to this cell
- get_connection_length_cl12 : ()
returns the connection lengths for all connections to this cell
- get_connection_area_fahl : ()
returns the connection areas for all connections to this cell
- get_connection_anglex : ()
returns the connection angles for all connections to this cell
- set_top : (top_elv : float, update_connections : bool)
sets the top elevation of the model cell and updates the connection properties if update_connections is true
- set_bot : (bot_elv : float, update_connections : bool)
sets the bottom elevation of the model cell and updates the connection properties if update_connections is true
- set_area : (area : float)
sets the area of the model cell
- add_connection : (to_cellid, ihc_direction, connection_length,
- connection_area, connection_angle=0)
adds a connection from this cell to the cell with ID to_cellid connection properties ihc_direction, connection_length,
connection_area, and connection_angle
are set for the new connection
- remove_connection : (to_cellid)
removes an existing connection between this cell and the cell with ID to_cellid
Notes
Examples