source: trunk/anuga_core/anuga/structures/structure_operator.py @ 9620

Last change on this file since 9620 was 9620, checked in by davies, 10 years ago

Bugfix

File size: 24.0 KB
Line 
1import anuga
2import numpy as num
3import math
4import inlet_enquiry
5
6from anuga.utilities.system_tools import log_to_file
7from anuga.utilities.numerical_tools import ensure_numeric
8
9
10
11class Structure_operator(anuga.Operator):
12    """Structure Operator - transfer water from one rectangular box to another.
13    Sets up the geometry of problem
14   
15    This is the base class for structures (culverts, pipes, bridges etc). Inherit from this class (and overwrite
16    discharge_routine method for specific subclasses)
17   
18    Input: Two points, pipe_size (either diameter or width, depth),
19    mannings_rougness,
20    """ 
21
22    counter = 0
23
24    def __init__(self,
25                 domain,
26                 end_points=None,
27                 exchange_lines=None,
28                 enquiry_points=None,
29                 invert_elevations=None,
30                 width=None,
31                 height=None,
32                 diameter=None,
33                 z1=None,#added by PM 4/10/2013
34                 z2=None,#added by PM 4/10/2013
35                 apron=None,
36                 manning=None,
37                 enquiry_gap=None,
38                 use_momentum_jet=False,
39                 zero_outflow_momentum=True,
40                 use_old_momentum_method=True,
41                 description=None,
42                 label=None,
43                 structure_type=None,
44                 logging=None,
45                 verbose=None):
46                     
47        """
48        exchange_lines define the input lines for each inlet.
49
50        If end_points = None, then the culvert_vector is calculated in the
51        directions from the centre of echange_line[0] to centre of exchange_line[1}
52
53        If end_points != None, then culvert_vector is unit vector in direction
54        end_point[1] - end_point[0]
55        """
56
57        anuga.Operator.__init__(self,domain)
58
59        self.master_proc = 0
60        self.end_points = ensure_numeric(end_points)
61        self.exchange_lines = ensure_numeric(exchange_lines)
62        self.enquiry_points = ensure_numeric(enquiry_points)
63        self.invert_elevations = ensure_numeric(invert_elevations)
64
65        assert self.end_points == None or self.exchange_lines == None
66
67       
68        if height is None:
69            height = width
70
71        if width is None:
72            width = diameter
73
74        if apron is None:
75            apron = width
76
77
78        assert width is not None
79
80
81        self.width  = width
82        self.height = height
83        self.diameter = diameter
84        self.z1 = z1 #added by PM 4/10/2013
85        self.z2 = z2 #added by PM 4/10/2013
86        self.apron  = apron
87        self.manning = manning
88        self.enquiry_gap = enquiry_gap
89        self.use_momentum_jet = use_momentum_jet
90        self.zero_outflow_momentum = zero_outflow_momentum
91        if use_momentum_jet and zero_outflow_momentum:
92            msg = "Can't have use_momentum_jet and zero_outflow_momentum both True"
93            raise Exception(msg)
94        self.use_old_momentum_method = use_old_momentum_method
95
96
97        if description == None:
98            self.description = ' '
99        else:
100            self.description = description
101       
102        if label == None:
103            self.label = "structure_%g" % Structure_operator.counter
104        else:
105            self.label = label + '_%g' % Structure_operator.counter
106
107        if structure_type == None:
108            self.structure_type = 'generic structure'
109        else:
110            self.structure_type = structure_type
111           
112        self.verbose = verbose       
113       
114        # Keep count of structures
115        Structure_operator.counter += 1
116
117        # Slots for recording current statistics
118        self.accumulated_flow = 0.0
119        self.discharge = 0.0
120        self.velocity = 0.0
121        self.outlet_depth = 0.0
122        self.delta_total_energy = 0.0
123        self.driving_energy = 0.0
124       
125        if exchange_lines is not None:
126            self.__process_skew_culvert()
127        elif end_points is not None:
128            self.__process_non_skew_culvert()
129        else:
130            raise Exception, 'Define either exchange_lines or end_points'
131
132       
133        self.inlets = []
134        line0 = self.exchange_lines[0] #self.inlet_lines[0]
135        if self.apron is None:
136            poly0 = line0
137        else:
138            offset = -self.apron*self.outward_vector_0
139            #print line0
140            #print offset
141            poly0 = num.array([ line0[0], line0[1], line0[1]+offset, line0[0]+offset])
142            #print poly0
143        if self.invert_elevations is None:
144            invert_elevation0 = None
145        else:
146            invert_elevation0 = self.invert_elevations[0]
147
148        enquiry_point0 = self.enquiry_points[0]
149
150        #outward_vector0 = - self.culvert_vector
151        self.inlets.append(inlet_enquiry.Inlet_enquiry(
152                           self.domain,
153                           poly0,
154                           enquiry_point0,
155                           invert_elevation = invert_elevation0,
156                           outward_culvert_vector = self.outward_vector_0,
157                           verbose = self.verbose))
158
159        tris_0 = self.inlets[0].triangle_indices
160        #print tris_0
161        #print self.domain.centroid_coordinates[tris_0]
162
163        line1 = self.exchange_lines[1]
164        if self.apron is None:
165            poly1 = line1
166        else:
167            offset = -self.apron*self.outward_vector_1
168            #print line1
169            #print offset
170            poly1 = num.array([ line1[0], line1[1], line1[1]+offset, line1[0]+offset])
171            #print poly1
172           
173        if self.invert_elevations is None:
174            invert_elevation1 = None
175        else:
176            invert_elevation1 = self.invert_elevations[1]
177        enquiry_point1 = self.enquiry_points[1]
178
179        #outward_vector1  = - self.culvert_vector
180        self.inlets.append(inlet_enquiry.Inlet_enquiry(
181                           self.domain,
182                           poly1,
183                           enquiry_point1,
184                           invert_elevation = invert_elevation1,
185                           outward_culvert_vector = self.outward_vector_1,
186                           verbose = self.verbose))
187
188
189        tris_1 = self.inlets[1].triangle_indices
190        #print tris_1
191        #print self.domain.centroid_coordinates[tris_1]       
192       
193        self.set_logging(logging)
194
195
196
197
198    def __call__(self):
199
200        timestep = self.domain.get_timestep()
201       
202        Q, barrel_speed, outlet_depth = self.discharge_routine()
203
204        old_inflow_depth = self.inflow.get_average_depth()
205        old_inflow_stage = self.inflow.get_average_stage()
206        old_inflow_xmom = self.inflow.get_average_xmom()
207        old_inflow_ymom = self.inflow.get_average_ymom()
208
209        #semi_implicit = True
210        #if semi_implicit:   
211
212        # Implement the update of flow over a timestep by
213        # using a semi-implict update. This ensures that
214        # the update does not create a negative depth
215        if old_inflow_depth > 0.0 :
216            dt_Q_on_d = timestep*Q/old_inflow_depth
217        else:
218            dt_Q_on_d = 0.0
219
220        # The depth update is:
221        #    new_inflow_depth*inflow_area =
222        #    old_inflow_depth*inflow_area -
223        #    timestep*Q*(new_inflow_depth/old_inflow_depth)
224        # Note the last term in () is a wet-dry improvement trick
225        #
226        factor = 1.0/(1.0 + dt_Q_on_d/self.inflow.get_area())
227        new_inflow_depth = old_inflow_depth*factor
228
229        if(self.use_old_momentum_method):
230            # This method is here for consistency with the old version of the
231            # routine
232            new_inflow_xmom = old_inflow_xmom*factor
233            new_inflow_ymom = old_inflow_ymom*factor
234
235        else:
236            # For the momentum balance, note that Q also advects the momentum,
237            # which has an average value of new_inflow_mom (or old_inflow_mom). For
238            # consistency we keep using the (new_inflow_depth/old_inflow_depth)
239            # factor for discharge:
240            #
241            #     new_inflow_xmom*inflow_area =
242            #     old_inflow_xmom*inflow_area -
243            #     timestep*Q*(new_inflow_depth/old_inflow_depth)*new_inflow_xmom
244            # and:
245            #     new_inflow_ymom*inflow_area =
246            #     old_inflow_ymom*inflow_area -
247            #     timestep*Q*(new_inflow_depth/old_inflow_depth)*new_inflow_ymom
248            #
249            # The choice of new_inflow_mom in the final term at the end might be
250            # replaced with old_inflow_mom
251            #
252            factor2 = 1.0/(1.0 + dt_Q_on_d*new_inflow_depth/self.inflow.get_area())
253            new_inflow_xmom = old_inflow_xmom*factor2
254            new_inflow_ymom = old_inflow_ymom*factor2
255       
256        self.inflow.set_depths(new_inflow_depth)
257
258        #inflow.set_xmoms(Q/inflow.get_area())
259        #inflow.set_ymoms(0.0)
260
261        self.inflow.set_xmoms(new_inflow_xmom)
262        self.inflow.set_ymoms(new_inflow_ymom)
263
264        loss = (old_inflow_depth - new_inflow_depth)*self.inflow.get_area()
265        xmom_loss = (old_inflow_xmom - new_inflow_xmom)*self.inflow.get_area()
266        ymom_loss = (old_inflow_ymom - new_inflow_ymom)*self.inflow.get_area()
267
268        # set outflow
269        if old_inflow_depth > 0.0 :
270            timestep_star = timestep*new_inflow_depth/old_inflow_depth
271        else:
272            timestep_star = 0.0
273
274        outflow_extra_depth = Q*timestep_star/self.outflow.get_area()
275        outflow_direction = - self.outflow.outward_culvert_vector
276        #outflow_extra_momentum = outflow_extra_depth*barrel_speed*outflow_direction
277           
278        gain = outflow_extra_depth*self.outflow.get_area()
279       
280        #print gain, loss
281        assert num.allclose(gain-loss, 0.0)
282           
283        # Stats
284        self.accumulated_flow += gain
285        self.discharge  = Q*timestep_star/timestep
286        self.velocity =   barrel_speed
287        self.outlet_depth = outlet_depth
288
289        new_outflow_depth = self.outflow.get_average_depth() + outflow_extra_depth
290
291        self.outflow.set_depths(new_outflow_depth)
292
293        if self.use_momentum_jet:
294            # FIXME (SR) Review momentum to account for possible hydraulic jumps at outlet
295            # FIXME (GD) Depending on barrel speed I think this will be either
296            # a source or sink of momentum (considering the momentum losses
297            # above). Might not always be reasonable.
298            #new_outflow_xmom = self.outflow.get_average_xmom() + outflow_extra_momentum[0]
299            #new_outflow_ymom = self.outflow.get_average_ymom() + outflow_extra_momentum[1]
300            new_outflow_xmom = barrel_speed*new_outflow_depth*outflow_direction[0]
301            new_outflow_ymom = barrel_speed*new_outflow_depth*outflow_direction[1]
302           
303        elif self.zero_outflow_momentum:
304            new_outflow_xmom = 0.0
305            new_outflow_ymom = 0.0
306            #new_outflow_xmom = outflow.get_average_xmom()
307            #new_outflow_ymom = outflow.get_average_ymom()
308
309        else:
310            # Add the momentum lost from the inflow to the outflow. For
311            # structures where barrel_speed is unknown + direction doesn't
312            # change from inflow to outflow
313            new_outflow_xmom = self.outflow.get_average_xmom() + xmom_loss/self.outflow.get_area()
314            new_outflow_ymom = self.outflow.get_average_ymom() + ymom_loss/self.outflow.get_area()
315
316        self.outflow.set_xmoms(new_outflow_xmom)
317        self.outflow.set_ymoms(new_outflow_ymom)
318
319
320
321    def set_culvert_height(self, height):
322
323        self.culvert_height = height
324
325    def set_culvert_width(self, width):
326
327        self.culvert_width = width
328       
329    def set_culvert_z1(self, z1): #added by PM 4/10/2013
330
331        self.culvert_z1 = z1 #added by PM 4/10/2013
332
333    def set_culvert_z2(self, z2): #added by PM 4/10/2013
334
335        self.culvert_z2 = z2 #added by PM 4/10/2013
336
337    def __process_non_skew_culvert(self):
338
339        """Create lines at the end of a culvert inlet and outlet.
340        At either end two lines will be created; one for the actual flow to pass through and one a little further away
341        for enquiring the total energy at both ends of the culvert and transferring flow.
342        """
343       
344        self.culvert_vector = self.end_points[1] - self.end_points[0]
345        self.culvert_length = math.sqrt(num.sum(self.culvert_vector**2))   
346        assert self.culvert_length > 0.0, 'The length of culvert is less than 0'
347       
348        self.culvert_vector /= self.culvert_length
349        self.outward_vector_0 =   self.culvert_vector
350        self.outward_vector_1 = - self.culvert_vector
351
352       
353        culvert_normal = num.array([-self.culvert_vector[1], self.culvert_vector[0]])  # Normal vector
354        w = 0.5*self.width*culvert_normal # Perpendicular vector of 1/2 width
355
356        self.exchange_lines = []
357
358        # Build exchange polyline and enquiry point
359        if self.enquiry_points is None:
360           
361            gap = (self.apron + self.enquiry_gap)*self.culvert_vector
362            self.enquiry_points = []
363           
364            for i in [0, 1]:
365                p0 = self.end_points[i] + w
366                p1 = self.end_points[i] - w
367                self.exchange_lines.append(num.array([p0, p1]))
368                ep = self.end_points[i] + (2*i - 1)*gap #(2*i - 1) determines the sign of the points
369                self.enquiry_points.append(ep)
370           
371        else:           
372            for i in [0, 1]:
373                p0 = self.end_points[i] + w
374                p1 = self.end_points[i] - w
375                self.exchange_lines.append(num.array([p0, p1]))
376           
377 
378    def __process_skew_culvert(self):   
379       
380        """Compute skew culvert.
381        If exchange lines are given, the enquiry points are determined. This is for enquiring
382        the total energy at both ends of the culvert and transferring flow.
383        """
384           
385        centre_point0 = 0.5*(self.exchange_lines[0][0] + self.exchange_lines[0][1])
386        centre_point1 = 0.5*(self.exchange_lines[1][0] + self.exchange_lines[1][1])
387
388        n_exchange_0 = len(self.exchange_lines[0])
389        n_exchange_1 = len(self.exchange_lines[1])
390
391        assert n_exchange_0 == n_exchange_1, 'There should be the same number of points in both exchange_lines'
392
393        if n_exchange_0 == 2:
394       
395            if self.end_points is None:
396                self.culvert_vector = centre_point1 - centre_point0
397            else:
398                self.culvert_vector = self.end_points[1] - self.end_points[0]
399
400            self.outward_vector_0 =   self.culvert_vector
401            self.outward_vector_1 = - self.culvert_vector
402
403
404        elif n_exchange_0 == 4:
405
406            self.outward_vector_0 = self.exchange_lines[0][3] - self.exchange_lines[0][2]
407            self.outward_vector_1 = self.exchange_lines[1][3] - self.exchange_lines[1][2]
408
409            self.culvert_vector = centre_point1 - centre_point0
410
411        else:
412            raise Exception, 'n_exchange_0 != 2 or 4'
413
414
415        self.culvert_length = math.sqrt(num.sum(self.culvert_vector**2))
416        assert self.culvert_length > 0.0, 'The length of culvert is less than 0'
417        self.culvert_vector /= self.culvert_length
418
419        outward_vector_0_length = math.sqrt(num.sum(self.outward_vector_0**2))
420        assert outward_vector_0_length > 0.0, 'The length of outlet_vector_0 is less than 0'
421        self.outward_vector_0 /= outward_vector_0_length
422
423        outward_vector_1_length = math.sqrt(num.sum(self.outward_vector_1**2))
424        assert outward_vector_1_length > 0.0, 'The length of outlet_vector_1 is less than 0'
425        self.outward_vector_1 /= outward_vector_1_length
426
427
428        if self.enquiry_points is None:
429       
430            gap = (self.apron + self.enquiry_gap)*self.culvert_vector
431       
432            self.enquiry_points = []
433
434            self.enquiry_points.append(centre_point0 - gap)
435            self.enquiry_points.append(centre_point1 + gap)
436           
437
438    def discharge_routine(self):
439
440        msg = 'Need to impelement '
441        raise
442           
443
444    def statistics(self):
445
446
447        message  = '=====================================\n'
448        message += 'Structure Operator: %s\n' % self.label
449        message += '=====================================\n'
450
451        message += 'Structure Type: %s\n' % self.structure_type
452
453        message += 'Description\n'
454        message += '%s' % self.description
455        message += '\n'
456       
457        for i, inlet in enumerate(self.inlets):
458            message += '-------------------------------------\n'
459            message +=  'Inlet %i\n' % i
460            message += '-------------------------------------\n'
461
462            message += 'inlet triangle indices and centres\n'
463            message += '%s' % inlet.triangle_indices
464            message += '\n'
465           
466            message += '%s' % self.domain.get_centroid_coordinates()[inlet.triangle_indices]
467            message += '\n'
468
469            message += 'region\n'
470            message += '%s' % inlet.region
471            message += '\n'
472
473        message += '=====================================\n'
474
475        return message
476
477
478    def print_statistics(self):
479
480        print self.statistics()
481
482
483    def print_timestepping_statistics(self):
484
485        message = '---------------------------\n'
486        message += 'Structure report for %s:\n' % self.label
487        message += '--------------------------\n'
488        message += 'Type: %s\n' % self.structure_type
489       
490        message += 'inlets[0]_enquiry_depth [m]:  %.2f\n' %self.inlets[0].get_enquiry_depth()
491        message += 'inlets[0]_enquiry_speed [m/s]:  %.2f\n' %self.inlets[0].get_enquiry_speed()
492        message += 'inlets[0]_enquiry_stage [m]:  %.2f\n' %self.inlets[0].get_enquiry_stage()
493        message += 'inlets[0]_enquiry_elevation [m]:  %.2f\n' %self.inlets[0].get_enquiry_elevation()
494        message += 'inlets[0]_average_depth [m]:  %.2f\n' %self.inlets[0].get_average_depth()
495        message += 'inlets[0]_average_speed [m/s]:  %.2f\n' %self.inlets[0].get_average_speed()
496        message += 'inlets[0]_average_stage [m]:  %.2f\n' %self.inlets[0].get_average_stage()
497        message += 'inlets[0]_average_elevation [m]:  %.2f\n' %self.inlets[0].get_average_elevation()
498
499        message += '\n'
500       
501        message += 'inlets[1]_enquiry_depth [m]:  %.2f\n' %self.inlets[1].get_enquiry_depth()
502        message += 'inlets[1]_enquiry_speed [m/s]:  %.2f\n' %self.inlets[1].get_enquiry_speed()
503        message += 'inlets[1]_enquiry_stage [m]:  %.2f\n' %self.inlets[1].get_enquiry_stage()
504        message += 'inlets[1]_enquiry_elevation [m]:  %.2f\n' %self.inlets[1].get_enquiry_elevation()
505
506        message += 'inlets[1]_average_depth [m]:  %.2f\n' %self.inlets[1].get_average_depth()
507        message += 'inlets[1]_average_speed [m/s]:  %.2f\n' %self.inlets[1].get_average_speed()
508        message += 'inlets[1]_average_stage [m]:  %.2f\n' %self.inlets[1].get_average_stage()
509        message += 'inlets[1]_average_elevation [m]:  %.2f\n' %self.inlets[1].get_average_elevation()
510
511       
512        message += 'Discharge [m^3/s]: %.2f\n' % self.discharge
513        message += 'Velocity  [m/s]: %.2f\n' % self.velocity
514        message += 'Outlet Depth  [m]: %.2f\n' % self.outlet_depth
515        message += 'Accumulated Flow [m^3]: %.2f\n' % self.accumulated_flow
516        message += 'Inlet Driving Energy %.2f\n' % self.driving_energy
517        message += 'Delta Total Energy %.2f\n' % self.delta_total_energy
518        message += 'Control at this instant: %s\n' % self.case
519       
520
521
522
523        print message
524
525
526    def set_logging(self, flag=True):
527
528        self.logging = flag
529
530        # If flag is true open file with mode = "w" to form a clean file for logging
531        if self.logging:
532            self.log_filename = self.label + '.log'
533            log_to_file(self.log_filename, self.statistics(), mode='w')
534            log_to_file(self.log_filename, 'time, discharge, velocity, accumulated_flow, driving_energy, delta_total_energy')
535
536            #log_to_file(self.log_filename, self.culvert_type)
537
538
539    def timestepping_statistics(self):
540
541        message  = '%.5f, ' % self.domain.get_time()
542        message += '%.5f, ' % self.discharge
543        message += '%.5f, ' % self.velocity
544        message += '%.5f, ' % self.accumulated_flow
545        message += '%.5f, ' % self.driving_energy
546        message += '%.5f' % self.delta_total_energy
547       
548
549
550        return message
551
552
553    def get_inlets(self):
554       
555        return self.inlets
556       
557       
558    def get_culvert_length(self):
559       
560        return self.culvert_length
561   
562   
563   
564    def get_culvert_slope(self):
565       
566        inlet0 = self.inlets[0]
567        inlet1 = self.inlets[1]
568       
569        elev0 = inlet0.get_enquiry_invert_elevation()
570        elev1 = inlet1.get_enquiry_invert_elevation()
571       
572        return (elev1-elev0)/self.get_culvert_length()
573                         
574                         
575       
576    def get_culvert_width(self):
577       
578        return self.width
579       
580       
581    def get_culvert_diameter(self):
582   
583            return self.diameter
584       
585       
586    def get_culvert_height(self):
587   
588        return self.height
589
590    def get_culvert_z1(self): #added by PM 4/10/2013
591   
592        return self.z1 #added by PM 4/10/2013
593
594    def get_culvert_z2(self): #added by PM 4/10/2013
595   
596        return self.z2 #added by PM 4/10/2013
597
598    def get_culvert_apron(self):
599
600        return self.apron
601
602
603    def get_master_proc(self):
604
605        return 0
606
607
608
609    #--------------------------------------------------------
610    # Set of enquiry functions so that in the sequential and paralle case
611    # we can get equiry info fron the master Proc
612    #---------------------------------------------------------
613
614    def get_enquiry_stages(self):
615
616        enq0 = self.inlets[0].get_enquiry_stage()
617        enq1 = self.inlets[1].get_enquiry_stage()
618
619        return [enq0, enq1]
620
621
622    def get_enquiry_depths(self):
623
624        enq0 = self.inlets[0].get_enquiry_depth()
625        enq1 = self.inlets[1].get_enquiry_depth()
626
627        return [enq0, enq1]
628
629
630    def get_enquiry_positions(self):
631
632        enq0 = self.inlets[0].get_enquiry_position()
633        enq1 = self.inlets[1].get_enquiry_position()
634
635        return [enq0, enq1]
636
637
638    def get_enquiry_xmoms(self):
639
640        enq0 = self.inlets[0].get_enquiry_xmom()
641        enq1 = self.inlets[1].get_enquiry_xmom()
642
643        return [enq0, enq1]
644
645    def get_enquiry_ymoms(self):
646
647        enq0 = self.inlets[0].get_enquiry_ymom()
648        enq1 = self.inlets[1].get_enquiry_ymom()
649
650        return [enq0, enq1]
651
652
653    def get_enquiry_elevations(self):
654
655        enq0 = self.inlets[0].get_enquiry_elevation()
656        enq1 = self.inlets[1].get_enquiry_elevation()
657
658        return [enq0, enq1]
659
660
661
662    def get_enquiry_water_depths(self):
663
664        enq0 = self.inlets[0].get_enquiry_water_depth()
665        enq1 = self.inlets[1].get_enquiry_water_depth()
666
667        return [enq0, enq1]
668
669
670    def get_enquiry_invert_elevations(self):
671
672        enq0 = self.inlets[0].get_enquiry_invert_elevation()
673        enq1 = self.inlets[1].get_enquiry_invert_elevation()
674
675        return [enq0, enq1]
676
677
678    def get_enquiry_velocitys(self):
679
680        enq0 = self.inlets[0].get_enquiry_velocity()
681        enq1 = self.inlets[1].get_enquiry_velocity()
682
683        return [enq0, enq1]
684
685
686    def get_enquiry_xvelocitys(self):
687
688        enq0 = self.inlets[0].get_enquiry_xvelocity()
689        enq1 = self.inlets[1].get_enquiry_xvelocity()
690
691        return [enq0, enq1]
692
693    def get_enquiry_yvelocitys(self):
694
695        enq0 = self.inlets[0].get_enquiry_yvelocity()
696        enq1 = self.inlets[1].get_enquiry_yvelocity()
697
698        return [enq0, enq1]
699
700
701    def get_enquiry_speeds(self):
702
703        enq0 = self.inlets[0].get_enquiry_speed()
704        enq1 = self.inlets[1].get_enquiry_speed()
705
706        return [enq0, enq1]
707
708
709    def get_enquiry_velocity_heads(self):
710
711        enq0 = self.inlets[0].get_enquiry_velocity_head()
712        enq1 = self.inlets[1].get_enquiry_velocity_head()
713
714        return [enq0, enq1]
715
716
717    def get_enquiry_total_energys(self):
718
719        enq0 = self.inlets[0].get_enquiry_total_energy()
720        enq1 = self.inlets[1].get_enquiry_total_energy()
721
722        return [enq0, enq1]
723
724
725    def get_enquiry_specific_energys(self):
726
727        enq0 = self.inlets[0].get_enquiry_specific_energy()
728        enq1 = self.inlets[1].get_enquiry_specific_energy()
729
730        return [enq0, enq1]
731
Note: See TracBrowser for help on using the repository browser.