Example #1
0
    def __init__(self, inputs, nodes, elements, Cp):
        Model.__init__(self)
        self.centroids = {}
        self.areas = {}
        self.normals = {}

        #Bref = 623.179569341
        #Cref = 623.179569341
        #Lref = 623.179569341
        #Sref = 1582876.10613
        #Xref = 268.217444245

        self.Mach = inputs['Mach']
        self.pInf = inputs['pInf']
        self.qInf = inputs['qInf']
        self.Sref = inputs['Sref']
        self.Lref = inputs['Lref']
        self.xref = inputs['xref']
        self.force_scale = inputs['force_scale']  # 1 for lb -> lb
        self.moment_scale = inputs['moment_scale']  # 1/12 for in-lb to ft-lb

        self._nnodes = len(nodes)
        self._nelements = len(elements)
        self.nodes = nodes
        self.elements = elements
        Cp = self.prepare_Cps(Cp)  # convert nodal Cp to centroidal Cp

        self.prepare_centroid_area_normals()
        self.get_moments(Cp)  # centroidal Cp
Example #2
0
    def __init__(self, inputs, nodes, elements, Cp):
        Model.__init__(self)
        self.centroids = {}
        self.areas = {}
        self.normals = {}

        #Bref = 623.179569341
        #Cref = 623.179569341
        #Lref = 623.179569341
        #Sref = 1582876.10613
        #Xref = 268.217444245

        self.Mach = inputs['Mach']
        self.pInf = inputs['pInf']
        self.qInf = inputs['qInf']
        self.Sref = inputs['Sref']
        self.Lref = inputs['Lref']
        self.xref = inputs['xref']
        self.force_scale = inputs['force_scale'] # 1 for lb -> lb
        self.moment_scale = inputs['moment_scale']  # 1/12 for in-lb to ft-lb

        self._nnodes = len(nodes)
        self._nelements = len(elements)
        self.nodes = nodes
        self.elements = elements
        Cp = self.prepare_Cps(Cp)  # convert nodal Cp to centroidal Cp

        self.prepare_centroid_area_normals()
        self.get_moments(Cp) # centroidal Cp
Example #3
0
    def __init__(self, fem, pids, debug=False):
        Model.__init__(self)

        self.log = get_logger(None, 'debug' if debug else 'info')

        self.debug = debug
        if self.debug:
            print("*StructuralModel.init")
        self.fem = fem
        #nodes = fem.getNodes()
        #elements = fem.getElements()
        node_ids = fem.node_ids
        element_ids = fem.element_ids

        self.nnodes = len(node_ids)
        self.nelements = len(element_ids)
        self.pids = pids
        #self.points   = points
        #self.elements = elements
        if self.debug:
            self.log.debug("***StructuralModel.init")
Example #4
0
    def __init__(self, fem, pids, debug=False):
        Model.__init__(self)

        self.log = get_logger(None, 'debug' if debug else 'info')

        self.debug = debug
        if self.debug:
            print("*StructuralModel.init")
        self.fem = fem
        #nodes = fem.getNodes()
        #elements = fem.getElements()
        nodeIDs = fem.node_ids
        elementIDs = fem.elementIDs()

        self.nNodes = len(nodeIDs)
        self.nElements = len(elementIDs)
        self.pids = pids
        #self.points   = points
        #self.elements = elements
        if self.debug:
            self.log.debug("***StructuralModel.init")
Example #5
0
    def __init__(self, inputs, nodes, elements, Cp):
        Model.__init__(self)

        #Bref = 623.179569341
        #Cref = 623.179569341
        #Lref = 623.179569341
        #Sref = 1582876.10613
        #Xref = 268.217444245

        self.Mach = inputs['Mach']
        self.pInf = inputs['pInf']
        self.qInf = inputs['qInf']
        self.Sref = inputs['Sref']
        self.Lref = inputs['Lref']
        self.xref = inputs['xref']

        self._nNodes = len(nodes)
        self._nElements = len(elements)
        self.nodes = nodes
        self.elements = elements
        Cp = self.prepare_Cps(Cp)  # convert nodal Cp to centroidal Cp

        self.prepare_centroid_area_normals()
        self.get_moments(Cp) # centroidal Cp