This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added cr3bp_char_quant and its tests (#1570)
* added cr3bp_char_quant and its tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * attempt to fix tox error * Updated to use bodies.Body * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added new lines and SystemChars works * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed /s and removed test for now * Added test and the /contrib plotly html files * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added tests for cr3bp_char_quant * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * completed changes * added cr3bp_char_quant and its tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * attempt to fix tox error * Updated to use bodies.Body * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added new lines and SystemChars works * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed /s and removed test for now * Added test and the /contrib plotly html files * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added tests for cr3bp_char_quant * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * completed changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d011e12
commit 47ec9c0
Showing
8 changed files
with
403 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
46 changes: 46 additions & 0 deletions
46
src/poliastro/core/threebody/cr3bp_quantities_calculations.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
""" | ||
@author: Dhruv Jain, Multi-Body Dynamics Research Group, Purdue University | ||
""" | ||
|
||
|
||
def calculate_mu(mu1, mu2): | ||
"""Calculate mu of CR3BP | ||
Parameters | ||
---------- | ||
mu1: float, km^3*s^-2 | ||
mu of P1 | ||
mu2: float, km^3*s^-2 | ||
mu of P2 | ||
Returns | ||
------- | ||
mu: float, dimensionless | ||
mu2/(mu1+mu2), mu2<mu1 | ||
""" | ||
return mu2 / (mu1 + mu2) | ||
|
||
|
||
def calculate_tstar(mu1, mu2, lstar): | ||
r"""Calculate t* of CR3BP | ||
Parameters | ||
---------- | ||
mu1: float, km^3*s^-2 | ||
mu of P1 | ||
mu2: float, km^3*s^-2 | ||
mu of P2 | ||
lstar: float, km | ||
Characterisitc length of P1 - P2 system | ||
Returns | ||
------- | ||
tstar: float, sec | ||
Characterisitc time of P1-P2 system | ||
Explicitly converted to u.s as mu1 and mu2 may be of different units | ||
.. math:: | ||
\sqrt{\frac{l*^3}{M1+M2}} | ||
""" | ||
return (lstar**3 / (mu1 + mu2)) ** 0.5 |
Oops, something went wrong.