cape.attdb.dbfm: Aerodynamics force & moment datakits

This module provides customizations of cape.attdb.rdb that are especially useful for launch vehicle force & moment databases. The force & moment coefficient names follow common missile naming conventions:

Name

Symbol

Description

CA

\(C_A\)

Axial force

CY

\(C_Y\)

Side force

CN

\(C_N\)

Normal force

CLL

\(C_\ell\)

Rolling moment

CLM

\(C_m\)

Pitching moment

CLN

\(C_n\)

Yawing moment

class cape.attdb.dbfm.DBFM(fname=None, **kw)

Database class for launch vehicle force & moment

Call:
>>> db = dbfm.DBFM(fname=None, **kw)
Inputs:
fname: {None} | str

File name; extension is used to guess data format

csv: {None} | str

Explicit file name for CSVFile read

textdata: {None} | str

Explicit file name for TextDataFile

simplecsv: {None} | str

Explicit file name for CSVSimple

xls: {None} | str

File name for XLSFile

mat: {None} | str

File name for MATFile

Outputs:
db: cape.attdb.dbfm.DBFM

LV force & moment database

Versions:
  • 2020-03-20 @ddalle: First version

__init__(fname=None, **kw)

Initialization method

Versions:
  • 2020-03-20 @ddalle: First version

  • 2020-05-08 @ddalle: Split _make_dbfm()

create_fm_combo(comps, comp=None, **kw)

Calculate and save combined F & M on several components

