- Timestamp:
- Dec 8, 2011, 11:38:18 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe_domain.py
r8265 r8274 270 270 """ 271 271 272 # Equivalent area A is defined by A = (\rho/\rho_0) A_{pipe} 273 # A_{pipe} = width * top 274 # A = width * height 275 # \rho_0 = 1 276 # Therefore \rho = height/top for pressurised states 277 # For free surface \rho = 1 278 279 # Coarse approximation of mass M in a cell, assume rho is constant 280 # M = \Delta x * \rho * A 281 # = \Delta_x * A * height/top (pressurised) 282 # = \Delta_x * A (un-pressurised) 283 284 area = self.quantities['area'] 285 height = self.quantities['height'] 286 top = self.quantities['top'] 287 288 #Arrays 289 a = area.centroid_values 290 h = height.centroid_values 291 t = top.centroid_values 292 293 M = numpy.where(self.state == 0, self.areas * a, self.areas * a * h/t) 294 295 return M 272 # The equivalent area is the conserved mass quantity 273 # It is equal to \rho/\rho_0 A where A is the cross sectional 274 # area of the fluid where $\rho_0 is some fixed reference density 275 area = self.quantities['area'] 276 a = area.centroid_values 277 278 return a * self.areas 279 296 280 297 281 # Auxillary methods
Note: See TracChangeset
for help on using the changeset viewer.