Groundwater Modelling Advice: Difference between revisions

Content deleted Content added
Line 15:
<span style="color:black"> depths = np.arange(</span><span style="color:#3776ab">'''0.0'''</span><span style="color:black">, depth_max, depth_step)</span>
<span style="color:black"> vec_func = np.vectorize(</span><span style="color:#3776ab">'''lambda'''</span><span style="color:black">, e: orifice_coefficient * math.sqrt(</span><span style="color:#3776ab">'''2'''</span><span style="color:black"> * gravity * e))</span>
<span style="color:black"> discharges = vec_func(depths)</span><br>
<span style="color:black"> values = np.column_stack((depths, discharges))</span><br>
<span style="color:black"> np.savetxt(output_filename, values, delimiter=</span><span style="color:green">","</span><span style="color:black">, fmt=</span><span style="color:green">"%.7g"</span><span style="color:black">, header=</span></span><span style="color:green">'Depth, Discharge'</span><span style="color:black">, comments=</span><span style="color:green"><nowiki>''</nowiki></span><span style="color:black">)</span><br><br>
<span style="color:#3776ab">'''if'''</span><span style="color:black"> __name__ == </span><span style="color:green">"__main__"</span><span style="color:black">:</span>
<span style="color:black"> use_us_units = </span><span style="color:#3776ab">False</span>
<span style="color:black"> orifice_coefficent_value = </span><span style="color:#3776ab">0.002</span>
<span style="color:black"> depth_max_value = </span><span style="color:#3776ab">2.0</span>
<span style="color:black"> depth_step_value = </span><span style="color:#3776ab">0.02</span><br>
<span style="color:black"> out_filename = </span><span style="color:green">"orifice_depth_vs_discharge.csv"</span><br>
<span style="color:black"> generate_orifice_depth_vs_discharge(use_us_units, orifice_coefficent_value, depth_max_value, depth_step_value, out_filename)</span>
 
=== Excel ===