コード例 #1
0
def main(wp, Nx, Ny, Nz, Lx, Lz, Re, c, th, bf):
    #====================================================================
    #### Construct an instance of the FlowFieldGeometry class
    #====================================================================
    tmp = np.zeros((3, Nx, Ny, Nz),dtype=float)
    ff = ffClass.FlowField(Nx,
                            Ny,
                            Nz,
                            Lx,
                            Lz,
                            wp,
                            c,
                            th,
                            Re,
                            bf,
                            tmp,
                            "pp")
    #================================================================
    #### Generate flow field using resolvent formulation
    #================================================================
    velocity_field = cr.resolvent_formulation(ff)
    ff.set_ff(velocity_field, "pp")
    #================================================================
    #### ---- Unstack velocity field in the wall-normal direction
    #================================================================
    ff.unstack_ff(ff.velocityField)
    #================================================================
    #### ---- Add wall boundaries
    #================================================================
    ff.add_wall_boundaries()

    u = ff.velocityField[0,:,:,:].real
    v = ff.velocityField[1,:,:,:].real
    w = ff.velocityField[2,:,:,:].real
    
    #================================================================
    # End of file
    #================================================================
    ut.print_EndMessage()
    return 0
コード例 #2
0
ff = ffClass.FlowField(args.Nx,
                        args.Ny,
                        args.Nz,
                        args.Lx,
                        args.Lz,
                        args.Wavepacket,
                        args.Wavespeed,
                        args.Theta,
                        args.Reynolds,
                        args.Baseflow,
                        tmp,
                        "pp")
#====================================================================
#### Generate flow field using resolvent formulation             ####
#====================================================================
velocity_field = cr.resolvent_formulation(ff)
ff.set_ff(velocity_field, "pp")
#====================================================================
#### ---- Unstack velocity field in the wall-normal direction    ####
#====================================================================
ff.unstack_ff(ff.velocityField)
#====================================================================
#### ---- Add wall boundaries                                    ####
#====================================================================
ff.add_wall_boundaries()
#====================================================================
#### Make the correct directory to store the flow field in       ####
#====================================================================
if args.Iteration:
    output_directory = ut.make_FlowField_output_directory_wIteration(args.Directory, ff, date, args.Iteration)
else: