-
Notifications
You must be signed in to change notification settings - Fork 19
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
More crossection types can be implemented on demand #31
Comments
While the reach geometry has of course some influence on the transport equation, I would deem the parameter uncertainty of the Manning n as the greater problem. From that perspective I would use for the picture on top However, I have thought a long time ago about a generic reach type using a vector of coordinates for the functions P(d) and A(d). The ideas are conserved in the end of ReachType.h:488-503. But I stopped there, because this was not important for me. I do not think that we gain anything by yet another special reach type - lets rather go for a generalized formulation. I do not have the time to do the math, but I can translate a Python prototype into cmf's C++ code. |
If someone provides the Python prototype, please use the following (Python 3.5+) template: class CrossSectionReach:
def __init__(self, n_manning: float, x: Sequence[float], depth: Sequence[float]):
self.x = x
self.depth = depth
self.n_manning = n_manning
def set_nManning(self, val: float) -> None:
self.nManning = val
def get_nManning(self) -> float:
return self.nManning
def typecode(self) -> str:
return 'C'
def get_channel_width(self, depth: float) -> float:
"""
Calculates the flow width from a given actual depth [m] using the actual geometry
:param depth: Actual depth in m
:return: Actual channel width in m
"""
...
def get_wetted_perimeter(self, depth: float) -> float:
"""
Calculates the wetted perimeter from a given actual depth [m] using the actual geometry
:return:
"""
...
def get_depth(self, area: float) -> float:
"""
Calculates the actual depth of the reach from the wetted area using the geometry
:param area: The actual wetted area in m², can be obtained by V/l,
where V is the stored volume and l is the reach length
:return: the actual depth in m
"""
...
def get_flux_cross_section(self, depth: float) -> float:
"""
Calculates the wetted area from a given depth using the IChannel geometry.
:param depth: depth of the reach m
:return: Wetted area of a river cross section in m²
"""
... |
Ok, thanks. A generic reach type would be very interesting, but is not necessary for my current work. So, in order to have trapezoid cross-section I can just use the SWATReachType and disable the flood plain (e.g. by setting FloodPlainSlope=90%)? |
Just make a huuuuge channel depth, eg. 20m |
Thanks, this solution seems to be working. But it is a little bit tricky to figure out what parameters of the SWATReachType must be set by the user and which one are calculated by CMF. For example, in case of a trapezial shape the user must initialize the reach with "FlowWidht,BankWidth,ChannelDepth" and additionally set the BottomWidth by accessing the related property. Maybe this could be clarified in future.
|
Hello,
would be great to have a "TrapezialReachType" for simulating stream flow in addition to existing types as listed in the tutorial:
"If you create a reach for the project, you must give the crossectional geometry of the river. The different basic geometries are:
TriangularReach - T, a river with a triangular crosssection
SWATReachType - S, a river with a trapezoidal crossection, with a flat flood plain, as in the model SWAT
RectangularReach - R, a rectangular crosssection
PipeReach - P, a circular pipe
More crossection types can be implemented on demand."
Please find attached some examples of stream types which I am trying to simulate. The wet surface of the stream is a sensitive parameter I am interested in. The existing channel geometries are not sufficient to represent all of them and result in unrealistic estimates of the wet surface.
Cheers,
Sebastian
The text was updated successfully, but these errors were encountered: