Esempio n. 1
0
######################################################################################################################################################################################################################
# Gauges and probes #
######################################################################################################################################################################################################################

T = opts.duration
PG = []
gauge_dy = 0.01
tank_dim_y = opts.tank_dim_y
nprobes = int(tank_dim_y / gauge_dy) + 1
probes = np.linspace(0., tank_dim_y, nprobes)
for i in probes:
    PG.append((opts.tank_dim_x / 2., i, 0.), )
v_output = ga.PointGauges(gauges=(
    (('u', ), PG),
    (('v', ), PG),
),
                          activeTime=(0., T),
                          sampleRate=0.,
                          fileName='fluidVelocityGauges.csv')
vs_output = ga.PointGauges(gauges=(
    (('us', ), PG),
    (('vs', ), PG),
),
                           activeTime=(0., T),
                           sampleRate=0.,
                           fileName='solidVelocityGauges.csv')
vos_output = ga.PointGauges(gauges=((('vos', ), PG), ),
                            activeTime=(0., T),
                            sampleRate=0.,
                            fileName='solidFractionGauges.csv')
Esempio n. 2
0
    # ----- GAUGES ----- #
    from proteus import Gauges
    gauge_dx = tank_dim[0] / 100.
    probes = np.linspace(0., tank_dim[0], tank_dim[0] / gauge_dx + 1)
    PG = []
    PG2 = []
    LG = []
    zProbes = water_depth * 0.5
    for i in probes:
        PG.append((i, zProbes, 0.), )
        PG2.append((i, water_depth, 0.), )
        LG.append([(i, 0., 0.), (i, tank_dim[1], 0.)])

    m['flow'].auxiliaryVariables += [
        Gauges.PointGauges(gauges=((('p', ), PG), ),
                           activeTime=(0, opts.T),
                           sampleRate=0,
                           fileName='pointGauge_pressure.csv')
    ]
    m['ncls'].auxiliaryVariables += [
        Gauges.PointGauges(gauges=((('phi', ), PG2), ),
                           activeTime=(0, opts.T),
                           sampleRate=0,
                           fileName='pointGauge_levelset.csv')
    ]
    m['vof'].auxiliaryVariables += [
        Gauges.LineIntegralGauges(gauges=((('vof', ), LG), ),
                                  activeTime=(0, opts.T),
                                  sampleRate=0,
                                  fileName='lineGauge_vof.csv')
    ]
    m['flow'].auxiliaryVariables += [
Esempio n. 3
0
############################################################################################################################################################################
# ----- Output Gauges ----- #
############################################################################################################################################################################
T = opts.duration

gauge_dx=0.25
probes=np.linspace(0., tank_dim[0], (tank_dim[0]/gauge_dx)+1)
PG=[]
zProbes=opts.water_level*0.5
for i in probes:
    PG.append((i, zProbes, 0.),)

levelset_output=ga.PointGauges(gauges=((('phi',),PG),
                                 ),
                          activeTime = (0., T),
                          sampleRate=0.,
                          fileName='levelset_gauges.csv')

######################################################################################################################################################################################################################
# Numerical Options and other parameters #
######################################################################################################################################################################################################################

T = T 
he = he
domain.MeshOptions.he = he

from math import *
from proteus import MeshTools, AuxiliaryVariables
import numpy
import proteus.MeshTools
Esempio n. 4
0
PG = []
LG = []
LG1 = []
LG2 = []
LG3 = []
LG4 = []

#-------------Pressure and vof gauges for WaveHeight--------------------------------#

z_probes = waterLevel * 0.5
PG = [(0.0, z_probes, 0.), (xc1 - 0.73, z_probes, 0.),
      (xc1 + 0.53, z_probes, 0.), (xc1 + 1.03, z_probes, 0.),
      (xc1 + 1.23, z_probes, 0.)]
pressureGauges = ga.PointGauges(gauges=((('p', ), PG), ),
                                activeTime=(0., T),
                                sampleRate=0.,
                                fileName='pressureProbes.csv')

VG = [((0.0, 0., 0.), (0.0, tank_dim[1], 0.)),
      ((xc1 - 0.73, 0., 0.), (xc1 - 0.73, tank_dim[1], 0.)),
      ((xc1 + 0.53, 0., 0.), (xc1 + 0.53, tank_dim[1], 0.)),
      ((xc1 + 1.03, 0., 0.), (xc1 + 1.03, tank_dim[1], 0.)),
      ((xc1 + 1.23, 0., 0.), (xc1 + 1.23, tank_dim[1], 0.))]

VG = tuple(map(tuple, VG))
fields = (('vof', ))
vof_probes = ga.LineIntegralGauges(gauges=((fields, VG), ),
                                   activeTime=(0., T),
                                   sampleRate=0.,
                                   fileName='waveProbes.csv')
Esempio n. 5
0
LG = [((3 * wave_length + opts.tube +
        opts.structureCrestLevel * opts.structure_slope, 0.5, 0.),
       (3 * wave_length + opts.tube +
        opts.structureCrestLevel * opts.structure_slope, 0.8, 0.))]

x1 = 3 * wave_length + opts.tube + opts.structureCrestLevel * opts.structure_slope

probes = np.linspace(opts.structureCrestLevel, opts.tank_height, opts.dx)

for i in probes:
    LG.append((x1, i, 0.), )

myTpFlowProblem.Parameters.Models.rans2p.auxiliaryVariables += [
    ga.LineGauges(gauges=((('u', ), LG), ),
                  activeTime=(0., Duration),
                  sampleRate=0.,
                  fileName='velocity.csv')
]

myTpFlowProblem.Parameters.Models.vof.auxiliaryVariables += [
    ga.LineGauges(gauges=(((('vof'), ), LG), ),
                  activeTime=(0., Duration),
                  sampleRate=0.,
                  fileName='vof.csv')
]

#Assemble domain
domain.MeshOptions.he = he
st.assembleDomain(domain)
myTpFlowProblem.Parameters.Models.rans2p.auxiliaryVariables += domain.auxiliaryVariables[
    'twp']
Esempio n. 6
0
                        ("gauges", True, "Collect data for validation"),
                        ("cfl", 0.2, "Desired CFL restriction"),
                        ("he", 0.5, "Max mesh element diameter"),
                        ("ARTIFICIAL_VISCOSITY", 3, "artificial viscosity")])

assert opts.ns_model == 1, "use ns_model=1 (rans3pf) for this"

# ****************** #
# ***** GAUGES ***** #
# ****************** #
if opts.gauges:
    pressure_gauges = Gauges.PointGauges(
        gauges=(
            (
                ('p', ),
                (
                    (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="pressure.csv")
    point_height_gauges = 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 = Gauges.LineGauges(