Example #1
0
opts= Context.Options([
    ("final_time",3.0,"Final time for simulation"),
    ("dt_output",0.01,"Time interval to output solution"),
    ("cfl",0.25,"Desired CFL restriction"),
    ("he",0.01,"he relative to Length of domain in x"),
    ("refinement",3,"level of refinement")
    ])

# ****************** #
# ***** GAUGES ***** #
# ****************** #
height_gauges1 = LineGauges(gauges=((("phi",),
                                        (((2.724, 0.0, 0.0),
                                          (2.724, 1.8, 0.0)), # We consider this one in our paper
                                         ((2.228, 0.0, 0.0),
                                          (2.228, 1.8, 0.0)), # We consider this one in our paper
                                         ((1.732, 0.0, 0.0),
                                          (1.732, 1.8, 0.0)),
                                         ((0.582, 0.0, 0.0),
	                                  (0.582, 1.8, 0.0)))),),
                                        fileName="height1.csv")

height_gauges2 = LineGauges(gauges=((("phi",),
                                     (((0.0, 0.0, 0.0),
                                       (0.0, 0.0, -0.01)),
                                      ((0.0, 0.0, 0.0),
                                        (3.22, 0.0, 0.0)))),),
                            fileName="height2.csv")

pressure_gauges = PointGauges(gauges=((('p',),
                                      ((3.22, 0.16, 0.0), #P1
                                       (3.22, 0.584, 0.0), #P3
Example #2
0
                    (2.414, 0.474, 0.165),  #P5
                    (2.487, 0.474, 0.165))), ),  #P7
        fileName="pressure.csv")
    point_height_gauges = PointGauges(
        gauges=(
            (
                ('phi', ),
                (
                    (2.389, 0.526, 0.025),  #P1
                    (2.389, 0.526, 0.099),  #P3
                    (2.414, 0.474, 0.165),  #P5
                    (2.487, 0.474, 0.165))), ),  #P7
        fileName="point_clsvof.csv")
    height_gauges = LineGauges(
        gauges=((("phi", ), (((2.724, 0.5, 0.0), (2.724, 0.5, 1.0)),
                             ((2.228, 0.5, 0.0), (2.228, 0.5, 1.0)),
                             ((1.732, 0.5, 0.0), (1.732, 0.5, 1.0)),
                             ((0.582, 0.5, 0.0), (0.582, 0.5, 1.0)))), ),
        fileName="height.csv")

# *************************** #
# ***** DOMAIN AND MESH ***** #
# ****************** #******* #
L = [3.22, 1.0, 1.0]
box_L = [0.16, 0.4, 0.16]
box_xy = [2.39, 0.3]
he = opts.he
boundaries = [
    'left',
    'right',
    'bottom',
    'top',
Example #3
0
#print gaugeLocations
#print columnLines

fields = ('vof', )

columnGauge = LineIntegralGauges(gauges=((fields, columnLines), ),
                                 fileName='column_gauge.csv')

#v_resolution = max(he,0.05)
#linePoints = int((gauge_top - veg_gauge_bottom_y)/v_resolution)
lineGauges = LineGauges(
    gauges=(
        (
            ('u', 'v'),  #fields in gauge set
            (  #lines for these fields
                ((26.0, veg_gauge_bottom_y, 0.5 * L[2]),
                 (26.0, gauge_top, 0.5 * L[2])), ),  #end  lines
        ),  #end gauge set
    ),  #end gauges
    fileName="vegZoneVelocity.csv")

#lineGauges_phi  = LineGauges_phi(lineGauges.endpoints,linePoints=20)

# if useHex:
#     nnx=ceil(L[0]/he)+1
#     nny=ceil(L[1]/he)+1
#     hex=True
#     domain = Domain.RectangularDomain(L)
# else:
#     boundaries=['left','right','bottom','top','front','back']
#     boundaryTags=dict([(key,i+1) for (i,key) in enumerate(boundaries)])
Example #4
0
pointGauges = PointGauges(gauges=((('u','v'), gaugeLocations),
                                (('p',),    gaugeLocations)),
                  activeTime = (0, 1000.0),
                  sampleRate = 0,
                  fileName = 'combined_gauge_0_0.5_sample_all.txt')

print gaugeLocations
print columnLines

fields = ('vof',)

columnGauge = LineIntegralGauges(gauges=((fields, columnLines),),
                                 fileName='column_gauge.csv')

columnPointGauge = LineGauges(gauges=((fields, columnLines),),
                                 fileName='column_point_gauge.csv')

#lineGauges  = LineGauges(gaugeEndpoints={'lineGauge_y=0':((0.0,0.0,0.0),(L[0],0.0,0.0))},linePoints=24)

#lineGauges_phi  = LineGauges_phi(lineGauges.endpoints,linePoints=20)


if useHex:   
    nnx=ceil(L[0]/he)+1
    nny=ceil(L[1]/he)+1
    hex=True    
    domain = Domain.RectangularDomain(L)
else:
    boundaries=['left','right','bottom','top','front','back','airvent']
    boundaryTags=dict([(key,i+1) for (i,key) in enumerate(boundaries)])
    if structured:
weak_bc_penalty_constant = 100.0
nLevels = 1
#parallelPartitioningType = proteus.MeshTools.MeshParallelPartitioningTypes.element
parallelPartitioningType = proteus.MeshTools.MeshParallelPartitioningTypes.node
nLayersOfOverlapForParallel = 0
structured = False

# new style PointGauges
pointGauges = PointGauges(gauges=((('u', 'v'), ((0.5, 0.5, 0), (1, 0.5, 0))),
                                  (('p', ), ((0.5, 0.5, 0), ))),
                          activeTime=(0, 0.5),
                          sampleRate=0,
                          fileName='combined_gauge_0_0.5_sample_all.csv')

lineGauges = LineGauges(gaugeEndpoints={
    'lineGauge_xtoH=0.825': ((0.495, 0.0, 0.0), (0.495, 1.8, 0.0))
},
                        linePoints=20)
#'lineGauge_x/H=1.653':((0.99,0.0,0.0),(0.99,1.8,0.0))
#lineGauges_phi = LineGauges_phi(lineGauges.endpoints, linePoints=20)

if useHex:
    nnx = 4 * Refinement + 1
    nny = 2 * Refinement + 1
    hex = True
    domain = Domain.RectangularDomain(L)
else:
    boundaries = ['left', 'right', 'bottom', 'top', 'front', 'back']
    boundaryTags = dict([(key, i + 1) for (i, key) in enumerate(boundaries)])
    if structured:
        nnx = 4 * Refinement
        nny = 2 * Refinement