@@ -77,7 +77,7 @@ proc ::ShallowWater::examples::HydraulicJump::TreeAssignation {args} {
7777 set topography_cond " $topography_conditions /condition\[ @n='Topography'\] "
7878 set topography_node [customlib::AddConditionGroupOnXPath $topography_cond Channel]
7979 $topography_node setAttribute ov surface
80- set props [list ByFunction 1 function_value " 3*x " ]
80+ set props [list ByFunction 1 function_value " 2.45135310e-07*x**4 -4.82230477e-05*x**3 +2.54997185e-03*x**2 -4.57311854e-02*x +2.73225488e+00 " ]
8181 spdAux::SetValuesOnBaseNode $topography_node $props
8282
8383 # Initial conditions
@@ -86,7 +86,7 @@ proc ::ShallowWater::examples::HydraulicJump::TreeAssignation {args} {
8686 spdAux::AddIntervalGroup Channel " Channel//Initial"
8787 set initial_node [customlib::AddConditionGroupOnXPath $initial_cond " Channel//Initial" ]
8888 $initial_node setAttribute ov surface
89- set props [list variable_name FREE_SURFACE_ELEVATION value 2.0 Interval Initial set_minimum_height 1 minimum_height_value 1]
89+ set props [list variable_name FREE_SURFACE_ELEVATION value 2.8 Interval Initial set_minimum_height 1 minimum_height_value 1]
9090 spdAux::SetValuesOnBaseNode $initial_node $props
9191
9292 # Conditions
@@ -97,21 +97,31 @@ proc ::ShallowWater::examples::HydraulicJump::TreeAssignation {args} {
9797 spdAux::AddIntervalGroup Walls " Walls//Total"
9898 set flow_rate_node [customlib::AddConditionGroupOnXPath $flow_rate_cond " Walls//Total" ]
9999 $flow_rate_node setAttribute ov line
100- set props [list selector_component_X Not value_component_Y 0.0 Interval Total]
100+ set props [list selector_component_X Not value_component_Y 0.0 selector_component_Z Not Interval Total]
101101 spdAux::SetValuesOnBaseNode $flow_rate_node $props
102102
103103 spdAux::AddIntervalGroup Upstream " Upstream//Total"
104104 set flow_rate_node [customlib::AddConditionGroupOnXPath $flow_rate_cond " Upstream//Total" ]
105105 $flow_rate_node setAttribute ov line
106- set props [list value_component_X 2.0 selector_component_Y 0.0 Interval Total]
106+ set props [list value_component_X 2.0 selector_component_Y 0.0 selector_component_Z Not Interval Total]
107107 spdAux::SetValuesOnBaseNode $flow_rate_node $props
108108
109109 spdAux::AddIntervalGroup Downstream " Downstream//Total"
110110 set free_surface_node [customlib::AddConditionGroupOnXPath $water_height_cond " Downstream//Total" ]
111111 $free_surface_node setAttribute ov line
112- set props [list value 2.0 Interval Total]
112+ set props [list value 2.8 Interval Total]
113113 spdAux::SetValuesOnBaseNode $free_surface_node $props
114114
115+ # Time parameters
116+ set parameters [list EndTime 50.0]
117+ set xpath [spdAux::getRoute " SWTimeParameters" ]
118+ spdAux::SetValuesOnBasePath $xpath $parameters
119+
120+ # Output
121+ set parameters [list OutputControlType time OutputDeltaTime 1.0]
122+ set xpath " [ spdAux::getRoute Results] /container\[ @n='GiDOutput'\] /container\[ @n='GiDOptions'\] "
123+ spdAux::SetValuesOnBasePath $xpath $parameters
124+
115125 # Refresh
116126 spdAux::RequestRefresh
117127}
0 commit comments