Skip to content

It seems there's a mistake in <class StructureWeightLoads> if I'm right #358

@Iamkiller233

Description

@Iamkiller233

The original code is :
def compute(self, inputs, outputs):

  struct_weights = inputs['element_mass'] * inputs['load_factor'] * grav_constant
  nodes = inputs['nodes']

  element_lengths = norm(nodes[1:, :] - nodes[:-1, :], axis=1)
  outputs['element_lengths'] = element_lengths

  # And we also need the deltas between consecutive nodes
  deltas = nodes[1:, :] - nodes[:-1, :]
  # save these slices cause I use them a lot
  del0 = deltas[: , 0]
  del1 = deltas[: , 1]
  .......
  bm4 = z_moments_for_each * del0 / element_lengths
  loads[:-1, 4] += -bm4
  loads[1:, 4] += bm4

But I think that it should be: del0 = -deltas[: , 0]
Because deltas[: , 0] is negative for a sweepback wing, it should be added with "-"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions