Comments (5)
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 SWATReachType
(which is a trapezoid crosssection + bank overflow mechanism), the 2nd a TriangularReach
, assuming bank overflow never happens (else use SWATReachType
again) and the 3rd a RectangularReach
.
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.
from cmf.
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²
"""
...
from cmf.
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%)?
from cmf.
Just make a huuuuge channel depth, eg. 20m
from cmf.
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.
reachshape = cmf.SWATReachType(FlowWidht,BankWidth,ChannelDepth)
reachshape.BottomWidth = 0.3
from cmf.
Related Issues (20)
- Remove inline
- Remove cmfmemory.h
- Describe how to build a custom cmf
- Update Docs with new Solver names HOT 1
- Run CVodeKLU with CUDA
- Setup.py build libraries on clean command
- Freundlich Adsorption not working
- Can't create a SoluteWaterIntegrator HOT 1
- new flux: Schmitt-trigger HOT 4
- make potential of Dirichlet BC a time series HOT 1
- Undefined behaviour when c'tor of flux_connection throws HOT 2
- Remove integratables HOT 1
- CVodeKLU is not suitable in a SoluteWaterIntegrator HOT 1
- Add additional ET method with parameterized aerodynamic resistance HOT 5
- Diffusive singularity protection is inconsistent HOT 1
- cmf.timeseries should get a from_pandas factory function HOT 2
- Modernize the doxygen documentation HOT 1
- Allow for Python flux connections, even if they are slow HOT 1
- Simple infiltration ignores waterbalance connections regardless of their direction
- Try out scikit-build with ninja for CMF 2.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmf.