Changeset 2270


Ignore:
Timestamp:
Jan 24, 2006, 2:08:25 PM (18 years ago)
Author:
jakeman
Message:

Cairns_2006 now contains create_mesh file hich creates mesh with multiple refined regions. Still not working correctly though.
Also contains sww files from two basic runs.

Location:
development/cairns_2006
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • development/cairns_2006/cairns_fault.xya

    r2229 r2270  
    1 5481413.1609155666, 1558472.3824136395
    2 4933271.8448240105, 1558472.3824136395
    3 5444342.9345278544, 1335833.4706402624
    4 4899908.64107507, 1335833.4706402624
     15481413.1609155666, 1001875.1029801967
     24933271.8448240105, 1001875.1029801967
     35481413.1609155666, 779236.19120681973
     44933271.8448240105, 779236.19120681973
  • development/cairns_2006/run_cairns.py

    r2229 r2270  
    1414from pyvolution.pmesh2domain import pmesh_to_domain_instance
    1515from Numeric import array, zeros, Float, allclose
    16 import cairns_project
     16#import cairns_project
     17import project
    1718from caching import cache
    1819from utilities.polygon import read_polygon, Polygon_function
     
    2223#-------------------------------
    2324print 'Creating domain'
    24 M = 72 #float(len1)/m
    25 N = 20 #float(len2)/n
     25"""
     26M = 36 #float(len1)/m
     27N = 10 #float(len2)/n
    2628
    2729points, elements, boundary = rectangular_cross(M, N, len1=6393693.9504678631,
     
    3133#points, elements, boundary = rectangular_cross(N, M, len1=58.0, len2=1.0, origin=(145.0,-24.0))
    3234                                               
    33 domain = Domain(points, elements, boundary)
     35domain = cache(Domain, (points, elements, boundary))
     36
     37"""
     38domain = cache(pmesh_to_domain_instance,
     39               (project.mesh_filename, Domain),
     40               dependencies = [project.mesh_filename])
    3441
    3542domain.check_integrity()
     
    4956#p0 = read_polygon('cairns_fault_degrees.xya')
    5057
    51 domain.set_quantity('stage',Polygon_function([(p0,1.0)]))
     58domain.set_quantity('stage',Polygon_function([(p0,1000.0)]))
    5259
    5360#print domain.quantities['stage'].vertex_values
    5461
    5562domain.set_quantity('elevation',
    56                     filename = cairns_project.bathymetry_filename[:-4] + '.xya',
     63                    filename = project.bathymetry_filename[:-4] + '.xya',
    5764                    alpha = 10.0,
    5865                    verbose = True,
     
    7077print 'Boundaries'
    7178
    72 #   Tidal cycle recorded at Eden as open
    73 #print 'Open sea boundary condition from ',cairns_project.boundary_filename
    74 #from pyvolution.util import file_function
    75 #tide_function = file_function(cairns_project.boundary_filename[:-4] + '.tms',
    76 #                               domain,
    77 #                               verbose = True)
     79
    7880#Bts = Transmissive_Momentum_Set_Stage_boundary(domain, tide_function)
    7981
    80 #   All other boundaries are reflective
    81 #Br = Reflective_boundary(domain)
    82 #domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
     82Br = Reflective_boundary(domain)
     83domain.set_boundary({'border': Br, 'border': Br, 'border': Br, 'border': Br})
    8384
    84 Bt = Transmissive_boundary(domain)
    85 domain.set_boundary({'left': Bt, 'right': Bt, 'top': Bt, 'bottom': Bt})
     85#Bt = Transmissive_boundary(domain)
     86#domain.set_boundary({'left': Bt, 'right': Bt, 'top': Bt, 'bottom': Bt})
    8687
    8788#-------------------------------
    8889# Setup domain runtime parameters
    8990#-------------------------------
     91
    9092domain.visualise = True
    9193domain.visualise_color_stage = True
     94
     95#domain.visualise = False
     96#domain.visualise_color_stage = False
    9297
    9398base = os.path.basename(sys.argv[0])
     
    96101domain.store = True    #Store for visualisation purposes
    97102
    98 
    99 
    100103#-------------------------------
    101104# Evolve
     
    103106import time
    104107t0 = time.time()
    105 yieldstep = 10
    106 finaltime = 120
    107 
     108yieldstep = 60.0
     109finaltime = 480.0
    108110
    109111for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
Note: See TracChangeset for help on using the changeset viewer.