Initial commit of "Rocket Workbench".

Taken from sources in CVS at:
    https://sourceforge.net/projects/rocketworkbench/

Sources extracted in two steps:
1. Pull entire project tree into a subdir "rwb" via "rsync":
    rsync -a a.cvs.sourceforge.net::cvsroot/rocketworkbench/ rwb/.
2. Export sources:
    export CVSROOT=$(pwd)/rwb
    SUBDIRS="analyser cpropep cpropep-web CVSROOT data libcompat libcpropep libnum libsimulation libthermo prop rocketworkbench rockflight"
    mkdir rwbx; cd rwbx
    cvs export -D now ${SUBDIRS}

After this (and some backups for safety), the directory content was
added to a Git repo:
    git init .
    git add *
This commit is contained in:
R. J. Dev. Kwan
2021-01-20 15:50:36 -08:00
commit eb05416991
411 changed files with 362300 additions and 0 deletions
@@ -0,0 +1,29 @@
WGS-84 modeling constants:
Semi-major axis
a = 6378137.0 m
Semi-minor axis
b = 6356732.3142 m = a/(1-f)
Flattening of ellipsoid
f = 1.0/298.2572235630
Eccentricity of ellipsoid
e = 0.081819191 = (2f-f^2)^0.5
2nd zonal harmonic coeff. of gravitational potential
C2,0 = - 484.16685 x 10^-6
Earth's gravitational const. (with mass of atmosphere)
GM = 0.3986004418 x 10^15 m3/s2
Earth's angular velocity at equator
omega = 7292115 x 10^-11 radians/sec
Centimeter accuracy correction to this model:
http://www.nima.mil/GandG/wgs-84/egm96.html
File diff suppressed because one or more lines are too long
@@ -0,0 +1,56 @@
simulation =
(initial_conditions = (u = 0.0,
v = 0.0,
w = 0.0,
P = 0.0,
Q = 0.0,
R = 0.0,
latitude = 0.0,
longitude = 0.0,
altitude = 0.0,
phi = 0.0,
theta = 89.0,
psi = 0.0
),
rocket = (stage = (dry_mass = 1000., # (Head)
Ix = 4390.,
Iy = 318245.,
Iz = 318245.,
Cd = 0.15,
Cd_data_file = "V2drag.dat",
CL = 0.1,
CB = 0.1,
Cspin = 20.0,
Cmoment = 6.32,
Cdamping = 31.6,
Diameter = 1.65,
# this is the total duration during which the
# stage is active, i.e. from the time the previous
# stage were drop until this stage is drop.
active_time = 1000.0,
engine = (thrust = 250000.0,
thrust_data_file = "V2thrust.dat",
propellant_mass = 8935.,
dry_mass = 2965.,
mass_flow = 0.1,
start_time = 0.0,
burn_time = 65.,
drop_time = 65.0,
position = (x = -1.0,
y = 0.0,
z = 0.0),
direction = (x = 1.0,
y = 0.0,
z = 0.0)
)
)
)
,solution = (duration = 100.0,
dt = 0.1,
precision = 0.01)
)
@@ -0,0 +1,10 @@
MACH
0.00 0.15
0.60 0.15
0.85 0.20
1.15 0.42
1.60 0.30
1.90 0.25
3.65 0.18
5.00 0.15
5.60 0.15
@@ -0,0 +1,12 @@
ALT
0 247619
1393 253548
2003 257997
4354 266893
6096 272823
8534 278757
10973 283699
13585 287653
15449 289134
19158 291109
29608 292101
@@ -0,0 +1,116 @@
simulation =
(initial_conditions = (u = 400.0,
v = 0.0,
w = 0.0,
P = 0.0,
Q = 0.0,
R = 0.0,
latitude = 0.0,
longitude = 0.0,
altitude = 1000.0,
phi = 0.0,
theta = 90.0,
psi = 0.0
),
rocket = (stage = (dry_mass = 10.0,
Ix = 0.0025,
Iy = 0.84,
Iz = 0.84,
Cdrag = 0.2,
Clift = 2.3,
Cbeta = 2.3,
Cspin = 20.0,
Cmoment = 6.32,
Cdamping = 31.6,
Diameter = 0.1143,
# this is the total duration during which the
# stage is active, i.e. from the time the previous
# stage were drop until this stage is drop.
active_time = 100.0,
engine = (type = "constant_thrust",
propellant_mass = 2.0,
dry_mass = 1.0,
thrust = 1000.0,
mass_flow = 2.0,
start_time = 0.0,
burn_time = 100.0,
drop_time = 100.0,
position = (x = -1.0,
y = 0.0,
z = 0.0),
direction = (x = 1.0,
y = 0.0,
z = 0.0)
),
engine = (type = "thrust_table_data",
propellant_mass = 2.0,
dry_mass = 1.0,
thrust_data_file = "thrust.dat",
c = 2500.0, #effective exhaust velocity
start_time = 0.0,
burn_time = 100.0,
drop_time = 100.0,
position = (x = -1.0,
y = 0.0,
z = 0.0),
direction = (x = 1.0,
y = 0.0,
z = 0.0)
)
),
stage = (dry_mass = 10.0,
Ix = 0.0025,
Iy = 0.84,
Iz = 0.84,
Cdrag = 0.2,
Clift = 2.3,
Cbeta = 2.3,
Cspin = 20.0,
Cmoment = 6.32,
Cdamping = 31.6,
Diameter = 0.1143,
# this is the total duration during which the
# stage is active, i.e. from the time the previous
# stage were drop until this stage is drop.
active_time = 100.0,
engine = (type = "constant_thrust",
propellant_mass = 2.0,
dry_mass = 1.0,
thrust = 1000.0,
mass_flow = 2.0,
start_time = 0.0,
burn_time = 100.0,
drop_time = 100.0,
position = (x = -1.0,
y = 0.0,
z = 0.0),
direction = (x = 1.0,
y = 0.0,
z = 0.0)
),
engine = (type = "thrust_table_data",
propellant_mass = 2.0,
dry_mass = 1.0,
thrust_data_file = "thrust.dat",
c = 2500.0, #effective exhaust velocity
start_time = 0.0,
burn_time = 100.0,
drop_time = 100.0,
position = (x = -1.0,
y = 0.0,
z = 0.0),
direction = (x = 1.0,
y = 0.0,
z = 0.0)
)
)
)
,solution = (duration = 50.0,
dt = 0.01,
precision = 0.01)
)
@@ -0,0 +1,86 @@
simulation =
(initial_conditions = (u = 0.0,
v = 0.0,
w = 0.0,
P = 0.0,
Q = 0.0,
R = 0.0,
latitude = 0.0,
longitude = 0.0,
altitude = 0.0,
phi = 0.0,
theta = 0.0,
psi = 0.0
),
rocket = (stage = (dry_mass = .1,
Ix = 0.0025,
Iy = 0.84,
Iz = 0.84,
Cdrag = 0.2,
Clift = 2.3,
Cbeta = 2.3,
Cspin = 20.0,
Cmoment = 6.32,
Cdamping = 31.6,
Diameter = 0.1143,
# this is the total duration during which the
# stage is active, i.e. from the time the previous
# stage were drop until this stage is drop.
active_time = 2.0,
engine = (type = "constant_thrust",
propellant_mass = 0.1,
dry_mass = 0.05,
thrust = 10.0,
mass_flow = 0.1,
start_time = 0.0,
burn_time = 1.5,
drop_time = 0.0,
position = (x = -1.0,
y = 0.0,
z = 0.0),
direction = (x = 1.0,
y = 0.0,
z = 0.0)
)
),
stage = (dry_mass = .2,
Ix = 0.0025,
Iy = 0.84,
Iz = 0.84,
Cdrag = 0.2,
Clift = 2.3,
Cbeta = 2.3,
Cspin = 20.0,
Cmoment = 6.32,
Cdamping = 31.6,
Diameter = 0.1143,
# this is the total duration during which the
# stage is active, i.e. from the time the previous
# stage were drop until this stage is drop.
active_time = 3.0,
engine = (type = "thrust_table_data",
propellant_mass = 0.2,
dry_mass = 0.3,
thrust_data_file = "thrust.dat",
c = 2500.0, #effective exhaust velocity
start_time = 0.0,
burn_time = 2.0,
drop_time = 0.0,
position = (x = -1.0,
y = 0.0,
z = 0.0),
direction = (x = 1.0,
y = 0.0,
z = 0.0)
)
)
)
,solution = (duration = 5.0,
dt = 0.01,
precision = 0.0001)
)
@@ -0,0 +1,12 @@
TIME
0 0
10 1000
20 1500
30 1500
40 1500
50 1500
60 1500
70 1500
80 1500
90 1500
100 0
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,291 @@
\documentclass[10pt]{article}
\usepackage{vmargin}
\usepackage{amsmath}
\newcommand{\er}{\vec{e}_r}
\newcommand{\el}{\vec{e}_\lambda}
\newcommand{\eu}{\vec{e}_\mu}
\begin{document}
\section{Inertial acceleration of the vehicle mass center in body
reference frame}
Generally, the absolute acceleration of a particle $A$ in a moving
reference frame of center B is:
$$\vec{a}_A = \vec{a}_B + \vec{\alpha}\times\vec{r} +
\vec{\omega}\times(\vec{\omega}\times\vec{r})
+2\vec{\omega}\times\vec{v}_{rel} + \vec{a}_{rel}$$
Choosing an earth centered reference frame with constant angular
velocity ($\vec{\omega}^E$) and no acceleration yield to the simpler form
$$\vec{a}_{A_E} = \vec{\omega}^E_E\times(\vec{\omega}^E_E\times\vec{r}^E_E)
+2\vec{\omega}^E_E\times\vec{v}^{rel}_E + \vec{a}^{rel}_E$$
where the subscript $E$ indicate that the vector are expressed in the
earth reference frame.
Transforming this vectorial notation to matrix notation and noting
that the angular velocity of $F_B$ relative to $F_E$ is
$\vec{\omega}^B - \vec{\omega}^E$ yield to:
$$\vec{a}_{A_E} = \tilde{\omega}^E_E\tilde{\omega}^E_E\vec{r}^E_E
+2\tilde{\omega}^E_E\vec{v}^{rel}_E + \vec{a}^{rel}_E$$
We could now expressed this equation in term of component in the body
fixed reference frame.
$$\vec{a}_{A_B} = L_{BE}\vec{a}_{A_E} =
L_{BE}(\tilde{\omega}^E_E\tilde{\omega}^E_E\vec{r}^E_E
+2\tilde{\omega}^E_E\vec{v}^{rel}_E + \vec{a}^{rel}_E)$$
$$ = L_{BE}\tilde{\omega}^E_E\tilde{\omega}^E_E\vec{r}^E_E +
2L_{BE}\tilde{\omega}^E_E\vec{v}^{rel}_E + (\tilde{\omega}^B -
\tilde{\omega}^E)_B\vec{v}^{rel}_B + \vec{a}^{rel}_B$$
We could then transform
$$L_{BE}\tilde{\omega}^E_E\vec{v}^{rel}_E = (L_{BE}\tilde{\omega}^E_E
L_{EB})(L_{BE}\vec{v}^{rel}_E) = \tilde{\omega}^E_B\vec{v}^{rel}_B$$
and
$$L_{BE}\tilde{\omega}^E_E\tilde{\omega}^E_E\vec{r}^E_E =
(L_{BE}\tilde{\omega}^E_E L_{EB})(L_{BE}\tilde{\omega}^E_E
L_{EB})(L_{BE}\vec{r}^E_E) =
\tilde{\omega}^E_B\tilde{\omega}^E_B\vec{r}^E_B$$
We now have
$$\vec{a}_{A_B} = \vec{a}^{rel}_B + (\tilde{\omega}^B -
\tilde{\omega}^E)_B\vec{v}^E_B +
\tilde{\omega}^E_B\tilde{\omega}^E_B\vec{r}^E_B +
2\tilde{\omega}^E_B\vec{v}^{rel}_B$$
which simplify to
$$\vec{a}_{A_B} = \vec{a}^{rel}_B + (\tilde{\omega}^B +
\tilde{\omega}^E)_B\vec{v}^E_B +
\tilde{\omega}^E_B\tilde{\omega}^E_B\vec{r}^E_B$$
Defining vector component in $F_B$
$$\vec{v}^E_B = \begin{bmatrix}u\\v\\w\end{bmatrix}$$
$$\vec{\omega}^B_B = \begin{bmatrix}p\\q\\r\end{bmatrix}$$
$$\vec{\omega}^E_B = \begin{bmatrix}p^E_B\\q^E_B\\r^E_B\end{bmatrix} =
L_{BV}\begin{pmatrix}\cos{\lambda}\\0\\-\sin{\lambda}\end{pmatrix}\omega^E$$
and matrix notation of angular velocity
$$\tilde{\omega}^B_B =
\begin{bmatrix}0&-r&q\\r&0&-p\\q&p&0\end{bmatrix}$$
$$\tilde{\omega}^E_B =
\begin{bmatrix}0&-r^E_B&q^E_B\\r^E_B&0&-p^E_B\\q^E_B&p^E_B&0\end{bmatrix}$$
\section{Acceleration of vehicle mass center espressed in a spherical
coordinate system relative to rotating earth}
The spherical coordinate system is compose of the three vector
($\er$, $\el$, $\eu$), where $\er$ point in the direction of the mass
center of the vehicle, $\el$ point in the north direction and is
perpendicular to $\er$, $\eu$ point east and is perpendicular to both
previous vectors. We could also define the direction of $\er$ with two
angle, $\mu$ is the angle between the equatorial projection of $\er$
and a reference meridian on the earth. $\lambda$ is the angle between
$\er$ and the equator. We could then define the relative velocity and
acceleration of the point C relative to earth by:
$$\vec{v}_{rel} = \dot{r}\er + r\dot{\mu}\cos{\lambda}\eu + r\dot{\lambda}\el$$
\begin{align*}
\vec{a}_{rel} = & (\ddot{r} - r\dot{\lambda}^2 -
r\dot{\mu}^2\cos^2{\lambda})\er +\\
& ((2\dot{r}\dot{\mu} + r\ddot{\mu})\cos{\lambda} -
2r\dot{\mu}\dot{\lambda}\sin{\lambda})\eu +\\
& (2\dot{r}\dot{\lambda} + r\ddot{\lambda} +
r\dot{\mu}^2\sin{\lambda}\cos{\lambda})\el
\end{align*}
We can now derive the inertial velocity and acceleration of C:
\begin{align*}
\vec{v}_C & = \vec{v}_O + \vec{v}_{rel} + \vec{\omega}\times\vec{r}\\
& = \dot{r}\er + r\dot{\mu}\cos{\lambda}\eu +
r\dot{\lambda}\el + \omega\vec{k}\times r\er\\
& = \dot{r}\er + r\cos{\lambda}(\dot{\mu} + \omega)\eu
+ r\dot{\lambda}\el
\end{align*}
$$\vec{a}_C = \vec{a}_O + \vec{\alpha}\times\vec{r} +
\vec{\omega}\times(\vec{\omega}\times\vec{r})
+2\vec{\omega}\times\vec{v}_{rel} + \vec{a}_{rel}$$
Each term will be evaluate separatly:
\begin{align*}
\vec{\omega}\times(\vec{\omega}\times\vec{r}) & =
\omega\vec{k}\times(\omega\vec{k}\times r\er)\\
& = \omega\vec{k}\times(\omega r\cos{\lambda}\eu)\\
& = \omega^2r\cos{\lambda}(-\cos{\lambda}\er+\sin{\lambda}\el)\\
& = -\omega^2r\cos^2{\lambda}\er + \omega^2r\cos{\lambda}\sin{\lambda}\el
\end{align*}
\begin{align*}
\vec{\omega}\times\vec{v}_{rel} & = \omega\vec{k}\times(\dot{r}\er +
r\dot{\mu}\cos{\lambda}\eu + r\dot{\lambda}\el)\\
& = \omega\dot{r}\cos{\lambda}\eu + \omega
r\dot{\mu}\cos{\lambda}(-\cos{\lambda}\er + \sin{\lambda}\el) +
\omega r\dot{\lambda}(-\cos{\lambda})\eu\\
& = \omega\cos{\lambda}(\dot{r}-r\dot{\lambda})\eu - \omega
r\dot{\mu}\cos^2{\lambda}\er + \omega r\dot{\mu}\cos{\lambda}\sin{\lambda}\el
\end{align*}
The inertial acceleration of C is then:
\begin{align*}
\vec{a}_C = & (\ddot{r} - r\dot{\lambda}^2 -
r\dot{\mu}^2\cos^2{\lambda} - 2\omega
r\dot{\mu}\cos^2{\lambda} - \omega^2r\cos^2{\lambda})\er\\
& + ((2\dot{r}\dot{\mu} + r\ddot{\mu})\cos{\lambda} -
2r\dot{\mu}\dot{\lambda}\sin{\lambda}
+ 2\omega\cos{\lambda}(\dot{r}-r\dot{\lambda})\eu\\
& + (2\dot{r}\dot{\lambda} + r\ddot{\lambda} +
r\dot{\mu}^2\sin{\lambda}\cos{\lambda} +2\omega
r\dot{\mu}\cos{\lambda}\sin{\lambda} +
\omega^2r\cos{\lambda}\sin{\lambda})\el
\end{align*}
which simplify to:
\begin{align*}
\vec{a}_C = & (\ddot{r} - r\dot{\lambda}^2 -
r(\omega+\dot{\mu})^2\cos^2{\lambda})\er\\
& + ((2\dot{r}\dot{\mu} + r\ddot{\mu})\cos{\lambda} -
2r\dot{\mu}\dot{\lambda}\sin{\lambda}
+ 2\omega\cos{\lambda}(\dot{r}-r\dot{\lambda})\eu\\
& + (2\dot{r}\dot{\lambda} + r\ddot{\lambda} +
r\sin{\lambda}\cos{\lambda}(\omega+\dot{\mu})^2)\el
\end{align*}
We must now project the inertial acceleration from this vehicled
carried frame to the bidy fixed frame with the conversion matrix based
on the euler angle which define the angular position of $F_B$ relative
to $F_V$.
$$L_{BV} = \begin{bmatrix} \cos{\theta}\cos{\psi}&
\cos{\theta}\sin{\psi}& -\sin{\theta}\\
\sin{\phi}\sin{\theta}\cos{\psi}-\cos{\phi}\sin{\psi}&
\sin{\phi}\sin{\theta}\sin{\psi}+\cos{\phi}\cos{\psi}&
\sin{\phi}\cos{\theta}\\
\cos{\phi}\sin{\theta}\cos{\psi}+\sin{\phi}\sin{\psi}&
\cos{\phi}\sin{\theta}\sin{\psi}-\sin{\phi}\cos{\psi}&
\cos{\phi}\cos{\theta}
\end{bmatrix}
$$
\begin{align*}
\vec{a}_{C_B} & = L_{BV}\vec{a}_C\\
& = L_{BV}(\vec{\omega}\times(\vec{\omega}\times\vec{r})
+ 2\vec{\omega}\times\vec{v}_{rel} + \vec{a}_{rel})\\
& = L_{BV}\begin{bmatrix}r\cos{\lambda}\sin{\lambda}\\ 0\\
-r\cos^2{\lambda}\end{bmatrix}\omega^2 +
2\vec{\omega}^E_B\times\vec{v}_{rel_B} +
\vec{a}_{rel_B} + (\vec{\omega}^B -
\vec{\omega}^E)_B\times\vec{v}^E_B \\
& = L_{BV}\begin{bmatrix}r\cos{\lambda}\sin{\lambda}\\ 0\\
-r\cos^2{\lambda}\end{bmatrix}\omega^2 +
\vec{a}_{rel_B} + (\vec{\omega}^B +
\vec{\omega}^E)_B\times\vec{v}^E_B\\
& = \begin{bmatrix}\dot{u}\\\dot{v}\\\dot{w}\end{bmatrix} +
\begin{bmatrix}c_x\\c_y\\c_z\end{bmatrix} +
\begin{bmatrix}(q + q^E_B)w - (r + r^E_B)v\\
(r + r^E_B)u - (p + p^E_B)w\\
(p + p^E_B)v - (q + q^E_B)u\end{bmatrix}
\end{align*}
We will also use the moment equation:
\begin{align*}
L & = I_x\dot{p} - (I_y - I_z)qr\\
M & = I_y\dot{q} - (I_z - I_x)rp\\
N & = I_z\dot{r} - (I_x - I_y)pq
\end{align*}
\section{System of equation}
\subsection{Independant variable}
\begin{align*}
(\phi, \theta, \psi)\quad & \text{Euler angle defining orientation of the
vehicle relative to $F_V$}\\
(u, v, w)\quad & \text{Velocity of the vehicle relative to earth}\\
(p, q, r)\quad & \text{Absolute angle rate}\\
(\lambda, \mu, R)\quad & \text{Position of the rocket relative to earth}\\
(p^E_B, q^E_B, r^E_B)\quad & \text{Earth angular velocity in body axis}\\
(P, Q, R) \quad & \text{Relative angular velocity of body relative ro $F_V$
expressed in $F_B$}
\end{align*}
\subsection{List of equations}
$$X - mg\sin{\theta} = m(\dot{u} + c_x + (q^E_B+q)w - (r^E_B+r)v)$$
$$Y + mg\cos{\theta}\sin{\phi} = m(\dot{v} + c_y + (r^E_B+r)u - (p^E_B+p)w)$$
$$Z + mg\cos{\theta}\cos{\phi} = m(\dot{w} + c_z + (p^E_B+pvw -
(q^E_B+q)u)$$
\begin{align*}
L & = I_x\dot{p} - (I_y - I_z)qr\\
M & = I_y\dot{q} - (I_z - I_x)rp\\
N & = I_z\dot{r} - (I_x - I_y)pq
\end{align*}
$$\begin{bmatrix}\dot{\phi}\\\dot{\theta}\\\dot{\psi}\end{bmatrix} =
\begin{bmatrix}1&\sin{\phi}\tan{\theta}&\cos{\phi}\tan{\theta}\\
0&\cos{\phi}&-\sin{\phi}\\
0&\sin{\phi}\sec{\theta}&\cos{\phi}\sec{\theta}\end{bmatrix}
\begin{bmatrix}P\\Q\\R\end{bmatrix}$$
$$\begin{bmatrix}P\\Q\\R\end{bmatrix} =
\begin{bmatrix}p\\q\\r\end{bmatrix} -
L_{BV}\begin{bmatrix}(\omega^E -
\dot{\mu})\cos{\lambda}\\-\dot{\lambda}\\
-(\omega^E + \dot{\mu})\sin{\lambda}\end{bmatrix}$$
$$\begin{bmatrix}r\dot{\lambda}\\r\dot{\mu}\cos{\lambda}\\\dot{r}
\end{bmatrix} = L_{VB}\begin{bmatrix}u\\v\\w\end{bmatrix}$$
$$\vec{\omega}^E_B = \begin{bmatrix}p^E_B\\q^E_B\\r^E_B\end{bmatrix} =
L_{BV}\begin{pmatrix}\cos{\lambda}\\0\\-\sin{\lambda}\end{pmatrix}\omega^E$$
$$L_{VB} = \begin{bmatrix}\cos{\theta}\cos{\psi}&
\sin{\phi}\sin{\theta}\cos{\psi} - \cos{\phi}\sin{\psi}&
\cos{\phi}\sin{\theta}\cos{\psi} + \sin{\phi}\sin{\psi}\\
\cos{\theta}\sin{\psi}&
\sin{\phi}\sin{\theta}\sin{\psi} + \cos{\phi}\cos{\psi}&
\cos{\phi}\sin{\theta}\sin{\psi} - \sin{\phi}\cos{\psi}\\
-\sin{\theta}&
\sin{\phi}\cos{\theta}&
\cos{\phi}\cos{\theta}\end{bmatrix}$$
\end{document}