Problem using CrossSectionExtensions mehtods from MIKE 1D API #21
-
Hello, I have been using the Mike1D API trough pythonnet, to create my code in python for my PhD project. Recently a method that I was using is obsolete (GetNaturalDepthOld). I am trying to use the new equivalent version in the CrossSectionExtensions, CalculateNaturalDepth, but I am having some problems. I am defining a cross section interface IcsData=ICrossSection(crossSection), for which I want to calculate the natural depth and calling the method as follows for a given Q and slope value: natural_depth=CrossSectionExtensions.CalculateNaturalDepth(IcsData,float(Q),float(slope)) I am getting and error on de argument definition_ Do you have any hint why this is happening or have some examples on using CrossSectionExtensions methods? :) Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The obsolete method is still working, though it does not take sediments into account, if present. The most convenient method is available on the
Details of GetNaturalDepth MIKE 1D Class Library: CrossSectionSlotDecorator.GetNaturalDepth Method. The It is also possible to use the extension method. Details of the CalculateNaturalDepth can be found here: MIKE 1D Class Library: CrossSectionExtensions.CalculateNaturalDepth Method. Then it is required to set the |
Beta Was this translation helpful? Give feedback.
The obsolete method is still working, though it does not take sediments into account, if present.
The most convenient method is available on the
CrossSectionSlotDecorator
, something like (C# code syntax here):Details of GetNaturalDepth MIKE 1D Class Library: CrossSectionSlotDecorator.GetNaturalDepth Method. The
hdParams
are required for some Colebrook-White parameters, in case the cross section resistance is based on that.It is also possible to use the extension method. Details of the CalculateNaturalDepth can be found here: MIKE 1D Class Library: CrossSectionExtens…