示例#1
0
def call_SU2(conditions, settings, geometry):
    """ calculate total vehicle lift coefficient with SU2
    """

    half_mesh_flag = settings.half_mesh_flag
    tag = geometry.tag
    parallel = settings.parallel
    processors = settings.processors
    iters = settings.maximum_iterations

    SU2_settings = Data()
    if half_mesh_flag == False:
        SU2_settings.reference_area = geometry.reference_area
    else:
        SU2_settings.reference_area = geometry.reference_area / 2.
    SU2_settings.mach_number = conditions.aerodynamics.mach
    SU2_settings.angle_of_attack = conditions.aerodynamics.angle_of_attack / Units.deg
    SU2_settings.maximum_iterations = iters

    # Build SU2 configuration file
    write_SU2_cfg(tag, SU2_settings)

    # Run SU2
    CL, CD = call_SU2_CFD(tag, parallel, processors)

    return CL, CD
示例#2
0
def call_SU2(conditions,settings,geometry):
    """Calculates lift and drag using SU2

    Assumptions:
    None

    Source:
    N/A

    Inputs:
    conditions.
      mach_number        [-]
      angle_of_attack    [radians]
    settings.
      half_mesh_flag     <boolean> Determines if a symmetry plane is used
      parallel           <boolean>
      processors         [-]
      maximum_iterations [-]
    geometry.
      tag
      reference_area     [m^2]

    Outputs:
    CL                   [-]
    CD                   [-]

    Properties Used:
    N/A
    """

    half_mesh_flag = settings.half_mesh_flag
    tag            = geometry.tag
    parallel       = settings.parallel
    processors     = settings.processors 
    iters          = settings.maximum_iterations
    
    SU2_settings = Data()
    if half_mesh_flag == False:
        SU2_settings.reference_area  = geometry.reference_area
    else:
        SU2_settings.reference_area  = geometry.reference_area/2.
    SU2_settings.mach_number     = conditions.aerodynamics.mach
    SU2_settings.angle_of_attack = conditions.aerodynamics.angle_of_attack / Units.deg
    SU2_settings.maximum_iterations = iters
    
    # Build SU2 configuration file
    write_SU2_cfg(tag, SU2_settings)
    
    # Run SU2
    CL, CD = call_SU2_CFD(tag,parallel,processors)
        
    return CL, CD
示例#3
0
def call_SU2(conditions,settings,geometry):
    """Calculates lift and drag using SU2

    Assumptions:
    None

    Source:
    N/A

    Inputs:
    conditions.
      mach_number        [-]
      angle_of_attack    [radians]
    settings.
      half_mesh_flag     <boolean> Determines if a symmetry plane is used
      parallel           <boolean>
      processors         [-]
      maximum_iterations [-]
    geometry.
      tag
      reference_area     [m^2]

    Outputs:
    CL                   [-]
    CD                   [-]

    Properties Used:
    N/A
    """      

    half_mesh_flag = settings.half_mesh_flag
    tag            = geometry.tag
    parallel       = settings.parallel
    processors     = settings.processors 
    iters          = settings.maximum_iterations
    
    SU2_settings = Data()
    if half_mesh_flag == False:
        SU2_settings.reference_area  = geometry.reference_area
    else:
        SU2_settings.reference_area  = geometry.reference_area/2.
    SU2_settings.mach_number     = conditions.aerodynamics.mach
    SU2_settings.angle_of_attack = conditions.aerodynamics.angle_of_attack / Units.deg
    SU2_settings.maximum_iterations = iters
    
    # Build SU2 configuration file
    write_SU2_cfg(tag, SU2_settings)
    
    # Run SU2
    CL, CD = call_SU2_CFD(tag,parallel,processors)
        
    return CL, CD