mdolab / OpenAeroStruct

OpenAeroStruct is a lightweight tool that performs aerostructural optimization using OpenMDAO.
Apache License 2.0
175 stars 112 forks source link

Fixing symmetry for right wings #380

Closed timryanb closed 2 years ago

timryanb commented 2 years ago

Purpose

This PR addresses #244. Symmetric wings can now be used with the aerodynamics solver if they lie in the right side of the symmetry plane. Prior to this, OAS only gave correct results for left wings.

Expected time until merged

a week

Type of change

Testing

This fix can be tested by taking a standard left wing model and flipping the y nodes a shown below:

# Flip left wing to lie on right of symmetry plane
mesh[:, :ny, :] = inputs[mesh_name]
mesh[:, ny+1:, :] = inputs[mesh_name][:, ::-1, :]
mesh[:, ny+1:, 1] *= -1.

The new flipped surface can be passed to the aerodynamic component and should give a consistent solution to a left wing or full wing model.

Checklist