Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Overland model coupling #124

Merged
merged 47 commits into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
66db3f4
add surfaceArea to node parameters
lrntct Dec 6, 2017
26cb1d7
add setter and getter for node surfaceArea
lrntct Dec 6, 2017
6e90eaa
set fullVolume at the same time than surfaceArea
lrntct Dec 8, 2017
4d79615
set fullVolume as a result of node_getVolume(). Change the calculatio…
lrntct Dec 8, 2017
a6bb5b4
add node lid opening object. Add it as a property of Node
lrntct Dec 8, 2017
58f32e8
add coupling type parameter to TNode. add corresponding enum
lrntct Dec 8, 2017
9d53c91
rename lid opening to cover opening to prevent confusion with Low Imp…
lrntct Dec 8, 2017
fa9282f
add functions for 2D models coupling
lrntct Dec 9, 2017
41f9339
update AUTHORS
lrntct Dec 10, 2017
4bf50d8
add copyright notice
lrntct Dec 10, 2017
34a4a93
rename surfaceHead for consistency
lrntct Dec 10, 2017
2cec36f
add oldInflow and newInflow values to opening object. Adjust function…
lrntct Dec 10, 2017
6bc4e85
add stability helpers
lrntct Dec 10, 2017
f42ff91
set an overlandFlow parameter of the node; change functions according…
lrntct Dec 10, 2017
9abb1f8
refactor node_isCoupled()
lrntct Dec 10, 2017
8ced726
add overlandInflow to other inflows during routing
lrntct Dec 10, 2017
f7c7f4f
create a struct for overland data. Advance on node_executeCoupling()
lrntct Dec 10, 2017
8070524
create global OverlandData array; update related func accordingly. Cr…
lrntct Dec 10, 2017
3ccc6fe
call coupling_execute() from flowrout_execute()
lrntct Dec 10, 2017
888d766
move coupling functions in their own file
lrntct Dec 10, 2017
6093acc
rename coupling functions
lrntct Dec 10, 2017
499db85
add init of overland data
lrntct Dec 10, 2017
f794555
add func to set an opening
lrntct Dec 10, 2017
5005bd2
add a func to delete a single opening
lrntct Dec 11, 2017
517263a
return file header to previous state
lrntct Dec 11, 2017
dea174f
fix return type of coupling_setOpening()
lrntct Dec 11, 2017
a18a25e
add the possibility to retrieve overlandinflow. add function to set a…
lrntct Dec 11, 2017
d7086f5
add API func to set overlan params and retrieve coupling flow
lrntct Dec 11, 2017
f99de88
add API function to get overland model parameters
lrntct Dec 11, 2017
4bd169a
fix wrong array in setter and getter of verland params
lrntct Dec 11, 2017
d2c4cdf
refactor getOverlandParam
lrntct Dec 11, 2017
a30f6ec
integrate overland values inside of Node struct. Remove OverlandData …
lrntct Dec 11, 2017
63dd961
add getter for overland area and depth
lrntct Dec 11, 2017
18fe4a5
export coupling API functions. Add API function to get noide coupling…
lrntct Dec 11, 2017
d815056
refactor API call for setOpening
lrntct Dec 11, 2017
3cb37c4
init overland area and depth
lrntct Dec 11, 2017
5a3f0b3
add API function to get an opening parameter
lrntct Dec 11, 2017
6bb747b
refactor getNodeOpeningParam
lrntct Dec 11, 2017
88af31b
add API functions for openings
lrntct Dec 11, 2017
e8c2193
add missing breaks in findCouplingInflow
lrntct Dec 11, 2017
37e96ff
add a method for counting node openings
lrntct Dec 11, 2017
199850c
add func to get the list of indices of the openings of a node
lrntct Dec 12, 2017
e09a327
add API function to delete an opening. Not working yet
lrntct Dec 12, 2017
ddfa411
merge last changes from develop
lrntct Feb 22, 2018
64bc148
add doxygen documentation to coupling API functions
lrntct Feb 22, 2018
164ced1
add funcs to open and close an opening
lrntct Feb 23, 2018
2456cd9
Merge branch 'feature-2dflood' into surfaceCoupling
bemcdonnell Jul 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Adam Erispaha <aerispaha@gmail.com>
Sam Hatchett <samhatchett@gmail.com>
Gonzalo Peña-Castellanos <goanpeca@gmail.com>
Katherine Ratliff <ratliff.katherine@epa.gov>
Lew Rossman <LRossman@cinci.rr.com>
Laurent Courty <lrntct@gmail.com>
Abhiram Mullapudi <abhiramm@umich.edu>


EmNet LLC <EmNet.net>


