1 | import pdb |
---|
2 | pdb.set_trace() |
---|
3 | |
---|
4 | import sys |
---|
5 | from os import sep |
---|
6 | sys.path.append('..'+sep+'pyvolution') |
---|
7 | |
---|
8 | #======================================================================== |
---|
9 | from config import g, epsilon |
---|
10 | from Numeric import allclose, array, zeros, ones, Float |
---|
11 | from advection import * |
---|
12 | from Numeric import array |
---|
13 | |
---|
14 | |
---|
15 | from mesh_factory import rectangular |
---|
16 | |
---|
17 | points, vertices, boundary = rectangular(60, 60) |
---|
18 | |
---|
19 | #Create advection domain with direction (1,-1) |
---|
20 | domain = Domain(points, vertices, boundary, velocity=[1.0, 0.0]) |
---|
21 | |
---|
22 | # Initial condition is zero by default |
---|
23 | |
---|
24 | #domain.initialise_visualiser(scale_z=1.0) |
---|
25 | #domain.visualise_range_z = 0.5 |
---|
26 | #domain.visualise_color_stage = True |
---|
27 | |
---|
28 | |
---|
29 | #Boundaries |
---|
30 | T = Transmissive_boundary(domain) |
---|
31 | D = Dirichlet_boundary(array([1.0])) |
---|
32 | |
---|
33 | #turn on the visualisation |
---|
34 | rect = [0.0, 0.0, 1.0, 1.0] |
---|
35 | domain.initialise_visualiser(rect=rect) |
---|
36 | |
---|
37 | |
---|
38 | domain.default_order = 2 |
---|
39 | |
---|
40 | print domain.quantities.keys() |
---|
41 | |
---|
42 | domain.set_boundary( {'left': D, 'right': T, 'bottom': T, 'top': T} ) |
---|
43 | domain.check_integrity() |
---|
44 | |
---|
45 | #Check that the boundary value gets propagated to all elements |
---|
46 | for t in domain.evolve(yieldstep = 0.1, finaltime = 1.5): |
---|
47 | domain.write_time() |
---|
48 | pdb.set_trace() |
---|
49 | |
---|