We will now add the values for the boundary conditions by importing the corresponding data from a csv file with the function ImportBoundaryConditions . The information regarding the lateral sources can be similarly imported using the function ImportLateralData . In both cases, for the sake of simplicity, we have assumed that they have constant (not time dependent) values.
We continue by setting the roughness of the main roughness section. The following code, using the SetDefaultRoughness function, sets the main roughness section to the type Strickler ks with a default value of 30.
Next, we create a new roughness section called FloodPlain and make cross-sections prof_SW2815-SW2870_Bo and prof_D20060515-DP-295 use it. To declare roughness sections on cross-sections, you need to specify the start and end distancealong the cross-section for which that specific value will be used. Because we want these cross-sections to use our new FloodPlain section along their entire profile, we need to calculate the minimum and maximum horizontal relative coordinates values of the cross-section profile using the GetMinYMaxYofCrossSectionProfile function. The function GetItemByName will provide us the objects corresponding to the desired cross sections.
At this point, all we need to do is to set the initial conditions for the model. Let's assume a uniform water depth value of 3 m in the entire model domain.