Authors with Contributions in the Public Domain:
Michael Tryby <tryby.michael@epa.gov>
Michael Tryby <tryby.michael@epa.gov>
112 changes: 111 additions & 1 deletion include/toolkitAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ typedef enum {
SM_SURCHDEPTH = 2, /**< Surcharge Depth */
SM_PONDAREA = 3, /**< Ponding Area */
SM_INITDEPTH = 4, /**< Initial Depth */
SM_SURFAREA = 5, /**< Node Area */
SM_COUPAREA = 6, /**< Overland Area */
SM_OVERLANDDEPTH= 7, /**< Overland Depth */
} SM_NodeProperty;

/// Link property codes
Expand Down Expand Up @@ -145,7 +148,8 @@ typedef enum {
SM_NODEFLOOD = 4, /**< Flooding Rate */
SM_NODEDEPTH = 5, /**< Node Depth */
SM_NODEHEAD = 6, /**< Node Head */
SM_LATINFLOW = 7 /**< Lateral Inflow Rate */
SM_LATINFLOW = 7, /**< Lateral Inflow Rate */
SM_COUPINFLOW = 8 /**< Coupling Inflow Rate */
} SM_NodeResult;

/// Link result property codes
Expand Down Expand Up @@ -647,6 +651,111 @@ int DLLEXPORT swmm_setNodeInflow(int index, double flowrate);
*/
int DLLEXPORT swmm_setOutfallStage(int index, double stage);

//-------------------------------
// Coupling API
//-------------------------------

/**
@brief Set an opening for specified node.
@param nodeID The index of a node
@param idx The index of an opening
@param oType The opening's type
@param A The opening's area
@param l The opening's length
@param Co The opening's orifice coefficient
@param Cfw The opening's free weir coefficient
@param Csw The opening's submerged weir coefficient
@return Error code
*/
int DLLEXPORT swmm_setNodeOpening(int nodeID, int idx, int oType, double A,
double l, double Co, double Cfw, double Csw);

/**
@brief Open an opening that was previously closed.
@param nodeID The index of a node
@param idx The index of an opening
@return Error code
*/
int DLLEXPORT swmm_openOpening(int nodeID, int idx);

/**
@brief Close an opening.
@param nodeID The index of a node
@param idx The index of an opening
@return Error code
*/
int DLLEXPORT swmm_closeOpening(int nodeID, int idx);

/**
@brief Remove an opening from a node.
@param nodeID The index of a node
@param idx The index of an opening
@return Error code
*/
int DLLEXPORT swmm_deleteNodeOpening(int nodeID, int idx);

/**
@brief Get a node opening's parameter.
@param nodeID The index of a node
@param idx The index of an opening
@param Param The opening's parameter to be retrieved (from enum @ref OpeningParams)
@param[out] value The value of the opening's property
@return Error code
*/
int DLLEXPORT swmm_getNodeOpeningParam(int nodeID, int idx, int Param, double *value);

/**
@brief Get a node opening's inflow rate.
@param nodeID The index of a node
@param idx The index of an opening
@param[out] inflow The inflow rate
@return Error code
*/
int DLLEXPORT swmm_getNodeOpeningFlow(int nodeID, int idx, double *inflow);

/**
@brief Get a node opening's type.
@param nodeID The index of a node
@param idx The index of an opening
@param[out] type The opening type
@return Error code
*/
int DLLEXPORT swmm_getNodeOpeningType(int nodeID, int idx, int *type);

/**
@brief Get a node opening's coupling type.
@param nodeID The index of a node
@param idx The index of an opening
@param[out] coupling The opening coupling type (from enum @ref OverlandCouplingType)
@return Error code
*/
int DLLEXPORT swmm_getOpeningCouplingType(int nodeID, int idx, int *coupling);

/**
@brief Get the number of openings in a node.
@param nodeID The index of a node
@param[out] num The number of openings in the given node.
@return Error code
*/
int DLLEXPORT swmm_getOpeningsNum(int nodeID, int *num);

/**
@brief Get the indices of all the openings in a node.
@param nodeID The index of a node
@param arr_size The size of the results array (from @ref swmm_getOpeningsNum)
@param[out] arr An array of the openings indices
@return Error code
*/
int DLLEXPORT swmm_getOpeningsIndices(int nodeID, int arr_size, int *arr);

/**
@brief Get the coupling status of a node.
@param nodeID The index of a node
@param[out] iscoupled The coupling status of the node.
@return Error code
*/
int DLLEXPORT swmm_getNodeIsCoupled(int nodeID, int *iscoupled);

/**
@brief Set an rainfall intensity to the gage.
@param index The gage index.
Expand All @@ -655,6 +764,7 @@ int DLLEXPORT swmm_setOutfallStage(int index, double stage);
*/
int DLLEXPORT swmm_setGagePrecip(int index, double value);


#ifdef __cplusplus
} // matches the linkage specification from above */
#endif
Expand Down
Loading