Skip to main content
Version: 0.2.0

OasDiscipline

from philote_examples import OasDiscipline

Philote discipline wrapping an OpenAeroStruct VLM aerodynamic analysis. Accepts flight conditions as inputs and returns aerodynamic coefficients. The wing geometry (mesh and surface properties) is fixed at construction time.

Inherits from: philote_mdo.openmdao.OpenMdaoSubProblem

Constructor

OasDiscipline(mesh_dict=None, surface_options=None)

Parameters

NameTypeDefaultDescription
mesh_dictdict or NoneSee belowDictionary passed to openaerostruct.geometry.utils.generate_mesh
surface_optionsdict or NoneNoneExtra entries merged into the OAS surface dictionary

Default mesh configuration

When mesh_dict is None, the following default is used:

{
"num_y": 7,
"num_x": 2,
"wing_type": "rect",
"symmetry": True,
"span": 10.0,
"root_chord": 1.0,
}

Default surface properties

PropertyDefaultDescription
name"wing"Surface name
symmetryFrom mesh_dictUse half-model with symmetry
S_ref_type"wetted"Reference area type
fem_model_type"tube"FEM model type
CL00.0Baseline lift coefficient
CD00.0Baseline drag coefficient
k_lam0.05Fraction of chord with laminar flow
t_over_c_cp[0.15]Thickness-to-chord ratio control points
c_max_t0.303Chordwise location of max thickness
with_viscousFalseEnable viscous drag estimation
with_waveFalseEnable wave drag estimation

Methods

initialize()

No-op. Required by the base class interface.

set_options(options)

No-op. This discipline has no client-configurable options.

_build_discipline()

Internal method called by the constructor. Performs all setup:

  1. Generates the mesh using openaerostruct.geometry.utils.generate_mesh.
  2. Builds the surface dictionary with default properties merged with surface_options.
  3. Creates the OpenMDAO Group (OasAeroGroup) and adds it via self.add_group().
  4. Maps inputs from the Philote interface to the internal problem.
  5. Maps outputs from the internal problem to the Philote interface.

Mapped Inputs

Philote NameOpenMDAO PathShapeUnits
vv(1,)m/s
alphaalpha(1,)deg
Mach_numberMach_number(1,)--
rere(1,)1/m
rhorho(1,)kg/m^3
cgcg(3,)m

Mapped Outputs

Philote NameOpenMDAO PathShapeUnits
CLaero_point_0.wing_perf.CL(1,)--
CDaero_point_0.wing_perf.CD(1,)--
CMaero_point_0.CM(3,)--

OasAeroGroup

from philote_examples.oas.oas_discipline import OasAeroGroup

OpenMDAO Group containing OAS Geometry + AeroPoint for one lifting surface. An IndepVarComp exposes six flow-condition variables at the group level. Explicit connections route them to AeroPoint and wire the mesh and thickness-to-chord ratio from Geometry.

Inherits from: openmdao.api.Group

Constructor

OasAeroGroup(surface=surface_dict)

The surface dictionary is passed via OpenMDAO options.

Options

NameTypeDescription
surfacedictOAS surface dictionary (must include "name", "mesh", etc.)

Internal Components

SubsystemClassDescription
flow_varsIndepVarCompExposes v, alpha, Mach_number, re, rho, cg
{surface_name}GeometryApplies twist/chord/shear to the baseline mesh
aero_point_0AeroPointVLM solver for a single flight condition

Internal Connections

  • {name}.mesh -> aero_point_0.{name}.def_mesh
  • {name}.mesh -> aero_point_0.aero_states.{name}_def_mesh
  • {name}.t_over_c -> aero_point_0.{name}_perf.t_over_c
  • Flow variables (v, alpha, etc.) -> aero_point_0.{var}

Example

from philote_examples import OasDiscipline
from philote_mdo.general import run_server

# Default rectangular wing
discipline = OasDiscipline()
run_server(discipline, port=50051)

# CRM wing with viscous drag
discipline = OasDiscipline(
mesh_dict={
"num_y": 13,
"num_x": 3,
"wing_type": "CRM",
"symmetry": True,
"num_twist_cp": 5,
},
surface_options={
"with_viscous": True,
"CD0": 0.015,
},
)
run_server(discipline, port=50051)