コード例 #1
0
    'NKSubSpaceSize':400,
    'NKASMOverlap':4,
    'NKPCILUFill':4,
    'NKJacobianLag':5,
    'nkswitchtol':1e-6,
    'nkouterpreconits':3,
    'NKInnerPreConIts':3,
    'writeSurfaceSolution':False,
    'writeVolumeSolution':False,
    'frozenTurbulence':False,
    'restartADjoint':False,
    }

# Create solver
CFDSolver = ADFLOW(options=aeroOptions, comm=comm)
CFDSolver.addLiftDistribution(200, 'z')
#rst adflow (end)
# ======================================================================
#         Set up flow conditions with AeroProblem
# ======================================================================
#rst aeroproblem (beg)
ap = AeroProblem(name='fc', alpha=alpha, mach=mach, altitude=alt,
                 areaRef=1.0, chordRef=1.0, evalFuncs=['cl','cd'])
# Add angle of attack variable
ap.addDV('alpha', value=alpha, lower=0, upper=10.0, scale=1.0)
#rst aeroproblem (end)
# ======================================================================
#         Geometric Design Variable Set-up
# ======================================================================
#rst dvgeo (beg)
# Create DVGeometry object
コード例 #2
0
ファイル: aero_opt.py プロジェクト: anilyil/MACH-Aero
    # ANK Solver Parameters
    "useANKSolver": True,
    # NK Solver Parameters
    "useNKSolver": True,
    "nkswitchtol": 1e-6,
    # Termination Criteria
    "L2Convergence": 1e-10,
    "L2ConvergenceCoarse": 1e-2,
    "nCycles": 10000,
    # Adjoint Parameters
    "adjointL2Convergence": 1e-10,
}

# Create solver
CFDSolver = ADFLOW(options=aeroOptions, comm=comm)
CFDSolver.addLiftDistribution(150, "z")
CFDSolver.addSlices("z", np.linspace(0.1, 14, 10))
# rst adflow (end)
# ======================================================================
#         Set up flow conditions with AeroProblem
# ======================================================================
# rst aeroproblem (beg)
ap = AeroProblem(name="wing",
                 alpha=1.5,
                 mach=0.8,
                 altitude=10000,
                 areaRef=45.5,
                 chordRef=3.25,
                 evalFuncs=["cl", "cd"])

# Add angle of attack variable
コード例 #3
0
    # Zipper mesh option
    'debugzipper':False,
    'usezippermesh':True,
    'nrefine':10, # number of times to run IHC cycle
    'nearwalldist':0.1,
    'oversetpriority':oversetpriority
}

# Create solver
CFDSolver = ADFLOW(options=aeroOptions)

#rst end_options

# Save the lift distribution for the front wing
CFDSolver.addLiftDistribution(200, 'z', groupName='wing_front')
# Save the lift distribution for the back wing
CFDSolver.addLiftDistribution(200, 'z', groupName='wing_back')
# Save the total lift distribution
CFDSolver.addLiftDistribution(200, 'z')

#rst end_dist

ap = AeroProblem(name='fc', mach=0.3, altitude=1000, areaRef=0.64*0.24*2, alpha=3., chordRef=0.24, evalFuncs = ['cl', 'cd'])
CFDSolver(ap)

funcs = {}
CFDSolver.evalFunctions(ap, funcs)
# Print the evaluated functions
if MPI.COMM_WORLD.rank == 0:
    print(funcs)