Changeset 3876
- Timestamp:
- Oct 26, 2006, 5:31:27 PM (18 years ago)
- Location:
- anuga_core/source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/realtime_visualisation_new.py
r3737 r3876 210 210 211 211 #print 'update bed image' 212 if qname==' elevation':213 self.pos[:,2] = self.pos[:,2] +1.0e-2212 if qname=='stage': 213 self.pos[:,2] = self.pos[:,2] - self.domain.visualise_wet_dry_cutoff 214 214 215 215 self.vpython_z_models[qname].pos = self.pos -
anuga_core/source/anuga/config.py
r3819 r3876 81 81 beta_h = 0.2 82 82 83 alpha_balance = 2.0 83 84 84 85 CFL = 1.0 #FIXME (ole): Is this in use yet?? -
anuga_core/source/anuga/examples/island.py
r3719 r3876 36 36 filename = 'island.msh' , 37 37 interior_regions=[ ([[50,25], [70,25], [70,75], [50,75]], 1.0)] 38 #interior_holes=[[ 50,25], [70,25], [70,75], [50,75]],38 #interior_holes=[[[50,25], [70,25], [70,75], [50,75]]], 39 39 ) 40 40 … … 45 45 domain.smooth = False 46 46 domain.set_name('island') 47 domain. set_default_order(2)47 domain.default_order = 2 48 48 49 49 … … 55 55 # beta_h == 0.0 means that constant (1st order) gradients are introduced 56 56 # on h. This is equivalent to the constant depth used previously. 57 domain.beta_h = 0.2 58 domain.beta_w_dry = 0.2 59 57 domain.beta_h = 0.5 58 domain.beta_w_dry = 0.0 59 domain.alpha_balance = 10.0 60 domain.minimum_allowed_height = 1.0e-4 61 domain.maximum_allowed_speed = 100.0 62 domain.minimum_storable_height = 1.0e-4 63 domain.visualise_wet_dry_cutoff = 5.0e-2 60 64 61 65 #------------------------------------------------------------------------------ … … 66 70 z = 0*x 67 71 for i in range(len(x)): 68 z[i] = 8*exp( -((x[i]-50)**2 + (y[i]-50)**2)/100 )72 z[i] = 20*exp( -((x[i]-50)**2 + (y[i]-50)**2)/100 ) 69 73 70 74 #z[i] += 0.5*exp( -((x[i]-10)**2 + (y[i]-10)**2)/50 ) … … 79 83 return z 80 84 85 stage_value = 15.0 81 86 #domain.set_quantity('friction', 0.1) #Honky dory 82 domain.set_quantity('friction', 100.0) #Creep87 domain.set_quantity('friction', 0.01) #Creep 83 88 domain.set_quantity('elevation', island) 84 domain.set_quantity('stage', 1)89 domain.set_quantity('stage', stage_value) 85 90 domain.max_timestep = 0.01 86 91 … … 91 96 92 97 Br = Reflective_boundary(domain) 93 Bd = Dirichlet_boundary([ 1, 0, 0])98 Bd = Dirichlet_boundary([stage_value, 0, 0]) 94 99 95 domain.set_boundary({'left': Bd, 'right': Bd, 'top': Bd, 'bottom': Bd })100 domain.set_boundary({'left': Bd, 'right': Bd, 'top': Bd, 'bottom': Bd, 'exterior': Br}) 96 101 domain.check_integrity() 97 102 -
anuga_core/source/anuga/examples/netherlands.py
r3846 r3876 83 83 N = 130 #size = 33800 84 84 N = 600 #Size = 720000 85 N = 50 85 N = 40 86 86 87 87 88 … … 105 106 domain.beta_vh = 1.0 106 107 domain.beta_vh_dry = 0.2 108 109 domain.alpha_balance = 10.0 107 110 108 111 #Output params … … 139 142 vis.updating['stage'] = True 140 143 vis.qcolor['stage'] = (0.0,0.0,0.8) 141 vis.coloring['stage']= True144 vis.coloring['stage']= False 142 145 143 146 -
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r3848 r3876 92 92 from anuga.config import g, beta_h, beta_w, beta_w_dry,\ 93 93 beta_uh, beta_uh_dry, beta_vh, beta_vh_dry 94 from anuga.config import alpha_balance 94 95 95 96 … … 143 144 self.beta_vh_dry = beta_vh_dry 144 145 self.beta_h = beta_h 146 self.alpha_balance = alpha_balance 145 147 146 148 self.flux_function = flux_function_central … … 1212 1214 1213 1215 from shallow_water_ext import balance_deep_and_shallow 1214 balance_deep_and_shallow( wc, zc, hc, wv, zv, hv, hvbar,1216 balance_deep_and_shallow(domain, wc, zc, hc, wv, zv, hv, hvbar, 1215 1217 xmomc, ymomc, xmomv, ymomv) 1216 1218 -
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r3789 r3876 423 423 double* ymomc, 424 424 double* xmomv, 425 double* ymomv) { 425 double* ymomv, 426 double alpha_balance) { 426 427 427 428 int k, k3, i; … … 463 464 //else 464 465 // alpha = max( min( hc[k]/dz, 1.0), 0.0 ); 465 alpha = max( min( 2.0*hmin/dz, 1.0), 0.0 );466 alpha = max( min( alpha_balance*hmin/dz, 1.0), 0.0 ); 466 467 else 467 468 alpha = 1.0; //Flat bed … … 1569 1570 *xmomv, 1570 1571 *ymomv; 1572 1573 PyObject *domain, *Tmp; 1574 1575 double alpha_balance = 2.0; 1571 1576 1572 1577 int N; //, err; 1573 1578 1574 1579 // Convert Python arguments to C 1575 if (!PyArg_ParseTuple(args, "OOOOOOOOOOO", 1580 if (!PyArg_ParseTuple(args, "OOOOOOOOOOOO", 1581 &domain, 1576 1582 &wc, &zc, &hc, 1577 1583 &wv, &zv, &hv, &hvbar, … … 1581 1587 } 1582 1588 1589 // Pull out parameters 1590 Tmp = PyObject_GetAttrString(domain, "alpha_balance"); 1591 if (!Tmp) { 1592 PyErr_SetString(PyExc_RuntimeError, "shallow_water_ext.c: balance_deep_and_shallow could not obtain object alpha_balance from domain"); 1593 return NULL; 1594 } 1595 alpha_balance = PyFloat_AsDouble(Tmp); 1596 Py_DECREF(Tmp); 1597 1583 1598 1584 1599 N = wc -> dimensions[0]; … … 1592 1607 (double*) hv -> data, 1593 1608 (double*) hvbar -> data, 1594 1609 (double*) xmomc -> data, 1595 1610 (double*) ymomc -> data, 1596 1611 (double*) xmomv -> data, 1597 (double*) ymomv -> data); 1612 (double*) ymomv -> data, 1613 alpha_balance); 1598 1614 1599 1615 -
anuga_core/source/anuga_parallel/run_parallel_sw_rectangle.py
r3696 r3876 117 117 domain.beta_vh_dry = 0.2 118 118 119 domain.beta_w = 0.9120 domain.beta_w_dry = 0.9121 domain.beta_uh = 0.9122 domain.beta_uh_dry = 0.9123 domain.beta_vh = 0.9124 domain.beta_vh_dry = 0.9119 #domain.beta_w = 0.9 120 #domain.beta_w_dry = 0.9 121 #domain.beta_uh = 0.9 122 #domain.beta_uh_dry = 0.9 123 #domain.beta_vh = 0.9 124 #domain.beta_vh_dry = 0.9 125 125 126 126 yieldstep = 0.005
Note: See TracChangeset
for help on using the changeset viewer.