Changeset 9285


Ignore:
Timestamp:
Aug 5, 2014, 12:11:31 PM (10 years ago)
Author:
davies
Message:

Updates to mass conservation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py

    r9284 r9285  
    293293        self.call=1
    294294
     295        # List to store the volumes we computed before
     296        self.volume_history=[]
     297       
    295298        # Work arrays [avoid allocate statements in compute_fluxes or extrapolate_second_order]
    296299        self.edge_flux_work=num.zeros(len(self.edge_coordinates[:,0])*3)
     
    13841387        else:
    13851388            water_volume = receive(0)
    1386        
     1389       
     1390        self.volume_history.append(water_volume)
    13871391        return water_volume
    13881392
     
    25722576        """
    25732577        from anuga import myid
     2578
     2579        if(self.flow_algorithm=='tsunami'):
     2580            print ' '
     2581            print 'Warning: Volume computations do not account for changing porosity in tsunami algorithm'
     2582
    25742583        # Compute the volume
    25752584        Vol=self.get_water_volume()
     
    25792588       
    25802589        if(verbose and myid==0):
    2581             print '    Volume is:', Vol
    2582             print '    Boundary Flux integral: ', fluxIntegral
    2583             print '    (rate + inlet) Fractional Step volume integral : ', fracIntegral
    2584             print '    Volume - (boundary and fractional step inflows):',  Vol- fluxIntegral -fracIntegral
     2590            print ' '
     2591            print '    Volume V is:', Vol
     2592            print '    Boundary Flux integral BF: ', fluxIntegral
     2593            print '    (rate + inlet) Fractional Step volume integral FS: ', fracIntegral
     2594            print '    V - BF - FS - InitialVolume :',  Vol- fluxIntegral -fracIntegral - self.volume_history[0]
     2595            print ' '
    25852596
    25862597        if(returnStats):
Note: See TracChangeset for help on using the changeset viewer.