Call:
>>> fm = db.create_fm_combo(comps, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with analysis tools

comps: list[str]

List of components to combine

comp: {None} | str

Optional name of output assembled component

Lref: {1.0} | float

Reference length

xMRP: {0.0} | float

Moment reference point x-coordinate

yMRP: {0.0} | float

Moment reference point y-coordinate

zMRP: {0.0} | float

Moment reference point z-coordinate

CompFMCols: dict[dict]

Names for CA, CY, etc. for each comp (defaults to "<comp>.CA", etc.)

CompX: dict[float]

Force application point for each comp

CompY: dict[float]

Force application point for each comp

Compz: dict[float]

Force application point for each comp

FMCols: dict[str]

Names of force & moment columns for output

mask: {None} | np.ndarray

Mask or indices of which cases to include in POD calculation

method: {"trapz"} | "left" | callable

Integration method used to integrate columns

Outputs:
fm: dict[np.ndarray]

Integrated force/moment for each coefficient

fm[coeff]: np.ndarray

Combined coeff for each coeff

Versions:
  • 2020-06-19 @ddalle: First version

create_target_deltafm(db2, **kw)

Evaluate a target force and moment database

Call:
>>> dfm = db.create_target_fm(db2, mask, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with force & moment responses

db2: cape.attdb.dbfm.DBFM

Database with force & moment responses

mask: {None} | np.ndarray

Mask of bool or indices of which cases in db to evaluate; conditions in db used to evaluate db2

DeltaCols: {{}} | dict[str]

Names of columns to save deltas as; default takes form of "CA.delta", etc.

SourceCols: {{}} | dict[str]

Columns in db to compare to target

TargetCols: {{}} | dict[str]

Name of db2 col for CA, CY, …, CLN

Translators: {{}} | dict[str]

Alternate names of response arg columns; e.g. if Translators["MACH"] == "mach", that means db2["MACH"] is analogous to db["mach"]

Outputs:
dfm: dict[np.ndarray]

Differences between evaluated TargetCols in db2 minus SourceCols looked up from db

Versions:
  • 2020-06-16 @ddalle: First version

create_target_fm(db2, mask=None, **kw)

Evaluate and save a target force and moment database

Call:
>>> fm = db.create_target_fm(db2, mask, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with force & moment responses

db2: cape.attdb.dbfm.DBFM

Database with force & moment responses

mask: {None} | np.ndarray

Mask of bool or indices of which cases in db to evaluate; conditions in db used to evaluate db2

TargetCols: {{}} | dict[str]

Name of db2 col for CA, CY, …, CLN

TargetSaveCols: {{}} | dict[str]

Names to use when saving evaluated forces; default is "CA.target", etc.

Translators: {{}} | dict[str]

Alternate names of response arg columns; e.g. if Translators["MACH"] == "mach", that means db2["MACH"] is analogous to db["mach"]

Outputs:
fm: dict[np.ndarray]

Evaluated force & moment coefficients from db2 at conditions described by db and I

Versions:
  • 2020-06-15 @ddalle: First version

genr8_fm_combo(comps, **kw)

Calculate combined force & moment on several components

Call:
>>> fm = db.genr8_fm_combo(comps, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with analysis tools

comps: list[str]

List of components to combine

Lref: {1.0} | float

Reference length

xMRP: {0.0} | float

Moment reference point x-coordinate

yMRP: {0.0} | float

Moment reference point y-coordinate

zMRP: {0.0} | float

Moment reference point z-coordinate

CompFMCols: dict[dict]

Names for CA, CY, etc. for each comp (defaults to "<comp>.CA", etc.)

CompX: dict[float]

Force application point for each comp

CompY: dict[float]

Force application point for each comp

Compz: dict[float]

Force application point for each comp

mask: {None} | np.ndarray

Mask or indices of which cases to include in POD calculation

method: {"trapz"} | "left" | callable

Integration method used to integrate columns

Outputs:
fm: dict[np.ndarray]

Integrated force/moment for each coefficient

fm[coeff]: np.ndarray

Combined coeff for each coeff

Versions:
  • 2020-06-19 @ddalle: First version

genr8_target_deltafm(db2, **kw)

Evaluate a target force and moment database

Call:
>>> dfm = db.genr8_target_fm(db2, mask, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with force & moment responses

db2: cape.attdb.dbfm.DBFM

Database with force & moment responses

mask: {None} | np.ndarray

Mask of bool or indices of which cases in db to evaluate; conditions in db used to evaluate db2

SourceCols: {{}} | dict[str]

Columns in db to compare to target

TargetCols: {{}} | dict[str]

Name of db2 col for CA, CY, …, CLN

Translators: {{}} | dict[str]

Alternate names of response arg columns; e.g. if Translators["MACH"] == "mach", that means db2["MACH"] is analogous to db["mach"]

Outputs:
dfm: dict[np.ndarray]

Differences between evaluated TargetCols in db2 minus SourceCols looked up from db

Versions:
  • 2020-06-16 @ddalle: First version

genr8_target_fm(db2, mask=None, **kw)

Evaluate a target force and moment database

Call:
>>> fm = db.genr8_target_fm(db2, mask, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with force & moment responses

db2: cape.attdb.dbfm.DBFM

Database with force & moment responses

mask: {None} | np.ndarray

Mask of bool or indices of which cases in db to evaluate; conditions in db used to evaluate db2

TargetCols: {{}} | dict[str]

Name of db2 col for CA, CY, …, CLN

Translators: {{}} | dict[str]

Alternate names of response arg columns; e.g. if Translators["MACH"] == "mach", that means db2["MACH"] is analogous to db["mach"]

Outputs:
fm: dict[np.ndarray]

Evaluated force & moment coefficients from db2 at conditions described by db and I

Versions:
  • 2020-06-15 @ddalle: First version

make_CLMX()

Build and save evaluators for CLMX cols

Call:
>>> db.make_CLMX()
Inputs:
db: cape.attdb.dbfm.DBFM

LV force & moment database

Versions:
  • 2020-03-26 @ddalle: First version

make_CLNX()

Build and save evaluators for CLNX cols

Call:
>>> db.make_CLNX()
Inputs:
db: cape.attdb.dbfm.DBFM

LV force & moment database

Versions:
  • 2020-03-26 @ddalle: First version

make_UCLMX()

Build and save evaluators for UCLMX cols

Call:
>>> db.make_UCLMX()
Inputs:
db: cape.attdb.dbfm.DBFM

LV force & moment database

Versions:
  • 2020-05-04 @ddalle: First version

make_UCLNX()

Build and save evaluators for UCLNX cols

Call:
>>> db.make_UCLNX()
Inputs:
db: cape.attdb.dbfm.DBFM

LV force & moment database

Versions:
  • 2020-05-04 @ddalle: First version

make_fm_combo(comps, comp=None, **kw)

Get [and calculate] combined F & M on several components

Call:
>>> fm = db.make_fm_combo(comps, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with analysis tools

comps: list[str]

List of components to combine

comp: {None} | str

Optional name of output assembled component

Lref: {1.0} | float

Reference length

xMRP: {0.0} | float

Moment reference point x-coordinate

yMRP: {0.0} | float

Moment reference point y-coordinate

zMRP: {0.0} | float

Moment reference point z-coordinate

CompFMCols: dict[dict]

Names for CA, CY, etc. for each comp (defaults to "<comp>.CA", etc.)

CompX: dict[float]

Force application point for each comp

CompY: dict[float]

Force application point for each comp

Compz: dict[float]

Force application point for each comp

FMCols: dict[str]

Names of force & moment columns for output

mask: {None} | np.ndarray

Mask or indices of which cases to include in POD calculation

method: {"trapz"} | "left" | callable

Integration method used to integrate columns

Outputs:
fm: dict[np.ndarray]

Integrated force/moment for each coefficient

fm[coeff]: np.ndarray

Combined coeff for each coeff

Versions:
  • 2020-06-19 @ddalle: First version

make_target_deltafm(db2, **kw)

Evaluate a target force and moment database

Call:
>>> dfm = db.make_target_fm(db2, mask, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with force & moment responses

db2: cape.attdb.dbfm.DBFM

Database with force & moment responses

mask: {None} | np.ndarray

Mask of bool or indices of which cases in db to evaluate; conditions in db used to evaluate db2

DeltaCols: {{}} | dict[str]

Names of columns to save deltas as; default takes form of "CA.delta", etc.

SourceCols: {{}} | dict[str]

Columns in db to compare to target

TargetCols: {{}} | dict[str]

Name of db2 col for CA, CY, …, CLN

Translators: {{}} | dict[str]

Alternate names of response arg columns; e.g. if Translators["MACH"] == "mach", that means db2["MACH"] is analogous to db["mach"]

Outputs:
dfm: dict[np.ndarray]

Differences between evaluated TargetCols in db2 minus SourceCols looked up from db

Versions:
  • 2020-06-16 @ddalle: First version

make_target_fm(db2, mask=None, **kw)

Evaluate and save a target force and moment database

Call:
>>> fm = db.make_target_fm(db2, mask, **kw)
Inputs:
db: cape.attdb.dbfm.DBFM

Database with force & moment responses

db2: cape.attdb.dbfm.DBFM

Database with force & moment responses

mask: {None} | np.ndarray

Mask of bool or indices of which cases in db to evaluate; conditions in db used to evaluate db2

TargetCols: {{}} | dict[str]

Name of db2 col for CA, CY, …, CLN

TargetSaveCols: {{}} | dict[str]

Names to use when saving evaluated forces; default is "CA.target", etc.

Translators: {{}} | dict[str]

Alternate names of response arg columns; e.g. if Translators["MACH"] == "mach", that means db2["MACH"] is analogous to db["mach"]

Outputs:
fm: dict[np.ndarray]

Evaluated force & moment coefficients from db2 at conditions described by db and I

Versions:
  • 2020-06-15 @ddalle: First version