示例#1
0
def make_span_break(cs_ID, LE_TE, ib_ob, span_frac, chord_cut, Airfoil,
                    dihedral_ob, sweep_ob_QC, sweep_ob_LE, twist, local_chord,
                    x_offset, dih_offset):
    """ This gathers information related to a span break into one Data() object.
    A span break is the spanwise location of a discontinuity in the discretization
    of the panels. These can be caused by segments and by the inboard and outboard 
    edges of a control surface. The inboard and outboard sides of a span break can
    have different chords due to cuts made by control surfaces. Ultimately, the
    attributes of the span_breaks of the wing will provide the discretization function 
    generate_wing_vortex_distribution() with the necessary values to make VLM panels
    as well as reshape those panels to make the control surface cuts dipicted below.
    
    A diagram is given below:


                                            nominal local chord
    fuselage                inboard LE  |           |           .  outboard LE
    <---                                |           |           . 
                                        |           |           .
                                        |           |           .   <-- cut from a slat
                                        |           |           |
                                        |           |           |
                                        |           |           |
                                        |           |           |
                                        |           |           |
                                        |           |           |
                                        |           |           |
                                        |           |           .   <-- cut from a non-slat control surface with a different chord 
cut from a non-slat control surface     |           |           .       fraction than the control surface on the inboard side
                                  -->   .           |           .
                                        .           |           .
                            inboard TE  .           |           .  outboard TE
                                        
                                        
                                        
                                        |_______________________|
                                                    |
                                            there is 0 spanwise 
                                            distance between inboard 
                                            and outboard sides

    Outputs:
    span_break
    
    Properties Used:
    N/A
    """     
    span_break = Data()
    span_break.cs_IDs               = np.array([[-1,-1],  #  [[inboard LE cs, outboard LE cs],
                                                [-1,-1]]) #   [inboard TE cs, outboard TE cs]]
    span_break.cs_IDs[LE_TE,ib_ob]  = cs_ID
    span_break.span_fraction        = span_frac
    # The following 'cut' attributes are in terms of the local total chord and represent positions. 
    #    (an aileron with chord fraction 0.2 would have a cut value of 0.8)
    # For inboard_cut, -1 takes value of previous outboard cut value in a later function
    # For outboard_cut, -1 takes value of next inboard cut value.
    # If no break directly touching this one, cut becomes 0 (LE) or 1 (TE).
    span_break.cuts                 = np.array([[0.,0.],   #  [[inboard LE cut, outboard LE cut],
                                                [1.,1.]])  #   [inboard TE cut, outboard TE cut]]
    span_break.cuts[LE_TE,ib_ob]    = chord_cut
    span_break.Airfoil              = Airfoil
    span_break.dihedral_outboard    = dihedral_ob
    span_break.sweep_outboard_QC    = sweep_ob_QC
    span_break.sweep_outboard_LE    = sweep_ob_LE
    span_break.twist                = twist
    span_break.local_chord          = local_chord #this is the local chord BEFORE cuts are made
    span_break.x_offset             = x_offset
    span_break.dih_offset           = dih_offset  #dih_offset is the y or z accumulated offset from dihedral
    span_break.tag                  = make_span_break_tag(span_break)
    return span_break