Changeset 3428


Ignore:
Timestamp:
Jul 31, 2006, 4:20:12 PM (19 years ago)
Author:
duncan
Message:

Using Dirichlet boundary

Location:
development/dam_2006
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • development/dam_2006/create_mesh.py

    r3426 r3428  
    1313    #Basic geometry
    1414   
    15     xedge   = - gate_position
    1615    xright  = 3.0 - gate_position
    1716    ybottom = 0
    1817    ytop    = 0.4
    1918    xdam = 0.0
    20     xleft = -5.0
     19    xleft = - gate_position
    2120
    2221    #Outline
     
    2827    # Dam seperation (left)
    2928    point_dam_top = [xdam, ytop]
    30     point_dam_bottom = [xdam, ybottom]
    31 
    32     # Catchment seperation
    33     point_edge_top = [xedge, ytop]   
    34     point_edge_bottom = [xedge, ybottom]
    35    
     29    point_dam_bottom = [xdam, ybottom]   
    3630
    3731    m = Mesh()
     
    4337                      point_ne,
    4438                      point_dam_top,
    45                       point_edge_top,
    46                       point_nw,
    47                       point_sw,
    48                       point_edge_bottom,
    49                       point_dam_bottom]
     39                      point_nw,
     40                      point_sw,
     41                      point_dam_bottom
     42                      ]
    5043    #if False:
    51     if False:
    52         dict['segments'] = [[0,1], [1,2], [2,3], [3,4],
    53                             [4,5], [5,6], [6,7 ],[7,0],  #The outer border
    54                             [2,7],         #dam Separator
    55                             [3,6]]         #edge Separator
    5644   
    57         dict['segment_tags'] = ['wall',
    58                                 'wall',
    59                                 'wall',
    60                                 'wall', #back of the dam
    61                                 'wall',
    62                                 'wall',
    63                                 'wall',
    64                                 'wall',
    65                                 '',
    66                                 '']           #Interior
    67 
    68     else:
    69         dict['segments'] = [[0,1], [1,2], [2,3],
    70                             [6,7 ],[7,0],  #The outer border
    71                             [2,7],         #dam Separator
    72                             [3,6]]         #edge Separator
     45    dict['segments'] = [[0,1], [1,2], [2,3],
     46                        [3,4 ],[4,5], [5,0],  #The outer border
     47                        [2,5]]         #dam Separator
    7348   
    74         dict['segment_tags'] = ['wall',
    75                                 'wall',
    76                                 'wall',
    77                                 'wall',
    78                                 'wall',
    79                                 '',           #Interior
    80                                 'edge']           #Interior
     49    dict['segment_tags'] = ['wall',
     50                            'wall',
     51                            'wall',
     52                            'edge',
     53                            'wall',
     54                            'wall',         
     55                            '']           #Interior
    8156
    8257       
  • development/dam_2006/run_dam.py

    r3426 r3428  
    100100    Br = Reflective_boundary(domain)
    101101    Bd = Dirichlet_boundary([0,0,0])
    102     #Bd = None
    103102    domain.set_boundary( {'wall': Br, 'edge': Bd} )
    104103
     
    108107    t0 = time.time()
    109108
    110     for t in domain.evolve(yieldstep = 0.01, finaltime = 1):
     109    for t in domain.evolve(yieldstep = 0.1, finaltime = 25):
    111110        domain.write_time()
    112111   
Note: See TracChangeset for help on using the changeset viewer.