Spacecraft Control Framework 1.0
Spacecraft Control Library
Classes | Functions
sc_propulsion.h File Reference

Propulsion modeling functions. More...

Go to the source code of this file.

Classes

struct  aero_info
 Aerodynamic information. More...
 

Functions

double thruster_power (double thrust, double u_e, double eff)
 General power required by a thruster. More...
 
double boron_proton_thruster_exhaust_velocity (double n_protons)
 Boron-proton exhaust velocity. More...
 
double BloDown (double mPress, double rhoFuel, double vTank, double rPress, double T, double mFuel)
 Blow down pressurized fuel system model. More...
 
ml_matrix EngineDataFromTable (ml_matrix thrustTable, ml_matrix sFC_Table, ml_matrix mach_no, ml_matrix altitude, double m, double h)
 Extracts engine data from a table. Outputs thrust and specific fuel consumption. More...
 
double area_ratio_from_mach (double M, double gamma)
 Computes area ratio to mach number. More...
 
double isentropic_expansion (double M, double gamma)
 Computes the isentropic expansion of a gas. More...
 
double ue_qr (double qR, double gamma, double p0, double pE)
 Exhaust velocity from heating value. More...
 
double qr_hydrogen (void)
 Heating value of hydrogen. More...
 
double mach_from_area_ratio (double aR, double gamma)
 Mach number from area ratio. More...
 
ml_matrix RocketH2 (double p0, double pA, double aStar, double aE, double f)
 Thrust and exhaust velocity of an H2/O2 rocket. More...
 
double rhs_mach_from_area_ratio (double M, void *context)
 Right hand side of the minimization algorithm for mach from area ratio. More...
 
ml_matrix solid_rocket_inertia (double mDot, double a, double b, double rho, double h)
 Solid rocket model. More...
 
double FindH (double r, double d, double tol, int nMax)
 Bisection routine to find the height of a fluid in a sphere. More...
 
double TankHeight (double r, double vF)
 Find the height of a fluid in a sphere. More...
 

Detailed Description

Propulsion modeling functions.

Function Documentation

◆ thruster_power()

double thruster_power ( double  thrust,
double  u_e,
double  eff 
)

General power required by a thruster.

General power required by a thruster.

Parameters
thrustThrust (N)
u_eExhaust velocity (m/s)
effThruster efficiency
Returns
power Power (W)

◆ boron_proton_thruster_exhaust_velocity()

double boron_proton_thruster_exhaust_velocity ( double  n_protons)

Boron-proton exhaust velocity.

Boron-proton exhaust velocity.

Parameters
n_protonsNumber of protons
Returns
Exhaust velocity (m/s)

◆ BloDown()

double BloDown ( double  mPress,
double  rhoFuel,
double  vTank,
double  rPress,
double  T,
double  mFuel 
)

Blow down pressurized fuel system model.

Blow down pressurized fuel system model.

Parameters
mPressMass of pressurization gas
rhoFuelFuel density
vTankTank volume
rPressGas constant of pressurant
TTemperature
mFuelMass of fueld
Returns
Pressure

◆ EngineDataFromTable()

ml_matrix EngineDataFromTable ( ml_matrix  thrust_Table,
ml_matrix  sFC_Table,
ml_matrix  mach_no,
ml_matrix  altitude,
double  m,
double  h 
)

Extracts engine data from a table. Outputs thrust and specific fuel consumption.

Compute the difference between successive elements of a 1-dimensional matrix
\param  thrust_Table    2-dimensional matrix, size n, m
\param  sFC_Table       2-dimensional matrix, size n, m
\param  mach_no         1-dimensional matrix, size 1, m
\param  altitude        2-dimensional matrix, size 1,n
Parameters
mMach number to compute
hAltitude
Returns
b 1-dimensional matrix, [thrust;sFC]

References interp_2d().

◆ area_ratio_from_mach()

double area_ratio_from_mach ( double  M,
double  gamma 
)

Computes area ratio to mach number.

Computes area ratio to mach number.

Parameters
MMach number.
gammaRatio of specific heats.
Returns
Area ratio.

Referenced by rhs_mach_from_area_ratio().

◆ isentropic_expansion()

double isentropic_expansion ( double  M,
double  gamma 
)

Computes the isentropic expansion of a gas.

Computes the isentropic expansion of a gas.

Parameters
MMach number.
gammaRatio of specific heats.
Returns
Expansion ratio.

Referenced by RocketH2().

◆ ue_qr()

double ue_qr ( double  qR,
double  gamma,
double  p0,
double  pE 
)

Exhaust velocity from heating value.

Exhaust velocity from heating value.

Parameters
qRHeating value (J/kg)
gammaRatio of specific heats.
p0Combustion chamber pressure (N/m^2).
pEExhaust pressure (N/m^2).
Returns
exhaust velocity.

Referenced by RocketH2().

◆ qr_hydrogen()

double qr_hydrogen ( void  )

Heating value of hydrogen.

Returns
heating value (J/kg).

Referenced by RocketH2().

◆ mach_from_area_ratio()

double mach_from_area_ratio ( double  aR,
double  gamma 
)

Mach number from area ratio.

Mach number from area ratio.

Parameters
aRArea ratio.
gammaRatio of specific heats.
Returns
Mach number.

References aero_info::aR, aero_info::gamma, rhs_mach_from_area_ratio(), and secant().

Referenced by RocketH2().

◆ RocketH2()

ml_matrix RocketH2 ( double  p0,
double  pA,
double  aStar,
double  aE,
double  f 
)

Thrust and exhaust velocity of an H2/O2 rocket.

Thrust and exhaust velocity of an H2/O2 rocket.

Parameters
p0Combustion pressure (N/m^2).
pAAmbient pressure (N/m^2).
aStarThroat area (m^2).
aEExit area (m^2).
fMixture ratio H2/O2.
Returns
[thrust (N);exhaust velocity (m/s)].

References isentropic_expansion(), mach_from_area_ratio(), qr_hydrogen(), and ue_qr().

◆ rhs_mach_from_area_ratio()

double rhs_mach_from_area_ratio ( double  M,
void *  context 
)

Right hand side of the minimization algorithm for mach from area ratio.

Right hand side of the minimization algorithm for mach from area ratio.

Parameters
MMach number.
*contextPointer to data structure. Needs to contain the ratio of specific heats
Returns
error.

References aero_info::aR, area_ratio_from_mach(), and aero_info::gamma.

Referenced by mach_from_area_ratio().

◆ solid_rocket_inertia()

ml_matrix solid_rocket_inertia ( double  mDot,
double  a,
double  b,
double  rho,
double  h 
)

Solid rocket model.

Solid rocket model.

Assumes a cylindrical solid rocket with a cylindrical burn surface.

Parameters
mDotMass flow (kg/s).
aOutside radius (m).
bInside radius (m).
rhoFuel density (kg/m^3).
hFuel height (m).
Returns
[Ixx IDotxx; Iyy IDotyy; Izz IDotzz].

References PI.

◆ FindH()

double FindH ( double  r,
double  d,
double  tol,
int  nMax 
)

Bisection routine to find the height of a fluid in a sphere.

Bisection routine to find the height of a fluid in a sphere.

Parameters
rSphere radius
d3*volume fuel/pi
tolSolution tolerance
nMaxMaximum number of iterations
Returns
h Fuel height

Referenced by TankHeight().

◆ TankHeight()

double TankHeight ( double  r,
double  vF 
)

Find the height of a fluid in a sphere.

Find the height of a fluid in a sphere.

Parameters
rSphere radius
vFVolume of fuel
Returns
h Fuel height

References FindH(), and PI.