# Wave g = np.array([0., -9.81, 0.]) nu_0 = 1.004e-6 period=opts.period wave = wt.MonochromaticWaves(period=period, waveHeight=opts.waveHeight, mwl=opts.mwl, depth=opts.mwl, g=g, waveDir=(1,0,0), waveType='Linear', fast=True) #ShapeSTL SG=st.ShapeSTL(domain,'NWT.stl') boundaryTags= SG.boundaryTags SG.regions=np.array([[-13., 2.5, 0.], [-3., 2.5, 0.], [9., 2.5, 0.]] SG.regionFlags=np.array([1, 2, 3]) dragAlpha = 5*(2*np.pi/period)/nu_0 smoothing = 3. * opts.he nd = domain.nd xTop = max(SG.vertices[:,1]) ##Relaxation Zones SG.setGenerationZones(flags=1, epsFact_solid=2., center=np.array([-13., 2.5, 0.]),
pro_wl = 0.5 g = np.array([0., 0., -9.81]) he = opts.he # ****************** # # ***** GAUGES ***** # # ****************** # # *************************** # # ***** DOMAIN AND MESH ***** # # *************************** # from proteus.mprans import SpatialTools as st domain = Domain.PiecewiseLinearComplexDomain() domain2 = Domain.PiecewiseLinearComplexDomain() SG = st.ShapeSTL(domain2, 'SG_full_2.stl') boundaries = ['gate', 'left', 'right', 'bottom', 'top', 'front', 'back'] boundaryTags = dict([(key, i + 1) for (i, key) in enumerate(boundaries)]) boundaryOrientations = { 'gate': np.array([-1., 0., 0.]), 'left': np.array([-1., 0., 0.]), 'right': np.array([+1., 0., 0.]), 'bottom': np.array([0., 0., -1.]), 'top': np.array([0., 0., +1.]), 'front': np.array([0., +1., 0.]), 'back': np.array([0., -1., 0.]), } facetFlags = SG.facetFlags.tolist()
] # instantiate context options opts = Context.Options(context_options) # ____ _ # | _ \ ___ _ __ ___ __ _(_)_ __ # | | | |/ _ \| '_ ` _ \ / _` | | '_ \ # | |_| | (_) | | | | | | (_| | | | | | # |____/ \___/|_| |_| |_|\__,_|_|_| |_| # Domain # All geometrical options go here (but not mesh options) domain = Domain.PiecewiseLinearComplexDomain() SG = st.ShapeSTL(domain, 'Blocks.stl') boundaryTags = SG.boundaryTags current = wt.SteadyCurrent(U=opts.U, mwl=opts.outlet_level, rampTime=opts.rampTime) smoothing = 3. * opts.he nd = domain.nd xTop = max(SG.vertices[:, 1]) SG.BC['Top0'].setAtmosphere(orientation=np.array([0, +1, 0])) SG.BC['Wall0'].setFreeSlip() SG.BC['Bed0'].setFreeSlip() SG.BC['Concrete0'].setFreeSlip()