mdolab / mdolab/OpenAeroStruct
It seems there's a mistake in <class StructureWeightLoads> if I'm right
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 281
- Forks
- 135
- PR merge metrics
- No merged PRs in 30d
Description
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 "-"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search for the StructureWeightLoads class and inspect its compute method, especially the delta slices and bm4 load updates shown in the report. Reproduce the sign calculation for a sweepback wing and confirm the expected element loads before deciding whether the del0 direction is incorrect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100