Changeset 8384 for trunk/anuga_work


Ignore:
Timestamp:
Apr 5, 2012, 12:37:54 AM (13 years ago)
Author:
davies
Message:

balanced_dev: more application adjustments

Location:
trunk/anuga_work/development/gareth
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/gareth/experimental/balanced_dev/swb2_domain.py

    r8383 r8384  
    101101        self.set_store_vertices_smoothly(False)
    102102
     103        self.maximum_allowed_speed=0.0
     104
    103105        print '##########################################################################'
    104106        print '#'
  • trunk/anuga_work/development/gareth/experimental/balanced_dev/swb2_domain_ext.c

    r8375 r8384  
    731731  // Any provisional jump with magnitude < TINY does not contribute to
    732732  // the limiting process.
     733 
    733734  for (i=0;i<3;i++){
    734735    if (dqv[i]<-TINY)
     
    742743 
    743744  phi=min(r*beta_w,1.0);
     745  //phi=1.;
    744746  //for (i=0;i<3;i++)
    745747  dqv[0]=dqv[0]*phi;
     
    10821084      // vertices of the auxiliary triangle and compute jumps
    10831085      // from the centroid to the min and max
     1086      //
    10841087      find_qmin_and_qmax(dq0, dq1, dq2, &qmin, &qmax);
     1088
    10851089      //beta_tmp = beta_uh;
    10861090      //if (hmin<minimum_allowed_height)
     
    11391143      // vertices of the auxiliary triangle and compute jumps
    11401144      // from the centroid to the min and max
     1145      //
    11411146      find_qmin_and_qmax(dq0, dq1, dq2, &qmin, &qmax);
    11421147     
  • trunk/anuga_work/development/gareth/tests/channel_floodplain/plotme.py

    r8375 r8384  
    44
    55# Time-index to plot outputs from
    6 index=900
     6index=53
    77
    88#p2 = util.get_output('channel_floodplain1_bal_dev.sww', minimum_allowed_height=0.01)
  • trunk/anuga_work/development/gareth/tests/dam_break/plotme.py

    r8359 r8384  
    99p2_st=util.get_centroids(p_st)
    1010
    11 p_dev = util.get_output('dam_break_20120313_153101/dam_break.sww', 0.001)
     11
     12p_dev = util.get_output('dam_break_20120404_230353/dam_break.sww', 0.001)
    1213p2_dev=util.get_centroids(p_dev, velocity_extrapolation=True)
    1314
  • trunk/anuga_work/development/gareth/tests/urban_flow/ideal_urban.py

    r8383 r8384  
    99import anuga
    1010import numpy
     11#from anuga import create_domain_from_regions as create_domain_from_regions
    1112#from anuga.structures.inlet_operator import Inlet_operator
    1213
     
    2526#bankwidth = 2. # Width of the bank regions -- note that these protrude into the channel
    2627man_n=0.01 # Manning's n
    27 l0 = 0.05 #0.2501 # Length scale associated with triangle side length in channel (min_triangle area = 0.5*l0^2)
     28l0 = 0.1 #0.2501 # Length scale associated with triangle side length in channel (min_triangle area = 0.5*l0^2)
    2829
    2930#assert chan_width < floodplain_width, \
     
    5960
    6061domain.set_name('urban_flow0p05') # Output name
    61 
     62#domain.extrapolate_velocity_second_order=False
    6263#------------------------------------------------------------------------------
    6364#
     
    9596    elev2 = (x>6.9)*(x<7.7)*(y<1.3)*structure_height + \
    9697            (x>6.9)*(x<7.7)*(3.6-y<1.3)*structure_height
     98
     99    # Add sloping edges
     100    elev2b = (0.34 - y)*(0.155/0.34)*(y<0.34) + (0.155 - (floodplain_width-y)*(0.155/0.34))*(y>=floodplain_width-0.34)
     101
    97102    # Define building.
    98103    # Do this by using rotated coordinates.
     
    113118            (c2 > (ll[1] + 1.0/numpy.tan(alpha)*ll[0]) )*\
    114119            structure_height
    115     return elev1 + elev2 + elev3
     120    return elev1 + elev2 + elev2b + elev3
    116121
    117122#Function for stage
  • trunk/anuga_work/development/gareth/tests/urban_flow/plotme.py

    r8383 r8384  
    1414G6=numpy.array([-1.87,1.10]) + offset
    1515
    16 p=util.get_output('urban_flow0p1.sww')
     16p2=util.get_output('urban_flow0p05.sww',0.001)
     17p=util.get_centroids(p2,velocity_extrapolation=True)
    1718
    1819G1ind = ((p.x-G1[0])**2 + (p.y-G1[1])**2).argmin()
  • trunk/anuga_work/development/gareth/tests/wave/run_wave.py

    r8354 r8384  
    1313import anuga
    1414from anuga import Domain
    15 #from balanced_dev import *
     15
     16from balanced_dev import *
     17from balanced_dev import Domain as Domain
    1618
    1719from math import cos
     
    3941# Setup domain
    4042#------------------------------------------------------------------------------
    41 dx = 500.
     43dx = 1000.
    4244dy = dx
    4345L = 100000.
     
    5557# Setup Algorithm
    5658#------------------------------------------------------------------------------
    57 domain.set_timestepping_method('rk2')
    58 domain.set_default_order(2)
    59 domain.set_beta(2.0)
     59#domain.set_timestepping_method('rk2')
     60#domain.set_default_order(2)
     61#domain.set_beta(2.0)
    6062
    61 print domain.get_timestepping_method()
     63#print domain.get_timestepping_method()
    6264
    6365#domain.use_edge_limiter = True
     
    8183Bd = anuga.Dirichlet_boundary([1,0.,0.]) # Constant boundary values
    8284amplitude = 1
    83 wave_length = 3000.0
     85wave_length = 300.0
    8486Bw = anuga.Time_boundary(domain=domain,     # Time dependent boundary
    8587## Sine wave
     
    116118#------------------------------------------------------------------------------
    117119
    118 for t in domain.evolve(yieldstep = 10.0, finaltime = 60*60.*10.):
     120for t in domain.evolve(yieldstep = 10.0, finaltime = 60*60.*3.):
    119121    domain.write_time()
    120122    if interactive_visualisation:
Note: See TracChangeset for help on using the changeset viewer.